Skip to content

Releases

0.7.0

Choose a tag to compare

@vsima vsima released this 10 Sep 22:03
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.

0.6.0

Choose a tag to compare

@vsima vsima released this 15 Aug 02:58
v0.6.0
0c7727b

The CIP-0103 dApp connectivity layer lands: a wallet on the native SDK can take connections from dApps and sign their transactions, and a dApp can drive a wallet — plus TLS trust pinning, expiry-aware token handling, an encrypted Android wallet store, and the fee/traffic/history read work merged since v0.5.0.

New — dApp connectivity (CIP-0103)

Four Kotlin artifacts and four Swift products, sitting beside the wallet stack so an app that only talks to a wallet never links the ledger stubs or signing drivers:

  • canton-dapp / CantonDappKit — dApp side: protocol types, JSON-RPC codec, DappClient, the transport seam.
  • canton-dapp-wallet / CantonDappWalletKit — wallet side: DappSession, per-peer account grants, the approval delegate, the prepare → verify → sign → execute pipeline, a ledgerApi read proxy (allowlist policy), and signMessage with domain separation.
  • canton-dapp-lan / CantonDappLanKit — LAN gRPC transport: one CIP-0103 session across a real socket, no relay.
  • canton-dapp-wc / CantonDappWCKit — WalletConnect transport adapter, speaking the ecosystem's canton_ methods; the reference wallets drive it over a live relay (Android on-device, iOS on the simulator).

Both platforms are held to golden vectors from OpenRPC 0.5.0 and live-verified end-to-end on LocalNet. readAs is validated against the peer's grant like actAs, and the approval-request docs describe the actual flow.

Transport security

  • Pluggable TLS trust — pin the Ledger API to an operator's CA, on both platforms.

Auth & token handling

  • Async token provider, expiry-aware caching with a refresh leeway, and stream auth recovery.

Android

  • Encrypted wallet store on Jetpack DataStore (AES-GCM under an Android Keystore key), emulator- and device-verified. Minimum is API 26.

Reads, fees & economics (both SDKs)

  • Transfer-fee preview and synchronizer traffic purchase.
  • ValidatorClient (the LocalNet tap harness promoted to a public client).
  • Scan holdings summaries; transfer-level semantics in holdings history.
  • Hardening: reject duplicate node ids in prepared-transaction hashing; gate stream retry-budget resets on a healthy-connection window.

Dev tooling

  • LocalNet faucet tool; public init for AllocatedExternalParty (restore a persisted identity).

Compatibility

Canton 3.5.11–3.5.12 · Ledger API com.daml.ledger.api.v2.

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.

0.5.0

Choose a tag to compare

@vsima vsima released this 07 Aug 21:45

Device-held keys, hardware-verified at every tier.

New: canton-wallet-android

AndroidKeystoreSigningDriver — P-256 keys generated inside the Android Keystore, non-exportable, alias-addressed for reuse across launches. Attempts StrongBox first and falls back to the TEE-backed keystore, reporting the achieved security level honestly via KeyInfo (STRONGBOX / TRUSTED_ENVIRONMENT / SOFTWARE); pass requireStrongBox = true to fail instead of falling back. Maven Central: io.github.vsima.canton:canton-wallet-android:0.5.0 (minSdk 23).

Hardware verification, all on physical devices:

  • StrongBox dedicated secure element — Samsung Galaxy Z Flip5 (4/4 instrumentation tests, no-silent-fallback contract asserted)
  • TEE keystore fallback — OnePlus Open (the path most Android devices take)
  • Secure Enclave — iPhone XR (0.4.0), continuously exercised in CI on Apple Silicon

Also since 0.4.0

  • Transfer preapprovals: receiver-signed proposal → validator accepts → one-step ("direct") transfers with no inbox round-trip; scan lookup included. Live-verified against a real Amulet registry.
  • Custody hook (DelegatingSigningDriver) and WalletStore (in-memory both platforms, Keychain on Apple).
  • Migration map from @canton-network/wallet-sdk (docs/migrating-from-wallet-sdk.md).

