{"id":13477540,"url":"https://github.com/paritytech/subxt","last_synced_at":"2026-03-12T20:59:45.939Z","repository":{"id":37079804,"uuid":"200629301","full_name":"paritytech/subxt","owner":"paritytech","description":"Interact with Substrate based nodes in Rust or WebAssembly","archived":false,"fork":false,"pushed_at":"2025-12-08T00:34:34.000Z","size":525366,"stargazers_count":473,"open_issues_count":85,"forks_count":281,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-12-08T18:48:13.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paritytech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-08-05T09:55:57.000Z","updated_at":"2025-12-08T09:49:34.000Z","dependencies_parsed_at":"2025-11-27T12:04:20.068Z","dependency_job_id":null,"html_url":"https://github.com/paritytech/subxt","commit_stats":{"total_commits":471,"total_committers":58,"mean_commits":8.120689655172415,"dds":0.7600849256900213,"last_synced_commit":"e583aa987eb57ac6ce70c7166925189a663d0d31"},"previous_names":["paritytech/substrate-subxt"],"tags_count":288,"template":false,"template_full_name":null,"purl":"pkg:github/paritytech/subxt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/subxt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubxt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27683208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:44.191Z","updated_at":"2026-03-12T20:59:45.930Z","avatar_url":"https://github.com/paritytech.png","language":"Rust","funding_links":[],"categories":["Rust","MCP Frameworks and libraries","Smart Contract Platforms"],"sub_categories":["Rust"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./logo.svg\" alt=\"subxt logo\" width=\"420\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/paritytech/subxt/actions/workflows/rust.yml\"\u003e\u003cimg src=\"https://github.com/paritytech/subxt/actions/workflows/rust.yml/badge.svg\" alt=\"build\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/subxt\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/subxt.svg\" alt=\"Latest Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://docs.rs/subxt\"\u003e\u003cimg src=\"https://docs.rs/subxt/badge.svg\" alt=\"Documentation\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nSubxt is a library for interacting with chains in the [Polkadot](https://github.com/paritytech/polkadot-sdk) network. It can:\n\n- Submit Extrinsics (this is where the name comes from).\n- Access information at any block (eg storage values, constants, Runtime APIs, View Functions).\n- Subscribe to new blocks (and then do the above at them).\n- Do all of the above via a safe, statically typed interface or via a flexible dynamic interface.\n- Do most of the above via a built-in light client to interact with chains trustlessly.\n- Compile to WASM and run [entirely in the browser](./examples/wasm-example), or be [called via FFI](./examples/ffi-example) in many other languages.\n- Be used entirely offline to provide a subset of the available functionality.\n\n## Usage\n\nTake a look at the [single-file examples](./subxt/examples) folder or the [project based examples](./examples) folder for various smaller or\nlarger `subxt` usage examples, or [read the docs](https://docs.rs/subxt/latest/subxt) to learn more.\n\n## Example\n\nThe \"hello world\" example of Subxt is submitting a transaction. This is what it looks like:\n\n```rust\nuse subxt::{Error, OnlineClient, PolkadotConfig};\nuse subxt_signer::sr25519::dev;\n\n// Generate an interface that we can use from the node's metadata.\n#[subxt::subxt(runtime_metadata_path = \"/path/to/polkadot_rc_metadata.scale\")]\nmod polkadot {}\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Error\u003e {\n    // Create a new API client, configured to talk to Polkadot nodes.\n    let api = OnlineClient::\u003cPolkadotConfig\u003e::new().await?;\n\n    // Almost all actions are performed at an explicit block. Here we use\n    // the current block at the time of running this.\n    let at_block = api.at_current_block().await?;\n\n    // Build a balance transfer extrinsic.\n    let dest = dev::bob().public_key().into();\n    let balance_transfer_tx = polkadot::transactions()\n        .balances()\n        .transfer_allow_death(dest, 10_000);\n\n    // Submit the balance transfer extrinsic from Alice, and wait for it \n    // to be successful and in a finalized block. We get back the extrinsic \n    // events if all is well.\n    let from = dev::alice();\n    let events = at_block\n        .transactions()\n        .sign_and_submit_then_watch_default(\u0026balance_transfer_tx, \u0026from)\n        .await?\n        .wait_for_finalized_success()\n        .await?;\n\n    // (Optional) we can look for a specific event to learn more about \n    // the submission.\n    if let Some(event) = events.find_first::\u003cpolkadot::balances::events::Transfer\u003e() {\n        println!(\"Balance transfer success: {event:?}\");\n    }\n\n    Ok(())\n}\n```\n\n## Real world usage\n\nPlease add your project to this list via a PR.\n\n- [cargo-contract](https://github.com/paritytech/cargo-contract/) CLI for interacting with Wasm smart contracts.\n- [xcm-cli](https://github.com/ascjones/xcm-cli) CLI for submitting XCM messages.\n- [phala-pherry](https://github.com/Phala-Network/phala-blockchain/tree/master/standalone/pherry) The relayer between Phala blockchain and the off-chain Secure workers.\n- [crunch](https://github.com/turboflakes/crunch) CLI to claim staking rewards in batch every Era or X hours for substrate-based chains.\n- [interbtc-clients](https://github.com/interlay/interbtc-clients) Client implementations for the interBTC parachain; notably the Vault / Relayer and Oracle.\n- [tidext](https://github.com/tidelabs/tidext) Tidechain client with Stronghold signer.\n- [staking-miner-v2](https://github.com/paritytech/staking-miner-v2) Submit NPos election solutions and get rewards.\n- [polkadot-introspector](https://github.com/paritytech/polkadot-introspector) Tools for monitoring Polkadot nodes.\n- [ink!](https://github.com/paritytech/ink) Smart contract language that uses `subxt` for allowing developers to conduct [End-to-End testing](https://use.ink/basics/contract-testing/end-to-end-e2e-testing) of their contracts.\n- [Chainflip](https://github.com/chainflip-io/chainflip-backend) A decentralised exchange for native cross-chain swaps.\n- [Hyperbridge](https://github.com/polytope-labs/hyperbridge) A hyperscalable coprocessor for verifiable cross-chain interoperability.\n- [pop CLI](https://github.com/r0gue-io/pop-cli) The all-in-one tool for Polkadot development.\n\n## Alternatives\n\nIf you're working in TypeScript / JavaScript, [polkadot-api](https://github.com/polkadot-api/polkadot-api) is an excellent and actively developed alternative.\n\n#### License\n\nThe entire code within this repository is dual licensed under the _GPL-3.0_ or _Apache-2.0_ licenses. See [the LICENSE](./LICENSE) file for more details.\n\nPlease \u003ca href=\"https://www.parity.io/contact/\"\u003econtact us\u003c/a\u003e if you have questions about the licensing of our products.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fsubxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Fsubxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fsubxt/lists"}