Skip to content

Commit

Permalink
feat(wallet-integration): server and API (#362)
Browse files Browse the repository at this point in the history
* feat(wallet-integration): implement server and API

* feat(wallet-integration): add a few tests to server. Needs more

* refactor(wallet-integration): just use call_data, remove data types

* feat(wallet-integration): add frontend type for flexible serving

* feat(wallet-integration): StateHandler in WalletIntegrationManager. Add terminate method

* refactor(wallet-integration): move to module with pop-cli crate

* feat(wallet-integration): server-side error handling, update port to 9090

* refactor(wallet-integration): restructure server for easier use in thread

* fix(wallet-integration): remove invalid fn `finish`

* docs(wallet-integration): inline comments

* test(wallet-integration): unit tests for wallet-integration server. Add new frontend type

* feat(wallet-integration): two new routes: error and terminate

* refactor(wallet-integration): consistent comments, remove unnecessary code in tests

* feat: add TransactionData::new

* refactor(wallet-integration: shutdown channel error handling, terminate helper, take_error and TranscationData::new tests

* chore: clippy warning
  • Loading branch information
peterwht authored Dec 9, 2024
1 parent 258a4b2 commit 7705462
Show file tree
Hide file tree
Showing 5 changed files with 678 additions and 10 deletions.
141 changes: 131 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ console = "0.15"
os_info = { version = "3", default-features = false }
strum = "0.26"
strum_macros = "0.26"

# wallet-integration
axum = "0.7.9"
tower-http = "0.6.2"
5 changes: 5 additions & 0 deletions crates/pop-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ duct.workspace = true
env_logger.workspace = true
os_info.workspace = true
reqwest.workspace = true
serde = { workspace = true, version = "1.0", features = ["derive"] }
serde_json.workspace = true
tempfile.workspace = true
tokio.workspace = true
Expand Down Expand Up @@ -46,6 +47,10 @@ pop-telemetry = { path = "../pop-telemetry", version = "0.5.0", optional = true
# common
pop-common = { path = "../pop-common", version = "0.5.0" }

# wallet-integration
axum.workspace = true
tower-http = { workspace = true, features = ["fs"] }

[dev-dependencies]
assert_cmd.workspace = true
predicates.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/pop-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mod cli;
mod commands;
mod common;
mod style;
mod wallet_integration;

#[tokio::main]
async fn main() -> Result<()> {
Expand Down
Loading

0 comments on commit 7705462

Please sign in to comment.