Setup
Install the required packages:Creating a DFNS-backed viem account
UseDfnsWallet and toAccount from the SDK to create a viem-compatible account:
Sending transactions
Simple ETH transfer
Contract interaction
EIP-712 typed data signing
Account abstraction (gasless transactions)
DFNS wallets work with account abstraction providers for gasless transactions. The SDK includes examples for:Example with Alchemy
Multicall (batch transactions)
Batch multiple contract calls in a single transaction:Reading contract data
Use a public client for read operations (no signing needed):Using DFNS Broadcast API instead
For better policy integration, you may prefer using the DFNS Broadcast API directly:Related
viem examples
Complete working examples
TypeScript SDK
DFNS TypeScript SDK documentation
EVM Signing
EVM signature types reference
EVM Broadcast
EVM transaction broadcast reference