1
Install the SDK
- npm
- yarn
- pnpm
2
Initialize on app load
Call
init() once, early in your app’s lifecycle. This registers the default wallet
adapters and silently restores a previous session without opening the wallet picker.3
Connect a wallet
Call
connect() in response to a user action (for example, a “Connect wallet” button).
This opens the wallet picker and runs the authentication flow.4
Read the connected party
Once connected, read the account the user marked as primary.
5
Submit a transaction
Use
prepareExecute() to submit Daml commands. The SDK prepares the transaction, asks
the user to approve and sign it in their wallet, and submits it to the ledger.This example uses the built-in
Ping template to prove the round-trip works. For a real
dApp, submit commands from your own Daml package. See
Parties & transactions for details.6
Handle disconnect
Let the user end their session.
Next steps
- Connect & Sessions — Connect, restore sessions, check status, and disconnect.
- Parties & Transactions — Work with parties, sign messages, execute transactions, and query the ledger.
- Wallet Discovery — Customize the wallet picker and add WalletConnect or custom remote wallets.