22 breaking releases
Uses new Rust 2024
| 0.24.0 | Aug 7, 2025 |
|---|---|
| 0.22.0 | Aug 1, 2025 |
| 0.21.0 | Jul 30, 2025 |
| 0.14.0 | Mar 13, 2025 |
| 0.6.0 | Nov 27, 2024 |
#3 in #subxt
380 downloads per month
Used in 32 crates
(18 directly)
6MB
153K
SLoC
Tangle-Subxt
Rust interface to interact with tangle node via RPC
Downloading metadata from a Substrate node
Use the subxt-cli tool to download the metadata for your target runtime from a node.
- Install:
cargo install [email protected] --force
- To Save the metadata of
tangle: Run the release build of thetanglenode, then on another terminal run:
subxt metadata -f bytes > ./metadata/tangle-testnet-runtime.scale
- Generating the subxt code from the metadata:
subxt codegen --file metadata/tangle-testnet-runtime.scale \
--crate "::subxt_core" \
--derive Clone \
--derive Eq \
--derive PartialEq \
--attributes-for-type tangle_primitives::services::field::Field='#[codec(dumb_trait_bound)]' \
--derive-for-type tangle_primitives::services::service::ServiceBlueprint=serde::Serialize,recursive \
--derive-for-type tangle_primitives::services::service::ServiceBlueprint=serde::Deserialize,recursive | rustfmt --edition=2021 --emit=stdout > src/tangle_testnet_runtime.rs
Local Testing
You can run following tests to trigger Job pallet events for local development.
- Run Local Tangle network
./scripts/run-standalone-local.sh --clean
- Run Test
cargo test test_job_submission_event
Dependencies
~23–60MB
~890K SLoC