Rust SDK API Reference
Rust SDK APIs are grouped by whether they are shared across client modes or use a non-blocking or blocking Solana RPC client.
The default crate features expose sns_sdk::non_blocking. Enabling blocking replaces that namespace with sns_sdk::blocking. Shared parsing, derivation, types, and instruction builders are available in either mode.
Shared APIs
| API family | Description |
|---|---|
| Name-registry instructions | Create, update, transfer, and delete raw name accounts |
| Domain registration | Build top-level .sns registration instructions |
| Record instructions | Build V2 record content and verification instructions |
| Derivation | SNS, SRS, record, and name-account key derivation |
| Tokenized domains | Shared tokenized-domain result types |
| Primary domains | Primary-domain account parsing, derivation, and instruction construction |
| Record types and keys | Record enums, versions, classes, and account-key derivation |
| Record V1 codecs | Legacy record serialization, deserialization, and signature checks |
| Record V2 codecs | Current record decoding, content codecs, and verification |
| TLD parsing | Supported read suffixes and canonical .sns write validation |
Non-blocking APIs
These modules use solana_client::nonblocking::rpc_client::RpcClient and are available in the default build.
| API family | Description |
|---|---|
| Domain resolution | Resolve full domains with ordinary or safe SRS/SNS target checks |
| Name registries | Read one or multiple SPL Name Service accounts |
| Reverse lookup | Reverse-resolve one or multiple name-account keys |
| Wallet domains | List top-level name-account keys owned by a wallet |
| Tokenized domains | Retrieve tokenized domains and NFT owners |
| Primary domains | Retrieve a wallet's primary name-account key |
| Record V1 | Read legacy record accounts |
| Record V2 | Read current record accounts |
| Subdomains | Query subdomains; sub-registrar queries require the subdomain feature |
| Sub-registrars | Read sub-registrar state; requires the subdomain feature |
Blocking APIs
These modules use solana_client::rpc_client::RpcClient and are available when the crate enables blocking.
| API family | Description |
|---|---|
| Domain resolution | Resolve full domains with ordinary or safe SRS/SNS target checks |
| Name registries | Read one or multiple SPL Name Service accounts |
| Reverse lookup | Reverse-resolve one or multiple name-account keys |
| Wallet domains | List top-level name-account keys owned by a wallet |
| Tokenized domains | Retrieve tokenized domains and NFT owners |
| Primary domains | Retrieve a wallet's primary name-account key |
| Record V1 | Read legacy record accounts |
| Record V2 | Read current record accounts |
| Subdomains | Query subdomains; sub-registrar queries require the subdomain feature |
| Sub-registrars | Read sub-registrar state; requires blocking and subdomain |