Skip to main content
Every Walley action is invoked through the standard Canton Provider interface:
Get a provider from the adapter with 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.
You can optionally have the wallet sign a message as part of the same approval — handy for proving control of the party during login. Pass 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.
See Transactions & Fees for command shapes and the fee model.

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:

Sessions & persistence

  • Sessions are stored in localStorage under 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 disconnect to clear it. There is no server-side session to revoke from the dApp side — the user manages wallet-side access from within Walley.