paritytech/subxt là dự án mã nguồn mở trên GitHub, viết chủ yếu bằng Rust, với 488 sao. Interact with Substrate based nodes in Rust or WebAssembly
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Subxt is a library for interacting with chains in the Polkadot network. It can:
Submit Extrinsics (this is where the name comes from).
Access information at any block (eg storage values, constants, Runtime APIs, View Functions).
Subscribe to new blocks (and then do the above at them).
Do all of the above via a safe, statically typed interface or via a flexible dynamic interface.
Do most of the above via a built-in light client to interact with chains trustlessly.
Compile to WASM and run entirely in the browser, or be called via FFI in many other languages.
Be used entirely offline to provide a subset of the available functionality.
Usage
Take a look at the single-file examples folder or the project based examples folder for various smaller or
larger subxt usage examples, or read the docs to learn more.
Example
The "hello world" example of Subxt is submitting a transaction. This is what it looks like:
use subxt::{Error, OnlineClient, PolkadotConfig};
use subxt_signer::sr25519::dev;
// Generate an interface that we can use from the node's metadata.
#[subxt::subxt(runtime_metadata_path = "/path/to/polkadot_rc_metadata.scale")]
mod polkadot {}
#[tokio::main]
async fn main() -> Result<(), Error> {
// Create a new API client, configured to talk to Polkadot nodes.
let api = OnlineClient::<PolkadotConfig>::new().await?;
// Almost all actions are performed at an explicit block. Here we use
// the current block at the time of running this.
let at_block = api.at_current_block().await?;
// Build a balance transfer extrinsic.
let dest = dev::bob().public_key().into();
let balance_transfer_tx = polkadot::transactions()
.balances()
.transfer_allow_death(dest, 10_000);
// Submit the balance transfer extrinsic from Alice, and wait for it
// to be successful and in a finalized block. We get back the extrinsic
// events if all is well.
let from = dev::alice();
let events = at_block
.transactions()
.sign_and_submit_then_watch_default(&balance_transfer_tx, &from)
.await?
.wait_for_finalized_success()
.await?;
// (Optional) we can look for a specific event to learn more about
// the submission.
if let Some(event) = events.find_first::<polkadot::balances::events::Transfer>() {
println!("Balance transfer success: {event:?}");
}
Ok(())
}
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.
Chainflip A decentralised exchange for native cross-chain swaps.
Hyperbridge A hyperscalable coprocessor for verifiable cross-chain interoperability.
pop CLI The all-in-one tool for Polkadot development.
Alternatives
If you're working in TypeScript / JavaScript, polkadot-api is an excellent and actively developed alternative.
License
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.
paritytech/subxt có 488 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/paritytech/subxt. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
paritytech/subxt có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho paritytech/subxt. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
paritytech/subxt còn đang phát triển không?
Commit gần nhất trên paritytech/subxt là 3 ngày trước (theo timestamp GitHub). Repo có 295 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
paritytech/subxt là gì?
paritytech/subxt (paritytech/subxt) là dự án Rust trên GitHub. Theo mô tả gốc: Interact with Substrate based nodes in Rust or WebAssembly
paritytech/subxt viết bằng ngôn ngữ gì?
paritytech/subxt chủ yếu viết bằng Rust. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc subxt có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về subxt.