Documentation Index
Fetch the complete documentation index at: https://docs.dfns.co/llms.txt
Use this file to discover all available pages before exploring further.
Request signing
All state-changing requests made to the Dfns API must be cryptographically signed. The SDK handles this automatically when you configure a signer.For a detailed explanation of request signing and User Action Challenges, see Signing requests.
Authentication tokens
The client requires a validauthToken. See Required headers for details on obtaining tokens.
KeySigner configuration
TheKeySigner class provides factory methods for each supported key type. Each method takes a credential ID and the private key bytes:
| Parameter | Description |
|---|---|
credentialId | ID of the credential registered with your token. Find it in the Dfns Dashboard under Settings > Service Accounts or Settings > Personal Access Tokens. |
privateKeyBytes | Private key bytes in the format expected by the factory method (see table below). |
| Factory method | Key format |
|---|---|
fromEd25519PrivateKey | Raw 32-byte seed |
fromEcdsaP256PrivateKey | PKCS#8 DER encoded |
fromSecp256k1PrivateKey | Raw 32-byte big-endian scalar |
fromRsaPrivateKey | PKCS#8 DER encoded |
If you have a PEM file, strip the header/footer lines and Base64-decode the content to get the DER bytes.
Sync vs async clients
The SDK provides both synchronous and asynchronous clients:Available API domains
The client provides typed access to all Dfns API domains:| Domain | Description |
|---|---|
client.wallets | Wallet creation, listing, and management |
client.keys | Key management operations |
client.policies | Policy rules and approvals |
client.permissions | Access control and permissions |
client.webhooks | Webhook configuration |
client.signers | Signer management |
client.staking | Staking operations |
client.networks | Network information |
client.exchanges | Exchange integrations |
client.feeSponsors | Fee sponsorship |
client.swaps | Token swap operations |
client.agreements | Agreement management |
client.allocations | Allocation management |
client.auth | Authentication helpers |
client.payouts | Payout operations |
