The Wallet Gateway exposes two JSON-RPC 2.0 APIs: one for dApps interactions and one for user interactions. Both APIs use the same base URL but different paths.Documentation Index
Fetch the complete documentation index at: https://docs.canton.network/llms.txt
Use this file to discover all available pages before exploring further.
API Endpoints
- dApp API:
/api/v0/dapp- Used by decentralized applications to interact with wallets and submit transactions - User API:
/api/v0/user- Used by users to manage wallets, networks, and signing providers
dApp API Reference
The dApp API enables decentralized applications to connect to wallets, query ledger state, prepare transactions, and submit commands. This API is designed for programmatic access from web or mobile applications. Authentication: The dApp API requires a valid JWT token in theAuthorization header:
User API Reference
The User API enables users to manage their wallets, configure networks, manage identity providers, create parties, and interact with their wallet through the web UI. Methods:| Category | Method | Description |
|---|---|---|
| Sessions | addSession() | Create a new session (unauthenticated, used for initial connection) |
removeSession() | End the current session | |
listSessions() | List sessions for the current user | |
| Networks | listNetworks() | List all configured networks |
addNetwork() | Add a new network configuration | |
removeNetwork() | Remove a network configuration | |
| Identity Providers | listIdps() | List all identity providers |
addIdp() | Add a new identity provider | |
removeIdp() | Remove an identity provider | |
| Wallets | createWallet() | Create a new wallet (party) on a network |
listWallets() | List all wallets for the current user | |
setPrimaryWallet() | Set the primary wallet | |
removeWallet() | Remove a wallet | |
syncWallets() | Sync wallets with the ledger | |
isWalletSyncNeeded() | Check if wallet sync is needed | |
| Transactions | sign() | Sign a transaction |
execute() | Execute a signed transaction | |
getTransaction() | Get a transaction by ID | |
listTransactions() | List transactions |
addSession()listNetworks()listIdps()
Server-Sent Events (SSE) Support
The dApp API supports Server-Sent Events (SSE) for real-time notifications. Connect to the/events path relative to the dApp API base URL (e.g. /api/v0/dapp/events). Authenticate by passing the JWT token as the token query parameter (the Authorization: Bearer header is also supported):
- Transaction status changes (
txChanged) - Account changes (
accountsChanged) - Session/connection state (
connected,statusChanged)
Rate Limiting
API requests are rate-limited to prevent abuse. The default limits can be configured in the server configuration. Rate limit headers are included in responses:X-RateLimit-Limit- Maximum number of requests per windowX-RateLimit-Remaining- Remaining requests in current windowX-RateLimit-Reset- Time when the rate limit resets
CORS Configuration
Cross-Origin Resource Sharing (CORS) is configured via theallowedOrigins setting in the server configuration. By default, all origins are allowed (['*']), but for production deployments, you should restrict this to known dApp origins.
Example Configuration:
allowedOrigins to "*".