Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cantonfoundation-issue-365-details-history.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This reference covers the most commonly used Canton Console commands, organized by task. All examples assume you’re connected to a participant console unless otherwise noted. When the Canton Console starts, it reads the configuration file and automatically binds a variable for each configured node. For example, if your configuration defines a participant node, the console makes it available as the participant variable (or whatever name you gave it in the config). You can use this variable directly to call commands like participant.health.status without any additional setup.

Health and Status

Check whether the node is healthy and connected to the synchronizer:
// Overall health status
participant.health.status

// Check if the node is active (processing transactions)
participant.health.is_running

// Check synchronizer connectivity
participant.synchronizers.list_connected
For sequencer nodes:
sequencer.health.status

Party Management

Listing Parties

// List all parties hosted on this participant
participant.parties.hosted()

// Filter by party name
participant.parties.hosted("Alice")

// List all known parties (hosted locally or seen via the synchronizer)
participant.parties.list()

Party Details

// Get detailed information about a party, including hosting participants
participant.parties.hosted("Alice").head
// Returns: ListPartiesResult with participant IDs and synchronizer permissions

Package Management

Listing Packages

// List all uploaded DAR packages
participant.dars.list()

// List packages by name
participant.packages.list().filter(_.packageId.startsWith("com-example"))

Uploading Packages

// Upload a DAR file
participant.participant1.dars.upload("dars/CantonExamples.dar")

Package Vetting

// List vetted packages
participant.topology.vetted_packages.list()

// Vet a specific package
participant.topology.vetted_packages.authorize(
  TopologyChangeOp.Add,
  participant.id,
  Seq(packageId)
)

Topology Inspection

Topology commands show the current state of party-to-participant mappings, package vetting, and other network-wide configuration.

Party-to-Participant Mappings

// List all party-to-participant mappings on a synchronizer
participant.topology.party_to_participant_mappings.list(
  synchronizerId
)

// List hosting proposals (pending multi-hosting approvals)
participant.topology.party_to_participant_mappings.list_hosting_proposals(
  synchronizerId,
  participant.id
)

Synchronizer Parameters

// List current synchronizer parameters
participant.topology.synchronizer_parameters.list(synchronizerId)

Namespace Delegations

// List namespace delegations (who can manage topology for a namespace)
participant.topology.namespace_delegations.list()

Synchronizer Operations

Listing Connected Synchronizers

// List all synchronizers this participant is connected to
participant.synchronizers.list_connected

// Get the synchronizer ID
val syncId = participant.synchronizers.list_connected.head.synchronizerId

Reconnecting to a Synchronizer

// Disconnect and reconnect
participant.synchronizers.disconnect(syncId)
participant.synchronizers.reconnect(syncId)

Querying the Ledger

Active Contract Set (ACS)

// Count active contracts by template
participant.testing.acs_search(
  synchronizerId,
  filterTemplate = "MyModule:MyTemplate"
).size

// Search for specific contracts
participant.testing.acs_search(
  synchronizerId,
  filterTemplate = "MyModule:MyTemplate",
  filterParty = partyId
)
The testing.acs_search command is intended for debugging, not production queries. For production read access, use PQS.

Common Patterns

Getting the Participant ID

val participantId = participant.id
// Returns: PAR::participant1::1220abcd...

Getting a Party ID

val partyId = participant.parties.hosted("Alice").head.party
// Returns: Alice::1220abcd...

Getting the Synchronizer ID

val syncId = participant.synchronizers.list_connected.head.synchronizerId
// Returns: global-synchronizer::1220abcd...

Next Steps