Repository navigation
v0.8.0: Canton 3.7, Splice 0.10.0 bindings, Daml SDK 3.7.1 🚀
🚀 Canton .NET SDK: 0.8.0
TL;DR: Canton 3.7: the clients target Canton 3.7.1 and support Canton 3.7 only. External-party onboarding accepts protocol version 37's v31 topology transactions. Canton 3.6 users stay on 0.7.x. 0.8.0 is a breaking release that opens the Canton 3.7 line on Canton 3.7.1 ✅, ships the Splice.* bindings for Splice 0.10.0 ✅ and moves to Daml SDK 3.7.1 ✅. Read the upgrade notes below before bumping.
💥 Upgrading from 0.7.1
⚠️ Bump every package to0.8.0together, install the new Daml SDK withdpm install 3.7.1, then regenerate your bindings. Delete the generated directory once so files from before the upgrade are cleared. Anything compiled against an earlier package must be rebuilt, or it throwsMissingMethodException.
- 🌐 Canton 3.7 only. The vendored gRPC protos and JSON Ledger API spec move to Canton 3.7.1, and running the clients against an older participant is untested and unsupported. If your participant runs Canton 3.6, stay on 0.7.x.
- 🗑️
GetPreferredPackageVersionis gone from both raw tiers, because Canton 3.7 deletes the RPC and its route. CallGetPreferredPackagesinstead. The experimental RESTIInteractiveSubmissionApiis gone too. - 🧩 Interfaces gained members.
ICantonLedgerClientgainsGetEventsByContractIdAsync<TInterface, TView>and the raw RESTIStateServiceApigainsConvertRecordTimeToOffset. A type that implements either outside the SDK must add them. - 📸 Snapshot reads take a timeout and an unreadable-rows policy.
QueryActiveAsync<TInterface, TView>and theSnapshotAsync/SnapshotActiveAsyncextensions gaintimeoutandunreadableRowsbefore theCancellationToken, and return anActiveSnapshot<TRow>. A call that passes the token by position must name it:cancellationToken: token. - 🏷️
OneOrThrow,OneOrThrowAsyncandThrowIfErrortake no operation name. Delete the string argument: the outcome now carries the template and choice that produced it. - 🔤 Two
DamlErrorCategorymembers take Canton's names:MaliciousOrFaultyBehaviouris nowSecurityAlertandAuthorizationChecksFailedis nowInsufficientPermission. The numeric values are unchanged, and there is no alias. - 🧬 The generated
TryCreateAsynctakesworkflowId,commandIdandtimeoutbeforeconfigure. A call that passesconfigureby position must name it (configure: ...). - 🧪 Test doubles changed shape.
RecordedSubmission.Commands,ReassignmentandExecutiongain a trailingTimeoutmember,CompletionStreamEvent.CheckpointgainsSynchronizerTimes, andWithSubmissionOutcome,WithThrowingCallFailureandCompletionEvents.Checkpointchanged signature. Update positional constructions and deconstructions, then rebuild your test assemblies. - 🆔 Conformance packages have new identities. The corpus in
Daml.Codegen.Testing.Conformanceis rebuilt on Daml SDK 3.7.1 with new package names and ids, andIConformanceProbecarries the real package id and name of its DAR. Take ids from the generated types, never from literals.
Coming from before 0.7.1? See the [0.7.1] and [0.7.0] sections of the CHANGELOG first.
✨ Highlights
- 🌐 The Canton 3.7 Ledger API on both raw tiers:
ConvertRecordTimeToOffset,ReassignmentCosts,IncludeIncompleteReassignmentson active-contract requests, the validation package overrides onUnassignCommand, andProtocolVersionon external-party topology requests. - 🧺
CommandBatch: submit several typed commands as one atomic transaction and read each command's typed result back.var batch = new CommandBatch(); var ended = batch.Add(Connection.ChoiceDisconnect, connectionId, new Connection.Disconnect(actor)); var link = batch.AddCreate(new InviteLink(...)); var results = (await client.TrySubmitBatchAsync(batch, actor)).OneOrThrow(); ContractId<InviteLink> created = results.Get(link);
- 🛟
RecoverAsync: resolves a write that failed withCommitState.Unknowninto committed, rejected or lost, by reading the completion stream. - 🧱 New package
Canton.Ledger.AspNetCore:AddCantonLedgerProblemDetails()answers a failed ledger command as RFC 9457ProblemDetails(409for contention,202for a command that committed), andProducesLedgerProblems()declares those responses in your OpenAPI document. - 🪙 Splice Token Standard, typed end to end:
Splice.Api.Token.Registry.Clientis a typed client for registries' off-ledger API, andCreatedEventBlob.Decodereads a disclosed contract's signatories, observers and typed payload before you use it. - 🏗️ Richer generated code: keyed templates get
Try<Choice>ByKeyAsync, every archivable template and interface implementsIArchivable<TSelf>, and a module's top-level literal values becomepublic constfields.
🐛 Fixed
- 🔐 External-party onboarding decodes the
v31topology transactions a protocol version 37 synchronizer returns, as well asv30, instead of refusing them. - 🔀 A snapshot that holds a contract with a reassignment in flight returns that contract once instead of throwing.
- 🛑 Generating a second DAR into an output directory another package already fills now stops with a clear error instead of deleting the first package's bindings.
The full list is in the CHANGELOG.
📦 What's in the release
All 17 SDK packages ship on the single 0.8.0 version line, including the newly published Canton.Ledger.AspNetCore, with the dpm codegen-cs component at oci://ghcr.io/peacefulstudio/dpm-codegen-cs:0.8.0. The Splice.* bindings are generated from Splice 0.10.0 and the Daml.Finance.* bindings from Daml Finance 2.10.0, each versioned after its DAR.