Add support for ws in subxt-cli (#579)

* cli: Support ws or wss connection via jsonrpsee

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Handle `http` connections via `ureq`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Use Jsonrpsee HTTP client

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Remove `node.to_string()` calls

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2022-06-24 15:50:27 +03:00
committed by GitHub
parent 6d7a6c9388
commit f97b8963f5
2 changed files with 75 additions and 46 deletions
+4 -4
View File
@@ -21,8 +21,6 @@ subxt-codegen = { version = "0.22.0", path = "../codegen" }
subxt-metadata = { version = "0.22.0", path = "../metadata" }
# parse command line args
structopt = "0.3.25"
# make the request to a substrate node to get the metadata
ureq = { version = "2.2.0", features = ["json"] }
# colourful error reports
color-eyre = "0.6.1"
# serialize the metadata
@@ -35,7 +33,9 @@ hex = "0.4.3"
frame-metadata = { version = "15.0.0", features = ["v14", "std"] }
# decode bytes into the metadata types
scale = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
# handle urls to communicate with substrate nodes
url = { version = "2.2.2", features = ["serde"] }
# generate the item mod for codegen
syn = "1.0.80"
# communicate with the substrate nodes
jsonrpsee = { version = "0.14.0", features = ["async-client", "client-ws-transport", "http-client"] }
# async runtime
tokio = { version = "1.8", features = ["rt-multi-thread", "macros", "time"] }