canton

package
v0.81.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminServiceClients added in v0.81.0

AdminServiceClients provides all available Admin API service clients. These services can only be accessed if the user the participant has been configured with has admin rights.

func CreateAdminServiceClients added in v0.81.0

func CreateAdminServiceClients(conn grpc.ClientConnInterface) AdminServiceClients

CreateAdminServiceClients creates all AdminServiceClients given a gRPC client connection.

type Chain

type Chain struct {
	ChainMetadata

	// List of participants in the Canton network
	// The number of participants depends on the config the provider has been initialized with
	Participants []Participant
}

Chain represents a Canton network instance initialized by CLDF. It contains chain metadata and augments it with Canton-specific information. In particular, it tracks all known Canton participants and their connection details so that callers can discover and interact with the network's APIs.

type ChainMetadata

type ChainMetadata = chaincommon.ChainMetadata

type LedgerAdminServiceClients added in v0.81.0

type LedgerAdminServiceClients struct {
	CommandInspection      adminv2.CommandInspectionServiceClient
	IdentityProviderConfig adminv2.IdentityProviderConfigServiceClient
	PackageManagement      adminv2.PackageManagementServiceClient
	ParticipantPruning     adminv2.ParticipantPruningServiceClient
	PartyManagement        adminv2.PartyManagementServiceClient
	UserManagement         adminv2.UserManagementServiceClient
}

LedgerAdminServiceClients provides all available Ledger API admin gRPC service clients.

type LedgerServiceClients added in v0.81.0

type LedgerServiceClients struct {
	CommandCompletion apiv2.CommandCompletionServiceClient
	Command           apiv2.CommandServiceClient
	CommandSubmission apiv2.CommandSubmissionServiceClient
	EventQuery        apiv2.EventQueryServiceClient
	PackageService    apiv2.PackageServiceClient
	State             apiv2.StateServiceClient
	Update            apiv2.UpdateServiceClient
	Version           apiv2.VersionServiceClient
	// Ledger API admin clients
	// These endpoints can only be accessed if the user the participant has been configured with
	// has admin rights. Access with caution and only if you're certain that admin rights are available.
	Admin LedgerAdminServiceClients
}

LedgerServiceClients provides all available Ledger API gRPC service clients.

func CreateLedgerServiceClients added in v0.81.0

func CreateLedgerServiceClients(conn grpc.ClientConnInterface) LedgerServiceClients

CreateLedgerServiceClients creates all LedgerServiceClients given a gRPC client connection.

type Participant

type Participant struct {
	// A human-readable name for the participant
	Name string
	// The endpoints to interact with the participant's APIs
	Endpoints ParticipantEndpoints
	// The set of service clients to interact with the participant's Ledger API.
	// All clients are ready-to-use and are already configured with the correct authentication.
	LedgerServices LedgerServiceClients
	// (Optional) The set of service clients to interact with the participant's Admin API.
	// Will only be populated if the participant has been configured with an Admin API URL
	AdminServices *AdminServiceClients
	// An OAuth2 token source to obtain access tokens for authentication with the participant's APIs
	TokenSource oauth2.TokenSource
	// The UserID that will be used to interact with this participant.
	// The TokenSource will return access tokens containing this UserID as a subject claim.
	UserID string
	// The PartyID that will be used to interact with this participant.
	PartyID string
}

Participant represents a single Canton participant node in the network. A participant hosts parties and their local ledger state, and mediates all interactions with the Canton ledger for those parties via its exposed APIs (ledger, admin, validator, etc.). It is identified by a human-readable name, provides a set of API endpoints, and uses a TokenSource to issue authentication tokens for secure access to those endpoints.

type ParticipantEndpoints

type ParticipantEndpoints struct {
	// (HTTP) The URL to access the participant's JSON Ledger API
	// https://docs.digitalasset.com/build/3.5/reference/json-api/json-api.html
	JSONLedgerAPIURL string
	// (gRPC) The URL to access the participant's gRPC Ledger API
	// https://docs.digitalasset.com/build/3.5/reference/lapi-proto-docs.html
	GRPCLedgerAPIURL string
	// (gRPC) The URL to access the participant's Admin API
	// https://docs.digitalasset.com/operate/3.5/howtos/configure/apis/admin_api.html
	AdminAPIURL string
	// (HTTP) The URL to access the participant's Validator API
	// https://docs.sync.global/app_dev/validator_api/index.html
	// This also serves the Scan Proxy API, which provides access to the Global Scan and Token Standard APIs:
	// https://docs.sync.global/app_dev/validator_api/index.html#validator-api-scan-proxy
	ValidatorAPIURL string
}

ParticipantEndpoints holds all available API endpoints for a Canton participant

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL