canton-network-docs/Wallet GatewayUse the Wallet Gateway
Automate with the User API
The User API is the JSON-RPC 2.0 API behind the User UI. Anything a person can do in the UI —
manage sessions, networks, identity providers, wallets, and transactions — you can do
programmatically with the same API. Use it to script wallet setup, build a custom wallet UI
embedded in your app, or automate operations from a backend.
This guide walks through a typical automation flow. For the full method list, authentication
rules, and the OpenRPC specification, see the
User API reference.
Most methods require the
The Wallet Gateway issues a session tied to the authenticated user. List active sessions with
Admins can also manage these at runtime with
Read transactions with
The User API drives your own wallets and setup. It is different from the
dApp API, which dApps call through the dApp
SDK to connect to a user’s wallet.
Before you start
You need:- A running Wallet Gateway you can reach (for example
http://localhost:3030). See the Quickstart. - At least one configured network and identity provider. See Networks & identity providers.
- A way to obtain a JWT from that identity provider for the user you are automating.
POST requests to the User API base path
(/api/v0/user by default, configurable via server.userPath):
Authorization header. Three methods are available without it so a
client can bootstrap a connection: addSession(), listNetworks(), and listIdps().
Parameter shapes vary per method. Use the
OpenRPC specification
as the source of truth for exact request and response fields.
Create a session
Start the connection withaddSession() (no authentication required), then complete your
identity provider’s auth flow to obtain a JWT. Pass that JWT in the Authorization header on
every later call.
listSessions() and end the current one with removeSession().
Discover networks and identity providers
List what the Wallet Gateway offers before creating wallets. Both calls work without authentication.addNetwork(), removeNetwork(), addIdp(), and
removeIdp(). Admin privileges are granted to the user configured as server.admin; see
Configure the Wallet Gateway.
Create and manage wallets
Create a wallet by choosing a network and a signing provider, then manage the set with the wallet methods.Sign and execute a transaction
Once a wallet exists, sign and submit transactions withsign() and execute(), then read
status with the transaction methods.
getTransaction() and listTransactions(). Signing is delegated to the
wallet’s signing provider, so the key
never leaves that provider.
Follow transactions in real time
The dApp API exposes Server-Sent Events for real-time updates (txChanged, accountsChanged,
connected, statusChanged). If you are building a custom UI, subscribe to them instead of
polling. See Real-time events.
End the session
When you are done, end the session:Next steps
User API reference
Every method, authentication rules, rate limits, and the OpenRPC spec.
Manage wallets
The same operations in the User UI.
Approve & sign transactions
How approval and signing work end to end.
Signing providers
Where each wallet’s keys live and who signs.