Repository navigation
Canton .NET SDK 0.8.0 is out, for Canton 3.7 #125
monsieurleberre
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Canton .NET SDK 0.8.0 is out. It is the release for Canton 3.7: the protos and the JSON Ledger API spec are pinned at Canton 3.7.1, codegen runs on Daml SDK 3.7.1, and the
Splice.*bindings are generated from Splice 0.10.0. The clients support Canton 3.7 only, so if you are still on Canton 3.6, stay on 0.7.x.If you are new here, the SDK lets a C# / .NET team build on a Canton/Daml ledger with types all the way through. Generated C# records, typed choices and
Try…Asyncsubmission methods come from your DAR. A singleICantonLedgerClientsubmits them over gRPC or the JSON Ledger API, and a PQS client, OpenTelemetry tracing and in-memory test doubles sit alongside. It targets .NET 10 and is Apache-2.0.What changed in 0.8.0
CommandBatchsubmits several typed commands as one atomic transaction and reads each command's typed result back.RecoverAsyncresolves a write that failed withCommitState.Unknowninto committed, rejected or lost, by reading the completion stream.Canton.Ledger.AspNetCore.AddCantonLedgerProblemDetails()answers a failed ledger command as RFC 9457ProblemDetails:409for contention,202for a command that committed but whose result could not be used.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.Try<Choice>ByKeyAsync, every archivable template and interface implementsIArchivable<TSelf>, and a module's top-level literal values becomepublic constfields.ConvertRecordTimeToOffset, and external-party onboarding accepts thev31topology transactions of protocol version 37.FakeLedgerClientstages ordered outcomes, and command spans carry the Daml template id, choice and error.0.8.0 also carries everything from 0.7.1, such as codegen at
dotnet buildtime without a JDK and private-by-default telemetry: see the 0.7.1 notes on #99 and the walkthrough in #126.Upgrading from 0.7.x
0.8.0 has breaking changes. In short:
0.8.0together.dpm install 3.7.1.MissingMethodException.GetPreferredPackageVersionis gone (useGetPreferredPackages), snapshot calls that pass the token by position must name it (cancellationToken: token),OneOrThrowtakes no operation name, and twoDamlErrorCategorymembers take Canton's names (SecurityAlert,InsufficientPermission).The upgrade section of the release notes lists every change. Coming from before 0.7.1? Read the 0.7.1 upgrade notes first.
LocalNet moved too: canton-localnet v0.10.0-1 is Splice 0.10.0 on Canton 3.7.1 with protocol 37 as the default. An existing stack needs
canton-localnet down --volumesbefore you bring it up again.What's published
0.8.0line on nuget.org, including the newly publishedCanton.Ledger.AspNetCoreSplice.*bindings generated from Splice 0.10.0 and theDaml.Finance.*bindings from Daml Finance 2.10.0oci://ghcr.io/peacefulstudio/dpm-codegen-cs:0.8.0Try it, and tell us how it went 🚀
The quickest way to see it working is the mini-demo, whose v0.8.0 release is on this SDK version. One
dotnet runtakes a Token Standard V2 transfer from Daml source to a local Canton ledger, over gRPC and the JSON Ledger API, and can read it back from PQS. Share your run in the mini-demo thread: your OS, roughly how long it took, and anything you'd improve. Bugs are easiest to track as issues.If you are building something on Canton with .NET, #79 is the place to tell us about it, and we are happy to help with an integration.
Links
Peaceful Studio,
info@peaceful.studioAll reactions