Lockstep: Swift via this tag (SPM), Kotlin on Maven Central (canton-wallet-sdk, canton-wallet-android, canton-sdk, canton-ledger-api, all 0.5.0). Targets Canton 3.5.11–3.5.12. Pre-1.0: expect breaking changes.

🤖 Generated with Claude Code

0.4.0

Choose a tag to compare

@vsima vsima released this 07 Aug 20:05

The wallet-grade release: canton-mobile-sdk is now the native wallet stack for Canton, not just Ledger API bindings.

New: wallet layer (CantonWalletKit / canton-wallet-sdk)

  • External signing with device-held keys — SigningDriver abstraction with software Ed25519/P-256 drivers and a Secure Enclave driver on Apple platforms (P-256, biometric access control, persistable enclave-bound handles). Verified on physical hardware (iPhone XR) and continuously in CI on Apple Silicon.
  • External party onboarding — GenerateExternalPartyTopology → sign → AllocateExternalParty, live-verified with Ed25519 and EC P-256 keys against Canton 3.5 and a Splice participant.
  • Interactive submission — prepare → sign → execute with disclosed-contract support; a P-256 external party creates contracts end-to-end in the integration suite.
  • CIP-0056 token standard client — holdings and the pending-instruction inbox via interface-filtered ACS reads; two-step transfers (create/accept/reject/withdraw) built from registry choice contexts; Daml-JSON→gRPC AnyValue bridge. Live-verified against a real Amulet registry (Splice LocalNet): tap → transfer → inbox → externally-signed accept → holdings.
  • Read layer — parsed holdings history from ACS-delta update streams; Scan API client (DSO party, ANS name resolution).

Also

  • SPDX license headers on all hand-written sources, CI-enforced; NOTICE file added
  • Splice LocalNet integration harness (integration/run-localnet.sh)
  • On-device enclave self-check in the iOS sample app (devicectl-drivable)

Lockstep as always: Swift via this tag (SPM), Kotlin on Maven Central as io.github.vsima.canton:canton-wallet-sdk:0.4.0 (new), canton-sdk:0.4.0, canton-ledger-api:0.4.0. Targets Canton 3.5.11–3.5.12. Pre-1.0: expect breaking changes.

🤖 Generated with Claude Code

0.3.0

Choose a tag to compare

@vsima vsima released this 07 Aug 13:34

Full state sync and a better mobile transport. With this release the roadmap for the core SDK is complete: connect, authenticate, submit, stream, decode — with typed errors and value codecs — on both platforms.

New

ACS bootstrap

  • activeContracts(parties:activeAtOffset:) — the active contract set as typed ActiveContract values. Retryable failures restart the snapshot from scratch: results are never partial.
  • activeContractsSnapshot(parties:) — ledger end + ACS in one call. Apply the contracts, then follow updates(beginExclusive: snapshot.offset) for gap-free, duplicate-free deltas. Canton's canonical state-sync pattern as a two-call API.

Network.framework transport (Swift)

  • CantonClient now runs on HTTP2ClientTransport.TransportServices on Apple platforms — better cellular/Wi-Fi handoff and VPN behavior than raw POSIX sockets. No API changes; all live integration tests run over the new transport.

Scope decision

The SDKs are gRPC-only by design. A JSON Ledger API fallback is deliberately out of scope: HTTP/2-hostility is a browser-era problem that native transports don't share, and a second protocol would double the cross-platform parity surface. See the README for the evidence bar that would reopen this.

Install

implementation("io.github.vsima.canton:canton-sdk:0.3.0")
.package(url: "https://github.com/vsima/canton-mobile-sdk.git", from: "0.3.0")

Compatibility: Canton 3.5.11 protos (com.daml.ledger.api.v2). Expect breaking changes before 1.0.

0.2.0

Choose a tag to compare

@vsima vsima released this 07 Aug 12:24

The core read/write loop, complete on both platforms: submit commands with dedup-safe retries, stream the resulting ledger updates with gap-free resumption, decode Canton's structured errors, and build/read Daml values ergonomically. Everything below is tested three ways — unit, wire-level fakes, and live Canton nodes in CI — with identical semantics on Swift and Kotlin.

