Dango Rust SDK
The Rust SDK is a thin GraphQL + REST client over a Dango node, plus key-management and transaction-signing utilities.
It exposes:
HttpClient— queries (query_app,query_store,simulate,query_block, …), tx broadcast, and macro-generated paginators for indexer connections.WsClientandSession— GraphQL subscriptions overgraphql-transport-ws.SingleSigner— typestate signer for Dango single-signature accounts.Secrettrait withSecp256k1andEip712implementations, andKeystorefor AES-256-GCM at-rest encryption.
The SDK is a thin transport: there are no Dango action helpers. Transactions are composed by building Messages (re-exported by the SDK) and passing them to the signer.
Start here
- Installation — add
dango-sdkto a Cargo project. - First call — query the chain status with
HttpClient. - Project setup — endpoints, keys, env vars, runtime.
Concepts
- Clients — when to reach for
HttpClientvsWsClient. - Signers and authentication — the
Secrettrait andSingleSigner. - Transactions — compose, sign, broadcast.
- Subscriptions — multiplexed
Sessionvs dedicatedWsClient::subscribe. - Encoding and types — base units,
Addr,Hash256, codegen response types. - Error handling —
anyhow::Erroreverywhere except subscription items, which surfaceWsError. - Rate limits and quotas — server-side limits and how to shape the client around them.