Provider interface:
new WalleyAdapter().provider(), or through the dApp SDK discovery registry. Methods that need user approval (connect, signMessage, prepareExecute, prepareExecuteAndWait) open a Walley popup; the rest resolve locally from the persisted session.
Methods that require an existing connection —
getPrimaryAccount, getActiveNetwork, signMessage, prepareExecute, prepareExecuteAndWait, and ledgerApi — throw if the wallet is not connected. Call connect first, or guard with isConnected / status.Connection
connect
Opens a popup where the user approves the connection. On success the session is persisted to localStorage and restored automatically on subsequent loads.
signMessage in params; the base64 Ed25519 signature comes back on the result:
disconnect
Clears the active session and removes it from localStorage. Returns null.
isConnected
Returns a boolean for the current connection state without opening a popup.
status
Returns the full provider, connection, network, and session state without opening a popup.
Accounts & network
listAccounts
Returns an array of wallets. Contains a single entry when connected, and is empty when disconnected.
getPrimaryAccount
Returns the connected wallet. Throws if not connected.
getActiveNetwork
Returns the network the wallet is connected to. Throws if not connected.
Signing & transactions
signMessage
Opens a popup for the user to sign an arbitrary message.
prepareExecute
Opens a popup for the user to review, sign, and submit Daml commands. Fire-and-forget — resolves to null once submitted.
prepareExecuteAndWait
Same as prepareExecute, but waits for the transaction to be committed and returns the result.
ledgerApi
Forwards a read-only Canton JSON Ledger API request through the wallet’s authenticated proxy. See Ledger API for details.
Error handling
The provider throws standard Canton JSON-RPC errors:| Situation | Error |
|---|---|
| Unknown method | rpcErrors.methodNotFound |
| Action requires a connection that isn’t present | rpcErrors.internal (“Not connected”) |
| User closes the popup without approving | providerErrors.userRejectedRequest |
| Popup blocked by the browser | rpcErrors.internal (“Popup blocked…”) |
Expired wallet session on a ledgerApi call | providerErrors.unauthorized — reconnect |
Sessions & persistence
- Sessions are stored in
localStorageunder a single key and restored automatically on the next page load. - The stored session is scoped to your dApp’s origin by the browser.
- Call
disconnectto clear it. There is no server-side session to revoke from the dApp side — the user manages wallet-side access from within Walley.