The dApp SDK is a TypeScript library for building decentralized applications on the Canton Network. It provides a high-level interface for connecting to Canton wallets, managing accounts, signing messages, and executing transactions. The SDK implements the dApp API as defined in CIP-0103, establishing a vendor-neutral standard that enables any dApp to interoperate with any Canton-compatible wallet. Overview The dApp SDK decouples your application from wallet implementations, allowing users to choose their preferred wallet and signing provider. The SDK handles:Documentation Index
Fetch the complete documentation index at: https://cantonfoundation-add-app-development-module-579.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Wallet Connectivity - Connect, disconnect, and monitor connection status
- Account Management - List accounts, get the primary account, and respond to account changes
- Transaction Signing - Request user approval and signatures for Daml transactions
- Message Signing - Sign arbitrary messages for authentication or verification
- Ledger API Access - Proxy authenticated requests to the Canton JSON Ledger API
- Real-time Events - Subscribe to status changes, account changes, and transaction lifecycle events
- dApp SDK (recommended) - High-level methods like
sdk.connect(),sdk.listAccounts(), andsdk.prepareExecute()for common operations - Provider API - Low-level EIP-1193-compatible interface using
provider.request({ method, params })for direct API access
- postMessage - For browser extension wallets that inject a provider into the page
- HTTP/SSE - For remote wallets and server-side wallet gateways
window.canton, following the pattern established by Ethereum wallets. This enables wallet discovery and connection in browser environments. For extension authors, the SDK also supports namespace scanning, EIP-6963-style announcement events, and targeted postMessage routing. See the docs section Wallet providers.