Merge branch 'master' into tadeohepperle/support-decoding-signed-extensions

This commit is contained in:
Tadeo hepperle
2023-10-24 13:07:46 +02:00
27 changed files with 730 additions and 481 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ jobs:
run: rustup target add wasm32-unknown-unknown run: rustup target add wasm32-unknown-unknown
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: build substrate binary - name: build substrate binary
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
override: true override: true
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Cargo test - name: Cargo test
uses: actions-rs/cargo@v1.0.3 uses: actions-rs/cargo@v1.0.3
+14 -11
View File
@@ -40,7 +40,7 @@ jobs:
override: true override: true
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Install cargo-hack - name: Install cargo-hack
uses: baptiste0928/cargo-install@v2 uses: baptiste0928/cargo-install@v2
@@ -65,8 +65,8 @@ jobs:
- name: Cargo check subxt-signer - name: Cargo check subxt-signer
run: | run: |
cargo check -p subxt-signer cargo check -p subxt-signer
cargo check -p subxt-signer --no-default-features --features sr25519 cargo check -p subxt-signer --no-default-features --features sr25519,native
cargo check -p subxt-signer --no-default-features --features ecdsa cargo check -p subxt-signer --no-default-features --features ecdsa,native
# We can't enable web features here, so no cargo hack. # We can't enable web features here, so no cargo hack.
- name: Cargo check subxt-lightclient - name: Cargo check subxt-lightclient
@@ -92,7 +92,7 @@ jobs:
override: true override: true
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
# Check WASM examples, which aren't a part of the workspace and so are otherwise missed: # Check WASM examples, which aren't a part of the workspace and so are otherwise missed:
- name: Cargo check WASM examples - name: Cargo check WASM examples
@@ -115,7 +115,7 @@ jobs:
components: rustfmt components: rustfmt
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Cargo fmt - name: Cargo fmt
uses: actions-rs/cargo@v1.0.3 uses: actions-rs/cargo@v1.0.3
@@ -141,7 +141,7 @@ jobs:
override: true override: true
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Check internal documentation links - name: Check internal documentation links
run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc -vv --workspace --no-deps --document-private-items run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc -vv --workspace --no-deps --document-private-items
@@ -170,7 +170,7 @@ jobs:
override: true override: true
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Install cargo-nextest - name: Install cargo-nextest
run: cargo install cargo-nextest run: cargo install cargo-nextest
@@ -199,7 +199,7 @@ jobs:
override: true override: true
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Install cargo-nextest - name: Install cargo-nextest
run: cargo install cargo-nextest run: cargo install cargo-nextest
@@ -229,7 +229,7 @@ jobs:
override: true override: true
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1.0.3 uses: actions-rs/cargo@v1.0.3
@@ -240,6 +240,9 @@ jobs:
wasm_tests: wasm_tests:
name: Test (WASM) name: Test (WASM)
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
# Set timeout for wasm tests to be much bigger than the default 20 secs.
WASM_BINDGEN_TEST_TIMEOUT: 300
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -254,7 +257,7 @@ jobs:
uses: browser-actions/setup-chrome@latest uses: browser-actions/setup-chrome@latest
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Use substrate-node binary - name: Use substrate-node binary
uses: ./.github/workflows/actions/use-substrate uses: ./.github/workflows/actions/use-substrate
@@ -304,7 +307,7 @@ jobs:
override: true override: true
- name: Rust Cache - name: Rust Cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
- name: Run clippy - name: Run clippy
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
Generated
+42 -43
View File
@@ -2078,9 +2078,9 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee" name = "jsonrpsee"
version = "0.20.1" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ad9b31183a8bcbe843e32ca8554ad2936633548d95a7bb6a8e14c767dea6b05" checksum = "de902baa44bf34a58b1a4906f8b840d7d60dcec5f41fe08b4dbc14cf9efa821c"
dependencies = [ dependencies = [
"jsonrpsee-client-transport", "jsonrpsee-client-transport",
"jsonrpsee-core", "jsonrpsee-core",
@@ -2090,9 +2090,9 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee-client-transport" name = "jsonrpsee-client-transport"
version = "0.20.1" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97f2743cad51cc86b0dbfe316309eeb87a9d96a3d7f4dd7a99767c4b5f065335" checksum = "58d9851f8f5653e0433a898e9032bde4910b35d625bd9dcf33ef6e36e7c3d456"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
@@ -2112,9 +2112,9 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee-core" name = "jsonrpsee-core"
version = "0.20.1" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35dc957af59ce98373bcdde0c1698060ca6c2d2e9ae357b459c7158b6df33330" checksum = "51f45d37af23707750136379f6799e76ebfcf2d425ec4e36d0deb7921da5e65c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-lock", "async-lock",
@@ -2135,9 +2135,9 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee-http-client" name = "jsonrpsee-http-client"
version = "0.20.1" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dd865d0072764cb937b0110a92b5f53e995f7101cb346beca03d93a2dea79de" checksum = "02308562f2e8162a32f8d6c3dc19c29c858d5d478047c886a5c3c25b5f7fa868"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"hyper", "hyper",
@@ -2155,9 +2155,9 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee-types" name = "jsonrpsee-types"
version = "0.20.1" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa9e25aec855b2a7d3ed90fded6c41e8c3fb72b63f071e1be3f0004eba19b625" checksum = "05eaff23af19f10ba6fbb76519bed6da4d3b9bbaef13d39b7c2b6c14e532d27e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"beef", "beef",
@@ -2790,9 +2790,9 @@ dependencies = [
[[package]] [[package]]
name = "primitive-types" name = "primitive-types"
version = "0.12.1" version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2"
dependencies = [ dependencies = [
"fixed-hash", "fixed-hash",
"impl-codec", "impl-codec",
@@ -2837,9 +2837,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.67" version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@@ -2990,14 +2990,14 @@ dependencies = [
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.9.6" version = "1.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
"regex-automata 0.3.9", "regex-automata 0.4.3",
"regex-syntax 0.7.5", "regex-syntax 0.8.2",
] ]
[[package]] [[package]]
@@ -3011,13 +3011,13 @@ dependencies = [
[[package]] [[package]]
name = "regex-automata" name = "regex-automata"
version = "0.3.9" version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
"regex-syntax 0.7.5", "regex-syntax 0.8.2",
] ]
[[package]] [[package]]
@@ -3028,9 +3028,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.7.5" version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]] [[package]]
name = "ring" name = "ring"
@@ -3076,9 +3076,9 @@ dependencies = [
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "0.36.15" version = "0.36.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"errno", "errno",
@@ -3259,9 +3259,9 @@ dependencies = [
[[package]] [[package]]
name = "scale-info" name = "scale-info"
version = "2.9.0" version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"cfg-if", "cfg-if",
@@ -3273,9 +3273,9 @@ dependencies = [
[[package]] [[package]]
name = "scale-info-derive" name = "scale-info-derive"
version = "2.9.0" version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
@@ -4420,9 +4420,9 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.49" version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
@@ -4449,9 +4449,9 @@ dependencies = [
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.49" version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -4523,9 +4523,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.32.0" version = "1.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes", "bytes",
@@ -4631,11 +4631,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.37" version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [ dependencies = [
"cfg-if",
"log", "log",
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
@@ -4644,9 +4643,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-attributes" name = "tracing-attributes"
version = "0.1.26" version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -4655,9 +4654,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-core" name = "tracing-core"
version = "0.1.31" version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"valuable", "valuable",
@@ -5179,7 +5178,7 @@ dependencies = [
"memoffset 0.8.0", "memoffset 0.8.0",
"paste", "paste",
"rand 0.8.5", "rand 0.8.5",
"rustix 0.36.15", "rustix 0.36.16",
"wasmtime-asm-macros", "wasmtime-asm-macros",
"wasmtime-environ", "wasmtime-environ",
"wasmtime-jit-debug", "wasmtime-jit-debug",
+7 -7
View File
@@ -58,12 +58,12 @@ heck = "0.4.1"
impl-serde = { version = "0.4.0" } impl-serde = { version = "0.4.0" }
jsonrpsee = { version = "0.20" } jsonrpsee = { version = "0.20" }
pretty_assertions = "1.4.0" pretty_assertions = "1.4.0"
primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "scale-info", "serde"] } primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "serde"] }
proc-macro-error = "1.0.4" proc-macro-error = "1.0.4"
proc-macro2 = "1.0.67" proc-macro2 = "1.0.69"
quote = "1.0.33" quote = "1.0.33"
regex = "1.9.6" regex = "1.10.2"
scale-info = "2.9.0" scale-info = "2.10.0"
scale-value = "0.12.0" scale-value = "0.12.0"
scale-bits = "0.4.0" scale-bits = "0.4.0"
scale-decode = "0.9.0" scale-decode = "0.9.0"
@@ -71,9 +71,9 @@ scale-encode = "0.5.0"
serde = { version = "1.0.188" } serde = { version = "1.0.188" }
serde_json = { version = "1.0.107" } serde_json = { version = "1.0.107" }
syn = { version = "2.0.15", features = ["full", "extra-traits"] } syn = { version = "2.0.15", features = ["full", "extra-traits"] }
thiserror = "1.0.48" thiserror = "1.0.50"
tokio = { version = "1.32", default-features = false } tokio = { version = "1.33", default-features = false }
tracing = "0.1.34" tracing = "0.1.40"
tracing-wasm = "0.2.1" tracing-wasm = "0.2.1"
tracing-subscriber = "0.3.17" tracing-subscriber = "0.3.17"
trybuild = "1.0.85" trybuild = "1.0.85"
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
[dependencies] [dependencies]
subxt = { path = "../../subxt" } subxt = { path = "../../subxt" }
subxt-signer = { path = "../../signer", features = ["subxt"] } subxt-signer = { path = "../../signer" }
futures = { version = "0.3.27", default-features = false, features = ["std"] } futures = { version = "0.3.27", default-features = false, features = ["std"] }
tokio = { version = "1.28", features = ["macros", "time", "rt-multi-thread"] } tokio = { version = "1.28", features = ["macros", "time", "rt-multi-thread"] }
sp-core = "21.0.0" sp-core = "21.0.0"
+4 -3
View File
@@ -15,7 +15,7 @@ description = "Sign extrinsics to be submitted by Subxt"
keywords = ["parity", "subxt", "extrinsic", "signer"] keywords = ["parity", "subxt", "extrinsic", "signer"]
[features] [features]
default = ["sr25519", "ecdsa"] default = ["sr25519", "ecdsa", "subxt", "native"]
# Pick the signer implementation(s) you need by enabling the # Pick the signer implementation(s) you need by enabling the
# corresponding features. Note: I had more difficulties getting # corresponding features. Note: I had more difficulties getting
@@ -30,11 +30,12 @@ subxt = ["dep:subxt"]
# The getrandom package is used via schnorrkel. We need to enable the JS # The getrandom package is used via schnorrkel. We need to enable the JS
# feature on it if compiling for the web. # feature on it if compiling for the web.
web = ["getrandom/js"] web = ["getrandom/js", "subxt?/web"]
native = ["subxt?/native"]
[dependencies] [dependencies]
subxt = { workspace = true, optional = true, default-features = false }
regex = { workspace = true } regex = { workspace = true }
subxt = { workspace = true, optional = true }
hex = { workspace = true } hex = { workspace = true }
codec = { package = "parity-scale-codec", workspace = true, features = ["derive"] } codec = { package = "parity-scale-codec", workspace = true, features = ["derive"] }
sp-core-hashing = { workspace = true } sp-core-hashing = { workspace = true }
+2
View File
@@ -1,3 +1,5 @@
# Subxt-signer # Subxt-signer
This library exposes a small, WASM compatible signer implementation which can be used in conjunction with Subxt to sign transactions. This library exposes a small, WASM compatible signer implementation which can be used in conjunction with Subxt to sign transactions.
This library can be used without Subxt by disabling the `subxt` feature flag, which is enabled by default.
+6
View File
@@ -38,3 +38,9 @@ pub use secrecy::{ExposeSecret, SecretString};
// SecretUri's can be parsed from strings and used to generate key pairs. // SecretUri's can be parsed from strings and used to generate key pairs.
// DeriveJunctions are the "path" part of these SecretUris. // DeriveJunctions are the "path" part of these SecretUris.
pub use crypto::{DeriveJunction, SecretUri, SecretUriError, DEV_PHRASE}; pub use crypto::{DeriveJunction, SecretUri, SecretUriError, DEV_PHRASE};
#[cfg(any(
all(feature = "web", feature = "native"),
not(any(feature = "web", feature = "native"))
))]
compile_error!("subxt-signer: exactly one of the 'web' and 'native' features should be used.");
+1 -1
View File
@@ -103,7 +103,7 @@ sp-core = { workspace = true }
sp-keyring = { workspace = true } sp-keyring = { workspace = true }
sp-runtime = { workspace = true } sp-runtime = { workspace = true }
assert_matches = { workspace = true } assert_matches = { workspace = true }
subxt-signer = { path = "../signer", features = ["subxt"] } subxt-signer = { path = "../signer" }
# Tracing subscriber is useful for light-client examples to ensure that # Tracing subscriber is useful for light-client examples to ensure that
# the `bootNodes` and chain spec are configured correctly. If all is fine, then # the `bootNodes` and chain spec are configured correctly. If all is fine, then
# the light-client wlll emit INFO logs with # the light-client wlll emit INFO logs with
+73 -51
View File
@@ -71,15 +71,29 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for LegacyBackend<T> {
key: Vec<u8>, key: Vec<u8>,
at: T::Hash, at: T::Hash,
) -> Result<StreamOfResults<Vec<u8>>, Error> { ) -> Result<StreamOfResults<Vec<u8>>, Error> {
Ok(StreamOf(Box::pin(StorageFetchDescendantKeysStream { let keys = StorageFetchDescendantKeysStream {
at, at,
key, key,
methods: self.methods.clone(), methods: self.methods.clone(),
done: Default::default(), done: Default::default(),
keys: Default::default(),
keys_fut: Default::default(), keys_fut: Default::default(),
pagination_start_key: None, pagination_start_key: None,
}))) };
let keys = keys.flat_map(|keys| {
match keys {
Err(e) => {
// If there's an error, return that next:
Either::Left(stream::iter(std::iter::once(Err(e))))
}
Ok(keys) => {
// Or, stream each "ok" value:
Either::Right(stream::iter(keys.into_iter().map(Ok)))
}
}
});
Ok(StreamOf(Box::pin(keys)))
} }
async fn storage_fetch_descendant_values( async fn storage_fetch_descendant_values(
@@ -92,15 +106,14 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for LegacyBackend<T> {
key, key,
methods: self.methods.clone(), methods: self.methods.clone(),
done: Default::default(), done: Default::default(),
keys: Default::default(),
keys_fut: Default::default(), keys_fut: Default::default(),
pagination_start_key: Default::default(), pagination_start_key: None,
}; };
Ok(StreamOf(Box::pin(StorageFetchDescendantValuesStream { Ok(StreamOf(Box::pin(StorageFetchDescendantValuesStream {
keys: keys_stream, keys: keys_stream,
next_key: None, results_fut: None,
value_fut: Default::default(), results: Default::default(),
}))) })))
} }
@@ -319,6 +332,9 @@ where
}) })
} }
/// How many keys/values to fetch at once.
const STORAGE_PAGE_SIZE: u32 = 32;
/// This provides a stream of values given some prefix `key`. It /// This provides a stream of values given some prefix `key`. It
/// internally manages pagination and such. /// internally manages pagination and such.
pub struct StorageFetchDescendantKeysStream<T: Config> { pub struct StorageFetchDescendantKeysStream<T: Config> {
@@ -329,33 +345,23 @@ pub struct StorageFetchDescendantKeysStream<T: Config> {
pagination_start_key: Option<Vec<u8>>, pagination_start_key: Option<Vec<u8>>,
// Keys, future and cached: // Keys, future and cached:
keys_fut: Option<Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>, Error>> + Send + 'static>>>, keys_fut: Option<Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>, Error>> + Send + 'static>>>,
keys: VecDeque<Vec<u8>>,
// Set to true when we're done: // Set to true when we're done:
done: bool, done: bool,
} }
impl<T: Config> std::marker::Unpin for StorageFetchDescendantKeysStream<T> {} impl<T: Config> std::marker::Unpin for StorageFetchDescendantKeysStream<T> {}
// How many storage keys to ask for each time.
const STORAGE_FETCH_PAGE_SIZE: u32 = 32;
impl<T: Config> Stream for StorageFetchDescendantKeysStream<T> { impl<T: Config> Stream for StorageFetchDescendantKeysStream<T> {
type Item = Result<Vec<u8>, Error>; type Item = Result<Vec<Vec<u8>>, Error>;
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> { fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
loop {
let mut this = self.as_mut(); let mut this = self.as_mut();
loop {
// We're already done. // We're already done.
if this.done { if this.done {
return Poll::Ready(None); return Poll::Ready(None);
} }
// We have some keys to hand back already, so do that. // Poll future to fetch next keys.
if let Some(key) = this.keys.pop_front() {
return Poll::Ready(Some(Ok(key)));
}
// Else, we don't have any keys, but we have a fut to get more so poll it.
if let Some(mut keys_fut) = this.keys_fut.take() { if let Some(mut keys_fut) = this.keys_fut.take() {
let Poll::Ready(keys) = keys_fut.poll_unpin(cx) else { let Poll::Ready(keys) = keys_fut.poll_unpin(cx) else {
this.keys_fut = Some(keys_fut); this.keys_fut = Some(keys_fut);
@@ -371,9 +377,8 @@ impl<T: Config> Stream for StorageFetchDescendantKeysStream<T> {
} }
// The last key is where we want to paginate from next time. // The last key is where we want to paginate from next time.
this.pagination_start_key = keys.last().cloned(); this.pagination_start_key = keys.last().cloned();
// Got new keys; loop around to start returning them. // return all of the keys from this run.
this.keys = keys.into_iter().collect(); return Poll::Ready(Some(Ok(keys)));
continue;
} }
Err(e) => { Err(e) => {
// Error getting keys? Return it. // Error getting keys? Return it.
@@ -391,7 +396,7 @@ impl<T: Config> Stream for StorageFetchDescendantKeysStream<T> {
methods methods
.state_get_keys_paged( .state_get_keys_paged(
&key, &key,
STORAGE_FETCH_PAGE_SIZE, STORAGE_PAGE_SIZE,
pagination_start_key.as_deref(), pagination_start_key.as_deref(),
Some(at), Some(at),
) )
@@ -406,10 +411,18 @@ impl<T: Config> Stream for StorageFetchDescendantKeysStream<T> {
pub struct StorageFetchDescendantValuesStream<T: Config> { pub struct StorageFetchDescendantValuesStream<T: Config> {
// Stream of keys. // Stream of keys.
keys: StorageFetchDescendantKeysStream<T>, keys: StorageFetchDescendantKeysStream<T>,
next_key: Option<Vec<u8>>, // Then we track the future to get the values back for each key:
// Then we track the next value: results_fut: Option<
value_fut: Pin<
Option<Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'static>>>, Box<
dyn Future<Output = Result<Option<VecDeque<(Vec<u8>, Vec<u8>)>>, Error>>
+ Send
+ 'static,
>,
>,
>,
// And finally we return each result back one at a time:
results: VecDeque<(Vec<u8>, Vec<u8>)>,
} }
impl<T: Config> Stream for StorageFetchDescendantValuesStream<T> { impl<T: Config> Stream for StorageFetchDescendantValuesStream<T> {
@@ -417,47 +430,56 @@ impl<T: Config> Stream for StorageFetchDescendantValuesStream<T> {
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> { fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
let mut this = self.as_mut(); let mut this = self.as_mut();
loop { loop {
// If we're waiting on the next value then poll that future: // If we have results back, return them one by one
if let Some(mut value_fut) = this.value_fut.take() { if let Some((key, value)) = this.results.pop_front() {
match value_fut.poll_unpin(cx) { let res = StorageResponse { key, value };
Poll::Ready(Ok(Some(value))) => { return Poll::Ready(Some(Ok(res)));
let key = this.next_key.take().expect("key should exist"); }
return Poll::Ready(Some(Ok(StorageResponse { key, value })));
// If we're waiting on the next results then poll that future:
if let Some(mut results_fut) = this.results_fut.take() {
match results_fut.poll_unpin(cx) {
Poll::Ready(Ok(Some(results))) => {
this.results = results;
continue;
} }
Poll::Ready(Ok(None)) => { Poll::Ready(Ok(None)) => {
// No value back for some key? Skip. // No values back for some keys? Skip.
continue; continue;
} }
Poll::Ready(Err(e)) => return Poll::Ready(Some(Err(e))), Poll::Ready(Err(e)) => return Poll::Ready(Some(Err(e))),
Poll::Pending => { Poll::Pending => {
this.value_fut = Some(value_fut); this.results_fut = Some(results_fut);
return Poll::Pending; return Poll::Pending;
} }
} }
} }
// Else, if we have the next key then let's start waiting on the next value. match this.keys.poll_next_unpin(cx) {
if let Some(key) = &this.next_key { Poll::Ready(Some(Ok(keys))) => {
let key = key.clone();
let methods = this.keys.methods.clone(); let methods = this.keys.methods.clone();
let at = this.keys.at; let at = this.keys.at;
let fut = async move { methods.state_get_storage(&key, Some(at)).await }; let results_fut = async move {
let keys = keys.iter().map(|k| &**k);
let values = methods.state_query_storage_at(keys, Some(at)).await?;
let values: VecDeque<_> = values
.into_iter()
.flat_map(|v| {
v.changes.into_iter().filter_map(|(k, v)| {
let v = v?;
Some((k.0, v.0))
})
})
.collect();
Ok(Some(values))
};
this.value_fut = Some(Box::pin(fut)); this.results_fut = Some(Box::pin(results_fut));
continue;
}
// Else, poll the keys stream to get the next key.
match this.keys.poll_next_unpin(cx) {
Poll::Ready(Some(Ok(key))) => {
this.next_key = Some(key);
continue; continue;
} }
Poll::Ready(Some(Err(e))) => return Poll::Ready(Some(Err(e))), Poll::Ready(Some(Err(e))) => return Poll::Ready(Some(Err(e))),
Poll::Ready(None) => return Poll::Ready(None), Poll::Ready(None) => return Poll::Ready(None),
Poll::Pending => { Poll::Pending => return Poll::Pending,
return Poll::Pending;
}
} }
} }
} }
+10 -20
View File
@@ -8,35 +8,20 @@ use crate::backend::rpc::{rpc_params, RpcClient, RpcSubscription};
use crate::metadata::Metadata; use crate::metadata::Metadata;
use crate::{Config, Error}; use crate::{Config, Error};
use codec::Decode; use codec::Decode;
use derivative::Derivative;
use primitive_types::U256; use primitive_types::U256;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
/// An interface to call the legacy RPC methods. This interface is instantiated with /// An interface to call the legacy RPC methods. This interface is instantiated with
/// some `T: Config` trait which determines some of the types that the RPC methods will /// some `T: Config` trait which determines some of the types that the RPC methods will
/// take or hand back. /// take or hand back.
#[derive(Derivative)]
#[derivative(Clone(bound = ""), Debug(bound = ""))]
pub struct LegacyRpcMethods<T> { pub struct LegacyRpcMethods<T> {
client: RpcClient, client: RpcClient,
_marker: std::marker::PhantomData<T>, _marker: std::marker::PhantomData<T>,
} }
impl<T> Clone for LegacyRpcMethods<T> {
fn clone(&self) -> Self {
Self {
client: self.client.clone(),
_marker: self._marker,
}
}
}
impl<T> std::fmt::Debug for LegacyRpcMethods<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("LegacyRpcMethods")
.field("client", &self.client)
.field("_marker", &self._marker)
.finish()
}
}
impl<T: Config> LegacyRpcMethods<T> { impl<T: Config> LegacyRpcMethods<T> {
/// Instantiate the legacy RPC method interface. /// Instantiate the legacy RPC method interface.
pub fn new(client: RpcClient) -> Self { pub fn new(client: RpcClient) -> Self {
@@ -73,7 +58,10 @@ impl<T: Config> LegacyRpcMethods<T> {
Ok(data.into_iter().map(|b| b.0).collect()) Ok(data.into_iter().map(|b| b.0).collect())
} }
/// Query historical storage entries /// Query historical storage entries in the range from the start block to the end block,
/// defaulting the end block to the current best block if it's not given. The first
/// [`StorageChangeSet`] returned has all of the values for each key, and subsequent ones
/// only contain values for any keys which have changed since the last.
pub async fn state_query_storage( pub async fn state_query_storage(
&self, &self,
keys: impl IntoIterator<Item = &[u8]>, keys: impl IntoIterator<Item = &[u8]>,
@@ -88,7 +76,9 @@ impl<T: Config> LegacyRpcMethods<T> {
.map_err(Into::into) .map_err(Into::into)
} }
/// Query historical storage entries /// Query storage entries at some block, using the best block if none is given.
/// This essentially provides a way to ask for a batch of values given a batch of keys,
/// despite the name of the [`StorageChangeSet`] type.
pub async fn state_query_storage_at( pub async fn state_query_storage_at(
&self, &self,
keys: impl IntoIterator<Item = &[u8]>, keys: impl IntoIterator<Item = &[u8]>,
+3 -18
View File
@@ -9,6 +9,7 @@
use crate::backend::rpc::{rpc_params, RpcClient, RpcSubscription}; use crate::backend::rpc::{rpc_params, RpcClient, RpcSubscription};
use crate::config::BlockHash; use crate::config::BlockHash;
use crate::{Config, Error}; use crate::{Config, Error};
use derivative::Derivative;
use futures::{Stream, StreamExt}; use futures::{Stream, StreamExt};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::collections::{HashMap, VecDeque}; use std::collections::{HashMap, VecDeque};
@@ -17,29 +18,13 @@ use std::task::Poll;
/// An interface to call the unstable RPC methods. This interface is instantiated with /// An interface to call the unstable RPC methods. This interface is instantiated with
/// some `T: Config` trait which determines some of the types that the RPC methods will /// some `T: Config` trait which determines some of the types that the RPC methods will
/// take or hand back. /// take or hand back.
#[derive(Derivative)]
#[derivative(Clone(bound = ""), Debug(bound = ""))]
pub struct UnstableRpcMethods<T> { pub struct UnstableRpcMethods<T> {
client: RpcClient, client: RpcClient,
_marker: std::marker::PhantomData<T>, _marker: std::marker::PhantomData<T>,
} }
impl<T> Clone for UnstableRpcMethods<T> {
fn clone(&self) -> Self {
Self {
client: self.client.clone(),
_marker: self._marker,
}
}
}
impl<T> std::fmt::Debug for UnstableRpcMethods<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("UnstableRpcMethods")
.field("client", &self.client)
.field("_marker", &self._marker)
.finish()
}
}
impl<T: Config> UnstableRpcMethods<T> { impl<T: Config> UnstableRpcMethods<T> {
/// Instantiate the legacy RPC method interface. /// Instantiate the legacy RPC method interface.
pub fn new(client: RpcClient) -> Self { pub fn new(client: RpcClient) -> Self {
+20 -22
View File
@@ -4,45 +4,43 @@
//! # Light Client //! # Light Client
//! //!
//! The Light Client aims to contribute to the decentralization of blockchains by providing connectivity //! The light client based interface uses _Smoldot_ to connect to a _chain_, rather than an individual
//! to the P2P network and behaving similarly to a full node. //! node. This means that you don't have to trust a specific node when interacting with some chain.
//! //!
//! To enable this functionality, the unstable-light-client feature flag needs to be enabled. //! This feature is currently unstable. Use the `unstable-light-client` feature flag to enable it.
//! To enable light client for WASM environments, also enable the web feature flag. //! To use this in WASM environments, also enable the `web` feature flag.
//! //!
//! To connect to a blockchain network, the Light Client requires a trusted sync state of the network, named "chain spec". //! To connect to a blockchain network, the Light Client requires a trusted sync state of the network,
//! This can be obtained by making a `sync_state_genSyncSpec` RPC call to a trusted node. //! known as a _chain spec_. One way to obtain this is by making a `sync_state_genSyncSpec` RPC call to a
//! trusted node belonging to the chain that you wish to interact with.
//! //!
//! The following is an example of fetching the chain spec from a local running onde on port 9933. //! The following is an example of fetching the chain spec from a local running node on port 9933:
//! //!
//! ```bash //! ```bash
//! curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "sync_state_genSyncSpec", "params":[true]}' http://localhost:9933/ | jq .result > chain_spec.json //! curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "sync_state_genSyncSpec", "params":[true]}' http://localhost:9933/ | jq .result > chain_spec.json
//! ``` //! ```
//! //!
//! Alternately, you can have the `LightClient` download the chain spec from a trusted node when it
//! initializes, which is not recommended in production but is useful for examples and testing, as below.
//!
//! ## Example //! ## Example
//! //!
//! You can construct a Light Client from a trusted chain spec stored on disk. //! This example connects to a local chain and submits a transaction. To run this, you first need
//! Similary, the Light Client can fetch the chain spec from a running node and //! to have a local polkadot node running using the following command:
//! overwrite the bootNodes section. The `jsonrpsee` feature flag exposes the
//! `build_from_url` method.
//! //!
//! ```rust,ignore //! ```text
//! let light_client = LightClientBuilder::new() //! polkadot --dev --node-key 0000000000000000000000000000000000000000000000000000000000000001
//! .bootnodes(
//! ["/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp"]
//! )
//! .build_from_url("ws://127.0.0.1:9944")
//! .await?;
//! ``` //! ```
//! //!
//! Here's an example which connects to a local chain and submits a transaction. //! Leave that running for a minute, and then you can run the example using the following command
//! //! in the `subxt` crate:
//! You can run the example using the following command:
//! //!
//! ```bash //! ```bash
//! cargo run --example unstable_light_client_tx_basic --features="unstable-light-client jsonrpsee" //! cargo run --example unstable_light_client_tx_basic --features=unstable-light-client
//! ``` //! ```
//! //!
//! This is the code that will be executed:
//!
//! ```rust,ignore //! ```rust,ignore
#![doc = include_str!("../../../examples/unstable_light_client_tx_basic.rs")] #![doc = include_str!("../../../examples/unstable_light_client_tx_basic.rs")]
//! ``` //! ```
+1 -1
View File
@@ -3,7 +3,7 @@
// see LICENSE for license details. // see LICENSE for license details.
use super::{rpc::LightClientRpc, LightClient, LightClientError}; use super::{rpc::LightClientRpc, LightClient, LightClientError};
use crate::backend::{rpc::RpcClient, Backend}; use crate::backend::rpc::RpcClient;
use crate::{config::Config, error::Error, OnlineClient}; use crate::{config::Config, error::Error, OnlineClient};
use std::num::NonZeroU32; use std::num::NonZeroU32;
use subxt_lightclient::{AddChainConfig, AddChainConfigJsonRpc, ChainId}; use subxt_lightclient::{AddChainConfig, AddChainConfigJsonRpc, ChainId};
+3
View File
@@ -3,6 +3,7 @@
// see LICENSE for license details. // see LICENSE for license details.
use crate::{dynamic::DecodedValueThunk, metadata::DecodeWithMetadata}; use crate::{dynamic::DecodedValueThunk, metadata::DecodeWithMetadata};
use derivative::Derivative;
use std::borrow::Cow; use std::borrow::Cow;
/// This represents a constant address. Anything implementing this trait /// This represents a constant address. Anything implementing this trait
@@ -26,6 +27,8 @@ pub trait ConstantAddress {
} }
/// This represents the address of a constant. /// This represents the address of a constant.
#[derive(Derivative)]
#[derivative(Clone(bound = ""), Debug(bound = ""))]
pub struct Address<ReturnTy> { pub struct Address<ReturnTy> {
pallet_name: Cow<'static, str>, pallet_name: Cow<'static, str>,
constant_name: Cow<'static, str>, constant_name: Cow<'static, str>,
@@ -1,3 +1,4 @@
use derivative::Derivative;
use std::marker::PhantomData; use std::marker::PhantomData;
use crate::dynamic::DecodedValueThunk; use crate::dynamic::DecodedValueThunk;
@@ -36,6 +37,8 @@ impl CustomValueAddress for str {
pub struct Yes; pub struct Yes;
/// A static address to a custom value. /// A static address to a custom value.
#[derive(Derivative)]
#[derivative(Clone(bound = ""), Debug(bound = ""))]
pub struct StaticAddress<ReturnTy, IsDecodable> { pub struct StaticAddress<ReturnTy, IsDecodable> {
name: &'static str, name: &'static str,
hash: Option<[u8; 32]>, hash: Option<[u8; 32]>,
+6 -1
View File
@@ -3,6 +3,7 @@
// see LICENSE for license details. // see LICENSE for license details.
use core::marker::PhantomData; use core::marker::PhantomData;
use derivative::Derivative;
use scale_encode::EncodeAsFields; use scale_encode::EncodeAsFields;
use scale_value::Composite; use scale_value::Composite;
use std::borrow::Cow; use std::borrow::Cow;
@@ -65,7 +66,11 @@ pub trait RuntimeApiPayload {
/// ///
/// This can be created from static values (ie those generated /// This can be created from static values (ie those generated
/// via the `subxt` macro) or dynamic values via [`dynamic`]. /// via the `subxt` macro) or dynamic values via [`dynamic`].
#[derive(Clone, Debug)] #[derive(Derivative)]
#[derivative(
Clone(bound = "ArgsData: Clone"),
Debug(bound = "ArgsData: std::fmt::Debug")
)]
pub struct Payload<ArgsData, ReturnTy> { pub struct Payload<ArgsData, ReturnTy> {
trait_name: Cow<'static, str>, trait_name: Cow<'static, str>,
method_name: Cow<'static, str>, method_name: Cow<'static, str>,
+6
View File
@@ -8,6 +8,7 @@ use crate::{
metadata::{DecodeWithMetadata, EncodeWithMetadata, Metadata}, metadata::{DecodeWithMetadata, EncodeWithMetadata, Metadata},
utils::{Encoded, Static}, utils::{Encoded, Static},
}; };
use derivative::Derivative;
use scale_info::TypeDef; use scale_info::TypeDef;
use std::borrow::Cow; use std::borrow::Cow;
use subxt_metadata::{StorageEntryType, StorageHasher}; use subxt_metadata::{StorageEntryType, StorageHasher};
@@ -51,6 +52,11 @@ pub struct Yes;
/// A concrete storage address. This can be created from static values (ie those generated /// A concrete storage address. This can be created from static values (ie those generated
/// via the `subxt` macro) or dynamic values via [`dynamic`]. /// via the `subxt` macro) or dynamic values via [`dynamic`].
#[derive(Derivative)]
#[derivative(
Clone(bound = "StorageKey: Clone"),
Debug(bound = "StorageKey: std::fmt::Debug")
)]
pub struct Address<StorageKey, ReturnTy, Fetchable, Defaultable, Iterable> { pub struct Address<StorageKey, ReturnTy, Fetchable, Defaultable, Iterable> {
pallet_name: Cow<'static, str>, pallet_name: Cow<'static, str>,
entry_name: Cow<'static, str>, entry_name: Cow<'static, str>,
+1 -1
View File
@@ -34,7 +34,7 @@ scale-info = { workspace = true, features = ["bit-vec"] }
sp-core = { workspace = true } sp-core = { workspace = true }
syn = { workspace = true } syn = { workspace = true }
subxt = { workspace = true, features = ["unstable-metadata", "native", "jsonrpsee", "substrate-compat"] } subxt = { workspace = true, features = ["unstable-metadata", "native", "jsonrpsee", "substrate-compat"] }
subxt-signer = { workspace = true, features = ["subxt"] } subxt-signer = { workspace = true }
subxt-codegen = { workspace = true } subxt-codegen = { workspace = true }
subxt-metadata = { workspace = true } subxt-metadata = { workspace = true }
test-runtime = { workspace = true } test-runtime = { workspace = true }
@@ -60,6 +60,46 @@ async fn storage_iter() {
assert_eq!(len, 13); assert_eq!(len, 13);
} }
#[tokio::test]
async fn storage_child_values_same_across_backends() {
let ctx = test_context().await;
let unstable_client = ctx.unstable_client().await;
let legacy_client = ctx.legacy_client().await;
let addr = node_runtime::storage().system().account_iter();
let block_ref = legacy_client
.blocks()
.at_latest()
.await
.unwrap()
.reference();
let a: Vec<_> = unstable_client
.storage()
.at(block_ref.clone())
.iter(addr.clone())
.await
.unwrap()
.collect()
.await;
let b: Vec<_> = legacy_client
.storage()
.at(block_ref.clone())
.iter(addr)
.await
.unwrap()
.collect()
.await;
for (a, b) in a.into_iter().zip(b.into_iter()) {
let a = a.unwrap();
let b = b.unwrap();
assert_eq!(a, b);
}
}
#[tokio::test] #[tokio::test]
async fn transaction_validation() { async fn transaction_validation() {
let ctx = test_context().await; let ctx = test_context().await;
@@ -210,10 +210,7 @@ async fn chainhead_unstable_unpin() {
}; };
let sub_id = blocks.subscription_id().unwrap(); let sub_id = blocks.subscription_id().unwrap();
assert!(rpc assert!(rpc.chainhead_unstable_unpin(sub_id, hash).await.is_ok());
.chainhead_unstable_unpin(sub_id.clone(), hash)
.await
.is_ok());
// The block was already unpinned. // The block was already unpinned.
assert!(rpc.chainhead_unstable_unpin(sub_id, hash).await.is_err()); assert!(rpc.chainhead_unstable_unpin(sub_id, hash).await.is_err());
} }
@@ -2,6 +2,7 @@
// This file is dual-licensed as Apache-2.0 or GPL-3.0. // This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details. // see LICENSE for license details.
use std::cell::RefCell;
use std::ffi::{OsStr, OsString}; use std::ffi::{OsStr, OsString};
use std::sync::Arc; use std::sync::Arc;
use substrate_runner::SubstrateNode; use substrate_runner::SubstrateNode;
@@ -18,6 +19,12 @@ pub struct TestNodeProcess<R: Config> {
// Keep a handle to the node; once it's dropped the node is killed. // Keep a handle to the node; once it's dropped the node is killed.
proc: SubstrateNode, proc: SubstrateNode,
// Lazily construct these when asked for.
unstable_client: RefCell<Option<OnlineClient<R>>>,
legacy_client: RefCell<Option<OnlineClient<R>>>,
rpc_client: rpc::RpcClient,
#[cfg(not(feature = "unstable-light-client"))] #[cfg(not(feature = "unstable-light-client"))]
client: OnlineClient<R>, client: OnlineClient<R>,
@@ -49,14 +56,42 @@ where
unstable::UnstableRpcMethods::new(rpc_client) unstable::UnstableRpcMethods::new(rpc_client)
} }
async fn rpc_client(&self) -> rpc::RpcClient { /// Hand back an RPC client connected to the test node.
pub async fn rpc_client(&self) -> rpc::RpcClient {
let url = format!("ws://127.0.0.1:{}", self.proc.ws_port()); let url = format!("ws://127.0.0.1:{}", self.proc.ws_port());
rpc::RpcClient::from_url(url) rpc::RpcClient::from_url(url)
.await .await
.expect("Unable to connect RPC client to test node") .expect("Unable to connect RPC client to test node")
} }
/// Returns the subxt client connected to the running node. /// Always return a client using the unstable backend.
/// Only use for comparing backends; use [`TestNodeProcess::client()`] normally,
/// which enables us to run each test against both backends.
pub async fn unstable_client(&self) -> OnlineClient<R> {
if self.unstable_client.borrow().is_none() {
let c = build_unstable_client(self.rpc_client.clone())
.await
.unwrap();
self.unstable_client.replace(Some(c));
}
self.unstable_client.borrow().as_ref().unwrap().clone()
}
/// Always return a client using the legacy backend.
/// Only use for comparing backends; use [`TestNodeProcess::client()`] normally,
/// which enables us to run each test against both backends.
pub async fn legacy_client(&self) -> OnlineClient<R> {
if self.legacy_client.borrow().is_none() {
let c = build_legacy_client(self.rpc_client.clone()).await.unwrap();
self.legacy_client.replace(Some(c));
}
self.legacy_client.borrow().as_ref().unwrap().clone()
}
/// Returns the subxt client connected to the running node. This client
/// will use the legacy backend by default or the unstable backend if the
/// "unstable-backend-client" feature is enabled, so that we can run each
/// test against both.
#[cfg(not(feature = "unstable-light-client"))] #[cfg(not(feature = "unstable-light-client"))]
pub fn client(&self) -> OnlineClient<R> { pub fn client(&self) -> OnlineClient<R> {
self.client.clone() self.client.clone()
@@ -115,36 +150,57 @@ impl TestNodeProcessBuilder {
// Spawn the node and retrieve a URL to it: // Spawn the node and retrieve a URL to it:
let proc = node_builder.spawn().map_err(|e| e.to_string())?; let proc = node_builder.spawn().map_err(|e| e.to_string())?;
let ws_url = format!("ws://127.0.0.1:{}", proc.ws_port()); let ws_url = format!("ws://127.0.0.1:{}", proc.ws_port());
let rpc_client = build_rpc_client(&ws_url)
.await
.map_err(|e| format!("Failed to connect to node at {ws_url}: {e}"))?;
// Cache whatever client we build, and None for the other.
#[allow(unused_assignments, unused_mut)]
let mut unstable_client = None;
#[allow(unused_assignments, unused_mut)]
let mut legacy_client = None;
#[cfg(feature = "unstable-light-client")] #[cfg(feature = "unstable-light-client")]
let client = build_light_client(&proc).await; let client = build_light_client(&proc).await?;
#[cfg(feature = "unstable-backend-client")] #[cfg(feature = "unstable-backend-client")]
let client = build_unstable_client(&proc).await; let client = {
let client = build_unstable_client(rpc_client.clone()).await?;
unstable_client = Some(client.clone());
client
};
#[cfg(all( #[cfg(all(
not(feature = "unstable-light-client"), not(feature = "unstable-light-client"),
not(feature = "unstable-backend-client") not(feature = "unstable-backend-client")
))] ))]
let client = build_legacy_client(&proc).await; let client = {
let client = build_legacy_client(rpc_client.clone()).await?;
legacy_client = Some(client.clone());
client
};
match client { Ok(TestNodeProcess {
Ok(client) => Ok(TestNodeProcess { proc, client }), proc,
Err(err) => Err(format!("Failed to connect to node rpc at {ws_url}: {err}")), client,
} legacy_client: RefCell::new(legacy_client),
unstable_client: RefCell::new(unstable_client),
rpc_client,
})
} }
} }
#[cfg(all( async fn build_rpc_client(ws_url: &str) -> Result<rpc::RpcClient, String> {
not(feature = "unstable-light-client"),
not(feature = "unstable-backend-client")
))]
async fn build_legacy_client<T: Config>(proc: &SubstrateNode) -> Result<OnlineClient<T>, String> {
let ws_url = format!("ws://127.0.0.1:{}", proc.ws_port());
let rpc_client = rpc::RpcClient::from_url(ws_url) let rpc_client = rpc::RpcClient::from_url(ws_url)
.await .await
.map_err(|e| format!("Cannot construct RPC client: {e}"))?; .map_err(|e| format!("Cannot construct RPC client: {e}"))?;
Ok(rpc_client)
}
async fn build_legacy_client<T: Config>(
rpc_client: rpc::RpcClient,
) -> Result<OnlineClient<T>, String> {
let backend = legacy::LegacyBackend::new(rpc_client); let backend = legacy::LegacyBackend::new(rpc_client);
let client = OnlineClient::from_backend(Arc::new(backend)) let client = OnlineClient::from_backend(Arc::new(backend))
.await .await
@@ -153,14 +209,9 @@ async fn build_legacy_client<T: Config>(proc: &SubstrateNode) -> Result<OnlineCl
Ok(client) Ok(client)
} }
#[cfg(feature = "unstable-backend-client")] async fn build_unstable_client<T: Config>(
async fn build_unstable_client<T: Config>(proc: &SubstrateNode) -> Result<OnlineClient<T>, String> { rpc_client: rpc::RpcClient,
let ws_url = format!("ws://127.0.0.1:{}", proc.ws_port()); ) -> Result<OnlineClient<T>, String> {
let rpc_client = rpc::RpcClient::from_url(ws_url)
.await
.map_err(|e| format!("Cannot construct RPC client: {e}"))?;
let (backend, mut driver) = unstable::UnstableBackend::builder().build(rpc_client); let (backend, mut driver) = unstable::UnstableBackend::builder().build(rpc_client);
// The unstable backend needs driving: // The unstable backend needs driving:
+1 -4
View File
@@ -13,10 +13,7 @@ trybuild = { workspace = true }
hex = { workspace = true } hex = { workspace = true }
scale-info = { workspace = true, features = ["bit-vec"] } scale-info = { workspace = true, features = ["bit-vec"] }
frame-metadata = { workspace = true } frame-metadata = { workspace = true }
codec = { package = "parity-scale-codec", workspace = true, features = [ codec = { package = "parity-scale-codec", workspace = true, features = ["derive", "bit-vec"] }
"derive",
"bit-vec",
] }
subxt = { workspace = true, features = ["native", "jsonrpsee"] } subxt = { workspace = true, features = ["native", "jsonrpsee"] }
subxt-metadata = { workspace = true } subxt-metadata = { workspace = true }
generate-custom-metadata = { path = "../generate-custom-metadata" } generate-custom-metadata = { path = "../generate-custom-metadata" }
+201 -131
View File
@@ -101,13 +101,13 @@ dependencies = [
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.68" version = "0.1.74"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -483,12 +483,12 @@ dependencies = [
[[package]] [[package]]
name = "darling" name = "darling"
version = "0.20.1" version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e"
dependencies = [ dependencies = [
"darling_core 0.20.1", "darling_core 0.20.3",
"darling_macro 0.20.1", "darling_macro 0.20.3",
] ]
[[package]] [[package]]
@@ -507,16 +507,16 @@ dependencies = [
[[package]] [[package]]
name = "darling_core" name = "darling_core"
version = "0.20.1" version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621"
dependencies = [ dependencies = [
"fnv", "fnv",
"ident_case", "ident_case",
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim", "strsim",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -532,13 +532,13 @@ dependencies = [
[[package]] [[package]]
name = "darling_macro" name = "darling_macro"
version = "0.20.1" version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"
dependencies = [ dependencies = [
"darling_core 0.20.1", "darling_core 0.20.3",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -607,9 +607,9 @@ dependencies = [
[[package]] [[package]]
name = "either" name = "either"
version = "1.8.1" version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]] [[package]]
name = "event-listener" name = "event-listener"
@@ -641,6 +641,15 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "form_urlencoded"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
dependencies = [
"percent-encoding",
]
[[package]] [[package]]
name = "frame-metadata" name = "frame-metadata"
version = "15.1.0" version = "15.1.0"
@@ -714,7 +723,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -798,14 +807,15 @@ checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
[[package]] [[package]]
name = "gloo-net" name = "gloo-net"
version = "0.2.6" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
"futures-sink", "futures-sink",
"gloo-utils", "gloo-utils",
"http",
"js-sys", "js-sys",
"pin-project", "pin-project",
"serde", "serde",
@@ -830,9 +840,9 @@ dependencies = [
[[package]] [[package]]
name = "gloo-utils" name = "gloo-utils"
version = "0.1.7" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"serde", "serde",
@@ -980,7 +990,7 @@ dependencies = [
"httpdate", "httpdate",
"itoa", "itoa",
"pin-project-lite", "pin-project-lite",
"socket2", "socket2 0.4.9",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
@@ -989,10 +999,11 @@ dependencies = [
[[package]] [[package]]
name = "hyper-rustls" name = "hyper-rustls"
version = "0.23.2" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97"
dependencies = [ dependencies = [
"futures-util",
"http", "http",
"hyper", "hyper",
"log", "log",
@@ -1000,7 +1011,6 @@ dependencies = [
"rustls-native-certs", "rustls-native-certs",
"tokio", "tokio",
"tokio-rustls", "tokio-rustls",
"webpki-roots",
] ]
[[package]] [[package]]
@@ -1009,6 +1019,16 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
dependencies = [
"unicode-bidi",
"unicode-normalization",
]
[[package]] [[package]]
name = "impl-codec" name = "impl-codec"
version = "0.6.0" version = "0.6.0"
@@ -1098,9 +1118,9 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee" name = "jsonrpsee"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" checksum = "de902baa44bf34a58b1a4906f8b840d7d60dcec5f41fe08b4dbc14cf9efa821c"
dependencies = [ dependencies = [
"jsonrpsee-client-transport", "jsonrpsee-client-transport",
"jsonrpsee-core", "jsonrpsee-core",
@@ -1110,18 +1130,15 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee-client-transport" name = "jsonrpsee-client-transport"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" checksum = "58d9851f8f5653e0433a898e9032bde4910b35d625bd9dcf33ef6e36e7c3d456"
dependencies = [ dependencies = [
"anyhow",
"futures-channel", "futures-channel",
"futures-timer",
"futures-util", "futures-util",
"gloo-net", "gloo-net",
"http", "http",
"jsonrpsee-core", "jsonrpsee-core",
"jsonrpsee-types",
"pin-project", "pin-project",
"rustls-native-certs", "rustls-native-certs",
"soketto", "soketto",
@@ -1130,20 +1147,19 @@ dependencies = [
"tokio-rustls", "tokio-rustls",
"tokio-util", "tokio-util",
"tracing", "tracing",
"webpki-roots", "url",
] ]
[[package]] [[package]]
name = "jsonrpsee-core" name = "jsonrpsee-core"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" checksum = "51f45d37af23707750136379f6799e76ebfcf2d425ec4e36d0deb7921da5e65c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-lock", "async-lock",
"async-trait", "async-trait",
"beef", "beef",
"futures-channel",
"futures-timer", "futures-timer",
"futures-util", "futures-util",
"hyper", "hyper",
@@ -1159,28 +1175,29 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee-http-client" name = "jsonrpsee-http-client"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" checksum = "02308562f2e8162a32f8d6c3dc19c29c858d5d478047c886a5c3c25b5f7fa868"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"hyper", "hyper",
"hyper-rustls", "hyper-rustls",
"jsonrpsee-core", "jsonrpsee-core",
"jsonrpsee-types", "jsonrpsee-types",
"rustc-hash",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror",
"tokio", "tokio",
"tower",
"tracing", "tracing",
"url",
] ]
[[package]] [[package]]
name = "jsonrpsee-types" name = "jsonrpsee-types"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" checksum = "05eaff23af19f10ba6fbb76519bed6da4d3b9bbaef13d39b7c2b6c14e532d27e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"beef", "beef",
@@ -1479,6 +1496,12 @@ dependencies = [
"digest 0.10.7", "digest 0.10.7",
] ]
[[package]]
name = "percent-encoding"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]] [[package]]
name = "pin-project" name = "pin-project"
version = "1.1.0" version = "1.1.0"
@@ -1496,14 +1519,14 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.9" version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
[[package]] [[package]]
name = "pin-utils" name = "pin-utils"
@@ -1548,9 +1571,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]] [[package]]
name = "primitive-types" name = "primitive-types"
version = "0.12.1" version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2"
dependencies = [ dependencies = [
"fixed-hash", "fixed-hash",
"impl-codec", "impl-codec",
@@ -1595,18 +1618,18 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.66" version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.31" version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
@@ -1697,14 +1720,14 @@ dependencies = [
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.20.8" version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8"
dependencies = [ dependencies = [
"log", "log",
"ring", "ring",
"rustls-webpki",
"sct", "sct",
"webpki",
] ]
[[package]] [[package]]
@@ -1728,6 +1751,16 @@ dependencies = [
"base64 0.21.2", "base64 0.21.2",
] ]
[[package]]
name = "rustls-webpki"
version = "0.101.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe"
dependencies = [
"ring",
"untrusted",
]
[[package]] [[package]]
name = "ruzstd" name = "ruzstd"
version = "0.4.0" version = "0.4.0"
@@ -1747,9 +1780,9 @@ checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
[[package]] [[package]]
name = "scale-bits" name = "scale-bits"
version = "0.3.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf" checksum = "036575c29af9b6e4866ffb7fa055dbf623fe7a9cc159b33786de6013a6969d89"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"scale-info", "scale-info",
@@ -1758,24 +1791,24 @@ dependencies = [
[[package]] [[package]]
name = "scale-decode" name = "scale-decode"
version = "0.7.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0459d00b0dbd2e765009924a78ef36b2ff7ba116292d732f00eb0ed8e465d15" checksum = "7789f5728e4e954aaa20cadcc370b99096fb8645fca3c9333ace44bb18f30095"
dependencies = [ dependencies = [
"derive_more",
"parity-scale-codec", "parity-scale-codec",
"primitive-types", "primitive-types",
"scale-bits", "scale-bits",
"scale-decode-derive", "scale-decode-derive",
"scale-info", "scale-info",
"smallvec", "smallvec",
"thiserror",
] ]
[[package]] [[package]]
name = "scale-decode-derive" name = "scale-decode-derive"
version = "0.7.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4391f0dfbb6690f035f6d2a15d6a12f88cc5395c36bcc056db07ffa2a90870ec" checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47"
dependencies = [ dependencies = [
"darling 0.14.4", "darling 0.14.4",
"proc-macro-crate", "proc-macro-crate",
@@ -1786,24 +1819,24 @@ dependencies = [
[[package]] [[package]]
name = "scale-encode" name = "scale-encode"
version = "0.3.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0401b7cdae8b8aa33725f3611a051358d5b32887ecaa0fda5953a775b2d4d76" checksum = "6d70cb4b29360105483fac1ed567ff95d65224a14dd275b6303ed0a654c78de5"
dependencies = [ dependencies = [
"derive_more",
"parity-scale-codec", "parity-scale-codec",
"primitive-types", "primitive-types",
"scale-bits", "scale-bits",
"scale-encode-derive", "scale-encode-derive",
"scale-info", "scale-info",
"smallvec", "smallvec",
"thiserror",
] ]
[[package]] [[package]]
name = "scale-encode-derive" name = "scale-encode-derive"
version = "0.3.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "316e0fb10ec0fee266822bd641bab5e332a4ab80ef8c5b5ff35e5401a394f5a6" checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25"
dependencies = [ dependencies = [
"darling 0.14.4", "darling 0.14.4",
"proc-macro-crate", "proc-macro-crate",
@@ -1840,12 +1873,13 @@ dependencies = [
[[package]] [[package]]
name = "scale-value" name = "scale-value"
version = "0.10.0" version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2096d36e94ce9bf87d8addb752423b6b19730dc88edd7cc452bb2b90573f7a7" checksum = "6538d1cc1af9c0baf401c57da8a6d4730ef582db0d330d2efa56ec946b5b0283"
dependencies = [ dependencies = [
"base58", "base58",
"blake2", "blake2",
"derive_more",
"either", "either",
"frame-metadata 15.1.0", "frame-metadata 15.1.0",
"parity-scale-codec", "parity-scale-codec",
@@ -1854,7 +1888,6 @@ dependencies = [
"scale-encode", "scale-encode",
"scale-info", "scale-info",
"serde", "serde",
"thiserror",
"yap", "yap",
] ]
@@ -1942,29 +1975,29 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.171" version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.171" version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.103" version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@@ -2150,6 +2183,16 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "socket2"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e"
dependencies = [
"libc",
"windows-sys 0.48.0",
]
[[package]] [[package]]
name = "soketto" name = "soketto"
version = "0.7.1" version = "0.7.1"
@@ -2224,8 +2267,9 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142"
[[package]] [[package]]
name = "subxt" name = "subxt"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"async-trait",
"base58", "base58",
"blake2", "blake2",
"derivative", "derivative",
@@ -2256,9 +2300,10 @@ dependencies = [
[[package]] [[package]]
name = "subxt-codegen" name = "subxt-codegen"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"frame-metadata 16.0.0", "frame-metadata 16.0.0",
"getrandom",
"heck", "heck",
"hex", "hex",
"jsonrpsee", "jsonrpsee",
@@ -2267,14 +2312,14 @@ dependencies = [
"quote", "quote",
"scale-info", "scale-info",
"subxt-metadata", "subxt-metadata",
"syn 2.0.26", "syn 2.0.38",
"thiserror", "thiserror",
"tokio", "tokio",
] ]
[[package]] [[package]]
name = "subxt-lightclient" name = "subxt-lightclient"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"futures", "futures",
"futures-timer", "futures-timer",
@@ -2298,17 +2343,17 @@ dependencies = [
[[package]] [[package]]
name = "subxt-macro" name = "subxt-macro"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"darling 0.20.1", "darling 0.20.3",
"proc-macro-error", "proc-macro-error",
"subxt-codegen", "subxt-codegen",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "subxt-metadata" name = "subxt-metadata"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"frame-metadata 16.0.0", "frame-metadata 16.0.0",
"parity-scale-codec", "parity-scale-codec",
@@ -2330,9 +2375,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.26" version = "2.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -2347,9 +2392,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.40" version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
@@ -2376,13 +2421,13 @@ dependencies = [
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.40" version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -2421,18 +2466,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.29.1" version = "1.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653"
dependencies = [ dependencies = [
"autocfg",
"backtrace", "backtrace",
"bytes", "bytes",
"libc", "libc",
"mio", "mio",
"num_cpus", "num_cpus",
"pin-project-lite", "pin-project-lite",
"socket2", "socket2 0.5.4",
"tokio-macros", "tokio-macros",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@@ -2445,18 +2489,17 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.23.4" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [ dependencies = [
"rustls", "rustls",
"tokio", "tokio",
"webpki",
] ]
[[package]] [[package]]
@@ -2502,6 +2545,27 @@ dependencies = [
"winnow", "winnow",
] ]
[[package]]
name = "tower"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
dependencies = [
"futures-core",
"futures-util",
"pin-project",
"pin-project-lite",
"tower-layer",
"tower-service",
"tracing",
]
[[package]]
name = "tower-layer"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
[[package]] [[package]]
name = "tower-service" name = "tower-service"
version = "0.3.2" version = "0.3.2"
@@ -2510,11 +2574,11 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.37" version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9"
dependencies = [ dependencies = [
"cfg-if", "log",
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
"tracing-core", "tracing-core",
@@ -2522,20 +2586,20 @@ dependencies = [
[[package]] [[package]]
name = "tracing-attributes" name = "tracing-attributes"
version = "0.1.26" version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "tracing-core" name = "tracing-core"
version = "0.1.31" version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
dependencies = [ dependencies = [
"once_cell", "once_cell",
] ]
@@ -2576,7 +2640,6 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"digest 0.10.7", "digest 0.10.7",
"rand",
"static_assertions", "static_assertions",
] ]
@@ -2598,12 +2661,27 @@ dependencies = [
"static_assertions", "static_assertions",
] ]
[[package]]
name = "unicode-bidi"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
version = "1.0.9" version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
[[package]]
name = "unicode-normalization"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
dependencies = [
"tinyvec",
]
[[package]] [[package]]
name = "universal-hash" name = "universal-hash"
version = "0.4.0" version = "0.4.0"
@@ -2620,6 +2698,17 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
[[package]]
name = "url"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
dependencies = [
"form_urlencoded",
"idna",
"percent-encoding",
]
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.4" version = "0.9.4"
@@ -2662,7 +2751,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@@ -2696,7 +2785,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@@ -2795,25 +2884,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "webpki"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
dependencies = [
"ring",
"untrusted",
]
[[package]]
name = "webpki-roots"
version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
dependencies = [
"webpki",
]
[[package]] [[package]]
name = "winapi" name = "winapi"
version = "0.3.9" version = "0.3.9"
@@ -2979,9 +3049,9 @@ dependencies = [
[[package]] [[package]]
name = "yap" name = "yap"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7" checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf"
[[package]] [[package]]
name = "zeroize" name = "zeroize"
@@ -3000,5 +3070,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
+3 -2
View File
@@ -1,7 +1,8 @@
#![cfg(target_arch = "wasm32")] #![cfg(target_arch = "wasm32")]
use subxt::{config::PolkadotConfig, use subxt::{
client::{LightClient, OfflineClientT, LightClientBuilder}, config::PolkadotConfig,
client::{LightClient, LightClientBuilder},
}; };
use futures_util::StreamExt; use futures_util::StreamExt;
use wasm_bindgen_test::*; use wasm_bindgen_test::*;
+201 -131
View File
@@ -101,13 +101,13 @@ dependencies = [
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.68" version = "0.1.74"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -483,12 +483,12 @@ dependencies = [
[[package]] [[package]]
name = "darling" name = "darling"
version = "0.20.1" version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e"
dependencies = [ dependencies = [
"darling_core 0.20.1", "darling_core 0.20.3",
"darling_macro 0.20.1", "darling_macro 0.20.3",
] ]
[[package]] [[package]]
@@ -507,16 +507,16 @@ dependencies = [
[[package]] [[package]]
name = "darling_core" name = "darling_core"
version = "0.20.1" version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621"
dependencies = [ dependencies = [
"fnv", "fnv",
"ident_case", "ident_case",
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim", "strsim",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -532,13 +532,13 @@ dependencies = [
[[package]] [[package]]
name = "darling_macro" name = "darling_macro"
version = "0.20.1" version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"
dependencies = [ dependencies = [
"darling_core 0.20.1", "darling_core 0.20.3",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -607,9 +607,9 @@ dependencies = [
[[package]] [[package]]
name = "either" name = "either"
version = "1.8.1" version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]] [[package]]
name = "event-listener" name = "event-listener"
@@ -641,6 +641,15 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "form_urlencoded"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
dependencies = [
"percent-encoding",
]
[[package]] [[package]]
name = "frame-metadata" name = "frame-metadata"
version = "15.1.0" version = "15.1.0"
@@ -714,7 +723,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -798,14 +807,15 @@ checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
[[package]] [[package]]
name = "gloo-net" name = "gloo-net"
version = "0.2.6" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
"futures-sink", "futures-sink",
"gloo-utils", "gloo-utils",
"http",
"js-sys", "js-sys",
"pin-project", "pin-project",
"serde", "serde",
@@ -830,9 +840,9 @@ dependencies = [
[[package]] [[package]]
name = "gloo-utils" name = "gloo-utils"
version = "0.1.7" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"serde", "serde",
@@ -980,7 +990,7 @@ dependencies = [
"httpdate", "httpdate",
"itoa", "itoa",
"pin-project-lite", "pin-project-lite",
"socket2", "socket2 0.4.9",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
@@ -989,10 +999,11 @@ dependencies = [
[[package]] [[package]]
name = "hyper-rustls" name = "hyper-rustls"
version = "0.23.2" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97"
dependencies = [ dependencies = [
"futures-util",
"http", "http",
"hyper", "hyper",
"log", "log",
@@ -1000,7 +1011,6 @@ dependencies = [
"rustls-native-certs", "rustls-native-certs",
"tokio", "tokio",
"tokio-rustls", "tokio-rustls",
"webpki-roots",
] ]
[[package]] [[package]]
@@ -1009,6 +1019,16 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
dependencies = [
"unicode-bidi",
"unicode-normalization",
]
[[package]] [[package]]
name = "impl-codec" name = "impl-codec"
version = "0.6.0" version = "0.6.0"
@@ -1098,9 +1118,9 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee" name = "jsonrpsee"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" checksum = "de902baa44bf34a58b1a4906f8b840d7d60dcec5f41fe08b4dbc14cf9efa821c"
dependencies = [ dependencies = [
"jsonrpsee-client-transport", "jsonrpsee-client-transport",
"jsonrpsee-core", "jsonrpsee-core",
@@ -1110,18 +1130,15 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee-client-transport" name = "jsonrpsee-client-transport"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" checksum = "58d9851f8f5653e0433a898e9032bde4910b35d625bd9dcf33ef6e36e7c3d456"
dependencies = [ dependencies = [
"anyhow",
"futures-channel", "futures-channel",
"futures-timer",
"futures-util", "futures-util",
"gloo-net", "gloo-net",
"http", "http",
"jsonrpsee-core", "jsonrpsee-core",
"jsonrpsee-types",
"pin-project", "pin-project",
"rustls-native-certs", "rustls-native-certs",
"soketto", "soketto",
@@ -1130,20 +1147,19 @@ dependencies = [
"tokio-rustls", "tokio-rustls",
"tokio-util", "tokio-util",
"tracing", "tracing",
"webpki-roots", "url",
] ]
[[package]] [[package]]
name = "jsonrpsee-core" name = "jsonrpsee-core"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" checksum = "51f45d37af23707750136379f6799e76ebfcf2d425ec4e36d0deb7921da5e65c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-lock", "async-lock",
"async-trait", "async-trait",
"beef", "beef",
"futures-channel",
"futures-timer", "futures-timer",
"futures-util", "futures-util",
"hyper", "hyper",
@@ -1159,28 +1175,29 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpsee-http-client" name = "jsonrpsee-http-client"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" checksum = "02308562f2e8162a32f8d6c3dc19c29c858d5d478047c886a5c3c25b5f7fa868"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"hyper", "hyper",
"hyper-rustls", "hyper-rustls",
"jsonrpsee-core", "jsonrpsee-core",
"jsonrpsee-types", "jsonrpsee-types",
"rustc-hash",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror",
"tokio", "tokio",
"tower",
"tracing", "tracing",
"url",
] ]
[[package]] [[package]]
name = "jsonrpsee-types" name = "jsonrpsee-types"
version = "0.16.2" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" checksum = "05eaff23af19f10ba6fbb76519bed6da4d3b9bbaef13d39b7c2b6c14e532d27e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"beef", "beef",
@@ -1479,6 +1496,12 @@ dependencies = [
"digest 0.10.7", "digest 0.10.7",
] ]
[[package]]
name = "percent-encoding"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]] [[package]]
name = "pin-project" name = "pin-project"
version = "1.1.0" version = "1.1.0"
@@ -1496,14 +1519,14 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.9" version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
[[package]] [[package]]
name = "pin-utils" name = "pin-utils"
@@ -1548,9 +1571,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]] [[package]]
name = "primitive-types" name = "primitive-types"
version = "0.12.1" version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2"
dependencies = [ dependencies = [
"fixed-hash", "fixed-hash",
"impl-codec", "impl-codec",
@@ -1595,18 +1618,18 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.66" version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.31" version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
@@ -1697,14 +1720,14 @@ dependencies = [
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.20.8" version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8"
dependencies = [ dependencies = [
"log", "log",
"ring", "ring",
"rustls-webpki",
"sct", "sct",
"webpki",
] ]
[[package]] [[package]]
@@ -1728,6 +1751,16 @@ dependencies = [
"base64 0.21.2", "base64 0.21.2",
] ]
[[package]]
name = "rustls-webpki"
version = "0.101.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe"
dependencies = [
"ring",
"untrusted",
]
[[package]] [[package]]
name = "ruzstd" name = "ruzstd"
version = "0.4.0" version = "0.4.0"
@@ -1747,9 +1780,9 @@ checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
[[package]] [[package]]
name = "scale-bits" name = "scale-bits"
version = "0.3.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf" checksum = "036575c29af9b6e4866ffb7fa055dbf623fe7a9cc159b33786de6013a6969d89"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"scale-info", "scale-info",
@@ -1758,24 +1791,24 @@ dependencies = [
[[package]] [[package]]
name = "scale-decode" name = "scale-decode"
version = "0.7.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0459d00b0dbd2e765009924a78ef36b2ff7ba116292d732f00eb0ed8e465d15" checksum = "7789f5728e4e954aaa20cadcc370b99096fb8645fca3c9333ace44bb18f30095"
dependencies = [ dependencies = [
"derive_more",
"parity-scale-codec", "parity-scale-codec",
"primitive-types", "primitive-types",
"scale-bits", "scale-bits",
"scale-decode-derive", "scale-decode-derive",
"scale-info", "scale-info",
"smallvec", "smallvec",
"thiserror",
] ]
[[package]] [[package]]
name = "scale-decode-derive" name = "scale-decode-derive"
version = "0.7.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4391f0dfbb6690f035f6d2a15d6a12f88cc5395c36bcc056db07ffa2a90870ec" checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47"
dependencies = [ dependencies = [
"darling 0.14.4", "darling 0.14.4",
"proc-macro-crate", "proc-macro-crate",
@@ -1786,24 +1819,24 @@ dependencies = [
[[package]] [[package]]
name = "scale-encode" name = "scale-encode"
version = "0.3.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0401b7cdae8b8aa33725f3611a051358d5b32887ecaa0fda5953a775b2d4d76" checksum = "6d70cb4b29360105483fac1ed567ff95d65224a14dd275b6303ed0a654c78de5"
dependencies = [ dependencies = [
"derive_more",
"parity-scale-codec", "parity-scale-codec",
"primitive-types", "primitive-types",
"scale-bits", "scale-bits",
"scale-encode-derive", "scale-encode-derive",
"scale-info", "scale-info",
"smallvec", "smallvec",
"thiserror",
] ]
[[package]] [[package]]
name = "scale-encode-derive" name = "scale-encode-derive"
version = "0.3.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "316e0fb10ec0fee266822bd641bab5e332a4ab80ef8c5b5ff35e5401a394f5a6" checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25"
dependencies = [ dependencies = [
"darling 0.14.4", "darling 0.14.4",
"proc-macro-crate", "proc-macro-crate",
@@ -1840,12 +1873,13 @@ dependencies = [
[[package]] [[package]]
name = "scale-value" name = "scale-value"
version = "0.10.0" version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2096d36e94ce9bf87d8addb752423b6b19730dc88edd7cc452bb2b90573f7a7" checksum = "6538d1cc1af9c0baf401c57da8a6d4730ef582db0d330d2efa56ec946b5b0283"
dependencies = [ dependencies = [
"base58", "base58",
"blake2", "blake2",
"derive_more",
"either", "either",
"frame-metadata 15.1.0", "frame-metadata 15.1.0",
"parity-scale-codec", "parity-scale-codec",
@@ -1854,7 +1888,6 @@ dependencies = [
"scale-encode", "scale-encode",
"scale-info", "scale-info",
"serde", "serde",
"thiserror",
"yap", "yap",
] ]
@@ -1942,29 +1975,29 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.171" version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.171" version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.103" version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@@ -2150,6 +2183,16 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "socket2"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e"
dependencies = [
"libc",
"windows-sys 0.48.0",
]
[[package]] [[package]]
name = "soketto" name = "soketto"
version = "0.7.1" version = "0.7.1"
@@ -2224,8 +2267,9 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142"
[[package]] [[package]]
name = "subxt" name = "subxt"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"async-trait",
"base58", "base58",
"blake2", "blake2",
"derivative", "derivative",
@@ -2255,9 +2299,10 @@ dependencies = [
[[package]] [[package]]
name = "subxt-codegen" name = "subxt-codegen"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"frame-metadata 16.0.0", "frame-metadata 16.0.0",
"getrandom",
"heck", "heck",
"hex", "hex",
"jsonrpsee", "jsonrpsee",
@@ -2266,14 +2311,14 @@ dependencies = [
"quote", "quote",
"scale-info", "scale-info",
"subxt-metadata", "subxt-metadata",
"syn 2.0.26", "syn 2.0.38",
"thiserror", "thiserror",
"tokio", "tokio",
] ]
[[package]] [[package]]
name = "subxt-lightclient" name = "subxt-lightclient"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"futures", "futures",
"futures-timer", "futures-timer",
@@ -2297,17 +2342,17 @@ dependencies = [
[[package]] [[package]]
name = "subxt-macro" name = "subxt-macro"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"darling 0.20.1", "darling 0.20.3",
"proc-macro-error", "proc-macro-error",
"subxt-codegen", "subxt-codegen",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "subxt-metadata" name = "subxt-metadata"
version = "0.29.0" version = "0.32.1"
dependencies = [ dependencies = [
"frame-metadata 16.0.0", "frame-metadata 16.0.0",
"parity-scale-codec", "parity-scale-codec",
@@ -2329,9 +2374,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.26" version = "2.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -2346,9 +2391,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.40" version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
@@ -2375,13 +2420,13 @@ dependencies = [
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.40" version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -2420,18 +2465,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.29.1" version = "1.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653"
dependencies = [ dependencies = [
"autocfg",
"backtrace", "backtrace",
"bytes", "bytes",
"libc", "libc",
"mio", "mio",
"num_cpus", "num_cpus",
"pin-project-lite", "pin-project-lite",
"socket2", "socket2 0.5.4",
"tokio-macros", "tokio-macros",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@@ -2444,18 +2488,17 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.23.4" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [ dependencies = [
"rustls", "rustls",
"tokio", "tokio",
"webpki",
] ]
[[package]] [[package]]
@@ -2501,6 +2544,27 @@ dependencies = [
"winnow", "winnow",
] ]
[[package]]
name = "tower"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
dependencies = [
"futures-core",
"futures-util",
"pin-project",
"pin-project-lite",
"tower-layer",
"tower-service",
"tracing",
]
[[package]]
name = "tower-layer"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
[[package]] [[package]]
name = "tower-service" name = "tower-service"
version = "0.3.2" version = "0.3.2"
@@ -2509,11 +2573,11 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.37" version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9"
dependencies = [ dependencies = [
"cfg-if", "log",
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
"tracing-core", "tracing-core",
@@ -2521,20 +2585,20 @@ dependencies = [
[[package]] [[package]]
name = "tracing-attributes" name = "tracing-attributes"
version = "0.1.26" version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]
[[package]] [[package]]
name = "tracing-core" name = "tracing-core"
version = "0.1.31" version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
dependencies = [ dependencies = [
"once_cell", "once_cell",
] ]
@@ -2575,7 +2639,6 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"digest 0.10.7", "digest 0.10.7",
"rand",
"static_assertions", "static_assertions",
] ]
@@ -2597,12 +2660,27 @@ dependencies = [
"static_assertions", "static_assertions",
] ]
[[package]]
name = "unicode-bidi"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
version = "1.0.9" version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
[[package]]
name = "unicode-normalization"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
dependencies = [
"tinyvec",
]
[[package]] [[package]]
name = "universal-hash" name = "universal-hash"
version = "0.4.0" version = "0.4.0"
@@ -2619,6 +2697,17 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
[[package]]
name = "url"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
dependencies = [
"form_urlencoded",
"idna",
"percent-encoding",
]
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.4" version = "0.9.4"
@@ -2661,7 +2750,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@@ -2695,7 +2784,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@@ -2794,25 +2883,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "webpki"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
dependencies = [
"ring",
"untrusted",
]
[[package]]
name = "webpki-roots"
version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
dependencies = [
"webpki",
]
[[package]] [[package]]
name = "winapi" name = "winapi"
version = "0.3.9" version = "0.3.9"
@@ -2978,9 +3048,9 @@ dependencies = [
[[package]] [[package]]
name = "yap" name = "yap"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7" checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf"
[[package]] [[package]]
name = "zeroize" name = "zeroize"
@@ -2999,5 +3069,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.26", "syn 2.0.38",
] ]