canton-network-docs/SDKsdApp SDKGuides
Parties & Transactions
Once a wallet is connected, your dApp can read the user’s Canton parties, sign messages,
submit transactions, and query the ledger through the authenticated session.
All examples use the high-level SDK. For the equivalent low-level calls, see the
Provider API.
Validate the network before submitting transactions so your dApp does not act against an
unexpected network.
Use this to read ledger data (contracts, events, version) without standing up your own
authenticated Ledger API client.
List the user’s parties
A user may have access to multiple Canton parties (accounts). List them and find the one they marked as primary.Get the primary party
If you only need the primary account, read it directly.React to account changes
Read the active network
Sign a message
Sign an arbitrary human-readable string with the primary account. Show the user what they are signing before you request it.Execute a transaction
prepareExecute() handles the full lifecycle: it prepares the Daml commands, requests the
user’s approval and signature in their wallet, and submits the transaction to the ledger.
For a first end-to-end test you can use the built-in
Ping template
(#AdminWorkflows:Canton.Internal.Ping:Ping) to prove the round-trip works. For a real
dApp, submit commands from your own Daml package.Track a transaction
Subscribe toonTxChanged to follow a transaction through its lifecycle
(pending → signed → executed, or failed).
Query the ledger
Proxy authenticated requests to the Canton JSON Ledger API through the user’s session.Next steps
- Wallet Discovery — Customize the wallet picker and add WalletConnect or custom remote wallets.
- API Reference — Full signatures, parameters, and return types.