Canton.Ledger.Abstractions
0.7.1
Prefix Reserved
dotnet add package Canton.Ledger.Abstractions --version 0.7.1
NuGet\Install-Package Canton.Ledger.Abstractions -Version 0.7.1
<PackageReference Include="Canton.Ledger.Abstractions" Version="0.7.1" />
<PackageVersion Include="Canton.Ledger.Abstractions" Version="0.7.1" />
<PackageReference Include="Canton.Ledger.Abstractions" />
paket add Canton.Ledger.Abstractions --version 0.7.1
#r "nuget: Canton.Ledger.Abstractions, 0.7.1"
#:package Canton.Ledger.Abstractions@0.7.1
#addin nuget:?package=Canton.Ledger.Abstractions&version=0.7.1
#tool nuget:?package=Canton.Ledger.Abstractions&version=0.7.1
Canton.Ledger.Abstractions
Part of the Canton .NET SDK. The transport-neutral Canton contract layer: the Canton-participant surface types that both the gRPC client (Canton.Ledger.Grpc.Client) and the HTTP client (Canton.Ledger.Rest.Client) implement, and that the Canton.Ledger.Testing fakes stand in for — including ITokenProvider, the authentication contract both transports resolve bearer tokens through. It also declares the Participant Query Store read surface IPqsClient and its signature types, so FakePqsClient is as neutral as the other fakes; Canton.Ledger.Pqs.Client supplies the PostgreSQL-backed implementation. It parallels upstream Daml.Ledger.Abstractions — Canton contracts extend the Daml-neutral ones — and its dependency direction is Canton.Ledger.Abstractions → Daml.Ledger.Abstractions + Daml.Runtime only. It drags in neither transport nor a database driver: no Google.Protobuf, no Grpc.*, no Canton.Ledger.Grpc, no Npgsql. This keeps the shared contract assembly usable by a REST-only consumer without pulling in the gRPC stack.
Installation
dotnet add package Canton.Ledger.Abstractions --version 0.7.1
Key Types
| Type | Purpose |
|---|---|
ICantonLedgerClient |
The Canton participant client surface — everything on ILedgerClient plus the Canton-only operations (fire-and-forget submit, the command completion stream, connected-synchronizer and Ledger API version discovery, offset/id point reads, by-id disclosure reads through GetDisclosureAsync<T>, tree-shaped submission, traffic-cost estimation) |
CompletionStreamEvent |
A command-completion stream event — CommandAccepted/CommandRejected/Checkpoint/StreamError, with the verdict modelled as the event type |
Completion |
The transport-neutral command-completion payload (command id, offset, act-as parties, synchronizer time, submission/user ids, deduplication period) |
CompletionStatus |
The google.rpc.Code verdict of a rejected command (Code, Message) plus the structured rejection detail decoded from google.rpc.Status.details (ErrorId, Metadata) |
SynchronizerTime |
The synchronizer id and record time a completion was sequenced at |
ConnectedSynchronizer |
A synchronizer the participant is connected to (SynchronizerAlias, SynchronizerId, Permission) |
TrafficCostEstimate |
What a participant estimates a submission would consume in synchronizer traffic, in bytes (EstimatedAt, ConfirmationRequestCost, ConfirmationResponseCost, TotalCost) — the one shape both transports' EstimateTrafficCostAsync project into |
SynchronizerPermissionLevel |
The permission a participant holds on a connected synchronizer (Unspecified/Submission/Confirmation/Observation) |
IReassignmentCommand |
Marker for a single reassignment command — an UnassignCommand or an AssignCommand |
UnassignCommand |
Unassigns a contract from its source synchronizer, naming both endpoints |
AssignCommand |
Completes a reassignment on the target synchronizer, referencing the unassigned event's reassignment_id |
ReassignmentSubmission |
A reassignment submission — the command to submit on behalf of a submitter, with optional command/workflow/submission ids; construct with Of and refine with the With… members |
IAdminClient |
The Canton participant administration surface — party allocation and lookup, user and user-right management, package listing/download/vetting, DAR upload and validation |
PartyDetails |
A party known to the participant (Party, IsLocal) |
UserDetails |
A user on the participant (UserId, PrimaryParty) |
UserRight |
A right granted to a user — ActAs, ReadAs, ParticipantAdmin, IdentityProviderAdmin, ReadAsAnyParty, ExecuteAs, ExecuteAsAnyParty, ActAsAnyParty |
PackageDetails |
A Daml-LF package known to the participant (PackageId, Name, Version, PackageSize, KnownSince) |
PackageArchive |
A downloaded package archive — the daml_lf payload with its hash and HashFunction |
HashFunction |
The hash function a PackageArchive.Hash was computed with (Sha256) |
VettedPackage |
A package vetted on a participant and synchronizer |
PackageIdResolver / Identifier.ForPackageName |
Package-name addressing: ForPackageName builds the #<package-name>:<module>:<entity> identifier Canton resolves per request, and PackageIdResolver caches the package id of a name's highest known version over any IAdminClient |
ParsedLedgerError |
A participant error decoded from the google.rpc.Status payload (category, error id, message, ErrorInfo metadata, the TransportStatus the transport reported), in the one shape both clients produce; MapCategory is the single classifier turning the wire category into a DamlErrorCategory |
TransactionResultExerciseExtensions |
Typed accessors over TransactionResult.ExercisedEvents — ExerciseResult<TReturn>(choice) for the single matching event and AllExerciseResults<TReturn>(choice) for every one, in transaction order, decoded through the generated choice descriptor the event's own InterfaceId and then TemplateId resolve to (variants, enums, generic types and collections included), falling back to FromDamlValue when no binding resolves or its result type is not assignable to TReturn, and handing a DamlValue target the raw value; both transports project into the same TransactionResult, so the accessors read the same either way |
MalformedTransactionTreeException |
Thrown when the node ids on a transaction's events cannot describe a tree, so no TransactionTree can be reconstructed from them — the one exception both transports' tree projections raise, so a consumer catches it once regardless of transport |
MalformedResponseException |
Describes why a participant's response body cannot be read as the Ledger API describes it — a required field is absent, or a value does not decode into the type it claims. A throwing gRPC call raises it as the InnerException of a LedgerOperationException with Status UndecodableBody; the JSON Ledger API client reports the same status with whichever failure the read raised, which can be a JsonException. Says the fault is the participant's, not the caller's, and carries the un-prefixed Detail behind the message |
ITokenProvider |
The bearer-token source every transport authenticates through — Task<string> GetTokenAsync(CancellationToken) |
ITokenProvider.None |
Static singleton signalling unauthenticated access; the clients detect it and send no Authorization header |
IPqsClient |
The Participant Query Store read surface — active-contract queries by template or interface, filtered, paged, by contract id, and existence checks |
PqsFilter |
A filter condition on a PQS query. Opaque by design: it declares no public members and its cases are internal, so a filter can only be built through Filter |
Filter |
Builds PqsFilters from strongly-typed expressions — Filter.Field<T>(t => t.Prop, value) and Filter.Where<T>(t => predicate), composed with Filter.And/Filter.Or. Comparisons are typed by each field's Daml type; field names come from codegen [DamlField] metadata, never from user input. An expression the filter cannot translate, including a member of a type the code generator did not emit, throws ArgumentException |
PqsPage |
A bounded page of query results (Limit, Offset), applied as LIMIT/OFFSET on the query itself |
InterfaceContract<TInterface, TView> |
An active contract observed through a Daml interface — its interface-typed ContractId paired with the participant-computed view |
Related Packages
Canton.Ledger.Grpc.Client— gRPC client implementing the Canton participant surfaceCanton.Ledger.Rest.Client— HTTP (JSON Ledger API) clientCanton.Ledger.Pqs.Client— PostgreSQL-backedIPqsClientimplementation for the Participant Query StoreCanton.Ledger.Testing— in-memory fakes for unit-testing against these contracts
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Daml.Ledger.Abstractions (>= 0.7.1)
- Daml.Runtime (>= 0.7.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Canton.Ledger.Abstractions:
| Package | Downloads |
|---|---|
|
Canton.Ledger.Kernel
Transport-neutral client kernel for Canton participant nodes: OAuth2 client-credentials and static token providers implementing Canton.Ledger.Abstractions.ITokenProvider, the OpenTelemetry ActivitySource naming convention, an opt-in Polly retry pipeline, and the shared transaction-tree assembler, exercise-outcome folds and malformed-response vocabulary, consumed as peers by both the gRPC and HTTP clients. |
|
|
Canton.Ledger.Grpc.Client
High-level gRPC client for the Canton Ledger API with integration to Daml.Runtime types. |
|
|
Canton.Ledger.Pqs.Client
Typed query client for the Canton Participant Query Store (PQS). Provides expression-based, SQL-injection-safe queries over active Daml contracts via PostgreSQL. |
|
|
Canton.Ledger.Rest.Client
HTTP (JSON Ledger API) client for the Canton Ledger API — a full ILedgerClient / ICantonLedgerClient implementation over the transport-neutral Daml.Ledger.Abstractions interfaces. |
|
|
Canton.Ledger.Testing
In-memory test doubles (FakeLedgerClient, FakeAdminClient, FakePqsClient, FakeTokenProvider) and event/result builders for unit-testing business logic against the Canton Ledger API client surfaces without a live participant. No mocking framework required. Every fake implements a neutral Canton surface from Canton.Ledger.Abstractions — ICantonLedgerClient (and thus Daml.Ledger.Abstractions.ILedgerClient), IAdminClient, ITokenProvider and IPqsClient — so the package references only Canton.Ledger.Abstractions, Daml.Ledger.Abstractions and Daml.Runtime, dragging in neither transport nor PostgreSQL. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.1 | 56 | 10/23/2026 |
| 0.7.0 | 241 | 10/14/2026 |
| 0.7.0-preview.1 | 422 | 10/13/2026 |
| 0.6.0 | 322 | 10/7/2026 |
| 0.6.0-preview.4 | 175 | 10/7/2026 |
| 0.6.0-preview.3 | 216 | 10/1/2026 |
| 0.6.0-preview.2 | 442 | 9/30/2026 |
| 0.6.0-preview.1 | 229 | 9/28/2026 |
| 0.5.0-preview.3 | 250 | 9/24/2026 |
| 0.5.0-preview.2 | 179 | 9/22/2026 |
| 0.5.0-preview.1 | 276 | 9/8/2026 |
| 0.4.1-preview.1 | 138 | 8/29/2026 |