Skip to content

0.7.0

Latest

Choose a tag to compare

@vsima vsima released this 10 Sep 22:03
· 2 commits to main since this release
v0.7.0
69e6718

Bounded autonomy for agents lands: a wallet on the native SDK can give a connected dApp (an AI agent, say) hard spending limits the wallet enforces itself before any approver is asked, an optional auto-approve line under them, and a record of every outcome — plus approval-sheet summaries, WalletConnect interop fixes, exactly-once request handling, and doc comments on every public declaration, merged since v0.6.0.

New — bounded autonomy for agents (canton-dapp-wallet / CantonDappWalletKit)

  • DappSpendPolicy — per-peer caps decided by the wallet before the approver is asked: maxPerTransaction, a rolling-24h dailyCap per instrument (from spend receipts via a SpendLedger seam, fail-loud on an unreadable store), allowedInstruments, allowedReceivers, minRequestInterval. An optional autoApproveBelow (default off) lets a transfer under the line skip the approver; anything above a cap is refused as USER_REJECTED with a reason, and anything unparseable, non-positive, or not a plain token-standard transfer always asks the human. The check and the receipt run under one per-session submission lock, so two concurrent requests cannot both pass a daily cap.
  • DappActivity + DappActivityObserver — every session outcome reported to the host, approver asked or not: connected/declined, signed/declined, requested, auto-approved, refused, rate-limited, executed, failed. Observer exceptions never break a request.
  • DappRequestContext — the dApp's WalletConnect deadline reaches approve(request, context), so an approver that defers its answer runs on the dApp's own clock. Defaults keep existing approvers compiling.
  • DappCommandSummary — strictly recognises a submission that is exactly one token-standard TransferFactory_Transfer and returns receiver, amount, instrument, memo, and expiry for approval sheets; anything else degrades to one description line per command, so a sheet never vouches for what it cannot parse.
  • Idempotent connect — an already-granted peer gets its grant back without a new prompt (agents call connect before every request).

Live-verified in the reference wallets against LocalNet (Pixel 11 Pro on StrongBox; iOS simulator) with an MCP-driven agent: 1 CC auto-approved with no sheet, 5 CC escalated to the approver, 100 CC refused. Guide: docs/agent-spend-policy.md.

WalletConnect (canton-dapp-wc / CantonDappWCKit)

  • Exactly-once requests — clients re-emit a still-pending request and the relay can redeliver one; the adapters now answer each (topic, requestId) once and hand the same answer to any duplicate, so a redelivered payment never reaches the approver twice.
  • Namespace interop — sessionNamespaces takes the proposal's requested methods and approves the advertised canton_-prefixed set plus every requested method the engine can serve, bare or prefixed. The old advertise-only approval silently stranded CIP-0103-verbatim dApps at connect.

Fixes

  • TokenStandardClient.createTransfer backdates its default requestedAt by a 60s clock-skew allowance: the registry enforces requestedAt <= ledger time, so a sender clock seconds fast failed every transfer (surfaced live by a phone running 2.7s ahead).

Docs

  • A doc comment on every public declaration, Kotlin (KDoc) and Swift (///), across all modules.
  • Generated API reference (Dokka + DocC) published on the project site, alongside the new site itself.
  • The roadmap moved out of the README into docs/roadmap.md.

Compatibility

Canton 3.5.11–3.5.12 · Ledger API com.daml.ledger.api.v2. No proto or generated-stub changes since 0.6.0.

Artifacts

Maven Central (group io.github.vsima.canton): canton-ledger-api, canton-sdk, canton-wallet-sdk, canton-wallet-android, canton-dapp, canton-dapp-wallet, canton-dapp-lan, canton-dapp-wc.

Swift (SPM, one package canton-mobile-sdk): CantonLedgerAPI, CantonKit, CantonWalletKit, CantonDappKit, CantonDappWalletKit, CantonDappLanKit, CantonDappWCKit.