Repository navigation
0.2.0
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 twicesubmitAndWait(...)→ update id;submitAndWaitForTransaction(...)→ committed transactionRetryPolicy: exponential backoff with jitter; a server-suggestedRetryInfodelay takes precedence
Update streams
updates(UpdateSubscription)—Flow(Kotlin) /AsyncThrowingStream(Swift) overUpdateService.GetUpdatesthat transparently reconnects and resumes from the last received offset: one uninterrupted, gap-free, duplicate-free streamLedgerUpdatemodels transactions, reassignments, topology transactions, and offset checkpoints, each exposing its resume offsetledgerEnd()for anchoring fresh subscriptions
Typed errors
CantonError/CantonExceptiondecode Canton's structuredgoogle.rpcdetails: 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 intestdata/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.