Skip to content

Commit

Permalink
feat: create a simple Sign API example on top of the WS client
Browse files Browse the repository at this point in the history
This client implements pairing and session flows:
https://specs.walletconnect.com/2.0/specs/clients/core/pairing
https://specs.walletconnect.com/2.0/specs/clients/sign/session-proposal

Supported actions:
- pairing
- session establishment
- session delete
- ping

This example could be expanded to handle multiple sessions.

Caution:
The purpose of this example is demonstration of core Sign API
functionality. However, it shouldn't be used in production, as might
exhibit some race conditions such as with session deletion, etc...
  • Loading branch information
silvestrst-crypto committed Dec 19, 2023
1 parent b0b3699 commit fc737a0
Show file tree
Hide file tree
Showing 2 changed files with 525 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sign_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ url = "2.4"
serde_json = { version = "1.0", features = ["preserve_order"] }

anyhow = "1"
clap = { version = "4.4", features = ["derive"] }
chrono = "0.4"
dashmap = "5.5"
relay_client = { path = "../relay_client" }
relay_rpc = { path = "../relay_rpc" }
tokio = { version = "1.22", features = ["full"] }

[[example]]
name = "session"
Loading

0 comments on commit fc737a0

Please sign in to comment.