Skip to main content

Crate canton_admin

Crate canton_admin 

Source
Expand description

Canton administrative client: party management, user self-inspect, and topology read.

Canton exposes these across two gRPC endpoints, so this crate provides two clients:

Both build on the shared canton_core::Config (endpoint, auth, TLS, retry).

§Scope

Party management here is allocation and discovery: allocate a party, list the parties a participant knows, look specific ones up. Updating a party’s details (UpdatePartyDetails), the identity-provider fields, and the participant-permission options of AllocateParty are deliberately not wrapped — Milestone 1 covers the client surface an application needs to act on the ledger, and party administration beyond that belongs to the operator tooling rather than to an SDK’s first release. Anything not wrapped is still reachable through canton_proto on the same channel.

use canton_admin::{AdminClient, Config};

let admin = AdminClient::connect_lazy(Config::new("http://localhost:3901"))?;
let me = admin.current_user().await?;
println!("acting as: {:?}", admin.acting_parties().await?);

Modules§

proto
Generated Ledger API admin protobuf types (party & user management).
protocol_proto
Generated Canton protocol types (topology mapping items).
topology_proto
Generated Canton admin-API topology types (query/result envelopes).

Structs§

AdminClient
A client for Canton’s Ledger-API admin services: PartyManagementService and UserManagementService.
Config
Configuration for an SDK gRPC client (shared by canton-ledger and canton-admin).
Entry
One topology mapping result: the mapping item plus its BaseResult context (store, validity window, serial, …). #[non_exhaustive] so fields can be added without a breaking change.
ErrorInfo
Structured google.rpc.ErrorInfo details from a gRPC status: the machine- readable reason, its domain, and error metadata. #[non_exhaustive].
ExternalPartyTopology
What the participant will do with an external party, once it is asked to.
ResourceInfo
A resource a failure is about, from a google.rpc.ResourceInfo detail on a gRPC status or an entry of a JSON API error body’s resources. #[non_exhaustive].
RetryConfig
Retry policy for unary calls.
TlsConfig
TLS settings for the gRPC channel.
TopologyClient
A client for Canton’s TopologyManagerReadService (admin API).

Enums§

Auth
How the client authenticates each request.
Error
The single error type for the whole Canton Rust SDK.
ErrorCategory
Canton’s error categories — the coarse classification every Ledger API error carries (ErrorInfo.metadata["category"]), which the error-code documentation defines retryability on. #[non_exhaustive]: Canton may add categories.
PackageStatus
Store
Which topology store to query.

Type Aliases§

Result
SDK-wide result alias. Re-exported by the facade as canton::Result.