New

Command submission

  • CommandSubmission — commands, act/read-as parties, dedup duration, synchronizer pinning; the command id defaults to a UUID that stays stable across retries, so the participant's deduplication guarantees a retried submission can never execute twice
  • submitAndWait(...) → update id; submitAndWaitForTransaction(...) → committed transaction
  • RetryPolicy: exponential backoff with jitter; a server-suggested RetryInfo delay takes precedence

Update streams

  • updates(UpdateSubscription) — Flow (Kotlin) / AsyncThrowingStream (Swift) over UpdateService.GetUpdates that transparently reconnects and resumes from the last received offset: one uninterrupted, gap-free, duplicate-free stream
  • LedgerUpdate models transactions, reassignments, topology transactions, and offset checkpoints, each exposing its resume offset
  • ledgerEnd() for anchoring fresh subscriptions

Typed errors

  • CantonError / CantonException decode Canton's structured google.rpc details: error code (ErrorInfo.reason), correlation id (RequestInfo), retryability and suggested backoff (RetryInfo)

Daml value codecs

  • Builders (DamlValues.… / Value.…) and typed readers (asParty(), requireField(…), …) for all value cases, held byte-compatible across both SDKs by shared golden vectors in testdata/values/

Examples

  • New iOS sample app (examples/ios), verified on-simulator against a live Canton node — parity with the Android sample

Install

implementation("io.github.vsima.canton:canton-sdk:0.2.0")
.package(url: "https://github.com/vsima/canton-mobile-sdk.git", from: "0.2.0")

Compatibility: Canton 3.5.11 protos (com.daml.ledger.api.v2). Expect breaking changes before 1.0.

0.1.1

Choose a tag to compare

@vsima vsima released this 07 Aug 03:11

Patch release. All Android users should upgrade from 0.1.0 to 0.1.1.

Fixed

  • R8/ProGuard: minified Android apps failed to parse Ledger API responses (CANCELLED: Failed to read message). protobuf-javalite reads generated message fields reflectively, and R8 renames them in shrunk builds. canton-ledger-api now ships consumer keep rules (META-INF/proguard/) that AGP applies automatically — no configuration needed. Verified on-device against a live gRPC server with a minified release build.

If you must stay on 0.1.0, add this rule manually:

-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
    <fields>;
}

Install

implementation("io.github.vsima.canton:canton-sdk:0.1.1")
.package(url: "https://github.com/vsima/canton-mobile-sdk.git", from: "0.1.1")

The Swift SDK is unchanged; the version bump keeps the two SDKs in lockstep.

0.1.0

Choose a tag to compare

@vsima vsima released this 07 Aug 02:37

First release of the Canton Mobile SDK — native Swift and Kotlin SDKs for the Canton Network Ledger API, generated from a single vendored proto source (Canton 3.5.11, com.daml.ledger.api.v2) and released in lockstep.

Swift (iOS 18+ / macOS 15+)

.package(url: "https://github.com/vsima/canton-mobile-sdk.git", from: "0.1.0")

Products: CantonKit (ergonomic layer), CantonLedgerAPI (generated gRPC Swift 2 bindings).

Kotlin (Android API 21+ / JVM 17+)

implementation("io.github.vsima.canton:canton-sdk:0.1.0")

Artifacts: canton-sdk (ergonomic layer), canton-ledger-api (generated gRPC bindings, protobuf lite runtime — Android-safe alongside DataStore/Firebase).

What's inside

  • Full generated Ledger API surface on both platforms (commands, updates, state, admin, interactive submission)
  • Connection management with JWT bearer-token auth (accessTokenProvider)
  • ledgerApiVersion() end-to-end on both SDKs
  • R8-verified on Android (sample app ships in examples/android)

Known limitations

Early release: the ergonomic layer covers connection/auth/version; command submission helpers, transaction stream decoding, and value codecs are on the roadmap. Expect breaking changes before 1.0.