Skip to main content

Request signing

All state-changing requests made to the DFNS API must be cryptographically signed. DfnsClient handles the challenge flow automatically when you configure a signer: it calls /auth/action/init, hands you the challenge, and replays your assertion on the real request.
For a detailed explanation of request signing and User Action Challenges, see Signing requests.

Client configuration

Both DfnsClient and DfnsDelegatedClient take the same Options:

Implementing a signer

The SDK does not ship a key signer. It defines the UserActionSigner trait and leaves the credential-specific crypto to you, so the same client works with a raw key, an HSM, or a KMS:
The exact clientData shape and stringification rules are defined in Credentials data. Incorrect stringification causes Unable to verify signature errors.
Calling a state-changing method without a configured signer returns Error::SignerRequired.

Available API domains

The client provides typed access to all DFNS API domains:

Delegated signing

DfnsDelegatedClient exposes the same domains, but every operation that requires a user action signature is split into two methods: Read-only methods are identical on both clients. See Delegated wallets for a full implementation guide.

Error handling

All methods return Result<T, dfns_sdk_rust::Error>:
Last modified on August 14, 2026