tangle-subxt

Crates.iotangle-subxt
lib.rstangle-subxt
version0.24.0
created_at2024-08-12 13:05:27.487338+00
updated_at2025-08-07 23:30:06.560965+00
descriptionRust bindings and interface to interact with Tangle Network using subxt
homepagehttps://tangle.tools
repositoryhttps://github.com/tangle-network/tangle
max_upload_size
id1334446
size7,232,689
webb-devs (github:tangle-network:webb-devs)

documentation

README

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.

  1. Install:
cargo install subxt-cli@0.39.0 --force
  1. To Save the metadata of tangle: Run the release build of the tangle node, then on another terminal run:
subxt metadata -f bytes > ./metadata/tangle-testnet-runtime.scale
  1. 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.

  1. Run Local Tangle network
./scripts/run-standalone-local.sh --clean
  1. Run Test
cargo test test_job_submission_event
Commit count: 689

cargo fmt