Dfns Rust SDK
Welcome, builders. This repo holds the Dfns Rust SDK. Useful links:
Installation
Quick Start
use ;
async
User Action Signing
Some operations (like creating wallets or signing transactions) require user action signing.
The transport handles the challenge dance (/auth/action/init -> sign -> /auth/action)
automatically; you provide the signing step by implementing the UserActionSigner trait
with your credential's key material:
use Arc;
use async_trait;
use Error;
use ;
use CreateWalletRequest;
use ;
async
Available Domains
The client provides access to the following API domains:
client.address_watches- Address watch operations (6 endpoints)client.agreements- Agreement management (2 endpoints)client.allocations- Allocation management (6 endpoints)client.auth- Authentication and user management (56 endpoints)client.exchanges- Exchange integrations (9 endpoints)client.fee_sponsors- Fee sponsor management (7 endpoints)client.keys- Key management (12 endpoints)client.networks- Network information (7 endpoints)client.payins- Payin operations (6 endpoints)client.payouts- Payout operations (5 endpoints)client.permissions- Permission management (8 endpoints)client.policies- Policy management (8 endpoints)client.signers- Signer management (17 endpoints)client.staking- Staking operations (6 endpoints)client.swaps- Token swap operations (5 endpoints)client.vaults- Vault operations (11 endpoints)client.wallets- Wallet operations (29 endpoints)client.webhooks- Webhook subscriptions (8 endpoints)
Each domain provides typed methods for all available API endpoints.
Error Handling
All methods return Result<T, dfns_sdk_rust::Error>:
use Error;
match client.wallets.get_wallet.await
The Error enum covers API errors (decoded and raw), configuration errors, missing or
failing signers, transport failures, and (de)serialization failures.
License
MIT License - See LICENSE file for details.