13 breaking releases

0.28.0 Apr 12, 2023
0.27.1 Feb 15, 2023
0.26.0 Jan 24, 2023
0.25.0 Nov 16, 2022
0.15.0 Nov 8, 2021

#1412 in Magic Beans

Download history 2529/week @ 2023-01-27 2210/week @ 2023-02-03 2421/week @ 2023-02-10 2098/week @ 2023-02-17 2302/week @ 2023-02-24 3126/week @ 2023-03-03 3071/week @ 2023-03-10 3413/week @ 2023-03-17 3669/week @ 2023-03-24 3162/week @ 2023-03-31 2553/week @ 2023-04-07 3944/week @ 2023-04-14 3864/week @ 2023-04-21 3137/week @ 2023-04-28 3566/week @ 2023-05-05 3557/week @ 2023-05-12

14,940 downloads per month
Used in 12 crates (10 directly)

Apache-2.0 OR GPL-3.0

7.5K SLoC

subxt · build Latest Version Documentation

A library to submit extrinsics to a substrate node via RPC.


Take a look in the examples folder for various subxt usage examples.

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
  1. Save the encoded metadata to a file:
subxt metadata -f bytes > metadata.scale

This defaults to querying the metadata of a locally running node on the default http://localhost:9933/. If querying a different node then the metadata command accepts a --url argument.

Subxt Documentation

For more details regarding utilizing subxt, please visit the documentation.

Integration Testing

Most tests require a running substrate node to communicate with. This is done by spawning an instance of the substrate node per test. It requires an up-to-date substrate executable on your path.

This can be installed from source via cargo:

cargo install --git https://github.com/paritytech/substrate node-cli --force

Real world usage

Please add your project to this list via a PR.

  • cargo-contract CLI for interacting with Wasm smart contracts.
  • xcm-cli CLI for submitting XCM messages.
  • phala-pherry The relayer between Phala blockchain and the off-chain Secure workers.
  • crunch CLI to claim staking rewards in batch every Era or X hours for substrate-based chains.
  • interbtc-clients Client implementations for the interBTC parachain; notably the Vault / Relayer and Oracle.
  • tidext Tidechain client with Stronghold signer.
  • staking-miner-v2 Submit NPos election solutions and get rewards.
  • polkadot-introspector Tools for monitoring Polkadot nodes.
  • ink! Smart contract language that uses subxt for allowing developers to conduct End-to-End testing of their contracts.


substrate-api-client provides similar functionality.


The entire code within this repository is dual licensed under the GPL-3.0 or Apache-2.0 licenses. See the LICENSE file for more details.

Please contact us if you have questions about the licensing of our products.


~570K SLoC