Console Commands¶
Top-level Commands¶
The following commands are available for convenience:
- exit
- Summary: Leave the console
- help
- Summary: Help with console commands; type help(“<command>”) for detailed help for <command>
- health.dump
- Summary: Generate and write a health dump of Canton’s state for a bug report
- Arguments:
outputFile
: better.files.Filetimeout
: com.digitalasset.canton.config.NonNegativeDurationchunkSize
: Option[Int]
- Return type:
- String
- Description: Gathers information about the current Canton process and/or remote nodes if using the console with a remote config. The outputFile argument can be used to write the health dump to a specific path. The timeout argument can be increased when retrieving large health dumps from remote nodes. The chunkSize argument controls the size of the byte chunks streamed back from remote nodes. This can be used if encountering errors due to gRPC max inbound message size being too low.
- health.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- console.command_timeout
- Summary: Yields the timeout for running console commands
- Return type:
- Description: Yields the timeout for running console commands. When the timeout has elapsed, the console stops waiting for the command result. The command will continue running in the background.
- console.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- console.set_command_timeout
- Summary: Sets the timeout for running console commands.
- Arguments:
- Description: Sets the timeout for running console commands. When the timeout has elapsed, the console stops waiting for the command result. The command will continue running in the background. The new timeout must be positive.
- logging.get_level
- Summary: Determine current logging level
- Arguments:
loggerName
: String
- Return type:
- Option[ch.qos.logback.classic.Level]
- logging.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- logging.last_error_trace
- Summary: Returns log events for an error with the same trace-id
- Arguments:
traceId
: String
- Return type:
- Seq[String]
- logging.last_errors
- Summary: Returns the last errors (trace-id -> error event) that have been logged locally
- Return type:
- Map[String,String]
- logging.set_level
- Summary: Dynamically change log level (TRACE, DEBUG, INFO, WARN, ERROR, OFF, null)
- Arguments:
loggerName
: Stringlevel
: String
- utils.auto_close (Testing)
- Summary: Register AutoCloseable object to be shutdown if Canton is shut down
- Arguments:
closeable
: AutoCloseable
- utils.contract_data_to_instance
- Summary: Convert contract data to a contract instance.
- Arguments:
contractData
: com.digitalasset.canton.admin.api.client.commands.LedgerApiTypeWrappers.ContractDataledgerTime
: java.time.Instant
- Description: The utils.contract_data_to_instance bridges the gap between participant.ledger_api.acs commands that return various pieces of “contract data” and the participant.repair.add command used to add “contract instances” as part of repair workflows. Such workflows (for example migrating contracts from other Daml ledgers to Canton participants) typically consist of extracting contract data using participant.ledger_api.acs commands, modifying the contract data, and then converting the contractData using this function before finally adding the resulting contract instances to Canton participants via participant.repair.add. Obtain the contractData by invoking .toContractData on the WrappedCreatedEvent returned by the corresponding participant.ledger_api.acs.of_party or of_all call. The ledgerTime parameter should be chosen to be a time meaningful to the domain on which you plan to subsequently invoke participant.repair.add on and will be retained alongside the contract instance by the participant.repair.add invocation.
- utils.contract_instance_to_data
- Summary: Convert a contract instance to contract data.
- Arguments:
- Description: The utils.contract_instance_to_data converts a Canton “contract instance” to “contract data”, a format more amenable to inspection and modification as part of repair workflows. This function consumes the output of the participant.testing commands and can thus be employed in workflows geared at verifying the contents of contracts for diagnostic purposes and in environments in which the “features.enable-testing-commands” configuration can be (at least temporarily) enabled.
- utils.generate_contract_id
- Summary: Generate authenticated contract id.
- Arguments:
cryptoPureApi
: com.digitalasset.canton.crypto.CryptoPureApirawContract
: com.digitalasset.canton.protocol.SerializableRawContractInstancecreatedAt
: com.digitalasset.canton.data.CantonTimestampdiscriminator
: com.digitalasset.canton.protocol.LfHashcontractSalt
: com.digitalasset.canton.crypto.Saltmetadata
: com.digitalasset.canton.protocol.ContractMetadataprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- Return type:
- com.daml.lf.value.Value.ContractId.V1
- Description: The utils.generate_contract_id generates “contract id” of a contract. Starting from protocol version 4, Canton uses the so called authenticated contract ids which depend on the details of the associated contracts. When aspects of a contract such as the parties involved change as part of repair or export/import procedure, the corresponding contract id must be recomputed. This function can be used as a tool to generate an id for an arbitrary contract content
- utils.generate_daml_script_participants_conf
- Summary: Create a participants config for Daml script
- Arguments:
file
: Option[String]useParticipantAlias
: BooleandefaultParticipant
: Option[com.digitalasset.canton.console.ParticipantReference]
- Return type:
- java.io.File
- Description: The generated config can be passed to daml script via the participant-config parameter. More information about the file format can be found in the documentation: It takes three arguments: - file (default to “participant-config.json”) - useParticipantAlias (default to true): participant aliases are used instead of UIDs - defaultParticipant (default to None): adds a default participant if provided
- utils.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- utils.object_args
- Summary: Reflective inspection of object arguments, handy to inspect case class objects
- Arguments:
obj
: T
- Return type:
- List[String]
- Description: Return the list field names of the given object. Helpful function when inspecting the return result.
- utils.read_all_messages_from_file
- Summary: Reads several Protobuf messages from a file.
- Arguments:
fileName
: String
- Return type:
- Seq[A]
- Description: Fails with an exception, if the file can’t be read or parsed.
- utils.read_byte_string_from_file
- Summary: Reads a ByteString from a file.
- Arguments:
fileName
: String
- Return type:
- com.google.protobuf.ByteString
- Description: Fails with an exception, if the file can’t be read.
- utils.read_first_message_from_file
- Summary: Reads a single Protobuf message from a file.
- Arguments:
fileName
: String
- Return type:
- A
- Description: Fails with an exception, if the file can’t be read or parsed.
- utils.recompute_contract_ids
- Summary: Recompute authenticated contract ids.
- Arguments:
- Return type:
- (Seq[com.digitalasset.canton.protocol.SerializableContract], Map[com.digitalasset.canton.protocol.LfContractId,com.digitalasset.canton.protocol.LfContractId])
- Description: The utils.recompute_contract_ids regenerates “contract ids” of multiple contracts after their contents have changed. Starting from protocol version 4, Canton uses the so called authenticated contract ids which depend on the details of the associated contracts. When aspects of a contract such as the parties involved change as part of repair or export/import procedure, the corresponding contract id must be recomputed.
- utils.retry_until_true
- Summary: Wait for a condition to become true
- Arguments:
timeout
: com.digitalasset.canton.config.NonNegativeDurationmaxWaitPeriod
: com.digitalasset.canton.config.NonNegativeDurationcondition
: => Booleanfailure
: => String
- Return type:
- (condition: => Boolean, failure: => String): Unit
- Description: Wait timeout duration until condition becomes true. Retry evaluating condition with an exponentially increasing back-off up to maxWaitPeriod duration between retries.
- utils.retry_until_true
- Summary: Wait for a condition to become true, using default timeouts
- Arguments:
condition
: => Boolean
- Description: Wait until condition becomes true, with a timeout taken from the parameters.timeouts.console.bounded configuration parameter.
- utils.synchronize_topology
- Summary: Wait until all topology changes have been effected on all accessible nodes
- Arguments:
- utils.type_args
- Summary: Reflective inspection of type arguments, handy to inspect case class types
- Return type:
- List[String]
- Description: Return the list of field names of the given type. Helpful function when creating new objects for requests.
- utils.write_to_file
- Summary: Writes a ByteString to a file.
- Arguments:
data
: com.google.protobuf.ByteStringfileName
: String
- utils.write_to_file
- Summary: Writes a Protobuf message to a file.
- Arguments:
data
: scalapb.GeneratedMessagefileName
: String
- utils.write_to_file
- Summary: Writes several Protobuf messages to a file.
- Arguments:
data
: Seq[scalapb.GeneratedMessage]fileName
: String
- ledger_api_utils.create (Testing)
- Summary: Build create command
- Arguments:
packageId
: Stringmodule
: Stringtemplate
: Stringarguments
: Map[String,Any]
- Return type:
- com.daml.ledger.api.v1.commands.Command
- ledger_api_utils.exercise (Testing)
- Summary: Build exercise command from CreatedEvent
- Arguments:
choice
: Stringarguments
: Map[String,Any]event
: com.daml.ledger.api.v1.event.CreatedEvent
- Return type:
- com.daml.ledger.api.v1.commands.Command
- ledger_api_utils.exercise (Testing)
- Summary: Build exercise command
- Arguments:
packageId
: Stringmodule
: Stringtemplate
: Stringchoice
: Stringarguments
: Map[String,Any]contractId
: String
- Return type:
- com.daml.ledger.api.v1.commands.Command
- ledger_api_utils.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
Participant Commands¶
- clear_cache (Testing)
- Summary: Clear locally cached variables
- Description: Some commands cache values on the client side. Use this command to explicitly clear the caches of these values.
- config
- Summary: Return participant config
- help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- id
- Summary: Yields the globally unique id of this participant. Throws an exception, if the id has not yet been allocated (e.g., the participant has not yet been started).
- Return type:
- is_initialized
- Summary: Check if the local instance is running and is fully initialized
- Return type:
- Boolean
- is_running
- Summary: Check if the local instance is running
- Return type:
- Boolean
- start
- Summary: Start the instance
- stop
- Summary: Stop the instance
- testing.acs_search (Testing)
- Summary: Lookup of active contracts
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAliasfilterId
: StringfilterPackage
: StringfilterTemplate
: StringfilterStakeholder
: Option[com.digitalasset.canton.topology.PartyId]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- testing.await_domain_time (Testing)
- Summary: Await for the given time to be reached on the given domain
- Arguments:
- testing.await_domain_time (Testing)
- Summary: Await for the given time to be reached on the given domain
- Arguments:
- testing.bong (Testing)
- Summary: Send a bong to a set of target parties over the ledger. Levels > 0 leads to an exploding ping with exponential number of contracts. Throw a RuntimeException in case of failure.
- Arguments:
targets
: Set[com.digitalasset.canton.topology.ParticipantId]validators
: Set[com.digitalasset.canton.topology.ParticipantId]timeout
: com.digitalasset.canton.config.NonNegativeDurationlevels
: LonggracePeriodMillis
: LongworkflowId
: Stringid
: String
- Return type:
- scala.concurrent.duration.Duration
- Description: Initiates a racy ping to multiple participants, measuring the roundtrip time of the fastest responder, with an optional timeout. Grace-period is the time the bong will wait for a duplicate spent (which would indicate an error in the system) before exiting. If levels > 0, the ping command will lead to a binary explosion and subsequent dilation of contracts, where
level
determines the number of levels we will explode. As a result, the system will create (2^(L+2) - 3) contracts (where L stands forlevel
). Normally, only the initiator is a validator. Additional validators can be added using the validators argument. The bong command comes handy to run a burst test against the system and quickly leads to an overloading state.
- testing.crypto_api (Testing)
- Summary: Return the sync crypto api provider, which provides access to all cryptographic methods
- Return type:
- testing.event_search (Testing)
- Summary: Lookup of events
- Arguments:
domain
: Option[com.digitalasset.canton.DomainAlias]from
: Option[java.time.Instant]to
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Return type:
- Seq[(String, com.digitalasset.canton.participant.sync.TimestampedEvent)]
- Description: Show the event logs. To select only events from a particular domain, use the domain alias. Leave the domain empty to search the combined event log containing the events of all domains. Note that if the domain is left blank, the values of from and to cannot be set. This is because the combined event log isn’t guaranteed to have increasing timestamps.
- testing.fetch_domain_time (Testing)
- Summary: Fetch the current time from the given domain
- Arguments:
- Return type:
- testing.fetch_domain_time (Testing)
- Summary: Fetch the current time from the given domain
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAliastimeout
: com.digitalasset.canton.config.NonNegativeDuration
- Return type:
- testing.fetch_domain_times (Testing)
- Summary: Fetch the current time from all connected domains
- Arguments:
- testing.find_clean_commitments_timestamp (Testing)
- Summary: The latest timestamp before or at the given one for which no commitment is outstanding
- Arguments:
domain
: com.digitalasset.canton.DomainAliasbeforeOrAt
: com.digitalasset.canton.data.CantonTimestamp
- Return type:
- Description: The latest timestamp before or at the given one for which no commitment is outstanding. Note that this doesn’t imply that pruning is possible at this timestamp, as the system might require some additional data for crash recovery. Thus, this is useful for testing commitments; use the commands in the pruning group for pruning. Additionally, the result needn’t fall on a “commitment tick” as specified by the reconciliation interval.
- testing.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- testing.maybe_bong (Testing)
- Summary: Like bong, but returns None in case of failure.
- Arguments:
targets
: Set[com.digitalasset.canton.topology.ParticipantId]validators
: Set[com.digitalasset.canton.topology.ParticipantId]timeout
: com.digitalasset.canton.config.NonNegativeDurationlevels
: LonggracePeriodMillis
: LongworkflowId
: Stringid
: String
- Return type:
- Option[scala.concurrent.duration.Duration]
- testing.pcs_search (Testing)
- Summary: Lookup contracts in the Private Contract Store
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAliasfilterId
: StringfilterPackage
: StringfilterTemplate
: StringactiveSet
: Booleanlimit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Return type:
- List[(Boolean, com.digitalasset.canton.protocol.SerializableContract)]
- Description: Get raw access to the PCS of the given domain sync controller. The filter commands will check if the target value
contains
the given string. The arguments can be started with^
such thatstartsWith
is used for comparison or!
to useequals
. TheactiveSet
argument allows to restrict the search to the active contract set.
- testing.sequencer_messages (Testing)
- Summary: Retrieve all sequencer messages
- Arguments:
domain
: com.digitalasset.canton.DomainAliasfrom
: Option[java.time.Instant]to
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: Optionally allows filtering for sequencer from a certain time span (inclusive on both ends) and limiting the number of displayed messages. The returned messages will be ordered on most domain ledger implementations if a time span is given. Fails if the participant has never connected to the domain.
- testing.state_inspection (Testing)
- Summary: Obtain access to the state inspection interface. Use at your own risk.
- Description: The state inspection methods can fatally and permanently corrupt the state of a participant. The API is subject to change in any way.
- testing.transaction_search (Testing)
- Summary: Lookup of accepted transactions
- Arguments:
domain
: Option[com.digitalasset.canton.DomainAlias]from
: Option[java.time.Instant]to
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Return type:
- Seq[(String, com.digitalasset.canton.protocol.LfCommittedTransaction)]
- Description: Show the accepted transactions as they appear in the event logs. To select only transactions from a particular domain, use the domain alias. Leave the domain empty to search the combined event log containing the events of all domains. Note that if the domain is left blank, the values of from and to cannot be set. This is because the combined event log isn’t guaranteed to have increasing timestamps.
Database¶
- db.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- db.migrate
- Summary: Migrates the instance’s database if using a database storage
- db.repair_migration
- Summary: Only use when advised - repairs the database migration of the instance’s database
- Arguments:
force
: Boolean
- Description: In some rare cases, we change already applied database migration files in a new release and the repair command resets the checksums we use to ensure that in general already applied migration files have not been changed. You should only use db.repair_migration when advised and otherwise use it at your own risk - in the worst case running it may lead to data corruption when an incompatible database migration (one that should be rejected because the already applied database migration files have changed) is subsequently falsely applied.
Health¶
- health.active
- Summary: Check if the node is running and is the active instance (mediator, participant)
- Return type:
- Boolean
- health.dump
- Summary: Creates a zip file containing diagnostic information about the canton process running this node
- Arguments:
outputFile
: better.files.Filetimeout
: com.digitalasset.canton.config.NonNegativeDurationchunkSize
: Option[Int]
- Return type:
- String
- health.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- health.initialized
- Summary: Returns true if node has been initialized.
- Return type:
- Boolean
- health.maybe_ping (Testing)
- Summary: Sends a ping to the target participant over the ledger. Yields Some(duration) in case of success and None in case of failure.
- Arguments:
participantId
: com.digitalasset.canton.topology.ParticipantIdtimeout
: com.digitalasset.canton.config.NonNegativeDurationworkflowId
: Stringid
: String
- Return type:
- Option[scala.concurrent.duration.Duration]
- health.ping
- Summary: Sends a ping to the target participant over the ledger. Yields the duration in case of success and throws a RuntimeException in case of failure.
- Arguments:
participantId
: com.digitalasset.canton.topology.ParticipantIdtimeout
: com.digitalasset.canton.config.NonNegativeDurationworkflowId
: Stringid
: String
- Return type:
- scala.concurrent.duration.Duration
- health.running
- Summary: Check if the node is running
- Return type:
- Boolean
- health.status
- Summary: Get human (and machine) readable status info
- Return type:
- com.digitalasset.canton.health.admin.data.NodeStatus[S]
- health.wait_for_identity
- Summary: Wait for the node to have an identity
- Description: This is specifically useful for the Domain Manager which needs its identity to be ready for bootstrapping, but for which we can’t rely on wait_for_initialized() because it will be initialized only after being bootstrapped.
- health.wait_for_initialized
- Summary: Wait for the node to be initialized
- health.wait_for_running
- Summary: Wait for the node to be running
Domain Connectivity¶
- domains.accept_agreement
- Summary: Accept the service agreement of the given domain alias
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAliasagreementId
: String
- domains.active
- Summary: Test whether a participant is connected to and permissioned on a domain reference, both from the perspective of the participant and the domain.
- Arguments:
- Return type:
- Boolean
- Description: Yields false, if the domain has not been initialized, is not connected or is not healthy.
- domains.active
- Summary: Test whether a participant is connected to and permissioned on a domain.
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAlias
- Return type:
- Boolean
- Description: Yields false, if the domain is not connected or not healthy. Yields false, if the domain is configured in the Canton configuration and the participant is not active from the perspective of the domain.
- domains.config
- Summary: Returns the current configuration of a given domain
- Arguments:
- domains.connect
- Summary: Macro to connect a participant to a domain given by connection
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAliasconnection
: StringmanualConnect
: BooleandomainId
: Option[com.digitalasset.canton.topology.DomainId]certificatesPath
: Stringpriority
: InttimeTrackerConfig
: com.digitalasset.canton.config.DomainTimeTrackerConfigsynchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Description: The connect macro performs a series of commands in order to connect this participant to a domain. First, register will be invoked with the given arguments, but first registered with manualConnect = true. If you already set manualConnect = true, then nothing else will happen and you will have to do the remaining steps yourselves. Otherwise, if the domain requires an agreement, it is fetched and presented to the user for evaluation. If the user is fine with it, the agreement is confirmed. If you want to auto-confirm, then set the environment variable CANTON_AUTO_APPROVE_AGREEMENTS=yes. Finally, the command will invoke reconnect to startup the connection. If the reconnect succeeded, the registered configuration will be updated with manualStart = true. If anything fails, the domain will remain registered with manualConnect = true and you will have to perform these steps manually. The arguments are: domainAlias - The name you will be using to refer to this domain. Can not be changed anymore. connection - The connection string to connect to this domain. I.e. https://url:port manualConnect - Whether this connection should be handled manually and also excluded from automatic re-connect. domainId - Optionally the domainId you expect to see on this domain. certificatesPath - Path to TLS certificate files to use as a trust anchor. priority - The priority of the domain. The higher the more likely a domain will be used. timeTrackerConfig - The configuration for the domain time tracker. synchronize - A timeout duration indicating how long to wait for all topology changes to have been effected on all local nodes.
- domains.connect
- Summary: Macro to connect a participant to a domain given by connection
- Arguments:
- Description: This variant of connect expects a domain connection config. Otherwise the behaviour is equivalent to the connect command with explicit arguments. If the domain is already configured, the domain connection will be attempted. If however the domain is offline, the command will fail. Generally, this macro should only be used to setup a new domain. However, for convenience, we support idempotent invocations where subsequent calls just ensure that the participant reconnects to the domain.
- domains.connect_ha
- Summary: Deprecated macro to connect a participant to a domain that supports connecting via many endpoints
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAliasfirstConnection
: com.digitalasset.canton.sequencing.SequencerConnectionadditionalConnections
: com.digitalasset.canton.sequencing.SequencerConnection*
- Description: Use the command connect_ha with the updated arguments list
- domains.connect_local
- Summary: Macro to connect a participant to a locally configured domain given by reference
- Arguments:
domain
: com.digitalasset.canton.console.InstanceReferenceWithSequencerConnectionmanualConnect
: Booleanalias
: Option[com.digitalasset.canton.DomainAlias]maxRetryDelayMillis
: Option[Long]priority
: Intsynchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Description: The arguments are: domain - A local domain or sequencer reference manualConnect - Whether this connection should be handled manually and also excluded from automatic re-connect. alias - The name you will be using to refer to this domain. Can not be changed anymore. certificatesPath - Path to TLS certificate files to use as a trust anchor. priority - The priority of the domain. The higher the more likely a domain will be used. synchronize - A timeout duration indicating how long to wait for all topology changes to have been effected on all local nodes.
- domains.connect_multi
- Summary: Macro to connect a participant to a domain that supports connecting via many endpoints
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAliasconnections
: Seq[com.digitalasset.canton.sequencing.SequencerConnection]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Description: Domains can provide many endpoints to connect to for availability and performance benefits. This version of connect allows specifying multiple endpoints for a single domain connection: connect_multi(“mydomain”, Seq(sequencer1, sequencer2)) or: connect_multi(“mydomain”, Seq(”https://host1.mydomain.net”, “https://host2.mydomain.net”, “https://host3.mydomain.net”)) To create a more advanced connection config use domains.toConfig with a single host, then use config.addConnection to add additional connections before connecting: config = myparticipaint.domains.toConfig(“mydomain”, “https://host1.mydomain.net”, …otherArguments) config = config.addConnection(”https://host2.mydomain.net”, “https://host3.mydomain.net”) myparticipant.domains.connect(config) The arguments are: domainAlias - The name you will be using to refer to this domain. Can not be changed anymore. connections - The sequencer connection definitions (can be an URL) to connect to this domain. I.e. https://url:port synchronize - A timeout duration indicating how long to wait for all topology changes to have been effected on all local nodes.
- domains.disconnect
- Summary: Disconnect this participant from the given domain
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAlias
- domains.disconnect_all
- Summary: Disconnect this participant from all connected domains
- domains.disconnect_local
- Summary: Disconnect this participant from the given local domain
- Arguments:
- domains.get_agreement
- Summary: Get the service agreement of the given domain alias and if it has been accepted already.
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAlias
- Return type:
- Option[(com.digitalasset.canton.participant.admin.v0.Agreement, Boolean)]
- domains.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- domains.id_of
- Summary: Returns the id of the given domain alias
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAlias
- Return type:
- domains.is_connected
- Summary: Test whether a participant is connected to a domain reference
- Arguments:
- Return type:
- Boolean
- domains.is_registered
- Summary: Returns true if a domain is registered using the given alias
- Arguments:
- Return type:
- Boolean
- domains.list_connected
- Summary: List the connected domains of this participant
- domains.list_registered
- Summary: List the configured domains of this participant
- Return type:
- Seq[(com.digitalasset.canton.participant.domain.DomainConnectionConfig, Boolean)]
- domains.modify
- Summary: Modify existing domain connection
- domains.reconnect
- Summary: Reconnect this participant to the given domain
- Arguments:
domainAlias
: com.digitalasset.canton.DomainAliasretry
: Booleansynchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Return type:
- Boolean
- Description: Idempotent attempts to re-establish a connection to a certain domain. If retry is set to false, the command will throw an exception if unsuccessful. If retry is set to true, the command will terminate after the first attempt with the result, but the server will keep on retrying to connect to the domain. The arguments are: domainAlias - The name you will be using to refer to this domain. Can not be changed anymore. retry - Whether the reconnect should keep on retrying until it succeeded or abort noisly if the connection attempt fails. synchronize - A timeout duration indicating how long to wait for all topology changes to have been effected on all local nodes.
- domains.reconnect_all
- Summary: Reconnect this participant to all domains which are not marked as manual start
- Arguments:
ignoreFailures
: Booleansynchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Description: The arguments are: ignoreFailures - If set to true (default), we’ll attempt to connect to all, ignoring any failure synchronize - A timeout duration indicating how long to wait for all topology changes to have been effected on all local nodes.
- domains.reconnect_local
- Summary: Reconnect this participant to the given local domain
- Arguments:
ref
: com.digitalasset.canton.console.DomainReferenceretry
: Booleansynchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Return type:
- Boolean
- Description: Idempotent attempts to re-establish a connection to the given local domain. Same behaviour as generic reconnect. The arguments are: ref - The domain reference to connect to retry - Whether the reconnect should keep on retrying until it succeeded or abort noisly if the connection attempt fails. synchronize - A timeout duration indicating how long to wait for all topology changes to have been effected on all local nodes.
- domains.register
- Summary: Register new domain connection
- Arguments:
- Description: When connecting to a domain, we need to register the domain connection and eventually accept the terms of service of the domain before we can connect. The registration process is therefore a subset of the operation. Therefore, register is equivalent to connect if the domain does not require a service agreement. However, you would usually call register only in advanced scripts.
Packages¶
- packages.find
- Summary: Find packages that contain a module with the given name
- Arguments:
moduleName
: StringlimitPackages
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- packages.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- packages.list
- Summary: List packages stored on the participant
- Arguments:
- Description: Supported arguments: limit - Limit on the number of packages returned (defaults to canton.parameters.console.default-limit)
- packages.list_contents
- Summary: List package contents
- Arguments:
packageId
: String
- packages.remove (Preview)
- Summary: Remove the package from Canton’s package store.
- Arguments:
packageId
: Stringforce
: Boolean
- Description: The standard operation of this command checks that a package is unused and unvetted, and if so removes the package. The force flag can be used to disable the checks, but do not use the force flag unless you’re certain you know what you’re doing.
- packages.synchronize_vetting
- Summary: Ensure that all vetting transactions issued by this participant have been observed by all configured participants
- Arguments:
- Description: Sometimes, when scripting tests and demos, a dar or package is uploaded and we need to ensure that commands are only submitted once the package vetting has been observed by some other connected participant known to the console. This command can be used in such cases.
DAR Management¶
- dars.download
- Summary: Downloads the DAR file with the given hash to the given directory
- Arguments:
darHash
: Stringdirectory
: String
- dars.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- dars.list
- Summary: List installed DAR files
- Arguments:
limit
: com.digitalasset.canton.config.RequireTypes.PositiveIntfilterName
: String
- Description: List DARs installed on this participant The arguments are: filterName: filter by name (source description) limit: Limit number of results (default none)
- dars.list_contents
- Summary: List contents of DAR files
- Arguments:
hash
: String
- dars.remove (Preview)
- Summary: Remove a DAR from the participant
- Arguments:
darHash
: StringsynchronizeVetting
: Boolean
- Description: Can be used to remove a DAR from the participant, if the following conditions are satisfied: 1. The main package of the DAR must be unused – there should be no active contract from this package 2. All package dependencies of the DAR should either be unused or contained in another of the participant node’s uploaded DARs. Canton uses this restriction to ensure that the package dependencies of the DAR don’t become “stranded” if they’re in use. 3. The main package of the dar should not be vetted. If it is vetted, Canton will try to automatically revoke the vetting for the main package of the DAR, but this automatic vetting revocation will only succeed if the main package vetting originates from a standard
dars.upload
. Even if the automatic revocation fails, you can always manually revoke the package vetting. If synchronizeVetting is true (default), then the command will block until the participant has observed the vetting transactions to be registered with the domain.
- dars.upload
- Summary: Upload a Dar to Canton
- Arguments:
path
: StringvetAllPackages
: BooleansynchronizeVetting
: Boolean
- Return type:
- String
- Description: Daml code is normally shipped as a Dar archive and must explicitly be uploaded to a participant. A Dar is a collection of LF-packages, the native binary representation of Daml smart contracts. In order to use Daml templates on a participant, the Dar must first be uploaded and then vetted by the participant. Vetting will ensure that other participants can check whether they can actually send a transaction referring to a particular Daml package and participant. Vetting is done by registering a VettedPackages topology transaction with the topology manager. By default, vetting happens automatically and this command waits for the vetting transaction to be successfully registered on all connected domains. This is the safe default setting minimizing race conditions. If vetAllPackages is true (default), the packages will all be vetted on all domains the participant is registered. If synchronizeVetting is true (default), then the command will block until the participant has observed the vetting transactions to be registered with the domain. Note that synchronize vetting might block on permissioned domains that do not just allow participants to update the topology state. In such cases, synchronizeVetting should be turned off. Synchronize vetting can be invoked manually using $participant.package.synchronize_vettings()
Party Management¶
The party management commands allow to conveniently enable and disable parties on the local node. Under the hood, they use the more complicated but feature-richer identity management commands.
- parties.await_topology_observed (Preview)
- Summary: Waits for any topology changes to be observed
- Arguments:
partyAssignment
: Set[(com.digitalasset.canton.topology.PartyId, T)]timeout
: com.digitalasset.canton.config.NonNegativeDuration
- Description: Will throw an exception if the given topology has not been observed within the given timeout.
- parties.disable
- Summary: Disable party on participant
- Arguments:
name
: com.digitalasset.canton.topology.Identifierforce
: Boolean
- parties.enable
- Summary: Enable/add party to participant
- Arguments:
name
: StringdisplayName
: Option[String]waitForDomain
: com.digitalasset.canton.console.commands.DomainChoicesynchronizeParticipants
: Seq[com.digitalasset.canton.console.ParticipantReference]
- Return type:
- Description: This function registers a new party with the current participant within the participants namespace. The function fails if the participant does not have appropriate signing keys to issue the corresponding PartyToParticipant topology transaction. Optionally, a local display name can be added. This display name will be exposed on the ledger API party management endpoint. Specifying a set of domains via the WaitForDomain parameter ensures that the domains have enabled/added a party by the time the call returns, but other participants connected to the same domains may not yet be aware of the party. Additionally, a sequence of additional participants can be added to be synchronized to ensure that the party is known to these participants as well before the function terminates.
- parties.find
- Summary: Find a party from a filter string
- Arguments:
filterParty
: String
- Return type:
- Description: Will search for all parties that match this filter string. If it finds exactly one party, it will return that one. Otherwise, the function will throw.
- parties.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- parties.hosted
- Summary: List parties hosted by this participant
- Arguments:
filterParty
: StringfilterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: Inspect the parties hosted by this participant as used for synchronisation. The response is built from the timestamped topology transactions of each domain, excluding the authorized store of the given node. The search will include all hosted parties and is equivalent to running the list method using the participant id of the invoking participant. filterParty: Filter by parties starting with the given string. filterDomain: Filter by domains whose id starts with the given string. asOf: Optional timestamp to inspect the topology state at a given point in time. limit: How many items to return (defaults to canton.parameters.console.default-limit) Example: participant1.parties.hosted(filterParty=”alice”)
- parties.list
- Summary: List active parties, their active participants, and the participants’ permissions on domains.
- Arguments:
filterParty
: StringfilterParticipant
: StringfilterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: Inspect the parties known by this participant as used for synchronisation. The response is built from the timestamped topology transactions of each domain, excluding the authorized store of the given node. For each known party, the list of active participants and their permission on the domain for that party is given. filterParty: Filter by parties starting with the given string. filterParticipant: Filter for parties that are hosted by a participant with an id starting with the given string filterDomain: Filter by domains whose id starts with the given string. asOf: Optional timestamp to inspect the topology state at a given point in time. limit: Limit on the number of parties fetched (defaults to canton.parameters.console.default-limit). Example: participant1.parties.list(filterParty=”alice”)
- parties.set_display_name
- Summary: Set party display name
- Arguments:
party
: com.digitalasset.canton.topology.PartyIddisplayName
: String
- Description: Locally set the party display name (shown on the ledger-api) to the given value
- parties.update
- Summary: Update participant-local party details
- Description: Currently you can update only the annotations. You cannot update other user attributes. party: party to be updated, modifier: a function to modify the party details, e.g.: partyDetails => { partyDetails.copy(annotations = partyDetails.annotations.updated(“a”, “b”).removed(“c”)) }
Key Administration¶
- keys.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.public.download
- Summary: Download public key
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- Return type:
- com.google.protobuf.ByteString
- keys.public.download_to
- Summary: Download public key and save it to a file
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintoutputFile
: StringprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- keys.public.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.public.list
- Summary: List public keys in registry
- Arguments:
filterFingerprint
: StringfilterContext
: String
- Description: Returns all public keys that have been added to the key registry. Optional arguments can be used for filtering.
- keys.public.list_by_owner
- Summary: List keys for given keyOwner.
- Arguments:
keyOwner
: com.digitalasset.canton.topology.KeyOwnerfilterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: This command is a convenience wrapper for list_key_owners, taking an explicit keyOwner as search argument. The response includes the public keys.
- keys.public.list_owners
- Summary: List active owners with keys for given search arguments.
- Arguments:
filterKeyOwnerUid
: StringfilterKeyOwnerType
: Option[com.digitalasset.canton.topology.KeyOwnerCode]filterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: This command allows deep inspection of the topology state. The response includes the public keys. Optional filterKeyOwnerType type can be ‘ParticipantId.Code’ , ‘MediatorId.Code’,’SequencerId.Code’, ‘DomainTopologyManagerId.Code’.
- keys.public.upload
- Summary: Upload public key
- Arguments:
filename
: Stringname
: Option[String]
- Return type:
- keys.public.upload
- Summary: Upload public key
- Arguments:
keyBytes
: com.google.protobuf.ByteStringname
: Option[String]
- Return type:
- Description: Import a public key and store it together with a name used to provide some context to that key.
- keys.secret.delete
- Summary: Delete private key
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.Fingerprintforce
: Boolean
- keys.secret.download
- Summary: Download key pair
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- Return type:
- com.google.protobuf.ByteString
- keys.secret.download_to
- Summary: Download key pair and save it to a file
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintoutputFile
: StringprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- keys.secret.generate_encryption_key
- Summary: Generate new public/private key pair for encryption and store it in the vault
- Arguments:
name
: Stringscheme
: Option[com.digitalasset.canton.crypto.EncryptionKeyScheme]
- Return type:
- Description: The optional name argument allows you to store an associated string for your convenience. The scheme can be used to select a key scheme and the default scheme is used if left unspecified.
- keys.secret.generate_signing_key
- Summary: Generate new public/private key pair for signing and store it in the vault
- Arguments:
name
: Stringscheme
: Option[com.digitalasset.canton.crypto.SigningKeyScheme]
- Return type:
- Description: The optional name argument allows you to store an associated string for your convenience. The scheme can be used to select a key scheme and the default scheme is used if left unspecified.
- keys.secret.get_wrapper_key_id
- Summary: Get the wrapper key id that is used for the encrypted private keys store
- Return type:
- String
- keys.secret.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.secret.list
- Summary: List keys in private vault
- Arguments:
filterFingerprint
: StringfilterName
: Stringpurpose
: Set[com.digitalasset.canton.crypto.KeyPurpose]
- Description: Returns all public keys to the corresponding private keys in the key vault. Optional arguments can be used for filtering.
- keys.secret.register_kms_encryption_key
- Summary: Register the specified KMS encryption key in canton storing its public information in the vault
- Arguments:
kmsKeyId
: Stringname
: String
- Return type:
- Description: The id for the KMS encryption key. The optional name argument allows you to store an associated string for your convenience.
- keys.secret.register_kms_signing_key
- Summary: Register the specified KMS signing key in canton storing its public information in the vault
- Arguments:
kmsKeyId
: Stringname
: String
- Return type:
- Description: The id for the KMS signing key. The optional name argument allows you to store an associated string for your convenience.
- keys.secret.rotate_kms_node_key
- Summary: Rotate a given node’s keypair with a new pre-generated KMS keypair
- Arguments:
fingerprint
: StringnewKmsKeyId
: String
- Return type:
- Description: Rotates an existing encryption or signing key stored externally in a KMS with a pre-generated key. The fingerprint of the key we want to rotate. The id of the new KMS key (e.g. Resource Name).
- keys.secret.rotate_node_key
- Summary: Rotate a node’s public/private key pair
- Arguments:
fingerprint
: Stringname
: Option[String]
- Return type:
- Description: Rotates an existing encryption or signing key. NOTE: A namespace root or intermediate signing key CANNOT be rotated by this command. The fingerprint of the key we want to rotate.
- keys.secret.rotate_node_keys
- Summary: Rotate the node’s public/private key pairs
- Description: For a participant node it rotates the signing and encryption key pair. For a domain or domain manager node it rotates the signing key pair as those nodes do not have an encryption key pair. For a sequencer or mediator node use rotate_node_keys with a domain manager reference as an argument. NOTE: Namespace root or intermediate signing keys are NOT rotated by this command.
- keys.secret.rotate_wrapper_key
- Summary: Change the wrapper key for encrypted private keys store
- Arguments:
newWrapperKeyId
: String
- Description: Change the wrapper key (e.g. AWS KMS key) being used to encrypt the private keys in the store. newWrapperKeyId: The optional new wrapper key id to be used. If the wrapper key id is empty Canton will generate a new key based on the current configuration.
- keys.secret.upload
- Summary: Upload a key pair
- Arguments:
pairBytes
: com.google.protobuf.ByteStringname
: Option[String]
- keys.secret.upload
- Summary: Upload (load and import) a key pair from file
- Arguments:
filename
: Stringname
: Option[String]
Topology Administration¶
The topology commands can be used to manipulate and inspect the topology state.
In all commands, we use fingerprints to refer to public keys. Internally, these
fingerprints are resolved using the key registry (which is a map of Fingerprint -> PublicKey).
Any key can be added to the key registry using the keys.public.load
commands.
- topology.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.init_id
- Summary: Initialize the node with a unique identifier
- Arguments:
identifier
: com.digitalasset.canton.topology.Identifierfingerprint
: com.digitalasset.canton.crypto.Fingerprint
- Return type:
- Description: Every node in Canton is identified using a unique identifier, which is composed of a user-chosen string and the fingerprint of a signing key. The signing key is the root key defining a so-called namespace, where the signing key has the ultimate control over issuing new identifiers. During initialisation, we have to pick such a unique identifier. By default, initialisation happens automatically, but it can be turned off by setting the auto-init option to false. Automatic node initialisation is usually turned off to preserve the identity of a participant or domain node (during major version upgrades) or if the topology transactions are managed through a different topology manager than the one integrated into this node.
- topology.load_transaction
- Summary: Upload signed topology transaction
- Arguments:
bytes
: com.google.protobuf.ByteString
- Description: Topology transactions can be issued with any topology manager. In some cases, such transactions need to be copied manually between nodes. This function allows for uploading previously exported topology transaction into the authorized store (which is the name of the topology managers transaction store.
- topology.stores.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.stores.list
- Summary: List available topology stores
- Return type:
- Seq[String]
- Description: Topology transactions are stored in these stores. There are the following stores: “Authorized” - The authorized store is the store of a topology manager. Updates to the topology state are made by adding new transactions to the “Authorized” store. Both the participant and the domain nodes topology manager have such a store. A participant node will distribute all the content in the Authorized store to the domains it is connected to. The domain node will distribute the content of the Authorized store through the sequencer to the domain members in order to create the authoritative topology state on a domain (which is stored in the store named using the domain-id), such that every domain member will have the same view on the topology state on a particular domain. “<domain-id>” - The domain store is the authorized topology state on a domain. A participant has one store for each domain it is connected to. The domain has exactly one store with its domain-id. “Requested” - A domain can be configured such that when participant tries to register a topology transaction with the domain, the transaction is placed into the “Requested” store such that it can be analysed and processed with user defined process.
- topology.namespace_delegations.authorize
- Summary: Change namespace delegation
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpnamespace
: com.digitalasset.canton.crypto.FingerprintauthorizedKey
: com.digitalasset.canton.crypto.FingerprintisRootDelegation
: BooleansignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]force
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: Delegates the authority to authorize topology transactions in a certain namespace to a certain key. The keys are referred to using their fingerprints. They need to be either locally generated or have been previously imported. ops: Either Add or Remove the delegation. namespace: The namespace whose authorization authority is delegated. signedBy: Optional fingerprint of the authorizing key. The authorizing key needs to be either the authorizedKey for root certificates. Otherwise, the signedBy key needs to refer to a previously authorized key, which means that we use the signedBy key to refer to a locally available CA. authorizedKey: Fingerprint of the key to be authorized. If signedBy equals authorizedKey, then this transaction corresponds to a self-signed root certificate. If the keys differ, then we get an intermediate CA. isRootDelegation: If set to true (default = false), the authorized key will be allowed to issue NamespaceDelegations. synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.namespace_delegations.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.namespace_delegations.list
- Summary: List namespace delegation transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterNamespace
: StringfilterSigningKey
: StringfilterTargetKey
: Option[com.digitalasset.canton.crypto.Fingerprint]protocolVersion
: Option[String]
- Description: List the namespace delegation transaction present in the stores. Namespace delegations are topology transactions that permission a key to issue topology transactions within a certain namespace. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterNamespace: Filter for namespaces starting with the given filter string. filterTargetKey: Filter for namespaces delegations for the given target key. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.identifier_delegations.authorize
- Summary: Change identifier delegation
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpidentifier
: com.digitalasset.canton.topology.UniqueIdentifierauthorizedKey
: com.digitalasset.canton.crypto.FingerprintsignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Return type:
- com.google.protobuf.ByteString
- Description: Delegates the authority of a certain identifier to a certain key. This corresponds to a normal certificate which binds identifier to a key. The keys are referred to using their fingerprints. They need to be either locally generated or have been previously imported. ops: Either Add or Remove the delegation. signedBy: Refers to the optional fingerprint of the authorizing key which in turn refers to a specific, locally existing certificate. authorizedKey: Fingerprint of the key to be authorized. synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.identifier_delegations.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.identifier_delegations.list
- Summary: List identifier delegation transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterUid
: StringfilterSigningKey
: StringfilterTargetKey
: Option[com.digitalasset.canton.crypto.Fingerprint]protocolVersion
: Option[String]
- Description: List the identifier delegation transaction present in the stores. Identifier delegations are topology transactions that permission a key to issue topology transactions for a certain unique identifier. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterUid: Filter for unique identifiers starting with the given filter string. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.owner_to_key_mappings.authorize
- Summary: Change an owner to key mapping
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpkeyOwner
: com.digitalasset.canton.topology.KeyOwnerkey
: com.digitalasset.canton.crypto.Fingerprintpurpose
: com.digitalasset.canton.crypto.KeyPurposesignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]force
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: Change a owner to key mapping. A key owner is anyone in the system that needs a key-pair known to all members (participants, mediator, sequencer, topology manager) of a domain. ops: Either Add or Remove the key mapping update. signedBy: Optional fingerprint of the authorizing key which in turn refers to a specific, locally existing certificate. ownerType: Role of the following owner (Participant, Sequencer, Mediator, DomainTopologyManager) owner: Unique identifier of the owner. key: Fingerprint of key purposes: The purposes of the owner to key mapping. force: removing the last key is dangerous and must therefore be manually forced synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.owner_to_key_mappings.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.owner_to_key_mappings.list
- Summary: List owner to key mapping transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterKeyOwnerType
: Option[com.digitalasset.canton.topology.KeyOwnerCode]filterKeyOwnerUid
: StringfilterKeyPurpose
: Option[com.digitalasset.canton.crypto.KeyPurpose]filterSigningKey
: StringprotocolVersion
: Option[String]
- Description: List the owner to key mapping transactions present in the stores. Owner to key mappings are topology transactions defining that a certain key is used by a certain key owner. Key owners are participants, sequencers, mediators and domains. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterKeyOwnerType: Filter for a particular type of key owner (KeyOwnerCode). filterKeyOwnerUid: Filter for key owners unique identifier starting with the given filter string. filterKeyPurpose: Filter for keys with a particular purpose (Encryption or Signing) protocolVersion: Export the topology transactions in the optional protocol version.
- topology.owner_to_key_mappings.rotate_key
- Summary: Rotate the key for an owner to key mapping
- Arguments:
nodeInstance
: com.digitalasset.canton.console.InstanceReferenceCommonowner
: com.digitalasset.canton.topology.KeyOwnercurrentKey
: com.digitalasset.canton.crypto.PublicKeynewKey
: com.digitalasset.canton.crypto.PublicKey
- Description: Rotates the key for an existing owner to key mapping by issuing a new owner to key mapping with the new key and removing the previous owner to key mapping with the previous key. nodeInstance: The node instance that is used to verify that both current and new key pertain to this node. This avoids conflicts when there are different nodes with the same uuid (i.e., multiple sequencers). owner: The owner of the owner to key mapping currentKey: The current public key that will be rotated newKey: The new public key that has been generated
- topology.party_to_participant_mappings.authorize (Preview)
- Summary: Change party to participant mapping
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpparty
: com.digitalasset.canton.topology.PartyIdparticipant
: com.digitalasset.canton.topology.ParticipantIdside
: com.digitalasset.canton.topology.transaction.RequestSidepermission
: com.digitalasset.canton.topology.transaction.ParticipantPermissionsignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]replaceExisting
: Booleanforce
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: Change the association of a party to a participant. If both identifiers are in the same namespace, then the request-side is Both. If they differ, then we need to say whether the request comes from the party (RequestSide.From) or from the participant (RequestSide.To). And, we need the matching request of the other side. Please note that this is a preview feature due to the fact that inhomogeneous topologies can not yet be properly represented on the Ledger API. ops: Either Add or Remove the mapping signedBy: Refers to the optional fingerprint of the authorizing key which in turn refers to a specific, locally existing certificate. party: The unique identifier of the party we want to map to a participant. participant: The unique identifier of the participant to which the party is supposed to be mapped. side: The request side (RequestSide.From if we the transaction is from the perspective of the party, RequestSide.To from the participant.) privilege: The privilege of the given participant which allows us to restrict an association (e.g. Confirmation or Observation). replaceExisting: If true (default), replace any existing mapping with the new setting synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.party_to_participant_mappings.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.party_to_participant_mappings.list
- Summary: List party to participant mapping transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterParty
: StringfilterParticipant
: StringfilterRequestSide
: Option[com.digitalasset.canton.topology.transaction.RequestSide]filterPermission
: Option[com.digitalasset.canton.topology.transaction.ParticipantPermission]filterSigningKey
: StringprotocolVersion
: Option[String]
- Description: List the party to participant mapping transactions present in the stores. Party to participant mappings are topology transactions used to allocate a party to a certain participant. The same party can be allocated on several participants with different privileges. A party to participant mapping has a request-side that identifies whether the mapping is authorized by the party, by the participant or by both. In order to have a party be allocated to a given participant, we therefore need either two transactions (one with RequestSide.From, one with RequestSide.To) or one with RequestSide.Both. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterParty: Filter for parties starting with the given filter string. filterParticipant: Filter for participants starting with the given filter string. filterRequestSide: Optional filter for a particular request side (Both, From, To). protocolVersion: Export the topology transactions in the optional protocol version.
- topology.participant_domain_states.active
- Summary: Returns true if the given participant is currently active on the given domain
- Arguments:
domainId
: com.digitalasset.canton.topology.DomainIdparticipantId
: com.digitalasset.canton.topology.ParticipantId
- Return type:
- Boolean
- Description: Active means that the participant has been granted at least observation rights on the domain and that the participant has registered a domain trust certificate
- topology.participant_domain_states.authorize
- Summary: Change participant domain states
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpdomain
: com.digitalasset.canton.topology.DomainIdparticipant
: com.digitalasset.canton.topology.ParticipantIdside
: com.digitalasset.canton.topology.transaction.RequestSidepermission
: com.digitalasset.canton.topology.transaction.ParticipantPermissiontrustLevel
: com.digitalasset.canton.topology.transaction.TrustLevelsignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]replaceExisting
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: Change the association of a participant to a domain. In order to activate a participant on a domain, we need both authorisation: the participant authorising its uid to be present on a particular domain and the domain to authorise the presence of a participant on said domain. If both identifiers are in the same namespace, then the request-side can be Both. If they differ, then we need to say whether the request comes from the domain (RequestSide.From) or from the participant (RequestSide.To). And, we need the matching request of the other side. ops: Either Add or Remove the mapping signedBy: Refers to the optional fingerprint of the authorizing key which in turn refers to a specific, locally existing certificate. domain: The unique identifier of the domain we want the participant to join. participant: The unique identifier of the participant. side: The request side (RequestSide.From if we the transaction is from the perspective of the domain, RequestSide.To from the participant.) permission: The privilege of the given participant which allows us to restrict an association (e.g. Confirmation or Observation). Will use the lower of if different between To/From. trustLevel: The trust level of the participant on the given domain. Will use the lower of if different between To/From. replaceExisting: If true (default), replace any existing mapping with the new setting synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.participant_domain_states.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.participant_domain_states.list
- Summary: List participant domain states
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterDomain
: StringfilterParticipant
: StringfilterSigningKey
: StringprotocolVersion
: Option[String]
- Description: List the participant domain transactions present in the stores. Participant domain states are topology transactions used to permission a participant on a given domain. A participant domain state has a request-side that identifies whether the mapping is authorized by the participant (From), by the domain (To) or by both (Both). In order to use a participant on a domain, both have to authorize such a mapping. This means that by authorizing such a topology transaction, a participant acknowledges its presence on a domain, whereas a domain permissions the participant on that domain. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterDomain: Filter for domains starting with the given filter string. filterParticipant: Filter for participants starting with the given filter string. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.vetted_packages.authorize
- Summary: Change package vettings
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpparticipant
: com.digitalasset.canton.topology.ParticipantIdpackageIds
: Seq[com.daml.lf.data.Ref.PackageId]signedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]force
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: A participant will only process transactions that reference packages that all involved participants have vetted previously. Vetting is done by registering a respective topology transaction with the domain, which can then be used by other participants to verify that a transaction is only using vetted packages. Note that all referenced and dependent packages must exist in the package store. By default, only vetting transactions adding new packages can be issued. Removing package vettings and issuing package vettings for other participants (if their identity is controlled through this participants topology manager) or for packages that do not exist locally can only be run using the force = true flag. However, these operations are dangerous and can lead to the situation of a participant being unable to process transactions. ops: Either Add or Remove the vetting. participant: The unique identifier of the participant that is vetting the package. packageIds: The lf-package ids to be vetted. signedBy: Refers to the fingerprint of the authorizing key which in turn must be authorized by a valid, locally existing certificate. If none is given, a key is automatically determined. synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node force: Flag to enable dangerous operations (default false). Great power requires great care.
- topology.vetted_packages.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.vetted_packages.list
- Summary: List package vetting transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterParticipant
: StringfilterSigningKey
: StringprotocolVersion
: Option[String]
- Description: List the package vetting transactions present in the stores. Participants must vet Daml packages and submitters must ensure that the receiving participants have vetted the package prior to submitting a transaction (done automatically during submission and validation). Vetting is done by authorizing such topology transactions and registering with a domain. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterParticipant: Filter for participants starting with the given filter string. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.all.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.all.list
- Summary: List all transaction
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterAuthorizedKey
: Option[com.digitalasset.canton.crypto.Fingerprint]protocolVersion
: Option[String]
- Description: List all topology transactions in a store, independent of the particular type. This method is useful for exporting entire states. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterAuthorizedKey: Filter the topology transactions by the key that has authorized the transactions. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.all.renew
- Summary: Renew all topology transactions that have been authorized with a previous key using a new key
- Arguments:
filterAuthorizedKey
: com.digitalasset.canton.crypto.FingerprintauthorizeWith
: com.digitalasset.canton.crypto.Fingerprint
- Description: Finds all topology transactions that have been authorized by filterAuthorizedKey and renews those topology transactions by authorizing them with the new key authorizeWith. filterAuthorizedKey: Filter the topology transactions by the key that has authorized the transactions. authorizeWith: The key to authorize the renewed topology transactions.
Ledger API Access¶
The following commands on a participant reference provide access to the participant’s Ledger API services.
- ledger_api.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api_v2.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
Transaction Service¶
- ledger_api.transactions.by_id (Testing)
- Summary: Get a (tree) transaction by its ID
- Arguments:
parties
: Set[com.digitalasset.canton.topology.PartyId]id
: String
- Return type:
- Option[com.daml.ledger.api.v1.transaction.TransactionTree]
- Description: Get a transaction tree from the transaction stream by its ID. Returns None if the transaction is not (yet) known at the participant or if the transaction has been pruned via pruning.prune.
- ledger_api.transactions.domain_of (Testing)
- Summary: Get the domain that a transaction was committed over.
- Arguments:
transactionId
: String
- Return type:
- Description: Get the domain that a transaction was committed over. Throws an error if the transaction is not (yet) known to the participant or if the transaction has been pruned via pruning.prune.
- ledger_api.transactions.end (Testing)
- Summary: Get ledger end
- Return type:
- com.daml.ledger.api.v1.ledger_offset.LedgerOffset
- ledger_api.transactions.flat (Testing)
- Summary: Get flat transactions
- Arguments:
partyIds
: Set[com.digitalasset.canton.topology.PartyId]completeAfter
: IntbeginOffset
: com.daml.ledger.api.v1.ledger_offset.LedgerOffsetendOffset
: Option[com.daml.ledger.api.v1.ledger_offset.LedgerOffset]verbose
: Booleantimeout
: com.digitalasset.canton.config.NonNegativeDuration
- Return type:
- Seq[com.daml.ledger.api.v1.transaction.Transaction]
- Description: This function connects to the flat transaction stream for the given parties and collects transactions until either completeAfter transaction trees have been received or timeout has elapsed. The returned transactions can be filtered to be between the given offsets (default: no filtering). If the participant has been pruned via pruning.prune and if beginOffset is lower than the pruning offset, this command fails with a NOT_FOUND error. If you need to specify filtering conditions for template IDs and including create event blobs for explicit disclosure, consider using ledger_api.transactions.flat_with_tx_filter.
- ledger_api.transactions.flat_with_tx_filter (Testing)
- Summary: Get flat transactions
- Arguments:
filter
: com.daml.ledger.api.v1.transaction_filter.TransactionFiltercompleteAfter
: IntbeginOffset
: com.daml.ledger.api.v1.ledger_offset.LedgerOffsetendOffset
: Option[com.daml.ledger.api.v1.ledger_offset.LedgerOffset]verbose
: Booleantimeout
: com.digitalasset.canton.config.NonNegativeDuration
- Return type:
- Seq[com.daml.ledger.api.v1.transaction.Transaction]
- Description: This function connects to the flat transaction stream for the given transaction filter and collects transactions until either completeAfter transactions have been received or timeout has elapsed. The returned transactions can be filtered to be between the given offsets (default: no filtering). If the participant has been pruned via pruning.prune and if beginOffset is lower than the pruning offset, this command fails with a NOT_FOUND error. If you only need to filter by a set of parties, consider using ledger_api.transactions.flat instead.
- ledger_api.transactions.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.transactions.start_measuring (Testing)
- Summary: Starts measuring throughput at the transaction service
- Arguments:
parties
: Set[com.digitalasset.canton.topology.PartyId]metricSuffix
: StringonTransaction
: com.daml.ledger.api.v1.transaction.TransactionTree => Unit
- Return type:
- AutoCloseable
- Description: This function will subscribe on behalf of parties to the transaction tree stream and notify various metrics: The metric <name>.<metricSuffix> counts the number of transaction trees emitted. The metric <name>.<metricSuffix>-tx-node-count tracks the number of root events emitted as part of transaction trees. The metric <name>.<metricSuffix>-tx-size tracks the number of bytes emitted as part of transaction trees. To stop measuring, you need to close the returned AutoCloseable. Use the onTransaction parameter to register a callback that is called on every transaction tree.
- ledger_api.transactions.subscribe_flat (Testing)
- Summary: Subscribe to the flat transaction stream
- Arguments:
observer
: io.grpc.stub.StreamObserver[com.daml.ledger.api.v1.transaction.Transaction]filter
: com.daml.ledger.api.v1.transaction_filter.TransactionFilterbeginOffset
: com.daml.ledger.api.v1.ledger_offset.LedgerOffsetendOffset
: Option[com.daml.ledger.api.v1.ledger_offset.LedgerOffset]verbose
: Boolean
- Return type:
- AutoCloseable
- Description: This function connects to the flat transaction stream and passes transactions to observer until the stream is completed. Only transactions for parties in filter.filterByParty.keys will be returned. Use filter = TransactionFilter(Map(myParty.toLf -> Filters())) to return all transactions for myParty: PartyId. The returned transactions can be filtered to be between the given offsets (default: no filtering). If the participant has been pruned via pruning.prune and if beginOffset is lower than the pruning offset, this command fails with a NOT_FOUND error.
- ledger_api.transactions.subscribe_trees (Testing)
- Summary: Subscribe to the transaction tree stream
- Arguments:
observer
: io.grpc.stub.StreamObserver[com.daml.ledger.api.v1.transaction.TransactionTree]filter
: com.daml.ledger.api.v1.transaction_filter.TransactionFilterbeginOffset
: com.daml.ledger.api.v1.ledger_offset.LedgerOffsetendOffset
: Option[com.daml.ledger.api.v1.ledger_offset.LedgerOffset]verbose
: Boolean
- Return type:
- AutoCloseable
- Description: This function connects to the transaction tree stream and passes transaction trees to observer until the stream is completed. Only transaction trees for parties in filter.filterByParty.keys will be returned. Use filter = TransactionFilter(Map(myParty.toLf -> Filters())) to return all trees for myParty: PartyId. The returned transactions can be filtered to be between the given offsets (default: no filtering). If the participant has been pruned via pruning.prune and if beginOffset is lower than the pruning offset, this command fails with a NOT_FOUND error.
- ledger_api.transactions.trees (Testing)
- Summary: Get transaction trees
- Arguments:
partyIds
: Set[com.digitalasset.canton.topology.PartyId]completeAfter
: IntbeginOffset
: com.daml.ledger.api.v1.ledger_offset.LedgerOffsetendOffset
: Option[com.daml.ledger.api.v1.ledger_offset.LedgerOffset]verbose
: Booleantimeout
: com.digitalasset.canton.config.NonNegativeDuration
- Return type:
- Seq[com.daml.ledger.api.v1.transaction.TransactionTree]
- Description: This function connects to the transaction tree stream for the given parties and collects transaction trees until either completeAfter transaction trees have been received or timeout has elapsed. The returned transaction trees can be filtered to be between the given offsets (default: no filtering). If the participant has been pruned via pruning.prune and if beginOffset is lower than the pruning offset, this command fails with a NOT_FOUND error.
Command Service¶
- ledger_api.commands.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.commands.submit (Testing)
- Summary: Submit command and wait for the resulting transaction, returning the transaction tree or failing otherwise
- Arguments:
actAs
: Seq[com.digitalasset.canton.topology.PartyId]commands
: Seq[com.daml.ledger.api.v1.commands.Command]workflowId
: StringcommandId
: StringoptTimeout
: Option[com.digitalasset.canton.config.NonNegativeDuration]deduplicationPeriod
: Option[com.digitalasset.canton.ledger.api.DeduplicationPeriod]submissionId
: StringminLedgerTimeAbs
: Option[java.time.Instant]readAs
: Seq[com.digitalasset.canton.topology.PartyId]disclosedContracts
: Seq[com.daml.ledger.api.v1.commands.DisclosedContract]applicationId
: String
- Return type:
- com.daml.ledger.api.v1.transaction.TransactionTree
- Description: Submits a command on behalf of the actAs parties, waits for the resulting transaction to commit and returns it. If the timeout is set, it also waits for the transaction to appear at all other configured participants who were involved in the transaction. The call blocks until the transaction commits or fails; the timeout only specifies how long to wait at the other participants. Fails if the transaction doesn’t commit, or if it doesn’t become visible to the involved participants in the allotted time. Note that if the optTimeout is set and the involved parties are concurrently enabled/disabled or their participants are connected/disconnected, the command may currently result in spurious timeouts or may return before the transaction appears at all the involved participants.
- ledger_api.commands.submit_async (Testing)
- Summary: Submit command asynchronously
- Arguments:
actAs
: Seq[com.digitalasset.canton.topology.PartyId]commands
: Seq[com.daml.ledger.api.v1.commands.Command]workflowId
: StringcommandId
: StringdeduplicationPeriod
: Option[com.digitalasset.canton.ledger.api.DeduplicationPeriod]submissionId
: StringminLedgerTimeAbs
: Option[java.time.Instant]readAs
: Seq[com.digitalasset.canton.topology.PartyId]disclosedContracts
: Seq[com.daml.ledger.api.v1.commands.DisclosedContract]applicationId
: String
- Description: Provides access to the command submission service of the Ledger API. See https://docs.daml.com/app-dev/services.html for documentation of the parameters.
- ledger_api.commands.submit_flat (Testing)
- Summary: Submit command and wait for the resulting transaction, returning the flattened transaction or failing otherwise
- Arguments:
actAs
: Seq[com.digitalasset.canton.topology.PartyId]commands
: Seq[com.daml.ledger.api.v1.commands.Command]workflowId
: StringcommandId
: StringoptTimeout
: Option[com.digitalasset.canton.config.NonNegativeDuration]deduplicationPeriod
: Option[com.digitalasset.canton.ledger.api.DeduplicationPeriod]submissionId
: StringminLedgerTimeAbs
: Option[java.time.Instant]readAs
: Seq[com.digitalasset.canton.topology.PartyId]disclosedContracts
: Seq[com.daml.ledger.api.v1.commands.DisclosedContract]applicationId
: String
- Return type:
- com.daml.ledger.api.v1.transaction.Transaction
- Description: Submits a command on behalf of the actAs parties, waits for the resulting transaction to commit, and returns the “flattened” transaction. If the timeout is set, it also waits for the transaction to appear at all other configured participants who were involved in the transaction. The call blocks until the transaction commits or fails; the timeout only specifies how long to wait at the other participants. Fails if the transaction doesn’t commit, or if it doesn’t become visible to the involved participants in the allotted time. Note that if the optTimeout is set and the involved parties are concurrently enabled/disabled or their participants are connected/disconnected, the command may currently result in spurious timeouts or may return before the transaction appears at all the involved participants.
- ledger_api_v2.commands.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api_v2.commands.submit (Testing)
- Summary: Submit command and wait for the resulting transaction, returning the transaction tree or failing otherwise
- Arguments:
actAs
: Seq[com.digitalasset.canton.topology.PartyId]commands
: Seq[com.daml.ledger.api.v1.commands.Command]domainId
: com.digitalasset.canton.topology.DomainIdworkflowId
: StringcommandId
: StringoptTimeout
: Option[com.digitalasset.canton.config.NonNegativeDuration]deduplicationPeriod
: Option[com.digitalasset.canton.ledger.api.DeduplicationPeriod]submissionId
: StringminLedgerTimeAbs
: Option[java.time.Instant]readAs
: Seq[com.digitalasset.canton.topology.PartyId]disclosedContracts
: Seq[com.daml.ledger.api.v1.commands.DisclosedContract]applicationId
: String
- Return type:
- com.daml.ledger.api.v2.transaction.TransactionTree
- Description: Submits a command on behalf of the actAs parties, waits for the resulting transaction to commit and returns it. If the timeout is set, it also waits for the transaction to appear at all other configured participants who were involved in the transaction. The call blocks until the transaction commits or fails; the timeout only specifies how long to wait at the other participants. Fails if the transaction doesn’t commit, or if it doesn’t become visible to the involved participants in the allotted time. Note that if the optTimeout is set and the involved parties are concurrently enabled/disabled or their participants are connected/disconnected, the command may currently result in spurious timeouts or may return before the transaction appears at all the involved participants.
- ledger_api_v2.commands.submit_assign (Testing)
- Summary: Submit assign command and wait for the resulting reassignment, returning the reassignment or failing otherwise
- Arguments:
submitter
: com.digitalasset.canton.topology.PartyIdunassignId
: Stringsource
: com.digitalasset.canton.topology.DomainIdtarget
: com.digitalasset.canton.topology.DomainIdworkflowId
: StringapplicationId
: StringsubmissionId
: StringwaitForParticipants
: Map[com.digitalasset.canton.console.ParticipantReferenceCommon,com.digitalasset.canton.topology.PartyId]timeout
: com.digitalasset.canton.config.NonNegativeDuration
- Return type:
- com.digitalasset.canton.admin.api.client.commands.LedgerApiV2Commands.UpdateService.AssignedWrapper
- Description: Submits a assignment command on behalf of submitter party, waits for the resulting assignment to commit, and returns the reassignment. If waitForParticipants is set, it also waits for the reassignment(s) to appear at all other configured participants who were involved in the assignment. The call blocks until the assignment commits or fails. Fails if the assignment doesn’t commit, or if it doesn’t become visible to the involved participants in time. Timout specifies the time how long to wait until the reassignment appears in the update stream for the submitting and all the specified participants. The unassignId should be the one returned by the corresponding submit_unassign command.
- ledger_api_v2.commands.submit_assign_async (Testing)
- Summary: Submit assign command asynchronously
- Arguments:
submitter
: com.digitalasset.canton.topology.PartyIdunassignId
: Stringsource
: com.digitalasset.canton.topology.DomainIdtarget
: com.digitalasset.canton.topology.DomainIdworkflowId
: StringapplicationId
: StringcommandId
: StringsubmissionId
: String
- Description: Provides access to the command submission service of the Ledger API. See https://docs.daml.com/app-dev/services.html for documentation of the parameters.
- ledger_api_v2.commands.submit_async (Testing)
- Summary: Submit command asynchronously
- Arguments:
actAs
: Seq[com.digitalasset.canton.topology.PartyId]commands
: Seq[com.daml.ledger.api.v1.commands.Command]domainId
: com.digitalasset.canton.topology.DomainIdworkflowId
: StringcommandId
: StringdeduplicationPeriod
: Option[com.digitalasset.canton.ledger.api.DeduplicationPeriod]submissionId
: StringminLedgerTimeAbs
: Option[java.time.Instant]readAs
: Seq[com.digitalasset.canton.topology.PartyId]disclosedContracts
: Seq[com.daml.ledger.api.v1.commands.DisclosedContract]applicationId
: String
- Description: Provides access to the command submission service of the Ledger API. See https://docs.daml.com/app-dev/services.html for documentation of the parameters.
- ledger_api_v2.commands.submit_flat (Testing)
- Summary: Submit command and wait for the resulting transaction, returning the flattened transaction or failing otherwise
- Arguments:
actAs
: Seq[com.digitalasset.canton.topology.PartyId]commands
: Seq[com.daml.ledger.api.v1.commands.Command]domainId
: com.digitalasset.canton.topology.DomainIdworkflowId
: StringcommandId
: StringoptTimeout
: Option[com.digitalasset.canton.config.NonNegativeDuration]deduplicationPeriod
: Option[com.digitalasset.canton.ledger.api.DeduplicationPeriod]submissionId
: StringminLedgerTimeAbs
: Option[java.time.Instant]readAs
: Seq[com.digitalasset.canton.topology.PartyId]disclosedContracts
: Seq[com.daml.ledger.api.v1.commands.DisclosedContract]applicationId
: String
- Return type:
- com.daml.ledger.api.v2.transaction.Transaction
- Description: Submits a command on behalf of the actAs parties, waits for the resulting transaction to commit, and returns the “flattened” transaction. If the timeout is set, it also waits for the transaction to appear at all other configured participants who were involved in the transaction. The call blocks until the transaction commits or fails; the timeout only specifies how long to wait at the other participants. Fails if the transaction doesn’t commit, or if it doesn’t become visible to the involved participants in the allotted time. Note that if the optTimeout is set and the involved parties are concurrently enabled/disabled or their participants are connected/disconnected, the command may currently result in spurious timeouts or may return before the transaction appears at all the involved participants.
- ledger_api_v2.commands.submit_unassign (Testing)
- Summary: Submit assign command and wait for the resulting reassignment, returning the reassignment or failing otherwise
- Arguments:
submitter
: com.digitalasset.canton.topology.PartyIdcontractId
: com.digitalasset.canton.protocol.LfContractIdsource
: com.digitalasset.canton.topology.DomainIdtarget
: com.digitalasset.canton.topology.DomainIdworkflowId
: StringapplicationId
: StringsubmissionId
: StringwaitForParticipants
: Map[com.digitalasset.canton.console.ParticipantReferenceCommon,com.digitalasset.canton.topology.PartyId]timeout
: com.digitalasset.canton.config.NonNegativeDuration
- Return type:
- com.digitalasset.canton.admin.api.client.commands.LedgerApiV2Commands.UpdateService.UnassignedWrapper
- Description: Submits an unassignment command on behalf of submitter party, waits for the resulting unassignment to commit, and returns the reassignment. If waitForParticipants is set, it also waits for the reassignment(s) to appear at all other configured participants who were involved in the unassignment. The call blocks until the unassignment commits or fails. Fails if the unassignment doesn’t commit, or if it doesn’t become visible to the involved participants in time. Timout specifies the time how long to wait until the reassignment appears in the update stream for the submitting and all the specified participants.
- ledger_api_v2.commands.submit_unassign_async (Testing)
- Summary: Submit unassign command asynchronously
- Arguments:
submitter
: com.digitalasset.canton.topology.PartyIdcontractId
: com.digitalasset.canton.protocol.LfContractIdsource
: com.digitalasset.canton.topology.DomainIdtarget
: com.digitalasset.canton.topology.DomainIdworkflowId
: StringapplicationId
: StringcommandId
: StringsubmissionId
: String
- Description: Provides access to the command submission service of the Ledger API. See https://docs.daml.com/app-dev/services.html for documentation of the parameters.
Command Completion Service¶
- ledger_api.completions.end (Testing)
- Summary: Read the current command completion offset
- Return type:
- com.daml.ledger.api.v1.ledger_offset.LedgerOffset
- ledger_api.completions.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.completions.list (Testing)
- Summary: Lists command completions following the specified offset
- Arguments:
partyId
: com.digitalasset.canton.topology.PartyIdatLeastNumCompletions
: Intoffset
: com.daml.ledger.api.v1.ledger_offset.LedgerOffsetapplicationId
: Stringtimeout
: com.digitalasset.canton.config.NonNegativeDurationfilter
: com.daml.ledger.api.v1.completion.Completion => Boolean
- Return type:
- Seq[com.daml.ledger.api.v1.completion.Completion]
- Description: If the participant has been pruned via pruning.prune and if offset is lower than the pruning offset, this command fails with a NOT_FOUND error.
- ledger_api.completions.list_with_checkpoint (Testing)
- Summary: Lists command completions following the specified offset along with the checkpoints included in the completions
- Arguments:
partyId
: com.digitalasset.canton.topology.PartyIdatLeastNumCompletions
: Intoffset
: com.daml.ledger.api.v1.ledger_offset.LedgerOffsetapplicationId
: Stringtimeout
: com.digitalasset.canton.config.NonNegativeDurationfilter
: com.daml.ledger.api.v1.completion.Completion => Boolean
- Return type:
- Seq[(com.daml.ledger.api.v1.completion.Completion, Option[com.daml.ledger.api.v1.command_completion_service.Checkpoint])]
- Description: If the participant has been pruned via pruning.prune and if offset is lower than the pruning offset, this command fails with a NOT_FOUND error.
- ledger_api.completions.subscribe (Testing)
- Summary: Subscribe to the command completion stream
- Arguments:
observer
: io.grpc.stub.StreamObserver[com.daml.ledger.api.v1.completion.Completion]parties
: Seq[com.digitalasset.canton.topology.PartyId]beginOffset
: com.daml.ledger.api.v1.ledger_offset.LedgerOffsetapplicationId
: String
- Return type:
- AutoCloseable
- Description: This function connects to the command completion stream and passes command completions to observer until the stream is completed. Only completions for parties in parties will be returned. The returned completions start at beginOffset (default: LEDGER_BEGIN). If the participant has been pruned via pruning.prune and if beginOffset is lower than the pruning offset, this command fails with a NOT_FOUND error.
- ledger_api_v2.completions.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api_v2.completions.list (Testing)
- Summary: Lists command completions following the specified offset
- Arguments:
partyId
: com.digitalasset.canton.topology.PartyIdatLeastNumCompletions
: IntbeginOffset
: com.daml.ledger.api.v2.participant_offset.ParticipantOffsetapplicationId
: Stringtimeout
: com.digitalasset.canton.config.NonNegativeDurationfilter
: com.digitalasset.canton.admin.api.client.commands.LedgerApiV2Commands.CompletionWrapper => Boolean
- Return type:
- Seq[com.digitalasset.canton.admin.api.client.commands.LedgerApiV2Commands.CompletionWrapper]
- Description: If the participant has been pruned via pruning.prune and if beginOffset is lower than the pruning offset, this command fails with a NOT_FOUND error.
- ledger_api_v2.completions.subscribe (Testing)
- Summary: Subscribe to the command completion stream
- Arguments:
observer
: io.grpc.stub.StreamObserver[com.digitalasset.canton.admin.api.client.commands.LedgerApiV2Commands.CompletionWrapper]parties
: Seq[com.digitalasset.canton.topology.PartyId]beginOffset
: com.daml.ledger.api.v2.participant_offset.ParticipantOffsetapplicationId
: String
- Return type:
- AutoCloseable
- Description: This function connects to the command completion stream and passes command completions to observer until the stream is completed. Only completions for parties in parties will be returned. The returned completions start at beginOffset (default: PARTICIPANT_BEGIN). If the participant has been pruned via pruning.prune and if beginOffset is lower than the pruning offset, this command fails with a NOT_FOUND error.
Active Contract Service¶
- ledger_api.acs.await_active_contract (Testing)
- Summary: Wait until the party sees the given contract in the active contract service
- Arguments:
- Description: Will throw an exception if the contract is not found to be active within the given timeout
- ledger_api.acs.find_generic (Testing)
- Summary: Generic search for contracts
- Description: This search function returns an untyped ledger-api event. The find will wait until the contract appears or throw an exception once it times out.
- ledger_api.acs.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.acs.of_all (Testing)
- Summary: List the set of active contracts for all parties hosted on this participant
- Arguments:
limit
: com.digitalasset.canton.config.RequireTypes.PositiveIntverbose
: BooleanfilterTemplates
: Seq[com.digitalasset.canton.admin.api.client.data.TemplateId]timeout
: com.digitalasset.canton.config.NonNegativeDurationidentityProviderId
: StringincludeCreatedEventBlob
: Boolean
- Description: This command will return the current set of active contracts for all parties. Supported arguments: - limit: limit (default set via canton.parameter.console) - verbose: whether the resulting events should contain detailed type information - filterTemplate: list of templates ids to filter for, empty sequence acts as a wildcard - timeout: the maximum wait time for the complete acs to arrive - identityProviderId: limit the response to parties governed by the given identity provider - includeCreatedEventBlob: whether the result should contain the createdEventBlobs, it works only if the filterTemplate is non-empty
- ledger_api.acs.of_party (Testing)
- Summary: List the set of active contracts of a given party
- Arguments:
party
: com.digitalasset.canton.topology.PartyIdlimit
: com.digitalasset.canton.config.RequireTypes.PositiveIntverbose
: BooleanfilterTemplates
: Seq[com.digitalasset.canton.admin.api.client.data.TemplateId]timeout
: com.digitalasset.canton.config.NonNegativeDurationincludeCreatedEventBlob
: Boolean
- Description: This command will return the current set of active contracts for the given party. Supported arguments: - party: for which party you want to load the acs - limit: limit (default set via canton.parameter.console) - verbose: whether the resulting events should contain detailed type information - filterTemplate: list of templates ids to filter for, empty sequence acts as a wildcard - timeout: the maximum wait time for the complete acs to arrive - includeCreatedEventBlob: whether the result should contain the createdEventBlobs, it works only if the filterTemplate is non-empty
Package Service¶
- ledger_api.packages.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.packages.list (Testing)
- Summary: List Daml Packages
- Arguments:
- Return type:
- Seq[com.daml.ledger.api.v1.admin.package_management_service.PackageDetails]
- ledger_api.packages.upload_dar (Testing)
- Summary: Upload packages from Dar file
- Arguments:
darPath
: String
- Description: Uploading the Dar can be done either through the ledger Api server or through the Canton admin Api. The Ledger Api is the portable method across ledgers. The Canton admin Api is more powerful as it allows for controlling Canton specific behaviour. In particular, a Dar uploaded using the ledger Api will not be available in the Dar store and can not be downloaded again. Additionally, Dars uploaded using the ledger Api will be vetted, but the system will not wait for the Dars to be successfully registered with all connected domains. As such, if a Dar is uploaded and then used immediately thereafter, a command might bounce due to missing package vettings.
- ledger_api_v2.packages.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api_v2.packages.list (Testing)
- Summary: List Daml Packages
- Arguments:
- Return type:
- Seq[com.daml.ledger.api.v1.admin.package_management_service.PackageDetails]
- ledger_api_v2.packages.upload_dar (Testing)
- Summary: Upload packages from Dar file
- Arguments:
darPath
: String
- Description: Uploading the Dar can be done either through the ledger Api server or through the Canton admin Api. The Ledger Api is the portable method across ledgers. The Canton admin Api is more powerful as it allows for controlling Canton specific behaviour. In particular, a Dar uploaded using the ledger Api will not be available in the Dar store and can not be downloaded again. Additionally, Dars uploaded using the ledger Api will be vetted, but the system will not wait for the Dars to be successfully registered with all connected domains. As such, if a Dar is uploaded and then used immediately thereafter, a command might bounce due to missing package vettings.
Party Management Service¶
- ledger_api.parties.allocate (Testing)
- Summary: Allocate a new party
- Arguments:
party
: StringdisplayName
: Stringannotations
: Map[String,String]identityProviderId
: String
- Description: Allocates a new party on the ledger. party: a hint for generating the party identifier displayName: a human-readable name of this party annotations: key-value pairs associated with this party and stored locally on this Ledger API server identityProviderId: identity provider id
- ledger_api.parties.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.parties.list (Testing)
- Summary: List parties known by the Ledger API server
- Arguments:
identityProviderId
: String
- Description: Lists parties known by the Ledger API server. identityProviderId: identity provider id
- ledger_api.parties.update
- Summary: Update participant-local party details
- Arguments:
party
: com.digitalasset.canton.topology.PartyIdmodifier
: com.digitalasset.canton.admin.api.client.data.PartyDetails => com.digitalasset.canton.admin.api.client.data.PartyDetailsidentityProviderId
: String
- Description: Currently you can update only the annotations. You cannot update other user attributes. party: party to be updated, modifier: a function to modify the party details, e.g.: partyDetails => { partyDetails.copy(annotations = partyDetails.annotations.updated(“a”, “b”).removed(“c”)) } identityProviderId: identity provider id
- ledger_api.parties.update_idp (Testing)
- Summary: Update party’s identity provider id
- Arguments:
party
: com.digitalasset.canton.topology.PartyIdsourceIdentityProviderId
: StringtargetIdentityProviderId
: String
- Description: Updates party’s identity provider id. party: party to be updated sourceIdentityProviderId: source identity provider id targetIdentityProviderId: target identity provider id
- ledger_api_v2.parties.allocate (Testing)
- Summary: Allocate a new party
- Arguments:
party
: StringdisplayName
: Stringannotations
: Map[String,String]identityProviderId
: String
- Description: Allocates a new party on the ledger. party: a hint for generating the party identifier displayName: a human-readable name of this party annotations: key-value pairs associated with this party and stored locally on this Ledger API server identityProviderId: identity provider id
- ledger_api_v2.parties.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api_v2.parties.list (Testing)
- Summary: List parties known by the Ledger API server
- Arguments:
identityProviderId
: String
- Description: Lists parties known by the Ledger API server. identityProviderId: identity provider id
- ledger_api_v2.parties.update
- Summary: Update participant-local party details
- Arguments:
party
: com.digitalasset.canton.topology.PartyIdmodifier
: com.digitalasset.canton.admin.api.client.data.PartyDetails => com.digitalasset.canton.admin.api.client.data.PartyDetailsidentityProviderId
: String
- Description: Currently you can update only the annotations. You cannot update other user attributes. party: party to be updated, modifier: a function to modify the party details, e.g.: partyDetails => { partyDetails.copy(annotations = partyDetails.annotations.updated(“a”, “b”).removed(“c”)) } identityProviderId: identity provider id
- ledger_api_v2.parties.update_idp (Testing)
- Summary: Update party’s identity provider id
- Arguments:
party
: com.digitalasset.canton.topology.PartyIdsourceIdentityProviderId
: StringtargetIdentityProviderId
: String
- Description: Updates party’s identity provider id. party: party to be updated sourceIdentityProviderId: source identity provider id targetIdentityProviderId: target identity provider id
Ledger Configuration Service¶
- ledger_api.configuration.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.configuration.list (Testing)
- Summary: Obtain the ledger configuration
- Arguments:
expectedConfigs
: Inttimeout
: com.digitalasset.canton.config.NonNegativeDuration
- Return type:
- Seq[com.daml.ledger.api.v1.ledger_configuration_service.LedgerConfiguration]
- Description: Returns the current ledger configuration and subsequent updates until the expected number of configs was retrieved or the timeout is over.
Ledger Api User Management Service¶
- ledger_api.users.create (Testing)
- Summary: Create a user with the given id
- Arguments:
id
: StringactAs
: Set[com.digitalasset.canton.topology.PartyId]primaryParty
: Option[com.digitalasset.canton.topology.PartyId]readAs
: Set[com.digitalasset.canton.topology.PartyId]participantAdmin
: BooleanisActive
: Booleanannotations
: Map[String,String]identityProviderId
: String
- Return type:
- Description: Users are used to dynamically managing the rights given to Daml applications. They allow us to link a stable local identifier (of an application) with a set of parties. id: the id used to identify the given user actAs: the set of parties this user is allowed to act as primaryParty: the optional party that should be linked to this user by default readAs: the set of parties this user is allowed to read as participantAdmin: flag (default false) indicating if the user is allowed to use the admin commands of the Ledger Api isActive: flag (default true) indicating if the user is active annotations: the set of key-value pairs linked to this user identityProviderId: identity provider id
- ledger_api.users.delete (Testing)
- Summary: Delete a user
- Arguments:
id
: StringidentityProviderId
: String
- Description: Delete a user by id. id: user id identityProviderId: identity provider id
- ledger_api.users.get (Testing)
- Summary: Get the user data of the user with the given id
- Arguments:
id
: StringidentityProviderId
: String
- Return type:
- Description: Fetch the data associated with the given user id failing if there is no such user. You will get the user’s primary party, active status and annotations. If you need the user rights, use rights.list instead. id: user id identityProviderId: identity provider id
- ledger_api.users.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.users.list (Testing)
- Summary: List users
- Arguments:
filterUser
: StringpageToken
: StringpageSize
: IntidentityProviderId
: String
- Description: List users of this participant node filterUser: filter results using the given filter string pageToken: used for pagination (the result contains a page token if there are further pages) pageSize: default page size before the filter is applied identityProviderId: identity provider id
- ledger_api.users.update (Testing)
- Summary: Update a user
- Arguments:
id
: Stringmodifier
: com.digitalasset.canton.admin.api.client.data.User => com.digitalasset.canton.admin.api.client.data.UseridentityProviderId
: String
- Return type:
- Description: Currently you can update the annotations, active status and primary party. You cannot update other user attributes. id: id of the user to be updated modifier: a function for modifying the user; e.g: user => { user.copy(isActive = false, primaryParty = None, annotations = user.annotations.updated(“a”, “b”).removed(“c”)) } identityProviderId: identity provider id
- ledger_api.users.update_idp (Testing)
- Summary: Update user’s identity provider id
- Arguments:
id
: StringsourceIdentityProviderId
: StringtargetIdentityProviderId
: String
- Description: Updates user’s identity provider id. id: the id used to identify the given user sourceIdentityProviderId: source identity provider id targetIdentityProviderId: target identity provider id
- ledger_api_v2.users.create (Testing)
- Summary: Create a user with the given id
- Arguments:
id
: StringactAs
: Set[com.digitalasset.canton.topology.PartyId]primaryParty
: Option[com.digitalasset.canton.topology.PartyId]readAs
: Set[com.digitalasset.canton.topology.PartyId]participantAdmin
: BooleanisActive
: Booleanannotations
: Map[String,String]identityProviderId
: String
- Return type:
- Description: Users are used to dynamically managing the rights given to Daml applications. They allow us to link a stable local identifier (of an application) with a set of parties. id: the id used to identify the given user actAs: the set of parties this user is allowed to act as primaryParty: the optional party that should be linked to this user by default readAs: the set of parties this user is allowed to read as participantAdmin: flag (default false) indicating if the user is allowed to use the admin commands of the Ledger Api isActive: flag (default true) indicating if the user is active annotations: the set of key-value pairs linked to this user identityProviderId: identity provider id
- ledger_api_v2.users.delete (Testing)
- Summary: Delete a user
- Arguments:
id
: StringidentityProviderId
: String
- Description: Delete a user by id. id: user id identityProviderId: identity provider id
- ledger_api_v2.users.get (Testing)
- Summary: Get the user data of the user with the given id
- Arguments:
id
: StringidentityProviderId
: String
- Return type:
- Description: Fetch the data associated with the given user id failing if there is no such user. You will get the user’s primary party, active status and annotations. If you need the user rights, use rights.list instead. id: user id identityProviderId: identity provider id
- ledger_api_v2.users.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api_v2.users.list (Testing)
- Summary: List users
- Arguments:
filterUser
: StringpageToken
: StringpageSize
: IntidentityProviderId
: String
- Description: List users of this participant node filterUser: filter results using the given filter string pageToken: used for pagination (the result contains a page token if there are further pages) pageSize: default page size before the filter is applied identityProviderId: identity provider id
- ledger_api_v2.users.update (Testing)
- Summary: Update a user
- Arguments:
id
: Stringmodifier
: com.digitalasset.canton.admin.api.client.data.User => com.digitalasset.canton.admin.api.client.data.UseridentityProviderId
: String
- Return type:
- Description: Currently you can update the annotations, active status and primary party. You cannot update other user attributes. id: id of the user to be updated modifier: a function for modifying the user; e.g: user => { user.copy(isActive = false, primaryParty = None, annotations = user.annotations.updated(“a”, “b”).removed(“c”)) } identityProviderId: identity provider id
- ledger_api_v2.users.update_idp (Testing)
- Summary: Update user’s identity provider id
- Arguments:
id
: StringsourceIdentityProviderId
: StringtargetIdentityProviderId
: String
- Description: Updates user’s identity provider id. id: the id used to identify the given user sourceIdentityProviderId: source identity provider id targetIdentityProviderId: target identity provider id
- ledger_api.users.rights.grant (Testing)
- Summary: Grant new rights to a user
- Arguments:
id
: StringactAs
: Set[com.digitalasset.canton.topology.PartyId]readAs
: Set[com.digitalasset.canton.topology.PartyId]participantAdmin
: BooleanidentityProviderId
: String
- Description: Users are used to dynamically managing the rights given to Daml applications. This function is used to grant new rights to an existing user. id: the id used to identify the given user actAs: the set of parties this user is allowed to act as readAs: the set of parties this user is allowed to read as participantAdmin: flag (default false) indicating if the user is allowed to use the admin commands of the Ledger Api identityProviderId: identity provider id
- ledger_api.users.rights.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api.users.rights.list (Testing)
- Summary: List rights of a user
- Arguments:
id
: StringidentityProviderId
: String
- Description: Lists the rights of a user, or the rights of the current user. id: user id identityProviderId: identity provider id
- ledger_api.users.rights.revoke (Testing)
- Summary: Revoke user rights
- Arguments:
id
: StringactAs
: Set[com.digitalasset.canton.topology.PartyId]readAs
: Set[com.digitalasset.canton.topology.PartyId]participantAdmin
: BooleanidentityProviderId
: String
- Description: Use to revoke specific rights from a user. id: the id used to identify the given user actAs: the set of parties this user should not be allowed to act as readAs: the set of parties this user should not be allowed to read as participantAdmin: if set to true, the participant admin rights will be removed identityProviderId: identity provider id
- ledger_api_v2.users.rights.grant (Testing)
- Summary: Grant new rights to a user
- Arguments:
id
: StringactAs
: Set[com.digitalasset.canton.topology.PartyId]readAs
: Set[com.digitalasset.canton.topology.PartyId]participantAdmin
: BooleanidentityProviderId
: String
- Description: Users are used to dynamically managing the rights given to Daml applications. This function is used to grant new rights to an existing user. id: the id used to identify the given user actAs: the set of parties this user is allowed to act as readAs: the set of parties this user is allowed to read as participantAdmin: flag (default false) indicating if the user is allowed to use the admin commands of the Ledger Api identityProviderId: identity provider id
- ledger_api_v2.users.rights.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api_v2.users.rights.list (Testing)
- Summary: List rights of a user
- Arguments:
id
: StringidentityProviderId
: String
- Description: Lists the rights of a user, or the rights of the current user. id: user id identityProviderId: identity provider id
- ledger_api_v2.users.rights.revoke (Testing)
- Summary: Revoke user rights
- Arguments:
id
: StringactAs
: Set[com.digitalasset.canton.topology.PartyId]readAs
: Set[com.digitalasset.canton.topology.PartyId]participantAdmin
: BooleanidentityProviderId
: String
- Description: Use to revoke specific rights from a user. id: the id used to identify the given user actAs: the set of parties this user should not be allowed to act as readAs: the set of parties this user should not be allowed to read as participantAdmin: if set to true, the participant admin rights will be removed identityProviderId: identity provider id
Ledger Api Metering Service¶
- ledger_api.metering.get_report (Testing)
- Summary: Get the ledger metering report
- Arguments:
from
: com.digitalasset.canton.data.CantonTimestampto
: Option[com.digitalasset.canton.data.CantonTimestamp]applicationId
: Option[String]
- Return type:
- String
- Description: Returns the current ledger metering report from: required from timestamp (inclusive) to: optional to timestamp application_id: optional application id to which we want to restrict the report
- ledger_api.metering.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- ledger_api_v2.metering.get_report (Testing)
- Summary: Get the ledger metering report
- Arguments:
from
: com.digitalasset.canton.data.CantonTimestampto
: Option[com.digitalasset.canton.data.CantonTimestamp]applicationId
: Option[String]
- Return type:
- String
- Description: Returns the current ledger metering report from: required from timestamp (inclusive) to: optional to timestamp application_id: optional application id to which we want to restrict the report
- ledger_api_v2.metering.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
Composability¶
- transfer.execute (Preview)
- Summary: Transfer the contract from the origin domain to the target domain
- Arguments:
submittingParty
: com.digitalasset.canton.topology.PartyIdcontractId
: com.digitalasset.canton.protocol.LfContractIdsourceDomain
: com.digitalasset.canton.DomainAliastargetDomain
: com.digitalasset.canton.DomainAlias
- Description: Macro that first calls transfer_out and then transfer_in. No error handling is done.
- transfer.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- transfer.in (Preview)
- Summary: Transfer-in a contract in transit to the target domain
- Arguments:
submittingParty
: com.digitalasset.canton.topology.PartyIdtransferId
: com.digitalasset.canton.protocol.TransferIdtargetDomain
: com.digitalasset.canton.DomainAliasapplicationId
: com.digitalasset.canton.LedgerApplicationIdsubmissionId
: StringworkflowId
: StringcommandId
: String
- Description: Manually transfers a contract in transit into the target domain. The command returns when the transfer-in has completed successfully. If the transferExclusivityTimeout in the target domain’s parameters is set to a positive value, all participants of all stakeholders connected to both origin and target domain will attempt to transfer-in the contract automatically after the exclusivity timeout has elapsed. An application-id can be specified to uniquely identifies the application that have issued the transfer, otherwise the default value will be used. An optional submission id can be set by the committer to the value of their choice that allows an application to correlate completions to its submissions.
- transfer.lookup_contract_domain (Preview)
- Summary: Lookup the active domain for the provided contracts
- Arguments:
contractIds
: com.digitalasset.canton.protocol.LfContractId*
- Return type:
- Map[com.digitalasset.canton.protocol.LfContractId,String]
- transfer.out (Preview)
- Summary: Transfer-out a contract from the source domain with destination target domain
- Arguments:
submittingParty
: com.digitalasset.canton.topology.PartyIdcontractId
: com.digitalasset.canton.protocol.LfContractIdsourceDomain
: com.digitalasset.canton.DomainAliastargetDomain
: com.digitalasset.canton.DomainAliasapplicationId
: com.digitalasset.canton.LedgerApplicationIdsubmissionId
: StringworkflowId
: StringcommandId
: String
- Return type:
- Description: Transfers the given contract out of the source domain with destination target domain. The command returns the ID of the transfer when the transfer-out has completed successfully. The contract is in transit until the transfer-in has completed on the target domain. The submitting party must be a stakeholder of the contract and the participant must have submission rights for the submitting party on the source domain. It must also be connected to the target domain. An application-id can be specified to uniquely identify the application that have issued the transfer, otherwise the default value will be used. An optional submission id can be set by the committer to the value of their choice that allows an application to correlate completions to its submissions.
- transfer.search (Preview)
- Summary: Search the currently in-flight transfers
- Arguments:
targetDomain
: com.digitalasset.canton.DomainAliasfilterSourceDomain
: Option[com.digitalasset.canton.DomainAlias]filterTimestamp
: Option[java.time.Instant]filterSubmittingParty
: Option[com.digitalasset.canton.topology.PartyId]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: Returns all in-flight transfers with the given target domain that match the filters, but no more than the limit specifies.
Ledger Pruning¶
- pruning.clear_schedule
- Summary: Deactivate automatic pruning.
- pruning.find_safe_offset (Preview)
- Summary: Return the highest participant ledger offset whose record time is before or at the given one (if any) at which pruning is safely possible
- Arguments:
beforeOrAt
: java.time.Instant
- Return type:
- Option[com.daml.ledger.api.v1.ledger_offset.LedgerOffset]
- pruning.get_offset_by_time
- Summary: Identify the participant ledger offset to prune up to based on the specified timestamp.
- Arguments:
upToInclusive
: java.time.Instant
- Return type:
- Option[com.daml.ledger.api.v1.ledger_offset.LedgerOffset]
- Description: Return the largest participant ledger offset that has been processed before or at the specified timestamp. The time is measured on the participant’s local clock at some point while the participant has processed the the event. Returns
None
if no such offset exists.
- pruning.get_participant_schedule
- Summary: Inspect the automatic, participant-specific pruning schedule.
- Description: The schedule consists of a “cron” expression and “max_duration” and “retention” durations as described in the
get_schedule
command description. Additionally “prune_internally” indicates if the schedule mandates pruning of internal state.
- pruning.get_schedule
- Summary: Inspect the automatic pruning schedule.
- Description: The schedule consists of a “cron” expression and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period. Returns None if no schedule has been configured via set_schedule or if clear_schedule has been invoked.
- pruning.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- pruning.locate_offset (Preview)
- Summary: Identify the participant ledger offset to prune up to.
- Arguments:
n
: Long
- Return type:
- com.daml.ledger.api.v1.ledger_offset.LedgerOffset
- Description: Return the participant ledger offset that corresponds to pruning “n” number of transactions from the beginning of the ledger. Errors if the ledger holds less than “n” transactions. Specifying “n” of 1 returns the offset of the first transaction (if the ledger is non-empty).
- pruning.prune
- Summary: Prune the ledger up to the specified offset inclusively.
- Arguments:
pruneUpTo
: com.daml.ledger.api.v1.ledger_offset.LedgerOffset
- Description: Prunes the participant ledger up to the specified offset inclusively returning
Unit
if the ledger has been successfully pruned. Note that upon successful pruning, subsequent attempts to read transactions vialedger_api.transactions.flat
orledger_api.transactions.trees
or command completions vialedger_api.completions.list
by specifying a begin offset lower than the returned pruning offset will result in aNOT_FOUND
error. In the Enterprise Edition,prune
performs a “full prune” freeing up significantly more space and also performs additional safety checks returning aNOT_FOUND
error ifpruneUpTo
is higher than the offset returned byfind_safe_offset
on any domain with events preceding the pruning offset.
- pruning.prune_internally (Preview)
- Summary: Prune only internal ledger state up to the specified offset inclusively.
- Arguments:
pruneUpTo
: com.daml.ledger.api.v1.ledger_offset.LedgerOffset
- Description: Special-purpose variant of the
prune
command only available in the Enterprise Edition that prunes only partial, internal participant ledger state freeing up space not needed for servingledger_api.transactions
andledger_api.completions
requests. In conjunction withprune
,prune_internally
enables pruning internal ledger state more aggressively than externally observable data via the ledger api. In most use casesprune
should be used instead. Unlikeprune
,prune_internally
has no visible effect on the Ledger API. The command returnsUnit
if the ledger has been successfully pruned or an error if the timestamp performs additional safety checks returning aNOT_FOUND
error ifpruneUpTo
is higher than the offset returned byfind_safe_offset
on any domain with events preceding the pruning offset.
- pruning.set_cron
- Summary: Modify the cron used by automatic pruning.
- Arguments:
cron
: String
- Description: The schedule is specified in cron format and refers to pruning start times in the GMT time zone. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- pruning.set_max_duration
- Summary: Modify the maximum duration used by automatic pruning.
- Arguments:
- Description: The maxDuration is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- pruning.set_participant_schedule
- Summary: Activate automatic pruning according to the specified schedule with participant-specific options.
- Arguments:
cron
: StringmaxDuration
: com.digitalasset.canton.config.PositiveDurationSecondsretention
: com.digitalasset.canton.config.PositiveDurationSecondspruneInternallyOnly
: Boolean
- Description: Refer to the
set_schedule
description for information about the “cron”, “max_duration”, and “retention” parameters. Setting the “prune_internally_only” flag causes pruning to only remove internal state as described in more detail in theprune_internally
command description.
- pruning.set_retention
- Summary: Update the pruning retention used by automatic pruning.
- Arguments:
- Description: The retention is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this update, pruning is actively running, a best effort is made to pause pruning and restart with the newly specified retention. This allows for the case that the new retention mandates retaining more data than previously.
- pruning.set_schedule
- Summary: Activate automatic pruning according to the specified schedule.
- Arguments:
cron
: StringmaxDuration
: com.digitalasset.canton.config.PositiveDurationSecondsretention
: com.digitalasset.canton.config.PositiveDurationSeconds
- Description: The schedule is specified in cron format and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period.
Bilateral Commitments¶
- commitments.computed
- Summary: Lookup ACS commitments locally computed as part of the reconciliation protocol
- Arguments:
domain
: com.digitalasset.canton.DomainAliasstart
: java.time.Instantend
: java.time.InstantcounterParticipant
: Option[com.digitalasset.canton.topology.ParticipantId]
- Return type:
- Iterable[(com.digitalasset.canton.protocol.messages.CommitmentPeriod, com.digitalasset.canton.topology.ParticipantId, com.digitalasset.canton.protocol.messages.AcsCommitment.CommitmentType)]
- commitments.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- commitments.received
- Summary: Lookup ACS commitments received from other participants as part of the reconciliation protocol
- Arguments:
domain
: com.digitalasset.canton.DomainAliasstart
: java.time.Instantend
: java.time.InstantcounterParticipant
: Option[com.digitalasset.canton.topology.ParticipantId]
- Return type:
- Iterable[com.digitalasset.canton.protocol.messages.SignedProtocolMessage[com.digitalasset.canton.protocol.messages.AcsCommitment]]
- Description: The arguments are: - domain: the alias of the domain - start: lowest time exclusive - end: highest time inclusive - counterParticipant: optionally filter by counter participant
Participant Repair¶
- repair.add
- Summary: Add specified contracts to specific domain on local participant.
- Arguments:
domain
: com.digitalasset.canton.DomainAliascontractsToAdd
: Seq[com.digitalasset.canton.protocol.SerializableContractWithWitnesses]ignoreAlreadyAdded
: BooleanignoreStakeholderCheck
: Boolean
- Description: This is a last resort command to recover from data corruption, e.g. in scenarios in which participant contracts have somehow gotten out of sync and need to be manually created. The participant needs to be disconnected from the specified “domain” at the time of the call, and as of now the domain cannot have had any inflight requests. For each “contractsToAdd”, specify “witnesses”, local parties, in case no local party is a stakeholder. The “ignoreAlreadyAdded” flag makes it possible to invoke the command multiple times with the same parameters in case an earlier command invocation has failed. As repair commands are powerful tools to recover from unforeseen data corruption, but dangerous under normal operation, use of this command requires (temporarily) enabling the “features.enable-repair-commands” configuration. In addition repair commands can run for an unbounded time depending on the number of contracts passed in. Be sure to not connect the participant to the domain until the call returns. The arguments are: - domain: the alias of the domain to which to add the contract - contractsToAdd: list of contracts to add with witness information - ignoreAlreadyAdded: (default true) if set to true, it will ignore contracts that already exist on the target domain. - ignoreStakeholderCheck: (default false) if set to true, add will work for contracts that don’t have a local party (useful for party migration).
- repair.change_domain
- Summary: Move contracts with specified Contract IDs from one domain to another.
- Arguments:
contractIds
: Seq[com.digitalasset.canton.protocol.LfContractId]sourceDomain
: com.digitalasset.canton.DomainAliastargetDomain
: com.digitalasset.canton.DomainAliasskipInactive
: BooleanbatchSize
: Int
- Description: This is a last resort command to recover from data corruption in scenarios in which a domain is irreparably broken and formerly connected participants need to move contracts to another, healthy domain. The participant needs to be disconnected from both the “sourceDomain” and the “targetDomain”. Also as of now the target domain cannot have had any inflight requests. Contracts already present in the target domain will be skipped, and this makes it possible to invoke this command in an “idempotent” fashion in case an earlier attempt had resulted in an error. The “skipInactive” flag makes it possible to only move active contracts in the “sourceDomain”. As repair commands are powerful tools to recover from unforeseen data corruption, but dangerous under normal operation, use of this command requires (temporarily) enabling the “features.enable-repair-commands” configuration. In addition repair commands can run for an unbounded time depending on the number of contract ids passed in. Be sure to not connect the participant to either domain until the call returns. Arguments: - contractIds - set of contract ids that should be moved to the new domain - sourceDomain - alias of the source domain - targetDomain - alias of the target domain - skipInactive - (default true) whether to skip inactive contracts mentioned in the contractIds list - batchSize - (default 100) how many contracts to write at once to the database
- repair.download
- Summary: Download all contracts for the given set of parties to a file.
- Arguments:
parties
: Set[com.digitalasset.canton.topology.PartyId]outputFile
: StringfilterDomainId
: Stringtimestamp
: Option[java.time.Instant]protocolVersion
: Option[com.digitalasset.canton.version.ProtocolVersion]chunkSize
: Option[com.digitalasset.canton.config.RequireTypes.PositiveInt]contractDomainRenames
: Map[com.digitalasset.canton.topology.DomainId,com.digitalasset.canton.topology.DomainId]
- Description: This command can be used to download the current active contract set of a given set of parties to a text file. This is mainly interesting for recovery and operational purposes. The file will contain base64 encoded strings, one line per contract. The lines are written sorted according to their domain and contract id. This allows to compare the contracts stored by two participants using standard file comparison tools. The domain-id is printed with the prefix domain-id before the block of contracts starts. This command may take a long time to complete and may require significant resources. It will first load the contract ids of the active contract set into memory and then subsequently load the contracts in batches and inspect their stakeholders. As this operation needs to traverse the entire datastore, it might take a long time to complete. The command will return a map of domainId -> number of active contracts stored The arguments are: - parties: identifying contracts having at least one stakeholder from the given set - outputFile: the output file name where to store the data. Use .gz as a suffix to get a compressed file (recommended) - filterDomainId: restrict the export to a given domain - timestamp: optionally a timestamp for which we should take the state (useful to reconcile states of a domain) - protocolVersion: optional the protocol version to use for the serialization. Defaults to the one of the domains. - chunkSize: size of the byte chunks to stream back: default 1024 * 1024 * 2 = (2MB) - contractDomainRenames: As part of the export, allow to rename the associated domain id of contracts from one domain to another based on the mapping.
- repair.export_acs
- Summary: Export active contracts for the given set of parties to a file.
- Arguments:
parties
: Set[com.digitalasset.canton.topology.PartyId]outputFile
: StringfilterDomainId
: Option[com.digitalasset.canton.topology.DomainId]timestamp
: Option[java.time.Instant]contractDomainRenames
: Map[com.digitalasset.canton.topology.DomainId,(com.digitalasset.canton.topology.DomainId, com.digitalasset.canton.version.ProtocolVersion)]
- Description: This command exports the current Active Contract Set (ACS) of a given set of parties to ACS snapshot file. Afterwards, the ‘import_acs’ command allows importing it into a participant’s ACS again. Such ACS export (and import) is interesting for recovery and operational purposes only. Note that the ‘export_acs’ command execution may take a long time to complete and may require significant resources.
- repair.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- repair.ignore_events
- Summary: Mark sequenced events as ignored.
- Arguments:
domainId
: com.digitalasset.canton.topology.DomainIdfrom
: com.digitalasset.canton.SequencerCounterto
: com.digitalasset.canton.SequencerCounterforce
: Boolean
- Description: This is the last resort to ignore events that the participant is unable to process. Ignoring events may lead to subsequent failures, e.g., if the event creating a contract is ignored and that contract is subsequently used. It may also lead to ledger forks if other participants still process the ignored events. It is possible to mark events as ignored that the participant has not yet received. The command will fail, if marking events between from and to as ignored would result in a gap in sequencer counters, namely if from <= to and from is greater than maxSequencerCounter + 1, where maxSequencerCounter is the greatest sequencer counter of a sequenced event stored by the underlying participant. The command will also fail, if force == false and from is smaller than the sequencer counter of the last event that has been marked as clean. (Ignoring such events would normally have no effect, as they have already been processed.)
- repair.import_acs
- Summary: Import active contracts from an Active Contract Set (ACS) snapshot file.
- Arguments:
inputFile
: StringworkflowIdPrefix
: String
- Description: This command imports contracts from an ACS snapshot file into the participant’s ACS. The given ACS snapshot file needs to be the resulting file from a previous ‘export_acs’ command invocation.
- repair.migrate_domain
- Summary: Migrate contracts from one domain to another one.
- Arguments:
- Description: This method can be used to migrate all the contracts associated with a domain to a new domain connection. This method will register the new domain, connect to it and then re-associate all contracts on the source domain to the target domain. Please note that this migration needs to be done by all participants at the same time. The domain should only be used once all participants have finished their migration. The arguments are: source: the domain alias of the source domain target: the configuration for the target domain
- repair.purge
- Summary: Purge contracts with specified Contract IDs from local participant.
- Arguments:
domain
: com.digitalasset.canton.DomainAliascontractIds
: Seq[com.digitalasset.canton.protocol.LfContractId]ignoreAlreadyPurged
: Boolean
- Description: This is a last resort command to recover from data corruption, e.g. in scenarios in which participant contracts have somehow gotten out of sync and need to be manually purged, or in situations in which stakeholders are no longer available to agree to their archival. The participant needs to be disconnected from the domain on which the contracts with “contractIds” reside at the time of the call, and as of now the domain cannot have had any inflight requests. The “ignoreAlreadyPurged” flag makes it possible to invoke the command multiple times with the same parameters in case an earlier command invocation has failed. As repair commands are powerful tools to recover from unforeseen data corruption, but dangerous under normal operation, use of this command requires (temporarily) enabling the “features.enable-repair-commands” configuration. In addition repair commands can run for an unbounded time depending on the number of contract ids passed in. Be sure to not connect the participant to the domain until the call returns.
- repair.unignore_events
- Summary: Remove the ignored status from sequenced events.
- Arguments:
domainId
: com.digitalasset.canton.topology.DomainIdfrom
: com.digitalasset.canton.SequencerCounterto
: com.digitalasset.canton.SequencerCounterforce
: Boolean
- Description: This command has no effect on ordinary (i.e., not ignored) events and on events that do not exist. The command will fail, if marking events between from and to as unignored would result in a gap in sequencer counters, namely if there is one empty ignored event with sequencer counter between from and to and another empty ignored event with sequencer counter greater than to. An empty ignored event is an event that has been marked as ignored and not yet received by the participant. The command will also fail, if force == false and from is smaller than the sequencer counter of the last event that has been marked as clean. (Unignoring such events would normally have no effect, as they have already been processed.)
- repair.upload
- Summary: Import ACS snapshot
- Arguments:
inputFile
: String
- Description: Uploads a binary into the participant’s ACS
Resource Management¶
- resources.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- resources.resource_limits
- Summary: Get the resource limits of the participant.
- resources.set_resource_limits
- Summary: Set resource limits for the participant.
- Arguments:
- Description: While a resource limit is attained or exceeded, the participant will reject any additional submission with GRPC status ABORTED. Most importantly, a submission will be rejected before it consumes a significant amount of resources. There are three kinds of limits: maxDirtyRequests, maxRate and maxBurstFactor. The number of dirty requests of a participant P covers (1) requests initiated by P as well as (2) requests initiated by participants other than P that need to be validated by P. Compared to the maximum rate, the maximum number of dirty requests reflects the load on the participant more accurately. However, the maximum number of dirty requests alone does not protect the system from “bursts”: If an application submits a huge number of commands at once, the maximum number of dirty requests will likely be exceeded, as the system is registering dirty requests only during validation and not already during submission. The maximum rate is a hard limit on the rate of commands submitted to this participant through the ledger API. As the rate of commands is checked and updated immediately after receiving a new command submission, an application cannot exceed the maximum rate. The maxBurstFactor parameter (positive, default 0.5) allows to configure how permissive the rate limitation should be with respect to bursts. The rate limiting will be enforced strictly after having observed max_burst * max_rate commands. For the sake of illustration, let’s assume the configured rate limit is
100 commands/s
with a burst ratio of 0.5. If an application submits 100 commands within a single second, waiting exactly 10 milliseconds between consecutive commands, then the participant will accept all commands. With a maxBurstFactor of 0.5, the participant will accept the first 50 commands and reject the remaining 50. If the application then waits another 500 ms, it may submit another burst of 50 commands. If it waits 250 ms, it may submit only a burst of 25 commands. Resource limits can only be changed, if the server runs Canton enterprise. In the community edition, the server uses fixed limits that cannot be changed.
Replication¶
- replication.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- replication.set_passive
- Summary: Set the participant replica to passive
- Description: Trigger a graceful fail-over from this active replica to another passive replica.
Multiple Participants¶
This section lists the commands available for a sequence of participants. They can be used on the
participant references participants.all
, .local
or .remote
as:
participants.all.dars.upload("my.dar")
- dars.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- dars.upload
- Summary: Upload DARs to participants
- Arguments:
darPath
: StringvetAllPackages
: BooleansynchronizeVetting
: Boolean
- Return type:
- Map[com.digitalasset.canton.console.ParticipantReference,String]
- Description: If vetAllPackages is true, the participants will vet the package on all domains they are registered. If synchronizeVetting is true, the command will block until the package vetting transaction has been registered with all connected domains.
- domains.connect_local
- Summary: Register and potentially connect to new local domain
- Arguments:
domain
: com.digitalasset.canton.console.InstanceReferenceWithSequencerConnectionmanualConnect
: Booleansynchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Description: The arguments are: domain - A local domain or sequencer reference manualConnect - Whether this connection should be handled manually and also excluded from automatic re-connect. synchronize - A timeout duration indicating how long to wait for all topology changes to have been effected on all local nodes.
- domains.disconnect
- Summary: Disconnect from domain
- Arguments:
- domains.disconnect_all
- Summary: Disconnect from all connected domains
- domains.disconnect_local
- Summary: Disconnect from a local domain
- Arguments:
- domains.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- domains.reconnect
- Summary: Reconnect to domain
- Arguments:
alias
: com.digitalasset.canton.DomainAliasretry
: Boolean
- Description: If retry is set to true (default), the command will return after the first attempt, but keep on trying in the background.
- domains.reconnect_all
- Summary: Reconnect to all domains for which manualStart = false
- Arguments:
ignoreFailures
: Boolean
- Description: If ignoreFailures is set to true (default), the reconnect all will succeed even if some domains are offline. The participants will continue attempting to establish a domain connection.
- domains.register
- Summary: Register and potentially connect to domain
- Arguments:
Domain Administration Commands¶
- clear_cache (Testing)
- Summary: Clear locally cached variables
- Description: Some commands cache values on the client side. Use this command to explicitly clear the caches of these values.
- config
- Summary: Returns the domain configuration
- Return type:
- LocalDomainReference.this.consoleEnvironment.environment.config.DomainConfigType
- defaultDomainConnection
- Summary: Yields a domain connection config with default values except for the domain alias and the sequencer connection. May throw an exception if the domain alias or sequencer connection is misconfigured.
- help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- id
- Summary: Yields the globally unique id of this domain. Throws an exception, if the id has not yet been allocated (e.g., the domain has not yet been started).
- Return type:
- is_initialized
- Summary: Check if the local instance is running and is fully initialized
- Return type:
- Boolean
- is_running
- Summary: Check if the local instance is running
- Return type:
- Boolean
- start
- Summary: Start the instance
- stop
- Summary: Stop the instance
Health¶
- health.active
- Summary: Check if the node is running and is the active instance (mediator, participant)
- Return type:
- Boolean
- health.dump
- Summary: Creates a zip file containing diagnostic information about the canton process running this node
- Arguments:
outputFile
: better.files.Filetimeout
: com.digitalasset.canton.config.NonNegativeDurationchunkSize
: Option[Int]
- Return type:
- String
- health.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- health.initialized
- Summary: Returns true if node has been initialized.
- Return type:
- Boolean
- health.running
- Summary: Check if the node is running
- Return type:
- Boolean
- health.status
- Summary: Get human (and machine) readable status info
- Return type:
- com.digitalasset.canton.health.admin.data.NodeStatus[S]
- health.wait_for_identity
- Summary: Wait for the node to have an identity
- Description: This is specifically useful for the Domain Manager which needs its identity to be ready for bootstrapping, but for which we can’t rely on wait_for_initialized() because it will be initialized only after being bootstrapped.
- health.wait_for_initialized
- Summary: Wait for the node to be initialized
- health.wait_for_running
- Summary: Wait for the node to be running
Database¶
- db.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- db.migrate
- Summary: Migrates the instance’s database if using a database storage
- db.repair_migration
- Summary: Only use when advised - repairs the database migration of the instance’s database
- Arguments:
force
: Boolean
- Description: In some rare cases, we change already applied database migration files in a new release and the repair command resets the checksums we use to ensure that in general already applied migration files have not been changed. You should only use db.repair_migration when advised and otherwise use it at your own risk - in the worst case running it may lead to data corruption when an incompatible database migration (one that should be rejected because the already applied database migration files have changed) is subsequently falsely applied.
Participants¶
- participants.active
- Summary: Test whether a participant is permissioned on this domain
- Arguments:
participantId
: com.digitalasset.canton.topology.ParticipantId
- Return type:
- Boolean
- participants.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- participants.list
- Summary: List participant states
- Description: This command will list the currently valid state as stored in the authorized store. For a deep inspection of the identity management history, use the topology.participant_domain_states.list command.
- participants.set_state
- Summary: Change state and trust level of participant
- Arguments:
- Description: Set the state of the participant within the domain. Valid permissions are ‘Submission’, ‘Confirmation’, ‘Observation’ and ‘Disabled’. Valid trust levels are ‘Vip’ and ‘Ordinary’. Synchronize timeout can be used to ensure that the state has been propagated into the node
Sequencer¶
- sequencer.disable_member
- Summary: Disable the provided member at the Sequencer that will allow any unread data for them to be removed
- Arguments:
- Description: This will prevent any client for the given member to reconnect the Sequencer and allow any unread/unacknowledged data they have to be removed. This should only be used if the domain operation is confident the member will never need to reconnect as there is no way to re-enable the member. To view members using the sequencer run sequencer.status().”
- sequencer.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- sequencer.pruning.clear_schedule
- Summary: Deactivate automatic pruning.
- sequencer.pruning.force_prune
- Summary: Force remove data from the Sequencer including data that may have not been read by offline clients
- Arguments:
dryRun
: Boolean
- Return type:
- String
- Description: Will force pruning up until the default retention period by potentially disabling clients that have not yet read data we would like to remove. Disabling these clients will prevent them from ever reconnecting to the Domain so should only be used if the Domain operator is confident they can be permanently ignored. Run with dryRun = true to review a description of which clients will be disabled first. Run with dryRun = false to disable these clients and perform a forced pruning.
- sequencer.pruning.force_prune_at
- Summary: Force removing data from the Sequencer including data that may have not been read by offline clients up until the specified time
- Arguments:
timestamp
: com.digitalasset.canton.data.CantonTimestampdryRun
: Boolean
- Return type:
- String
- Description: Similar to the above force_prune command but allows specifying the exact time at which to prune
- sequencer.pruning.force_prune_with_retention_period
- Summary: Force removing data from the Sequencer including data that may have not been read by offline clients up until a custom retention period
- Arguments:
retentionPeriod
: scala.concurrent.duration.FiniteDurationdryRun
: Boolean
- Return type:
- String
- Description: Similar to the above force_prune command but allows specifying a custom retention period
- sequencer.pruning.get_schedule
- Summary: Inspect the automatic pruning schedule.
- Description: The schedule consists of a “cron” expression and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period. Returns None if no schedule has been configured via set_schedule or if clear_schedule has been invoked.
- sequencer.pruning.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- sequencer.pruning.locate_pruning_timestamp
- Summary: Obtain a timestamp at or near the beginning of sequencer state
- Arguments:
- Return type:
- Description: This command provides insight into the current state of sequencer pruning when called with the default value of index 1. When pruning the sequencer manually via prune_at and with the intent to prune in batches, specify a value such as 1000 to obtain a pruning timestamp that corresponds to the “end” of the batch.
- sequencer.pruning.prune
- Summary: Remove unnecessary data from the Sequencer up until the default retention point
- Return type:
- String
- Description: Removes unnecessary data from the Sequencer that is earlier than the default retention period. The default retention period is set in the configuration of the canton processing running this command under parameters.retention-period-defaults.sequencer. This pruning command requires that data is read and acknowledged by clients before considering it safe to remove. If no data is being removed it could indicate that clients are not reading or acknowledging data in a timely fashion (typically due to nodes going offline for long periods). You have the option of disabling the members running on these nodes to allow removal of this data, however this will mean that they will be unable to reconnect to the domain in the future. To do this run force_prune(dryRun = true) to return a description of which members would be disabled in order to prune the Sequencer. If you are happy to disable the described clients then run force_prune(dryRun = false) to permanently remove their unread data. Once offline clients have been disabled you can continue to run prune normally.
- sequencer.pruning.prune_at
- Summary: Remove data that has been read up until the specified time
- Arguments:
timestamp
: com.digitalasset.canton.data.CantonTimestamp
- Return type:
- String
- Description: Similar to the above prune command but allows specifying the exact time at which to prune. The command will fail if a client has not yet read and acknowledged some data up to the specified time.
- sequencer.pruning.prune_with_retention_period
- Summary: Remove data that has been read up until a custom retention period
- Arguments:
retentionPeriod
: scala.concurrent.duration.FiniteDuration
- Return type:
- String
- Description: Similar to the above prune command but allows specifying a custom retention period
- sequencer.pruning.set_cron
- Summary: Modify the cron used by automatic pruning.
- Arguments:
cron
: String
- Description: The schedule is specified in cron format and refers to pruning start times in the GMT time zone. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- sequencer.pruning.set_max_duration
- Summary: Modify the maximum duration used by automatic pruning.
- Arguments:
- Description: The maxDuration is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- sequencer.pruning.set_retention
- Summary: Update the pruning retention used by automatic pruning.
- Arguments:
- Description: The retention is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this update, pruning is actively running, a best effort is made to pause pruning and restart with the newly specified retention. This allows for the case that the new retention mandates retaining more data than previously.
- sequencer.pruning.set_schedule
- Summary: Activate automatic pruning according to the specified schedule.
- Arguments:
cron
: StringmaxDuration
: com.digitalasset.canton.config.PositiveDurationSecondsretention
: com.digitalasset.canton.config.PositiveDurationSeconds
- Description: The schedule is specified in cron format and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period.
- sequencer.pruning.status
- Summary: Status of the sequencer and its connected clients
- Description: Provides a detailed breakdown of information required for pruning: - the current time according to this sequencer instance - domain members that the sequencer supports - for each member when they were registered and whether they are enabled - a list of clients for each member, their last acknowledgement, and whether they are enabled
Mediator¶
- mediator.clear_schedule
- Summary: Deactivate automatic pruning.
- mediator.get_schedule
- Summary: Inspect the automatic pruning schedule.
- Description: The schedule consists of a “cron” expression and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period. Returns None if no schedule has been configured via set_schedule or if clear_schedule has been invoked.
- mediator.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- mediator.locate_pruning_timestamp
- Summary: Obtain a timestamp at or near the beginning of mediator state
- Arguments:
- Return type:
- Description: This command provides insight into the current state of mediator pruning when called with the default value of index 1. When pruning the mediator manually via prune_at and with the intent to prune in batches, specify a value such as 1000 to obtain a pruning timestamp that corresponds to the “end” of the batch.
- mediator.prune
- Summary: Prune the mediator of unnecessary data while keeping data for the default retention period
- Description: Removes unnecessary data from the Mediator that is earlier than the default retention period. The default retention period is set in the configuration of the canton node running this command under parameters.retention-period-defaults.mediator.
- mediator.prune_at
- Summary: Prune the mediator of unnecessary data up to and including the given timestamp
- Arguments:
timestamp
: com.digitalasset.canton.data.CantonTimestamp
- mediator.prune_with_retention_period
- Summary: Prune the mediator of unnecessary data while keeping data for the provided retention period
- Arguments:
retentionPeriod
: scala.concurrent.duration.FiniteDuration
- mediator.set_cron
- Summary: Modify the cron used by automatic pruning.
- Arguments:
cron
: String
- Description: The schedule is specified in cron format and refers to pruning start times in the GMT time zone. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- mediator.set_max_duration
- Summary: Modify the maximum duration used by automatic pruning.
- Arguments:
- Description: The maxDuration is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- mediator.set_retention
- Summary: Update the pruning retention used by automatic pruning.
- Arguments:
- Description: The retention is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this update, pruning is actively running, a best effort is made to pause pruning and restart with the newly specified retention. This allows for the case that the new retention mandates retaining more data than previously.
- mediator.set_schedule
- Summary: Activate automatic pruning according to the specified schedule.
- Arguments:
cron
: StringmaxDuration
: com.digitalasset.canton.config.PositiveDurationSecondsretention
: com.digitalasset.canton.config.PositiveDurationSeconds
- Description: The schedule is specified in cron format and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period.
- mediator.testing.await_domain_time (Testing)
- Summary: Await for the given time to be reached on the domain
- Arguments:
- mediator.testing.fetch_domain_time (Testing)
- Summary: Fetch the current time from the domain
- Arguments:
- Return type:
- mediator.testing.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
Key Administration¶
- keys.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.public.download
- Summary: Download public key
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- Return type:
- com.google.protobuf.ByteString
- keys.public.download_to
- Summary: Download public key and save it to a file
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintoutputFile
: StringprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- keys.public.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.public.list
- Summary: List public keys in registry
- Arguments:
filterFingerprint
: StringfilterContext
: String
- Description: Returns all public keys that have been added to the key registry. Optional arguments can be used for filtering.
- keys.public.list_by_owner
- Summary: List keys for given keyOwner.
- Arguments:
keyOwner
: com.digitalasset.canton.topology.KeyOwnerfilterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: This command is a convenience wrapper for list_key_owners, taking an explicit keyOwner as search argument. The response includes the public keys.
- keys.public.list_owners
- Summary: List active owners with keys for given search arguments.
- Arguments:
filterKeyOwnerUid
: StringfilterKeyOwnerType
: Option[com.digitalasset.canton.topology.KeyOwnerCode]filterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: This command allows deep inspection of the topology state. The response includes the public keys. Optional filterKeyOwnerType type can be ‘ParticipantId.Code’ , ‘MediatorId.Code’,’SequencerId.Code’, ‘DomainTopologyManagerId.Code’.
- keys.public.upload
- Summary: Upload public key
- Arguments:
filename
: Stringname
: Option[String]
- Return type:
- keys.public.upload
- Summary: Upload public key
- Arguments:
keyBytes
: com.google.protobuf.ByteStringname
: Option[String]
- Return type:
- Description: Import a public key and store it together with a name used to provide some context to that key.
- keys.secret.delete
- Summary: Delete private key
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.Fingerprintforce
: Boolean
- keys.secret.download
- Summary: Download key pair
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- Return type:
- com.google.protobuf.ByteString
- keys.secret.download_to
- Summary: Download key pair and save it to a file
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintoutputFile
: StringprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- keys.secret.generate_encryption_key
- Summary: Generate new public/private key pair for encryption and store it in the vault
- Arguments:
name
: Stringscheme
: Option[com.digitalasset.canton.crypto.EncryptionKeyScheme]
- Return type:
- Description: The optional name argument allows you to store an associated string for your convenience. The scheme can be used to select a key scheme and the default scheme is used if left unspecified.
- keys.secret.generate_signing_key
- Summary: Generate new public/private key pair for signing and store it in the vault
- Arguments:
name
: Stringscheme
: Option[com.digitalasset.canton.crypto.SigningKeyScheme]
- Return type:
- Description: The optional name argument allows you to store an associated string for your convenience. The scheme can be used to select a key scheme and the default scheme is used if left unspecified.
- keys.secret.get_wrapper_key_id
- Summary: Get the wrapper key id that is used for the encrypted private keys store
- Return type:
- String
- keys.secret.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.secret.list
- Summary: List keys in private vault
- Arguments:
filterFingerprint
: StringfilterName
: Stringpurpose
: Set[com.digitalasset.canton.crypto.KeyPurpose]
- Description: Returns all public keys to the corresponding private keys in the key vault. Optional arguments can be used for filtering.
- keys.secret.register_kms_encryption_key
- Summary: Register the specified KMS encryption key in canton storing its public information in the vault
- Arguments:
kmsKeyId
: Stringname
: String
- Return type:
- Description: The id for the KMS encryption key. The optional name argument allows you to store an associated string for your convenience.
- keys.secret.register_kms_signing_key
- Summary: Register the specified KMS signing key in canton storing its public information in the vault
- Arguments:
kmsKeyId
: Stringname
: String
- Return type:
- Description: The id for the KMS signing key. The optional name argument allows you to store an associated string for your convenience.
- keys.secret.rotate_kms_node_key
- Summary: Rotate a given node’s keypair with a new pre-generated KMS keypair
- Arguments:
fingerprint
: StringnewKmsKeyId
: String
- Return type:
- Description: Rotates an existing encryption or signing key stored externally in a KMS with a pre-generated key. The fingerprint of the key we want to rotate. The id of the new KMS key (e.g. Resource Name).
- keys.secret.rotate_node_key
- Summary: Rotate a node’s public/private key pair
- Arguments:
fingerprint
: Stringname
: Option[String]
- Return type:
- Description: Rotates an existing encryption or signing key. NOTE: A namespace root or intermediate signing key CANNOT be rotated by this command. The fingerprint of the key we want to rotate.
- keys.secret.rotate_node_keys
- Summary: Rotate the node’s public/private key pairs
- Description: For a participant node it rotates the signing and encryption key pair. For a domain or domain manager node it rotates the signing key pair as those nodes do not have an encryption key pair. For a sequencer or mediator node use rotate_node_keys with a domain manager reference as an argument. NOTE: Namespace root or intermediate signing keys are NOT rotated by this command.
- keys.secret.rotate_wrapper_key
- Summary: Change the wrapper key for encrypted private keys store
- Arguments:
newWrapperKeyId
: String
- Description: Change the wrapper key (e.g. AWS KMS key) being used to encrypt the private keys in the store. newWrapperKeyId: The optional new wrapper key id to be used. If the wrapper key id is empty Canton will generate a new key based on the current configuration.
- keys.secret.upload
- Summary: Upload a key pair
- Arguments:
pairBytes
: com.google.protobuf.ByteStringname
: Option[String]
- keys.secret.upload
- Summary: Upload (load and import) a key pair from file
- Arguments:
filename
: Stringname
: Option[String]
Parties¶
- parties.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- parties.list
- Summary: List active parties, their active participants, and the participants’ permissions on domains.
- Arguments:
filterParty
: StringfilterParticipant
: StringfilterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: Inspect the parties known by this participant as used for synchronisation. The response is built from the timestamped topology transactions of each domain, excluding the authorized store of the given node. For each known party, the list of active participants and their permission on the domain for that party is given. filterParty: Filter by parties starting with the given string. filterParticipant: Filter for parties that are hosted by a participant with an id starting with the given string filterDomain: Filter by domains whose id starts with the given string. asOf: Optional timestamp to inspect the topology state at a given point in time. limit: Limit on the number of parties fetched (defaults to canton.parameters.console.default-limit). Example: participant1.parties.list(filterParty=”alice”)
Service¶
- service.get_dynamic_domain_parameters
- Summary: Get the Dynamic Domain Parameters configured for the domain
- service.get_max_rate_per_participant
- Summary: Get the max rate per participant
- Description: Depending on the protocol version used on the domain, the value will be read either from the static domain parameters or the dynamic ones.
- service.get_max_request_size
- Summary: Get the max request size
- Description: Depending on the protocol version used on the domain, the value will be read either from the static domain parameters or the dynamic ones. This value is not necessarily the one used by the sequencer node because it requires a restart of the server to be taken into account.
- service.get_mediator_deduplication_timeout
- Summary: Get the mediator deduplication timeout
- Description: The method will fail, if the domain does not support the mediatorDeduplicationTimeout.
- service.get_reconciliation_interval
- Summary: Get the reconciliation interval configured for the domain
- Description: Depending on the protocol version used on the domain, the value will be read either from the static domain parameters or the dynamic ones.
- service.get_static_domain_parameters
- Summary: Get the Static Domain Parameters configured for the domain
- service.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- service.list_accepted_agreements
- Summary: List the accepted service agreements
- service.set_dynamic_domain_parameters
- Summary: Set the Dynamic Domain Parameters configured for the domain
- Arguments:
dynamicDomainParameters
: com.digitalasset.canton.admin.api.client.data.DynamicDomainParametersforce
: Boolean
- Description: force: Enable potentially dangerous changes. Required to increase
ledgerTimeRecordTimeTolerance
. Useset_ledger_time_record_time_tolerance
to securely increaseledgerTimeRecordTimeTolerance
.
- service.set_ledger_time_record_time_tolerance
- Summary: Update the ledgerTimeRecordTimeTolerance in the dynamic domain parameters.
- Arguments:
newLedgerTimeRecordTimeTolerance
: com.digitalasset.canton.config.NonNegativeFiniteDurationforce
: Boolean
- Description: If it would be insecure to perform the change immediately, the command will block and wait until it is secure to perform the change. The command will block for at most twice of
newLedgerTimeRecordTimeTolerance
. If the domain does not supportmediatorDeduplicationTimeout
, the method will updateledgerTimeRecordTimeTolerance
immediately without blocking. The method will fail ifmediatorDeduplicationTimeout
is less than twice ofnewLedgerTimeRecordTimeTolerance
. Do not modify domain parameters concurrently while running this command, because the command may override concurrent changes. force: updateledgerTimeRecordTimeTolerance
immediately without blocking. This is safe to do during domain bootstrapping and in test environments, but should not be done in operational production systems..
- service.set_max_inbound_message_size
- Summary: Try to update the max rate per participant for the domain
- Arguments:
maxRequestSize
: com.digitalasset.canton.config.RequireTypes.NonNegativeIntforce
: Boolean
- Description: If the max request size is dynamic, update the value. The update won’t have any effect unless the sequencer server is restarted. If the max request size is not dynamic (i.e., if the domain is running on protocol version lower than 4), then it will throw an error.
- service.set_max_rate_per_participant
- Summary: Try to update the max rate per participant for the domain
- Arguments:
maxRatePerParticipant
: com.digitalasset.canton.config.RequireTypes.NonNegativeInt
- Description: If the max rate per participant is dynamic, update the value. If the max rate per participant is not dynamic (i.e., if the domain is running on protocol version lower than 4), then it will throw an error.
- service.set_max_request_size
- Summary: Try to update the max rate per participant for the domain
- Arguments:
maxRequestSize
: com.digitalasset.canton.config.RequireTypes.NonNegativeIntforce
: Boolean
- Description: If the max request size is dynamic, update the value. The update won’t have any effect unless the sequencer server is restarted. If the max request size is not dynamic (i.e., if the domain is running on protocol version lower than 4), then it will throw an error.
- service.set_mediator_deduplication_timeout
- Summary: Update the mediator deduplication timeout
- Arguments:
newMediatorDeduplicationTimeout
: com.digitalasset.canton.config.NonNegativeFiniteDuration
- Description: The method will fail: - if the domain does not support the
mediatorDeduplicationTimeout
parameter, - if the new value ofmediatorDeduplicationTimeout
is less than twice the value ofledgerTimeRecordTimeTolerance.
- service.set_reconciliation_interval
- Summary: Try to update the reconciliation interval for the domain
- Arguments:
newReconciliationInterval
: com.digitalasset.canton.config.PositiveDurationSeconds
- Description: If the reconciliation interval is dynamic, update the value. If the reconciliation interval is not dynamic (i.e., if the domain is running on protocol version lower than 4), then it will throw an error.
- service.update_dynamic_domain_parameters
- Summary: Update the Dynamic Domain Parameters for the domain
- Arguments:
- Description: force: Enable potentially dangerous changes. Required to increase
ledgerTimeRecordTimeTolerance
. Useset_ledger_time_record_time_tolerance_securely
to securely increaseledgerTimeRecordTimeTolerance
.
- service.update_dynamic_parameters
- Summary: Update the Dynamic Domain Parameters for the domain
- Arguments:
- Description: force: Enable potentially dangerous changes. Required to increase
ledgerTimeRecordTimeTolerance
. Useset_ledger_time_record_time_tolerance_securely
to securely increaseledgerTimeRecordTimeTolerance
.
Topology Administration¶
Topology commands run on the domain topology manager immediately affect the topology state of the domain, which means that all changes are immediately pushed to the connected participants.
- topology.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.init_id
- Summary: Initialize the node with a unique identifier
- Arguments:
identifier
: com.digitalasset.canton.topology.Identifierfingerprint
: com.digitalasset.canton.crypto.Fingerprint
- Return type:
- Description: Every node in Canton is identified using a unique identifier, which is composed of a user-chosen string and the fingerprint of a signing key. The signing key is the root key defining a so-called namespace, where the signing key has the ultimate control over issuing new identifiers. During initialisation, we have to pick such a unique identifier. By default, initialisation happens automatically, but it can be turned off by setting the auto-init option to false. Automatic node initialisation is usually turned off to preserve the identity of a participant or domain node (during major version upgrades) or if the topology transactions are managed through a different topology manager than the one integrated into this node.
- topology.load_transaction
- Summary: Upload signed topology transaction
- Arguments:
bytes
: com.google.protobuf.ByteString
- Description: Topology transactions can be issued with any topology manager. In some cases, such transactions need to be copied manually between nodes. This function allows for uploading previously exported topology transaction into the authorized store (which is the name of the topology managers transaction store.
- topology.stores.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.stores.list
- Summary: List available topology stores
- Return type:
- Seq[String]
- Description: Topology transactions are stored in these stores. There are the following stores: “Authorized” - The authorized store is the store of a topology manager. Updates to the topology state are made by adding new transactions to the “Authorized” store. Both the participant and the domain nodes topology manager have such a store. A participant node will distribute all the content in the Authorized store to the domains it is connected to. The domain node will distribute the content of the Authorized store through the sequencer to the domain members in order to create the authoritative topology state on a domain (which is stored in the store named using the domain-id), such that every domain member will have the same view on the topology state on a particular domain. “<domain-id>” - The domain store is the authorized topology state on a domain. A participant has one store for each domain it is connected to. The domain has exactly one store with its domain-id. “Requested” - A domain can be configured such that when participant tries to register a topology transaction with the domain, the transaction is placed into the “Requested” store such that it can be analysed and processed with user defined process.
- topology.namespace_delegations.authorize
- Summary: Change namespace delegation
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpnamespace
: com.digitalasset.canton.crypto.FingerprintauthorizedKey
: com.digitalasset.canton.crypto.FingerprintisRootDelegation
: BooleansignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]force
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: Delegates the authority to authorize topology transactions in a certain namespace to a certain key. The keys are referred to using their fingerprints. They need to be either locally generated or have been previously imported. ops: Either Add or Remove the delegation. namespace: The namespace whose authorization authority is delegated. signedBy: Optional fingerprint of the authorizing key. The authorizing key needs to be either the authorizedKey for root certificates. Otherwise, the signedBy key needs to refer to a previously authorized key, which means that we use the signedBy key to refer to a locally available CA. authorizedKey: Fingerprint of the key to be authorized. If signedBy equals authorizedKey, then this transaction corresponds to a self-signed root certificate. If the keys differ, then we get an intermediate CA. isRootDelegation: If set to true (default = false), the authorized key will be allowed to issue NamespaceDelegations. synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.namespace_delegations.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.namespace_delegations.list
- Summary: List namespace delegation transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterNamespace
: StringfilterSigningKey
: StringfilterTargetKey
: Option[com.digitalasset.canton.crypto.Fingerprint]protocolVersion
: Option[String]
- Description: List the namespace delegation transaction present in the stores. Namespace delegations are topology transactions that permission a key to issue topology transactions within a certain namespace. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterNamespace: Filter for namespaces starting with the given filter string. filterTargetKey: Filter for namespaces delegations for the given target key. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.identifier_delegations.authorize
- Summary: Change identifier delegation
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpidentifier
: com.digitalasset.canton.topology.UniqueIdentifierauthorizedKey
: com.digitalasset.canton.crypto.FingerprintsignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]
- Return type:
- com.google.protobuf.ByteString
- Description: Delegates the authority of a certain identifier to a certain key. This corresponds to a normal certificate which binds identifier to a key. The keys are referred to using their fingerprints. They need to be either locally generated or have been previously imported. ops: Either Add or Remove the delegation. signedBy: Refers to the optional fingerprint of the authorizing key which in turn refers to a specific, locally existing certificate. authorizedKey: Fingerprint of the key to be authorized. synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.identifier_delegations.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.identifier_delegations.list
- Summary: List identifier delegation transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterUid
: StringfilterSigningKey
: StringfilterTargetKey
: Option[com.digitalasset.canton.crypto.Fingerprint]protocolVersion
: Option[String]
- Description: List the identifier delegation transaction present in the stores. Identifier delegations are topology transactions that permission a key to issue topology transactions for a certain unique identifier. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterUid: Filter for unique identifiers starting with the given filter string. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.owner_to_key_mappings.authorize
- Summary: Change an owner to key mapping
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpkeyOwner
: com.digitalasset.canton.topology.KeyOwnerkey
: com.digitalasset.canton.crypto.Fingerprintpurpose
: com.digitalasset.canton.crypto.KeyPurposesignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]force
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: Change a owner to key mapping. A key owner is anyone in the system that needs a key-pair known to all members (participants, mediator, sequencer, topology manager) of a domain. ops: Either Add or Remove the key mapping update. signedBy: Optional fingerprint of the authorizing key which in turn refers to a specific, locally existing certificate. ownerType: Role of the following owner (Participant, Sequencer, Mediator, DomainTopologyManager) owner: Unique identifier of the owner. key: Fingerprint of key purposes: The purposes of the owner to key mapping. force: removing the last key is dangerous and must therefore be manually forced synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.owner_to_key_mappings.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.owner_to_key_mappings.list
- Summary: List owner to key mapping transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterKeyOwnerType
: Option[com.digitalasset.canton.topology.KeyOwnerCode]filterKeyOwnerUid
: StringfilterKeyPurpose
: Option[com.digitalasset.canton.crypto.KeyPurpose]filterSigningKey
: StringprotocolVersion
: Option[String]
- Description: List the owner to key mapping transactions present in the stores. Owner to key mappings are topology transactions defining that a certain key is used by a certain key owner. Key owners are participants, sequencers, mediators and domains. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterKeyOwnerType: Filter for a particular type of key owner (KeyOwnerCode). filterKeyOwnerUid: Filter for key owners unique identifier starting with the given filter string. filterKeyPurpose: Filter for keys with a particular purpose (Encryption or Signing) protocolVersion: Export the topology transactions in the optional protocol version.
- topology.owner_to_key_mappings.rotate_key
- Summary: Rotate the key for an owner to key mapping
- Arguments:
nodeInstance
: com.digitalasset.canton.console.InstanceReferenceCommonowner
: com.digitalasset.canton.topology.KeyOwnercurrentKey
: com.digitalasset.canton.crypto.PublicKeynewKey
: com.digitalasset.canton.crypto.PublicKey
- Description: Rotates the key for an existing owner to key mapping by issuing a new owner to key mapping with the new key and removing the previous owner to key mapping with the previous key. nodeInstance: The node instance that is used to verify that both current and new key pertain to this node. This avoids conflicts when there are different nodes with the same uuid (i.e., multiple sequencers). owner: The owner of the owner to key mapping currentKey: The current public key that will be rotated newKey: The new public key that has been generated
- topology.party_to_participant_mappings.authorize (Preview)
- Summary: Change party to participant mapping
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpparty
: com.digitalasset.canton.topology.PartyIdparticipant
: com.digitalasset.canton.topology.ParticipantIdside
: com.digitalasset.canton.topology.transaction.RequestSidepermission
: com.digitalasset.canton.topology.transaction.ParticipantPermissionsignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]replaceExisting
: Booleanforce
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: Change the association of a party to a participant. If both identifiers are in the same namespace, then the request-side is Both. If they differ, then we need to say whether the request comes from the party (RequestSide.From) or from the participant (RequestSide.To). And, we need the matching request of the other side. Please note that this is a preview feature due to the fact that inhomogeneous topologies can not yet be properly represented on the Ledger API. ops: Either Add or Remove the mapping signedBy: Refers to the optional fingerprint of the authorizing key which in turn refers to a specific, locally existing certificate. party: The unique identifier of the party we want to map to a participant. participant: The unique identifier of the participant to which the party is supposed to be mapped. side: The request side (RequestSide.From if we the transaction is from the perspective of the party, RequestSide.To from the participant.) privilege: The privilege of the given participant which allows us to restrict an association (e.g. Confirmation or Observation). replaceExisting: If true (default), replace any existing mapping with the new setting synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.party_to_participant_mappings.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.party_to_participant_mappings.list
- Summary: List party to participant mapping transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterParty
: StringfilterParticipant
: StringfilterRequestSide
: Option[com.digitalasset.canton.topology.transaction.RequestSide]filterPermission
: Option[com.digitalasset.canton.topology.transaction.ParticipantPermission]filterSigningKey
: StringprotocolVersion
: Option[String]
- Description: List the party to participant mapping transactions present in the stores. Party to participant mappings are topology transactions used to allocate a party to a certain participant. The same party can be allocated on several participants with different privileges. A party to participant mapping has a request-side that identifies whether the mapping is authorized by the party, by the participant or by both. In order to have a party be allocated to a given participant, we therefore need either two transactions (one with RequestSide.From, one with RequestSide.To) or one with RequestSide.Both. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterParty: Filter for parties starting with the given filter string. filterParticipant: Filter for participants starting with the given filter string. filterRequestSide: Optional filter for a particular request side (Both, From, To). protocolVersion: Export the topology transactions in the optional protocol version.
- topology.participant_domain_states.active
- Summary: Returns true if the given participant is currently active on the given domain
- Arguments:
domainId
: com.digitalasset.canton.topology.DomainIdparticipantId
: com.digitalasset.canton.topology.ParticipantId
- Return type:
- Boolean
- Description: Active means that the participant has been granted at least observation rights on the domain and that the participant has registered a domain trust certificate
- topology.participant_domain_states.authorize
- Summary: Change participant domain states
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpdomain
: com.digitalasset.canton.topology.DomainIdparticipant
: com.digitalasset.canton.topology.ParticipantIdside
: com.digitalasset.canton.topology.transaction.RequestSidepermission
: com.digitalasset.canton.topology.transaction.ParticipantPermissiontrustLevel
: com.digitalasset.canton.topology.transaction.TrustLevelsignedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]replaceExisting
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: Change the association of a participant to a domain. In order to activate a participant on a domain, we need both authorisation: the participant authorising its uid to be present on a particular domain and the domain to authorise the presence of a participant on said domain. If both identifiers are in the same namespace, then the request-side can be Both. If they differ, then we need to say whether the request comes from the domain (RequestSide.From) or from the participant (RequestSide.To). And, we need the matching request of the other side. ops: Either Add or Remove the mapping signedBy: Refers to the optional fingerprint of the authorizing key which in turn refers to a specific, locally existing certificate. domain: The unique identifier of the domain we want the participant to join. participant: The unique identifier of the participant. side: The request side (RequestSide.From if we the transaction is from the perspective of the domain, RequestSide.To from the participant.) permission: The privilege of the given participant which allows us to restrict an association (e.g. Confirmation or Observation). Will use the lower of if different between To/From. trustLevel: The trust level of the participant on the given domain. Will use the lower of if different between To/From. replaceExisting: If true (default), replace any existing mapping with the new setting synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node
- topology.participant_domain_states.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.participant_domain_states.list
- Summary: List participant domain states
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterDomain
: StringfilterParticipant
: StringfilterSigningKey
: StringprotocolVersion
: Option[String]
- Description: List the participant domain transactions present in the stores. Participant domain states are topology transactions used to permission a participant on a given domain. A participant domain state has a request-side that identifies whether the mapping is authorized by the participant (From), by the domain (To) or by both (Both). In order to use a participant on a domain, both have to authorize such a mapping. This means that by authorizing such a topology transaction, a participant acknowledges its presence on a domain, whereas a domain permissions the participant on that domain. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterDomain: Filter for domains starting with the given filter string. filterParticipant: Filter for participants starting with the given filter string. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.vetted_packages.authorize
- Summary: Change package vettings
- Arguments:
ops
: com.digitalasset.canton.topology.transaction.TopologyChangeOpparticipant
: com.digitalasset.canton.topology.ParticipantIdpackageIds
: Seq[com.daml.lf.data.Ref.PackageId]signedBy
: Option[com.digitalasset.canton.crypto.Fingerprint]synchronize
: Option[com.digitalasset.canton.config.NonNegativeDuration]force
: Boolean
- Return type:
- com.google.protobuf.ByteString
- Description: A participant will only process transactions that reference packages that all involved participants have vetted previously. Vetting is done by registering a respective topology transaction with the domain, which can then be used by other participants to verify that a transaction is only using vetted packages. Note that all referenced and dependent packages must exist in the package store. By default, only vetting transactions adding new packages can be issued. Removing package vettings and issuing package vettings for other participants (if their identity is controlled through this participants topology manager) or for packages that do not exist locally can only be run using the force = true flag. However, these operations are dangerous and can lead to the situation of a participant being unable to process transactions. ops: Either Add or Remove the vetting. participant: The unique identifier of the participant that is vetting the package. packageIds: The lf-package ids to be vetted. signedBy: Refers to the fingerprint of the authorizing key which in turn must be authorized by a valid, locally existing certificate. If none is given, a key is automatically determined. synchronize: Synchronize timeout can be used to ensure that the state has been propagated into the node force: Flag to enable dangerous operations (default false). Great power requires great care.
- topology.vetted_packages.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.vetted_packages.list
- Summary: List package vetting transactions
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterParticipant
: StringfilterSigningKey
: StringprotocolVersion
: Option[String]
- Description: List the package vetting transactions present in the stores. Participants must vet Daml packages and submitters must ensure that the receiving participants have vetted the package prior to submitting a transaction (done automatically during submission and validation). Vetting is done by authorizing such topology transactions and registering with a domain. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterSigningKey: Filter for transactions that are authorized with a key that starts with the given filter string. filterParticipant: Filter for participants starting with the given filter string. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.all.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- topology.all.list
- Summary: List all transaction
- Arguments:
filterStore
: StringuseStateStore
: BooleantimeQuery
: com.digitalasset.canton.topology.store.TimeQueryoperation
: Option[com.digitalasset.canton.topology.transaction.TopologyChangeOp]filterAuthorizedKey
: Option[com.digitalasset.canton.crypto.Fingerprint]protocolVersion
: Option[String]
- Description: List all topology transactions in a store, independent of the particular type. This method is useful for exporting entire states. filterStore: Filter for topology stores starting with the given filter string (Authorized, <domain-id>, Requested) useStateStore: If true (default), only properly authorized transactions that are part of the state will be selected. timeQuery: The time query allows to customize the query by time. The following options are supported: TimeQuery.HeadState (default): The most recent known state. TimeQuery.Snapshot(ts): The state at a certain point in time. TimeQuery.Range(fromO, toO): Time-range of when the transaction was added to the store operation: Optionally, what type of operation the transaction should have. State store only has “Add”. filterAuthorizedKey: Filter the topology transactions by the key that has authorized the transactions. protocolVersion: Export the topology transactions in the optional protocol version.
- topology.all.renew
- Summary: Renew all topology transactions that have been authorized with a previous key using a new key
- Arguments:
filterAuthorizedKey
: com.digitalasset.canton.crypto.FingerprintauthorizeWith
: com.digitalasset.canton.crypto.Fingerprint
- Description: Finds all topology transactions that have been authorized by filterAuthorizedKey and renews those topology transactions by authorizing them with the new key authorizeWith. filterAuthorizedKey: Filter the topology transactions by the key that has authorized the transactions. authorizeWith: The key to authorize the renewed topology transactions.
Domain Manager Administration Commands¶
- clear_cache (Testing)
- Summary: Clear locally cached variables
- Description: Some commands cache values on the client side. Use this command to explicitly clear the caches of these values.
- config
- Summary: Returns the domain configuration
- help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- id
- Summary: Yields the globally unique id of this domain. Throws an exception, if the id has not yet been allocated (e.g., the domain has not yet been started).
- Return type:
- is_initialized
- Summary: Check if the local instance is running and is fully initialized
- Return type:
- Boolean
- is_running
- Summary: Check if the local instance is running
- Return type:
- Boolean
- start
- Summary: Start the instance
- stop
- Summary: Stop the instance
Setup¶
- setup.authorize_mediator
- Summary: Authorize external Mediator node.
- Arguments:
mediatorId
: com.digitalasset.canton.topology.MediatorId
- Description: Use this command to reinstigate an external mediator node that has been offboarded via offboard_mediator.
- setup.bootstrap_domain
- Summary: Bootstrap domain
- Arguments:
- Description: Use this command to bootstrap the domain with an initial set of external sequencer(s) and external mediator(s). Note that you only need to call this once, however it is safe to call it again if necessary in case something went wrong and this needs to be retried.
- setup.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- setup.init
- Summary: Initialize domain
- Arguments:
sequencerConnection
: com.digitalasset.canton.sequencing.SequencerConnection
- Description: This command triggers domain initialization and should be called once the initial topology data has been authorized and sequenced. This is called as part of the setup.bootstrap command, so you are unlikely to need to call this directly.
- setup.init
- Summary: Initialize domain
- Arguments:
sequencerConnections
: com.digitalasset.canton.sequencing.SequencerConnections
- Description: This command triggers domain initialization and should be called once the initial topology data has been authorized and sequenced. This is called as part of the setup.bootstrap command, so you are unlikely to need to call this directly.
- setup.offboard_mediator
- Summary: Offboard external Mediator node.
- Arguments:
mediatorId
: com.digitalasset.canton.topology.MediatorIdforce
: Boolean
- Description: Use this command to offboard an onboarded external mediator node. It removes the topology transaction that authorizes the given mediator ID to act as a mediator on the domain. If you afterwards want to authorize an offboarded mediator again, use authorize_mediator. You must apply force to offboard the last mediator of a domain.
- setup.onboard_mediator
- Summary: Onboard external Mediator node.
- Arguments:
mediator
: com.digitalasset.canton.console.MediatorReferencesequencerConnections
: Seq[com.digitalasset.canton.console.InstanceReferenceWithSequencerConnection]
- Description: Use this command to onboard an external mediator node. If you’re bootstrapping a domain with external sequencer(s) and this is the initial mediator, then use setup.bootstrap_domain instead. For adding additional external mediators or onboard an external mediator with a domain that runs a single embedded sequencer, use this command.Note that you only need to call this once.
- setup.onboard_new_sequencer
- Summary: Dynamically onboard new Sequencer node.
- Arguments:
initialSequencer
: com.digitalasset.canton.console.SequencerNodeReferencenewSequencer
: com.digitalasset.canton.console.SequencerNodeReference
- Return type:
- Description: Use this command to dynamically onboard a new sequencer node that’s not part of the initial set of sequencer nodes. Do not use this for database sequencers.
Health¶
- health.active
- Summary: Check if the node is running and is the active instance (mediator, participant)
- Return type:
- Boolean
- health.dump
- Summary: Creates a zip file containing diagnostic information about the canton process running this node
- Arguments:
outputFile
: better.files.Filetimeout
: com.digitalasset.canton.config.NonNegativeDurationchunkSize
: Option[Int]
- Return type:
- String
- health.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- health.initialized
- Summary: Returns true if node has been initialized.
- Return type:
- Boolean
- health.running
- Summary: Check if the node is running
- Return type:
- Boolean
- health.status
- Summary: Get human (and machine) readable status info
- Return type:
- com.digitalasset.canton.health.admin.data.NodeStatus[S]
- health.wait_for_identity
- Summary: Wait for the node to have an identity
- Description: This is specifically useful for the Domain Manager which needs its identity to be ready for bootstrapping, but for which we can’t rely on wait_for_initialized() because it will be initialized only after being bootstrapped.
- health.wait_for_initialized
- Summary: Wait for the node to be initialized
- health.wait_for_running
- Summary: Wait for the node to be running
Database¶
- db.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- db.migrate
- Summary: Migrates the instance’s database if using a database storage
- db.repair_migration
- Summary: Only use when advised - repairs the database migration of the instance’s database
- Arguments:
force
: Boolean
- Description: In some rare cases, we change already applied database migration files in a new release and the repair command resets the checksums we use to ensure that in general already applied migration files have not been changed. You should only use db.repair_migration when advised and otherwise use it at your own risk - in the worst case running it may lead to data corruption when an incompatible database migration (one that should be rejected because the already applied database migration files have changed) is subsequently falsely applied.
Sequencer Connection¶
- sequencer_connection.get
- Summary: Get Sequencer Connection
- Description: Use this command to get the currently configured sequencer connection details for this sequencer client. If this node has not yet been initialized, this will return None.
- sequencer_connection.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- sequencer_connection.modify
- Summary: Modify Default Sequencer Connection
- Description: Modify sequencer connection details for this sequencer client node, by passing a modifier function that operates on the existing default connection.
- sequencer_connection.modify_connections
- Summary: Modify Sequencer Connections
- Description: Modify sequencer connection details for this sequencer client node, by passing a modifier function that operates on the existing connection configuration.
- sequencer_connection.set
- Summary: Set Sequencer Connection
- Arguments:
- Description: Set new sequencer connection details for this sequencer client node. This will replace any pre-configured connection details. This command will only work after the node has been initialized.
- sequencer_connection.set
- Summary: Set Sequencer Connection
- Arguments:
- Description: Set new sequencer connection details for this sequencer client node. This will replace any pre-configured connection details. This command will only work after the node has been initialized.
Key Administration¶
- keys.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.public.download
- Summary: Download public key
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- Return type:
- com.google.protobuf.ByteString
- keys.public.download_to
- Summary: Download public key and save it to a file
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintoutputFile
: StringprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- keys.public.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.public.list
- Summary: List public keys in registry
- Arguments:
filterFingerprint
: StringfilterContext
: String
- Description: Returns all public keys that have been added to the key registry. Optional arguments can be used for filtering.
- keys.public.list_by_owner
- Summary: List keys for given keyOwner.
- Arguments:
keyOwner
: com.digitalasset.canton.topology.KeyOwnerfilterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: This command is a convenience wrapper for list_key_owners, taking an explicit keyOwner as search argument. The response includes the public keys.
- keys.public.list_owners
- Summary: List active owners with keys for given search arguments.
- Arguments:
filterKeyOwnerUid
: StringfilterKeyOwnerType
: Option[com.digitalasset.canton.topology.KeyOwnerCode]filterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: This command allows deep inspection of the topology state. The response includes the public keys. Optional filterKeyOwnerType type can be ‘ParticipantId.Code’ , ‘MediatorId.Code’,’SequencerId.Code’, ‘DomainTopologyManagerId.Code’.
- keys.public.upload
- Summary: Upload public key
- Arguments:
filename
: Stringname
: Option[String]
- Return type:
- keys.public.upload
- Summary: Upload public key
- Arguments:
keyBytes
: com.google.protobuf.ByteStringname
: Option[String]
- Return type:
- Description: Import a public key and store it together with a name used to provide some context to that key.
- keys.secret.delete
- Summary: Delete private key
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.Fingerprintforce
: Boolean
- keys.secret.download
- Summary: Download key pair
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- Return type:
- com.google.protobuf.ByteString
- keys.secret.download_to
- Summary: Download key pair and save it to a file
- Arguments:
fingerprint
: com.digitalasset.canton.crypto.FingerprintoutputFile
: StringprotocolVersion
: com.digitalasset.canton.version.ProtocolVersion
- keys.secret.generate_encryption_key
- Summary: Generate new public/private key pair for encryption and store it in the vault
- Arguments:
name
: Stringscheme
: Option[com.digitalasset.canton.crypto.EncryptionKeyScheme]
- Return type:
- Description: The optional name argument allows you to store an associated string for your convenience. The scheme can be used to select a key scheme and the default scheme is used if left unspecified.
- keys.secret.generate_signing_key
- Summary: Generate new public/private key pair for signing and store it in the vault
- Arguments:
name
: Stringscheme
: Option[com.digitalasset.canton.crypto.SigningKeyScheme]
- Return type:
- Description: The optional name argument allows you to store an associated string for your convenience. The scheme can be used to select a key scheme and the default scheme is used if left unspecified.
- keys.secret.get_wrapper_key_id
- Summary: Get the wrapper key id that is used for the encrypted private keys store
- Return type:
- String
- keys.secret.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- keys.secret.list
- Summary: List keys in private vault
- Arguments:
filterFingerprint
: StringfilterName
: Stringpurpose
: Set[com.digitalasset.canton.crypto.KeyPurpose]
- Description: Returns all public keys to the corresponding private keys in the key vault. Optional arguments can be used for filtering.
- keys.secret.register_kms_encryption_key
- Summary: Register the specified KMS encryption key in canton storing its public information in the vault
- Arguments:
kmsKeyId
: Stringname
: String
- Return type:
- Description: The id for the KMS encryption key. The optional name argument allows you to store an associated string for your convenience.
- keys.secret.register_kms_signing_key
- Summary: Register the specified KMS signing key in canton storing its public information in the vault
- Arguments:
kmsKeyId
: Stringname
: String
- Return type:
- Description: The id for the KMS signing key. The optional name argument allows you to store an associated string for your convenience.
- keys.secret.rotate_kms_node_key
- Summary: Rotate a given node’s keypair with a new pre-generated KMS keypair
- Arguments:
fingerprint
: StringnewKmsKeyId
: String
- Return type:
- Description: Rotates an existing encryption or signing key stored externally in a KMS with a pre-generated key. The fingerprint of the key we want to rotate. The id of the new KMS key (e.g. Resource Name).
- keys.secret.rotate_node_key
- Summary: Rotate a node’s public/private key pair
- Arguments:
fingerprint
: Stringname
: Option[String]
- Return type:
- Description: Rotates an existing encryption or signing key. NOTE: A namespace root or intermediate signing key CANNOT be rotated by this command. The fingerprint of the key we want to rotate.
- keys.secret.rotate_node_keys
- Summary: Rotate the node’s public/private key pairs
- Description: For a participant node it rotates the signing and encryption key pair. For a domain or domain manager node it rotates the signing key pair as those nodes do not have an encryption key pair. For a sequencer or mediator node use rotate_node_keys with a domain manager reference as an argument. NOTE: Namespace root or intermediate signing keys are NOT rotated by this command.
- keys.secret.rotate_wrapper_key
- Summary: Change the wrapper key for encrypted private keys store
- Arguments:
newWrapperKeyId
: String
- Description: Change the wrapper key (e.g. AWS KMS key) being used to encrypt the private keys in the store. newWrapperKeyId: The optional new wrapper key id to be used. If the wrapper key id is empty Canton will generate a new key based on the current configuration.
- keys.secret.upload
- Summary: Upload a key pair
- Arguments:
pairBytes
: com.google.protobuf.ByteStringname
: Option[String]
- keys.secret.upload
- Summary: Upload (load and import) a key pair from file
- Arguments:
filename
: Stringname
: Option[String]
Parties¶
- parties.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- parties.list
- Summary: List active parties, their active participants, and the participants’ permissions on domains.
- Arguments:
filterParty
: StringfilterParticipant
: StringfilterDomain
: StringasOf
: Option[java.time.Instant]limit
: com.digitalasset.canton.config.RequireTypes.PositiveInt
- Description: Inspect the parties known by this participant as used for synchronisation. The response is built from the timestamped topology transactions of each domain, excluding the authorized store of the given node. For each known party, the list of active participants and their permission on the domain for that party is given. filterParty: Filter by parties starting with the given string. filterParticipant: Filter for parties that are hosted by a participant with an id starting with the given string filterDomain: Filter by domains whose id starts with the given string. asOf: Optional timestamp to inspect the topology state at a given point in time. limit: Limit on the number of parties fetched (defaults to canton.parameters.console.default-limit). Example: participant1.parties.list(filterParty=”alice”)
Service¶
- service.get_dynamic_domain_parameters
- Summary: Get the Dynamic Domain Parameters configured for the domain
- service.get_max_rate_per_participant
- Summary: Get the max rate per participant
- Description: Depending on the protocol version used on the domain, the value will be read either from the static domain parameters or the dynamic ones.
- service.get_max_request_size
- Summary: Get the max request size
- Description: Depending on the protocol version used on the domain, the value will be read either from the static domain parameters or the dynamic ones. This value is not necessarily the one used by the sequencer node because it requires a restart of the server to be taken into account.
- service.get_mediator_deduplication_timeout
- Summary: Get the mediator deduplication timeout
- Description: The method will fail, if the domain does not support the mediatorDeduplicationTimeout.
- service.get_reconciliation_interval
- Summary: Get the reconciliation interval configured for the domain
- Description: Depending on the protocol version used on the domain, the value will be read either from the static domain parameters or the dynamic ones.
- service.get_static_domain_parameters
- Summary: Get the Static Domain Parameters configured for the domain
- service.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- service.list_accepted_agreements
- Summary: List the accepted service agreements
- service.set_dynamic_domain_parameters
- Summary: Set the Dynamic Domain Parameters configured for the domain
- Arguments:
dynamicDomainParameters
: com.digitalasset.canton.admin.api.client.data.DynamicDomainParametersforce
: Boolean
- Description: force: Enable potentially dangerous changes. Required to increase
ledgerTimeRecordTimeTolerance
. Useset_ledger_time_record_time_tolerance
to securely increaseledgerTimeRecordTimeTolerance
.
- service.set_ledger_time_record_time_tolerance
- Summary: Update the ledgerTimeRecordTimeTolerance in the dynamic domain parameters.
- Arguments:
newLedgerTimeRecordTimeTolerance
: com.digitalasset.canton.config.NonNegativeFiniteDurationforce
: Boolean
- Description: If it would be insecure to perform the change immediately, the command will block and wait until it is secure to perform the change. The command will block for at most twice of
newLedgerTimeRecordTimeTolerance
. If the domain does not supportmediatorDeduplicationTimeout
, the method will updateledgerTimeRecordTimeTolerance
immediately without blocking. The method will fail ifmediatorDeduplicationTimeout
is less than twice ofnewLedgerTimeRecordTimeTolerance
. Do not modify domain parameters concurrently while running this command, because the command may override concurrent changes. force: updateledgerTimeRecordTimeTolerance
immediately without blocking. This is safe to do during domain bootstrapping and in test environments, but should not be done in operational production systems..
- service.set_max_inbound_message_size
- Summary: Try to update the max rate per participant for the domain
- Arguments:
maxRequestSize
: com.digitalasset.canton.config.RequireTypes.NonNegativeIntforce
: Boolean
- Description: If the max request size is dynamic, update the value. The update won’t have any effect unless the sequencer server is restarted. If the max request size is not dynamic (i.e., if the domain is running on protocol version lower than 4), then it will throw an error.
- service.set_max_rate_per_participant
- Summary: Try to update the max rate per participant for the domain
- Arguments:
maxRatePerParticipant
: com.digitalasset.canton.config.RequireTypes.NonNegativeInt
- Description: If the max rate per participant is dynamic, update the value. If the max rate per participant is not dynamic (i.e., if the domain is running on protocol version lower than 4), then it will throw an error.
- service.set_max_request_size
- Summary: Try to update the max rate per participant for the domain
- Arguments:
maxRequestSize
: com.digitalasset.canton.config.RequireTypes.NonNegativeIntforce
: Boolean
- Description: If the max request size is dynamic, update the value. The update won’t have any effect unless the sequencer server is restarted. If the max request size is not dynamic (i.e., if the domain is running on protocol version lower than 4), then it will throw an error.
- service.set_mediator_deduplication_timeout
- Summary: Update the mediator deduplication timeout
- Arguments:
newMediatorDeduplicationTimeout
: com.digitalasset.canton.config.NonNegativeFiniteDuration
- Description: The method will fail: - if the domain does not support the
mediatorDeduplicationTimeout
parameter, - if the new value ofmediatorDeduplicationTimeout
is less than twice the value ofledgerTimeRecordTimeTolerance.
- service.set_reconciliation_interval
- Summary: Try to update the reconciliation interval for the domain
- Arguments:
newReconciliationInterval
: com.digitalasset.canton.config.PositiveDurationSeconds
- Description: If the reconciliation interval is dynamic, update the value. If the reconciliation interval is not dynamic (i.e., if the domain is running on protocol version lower than 4), then it will throw an error.
- service.update_dynamic_domain_parameters
- Summary: Update the Dynamic Domain Parameters for the domain
- Arguments:
- Description: force: Enable potentially dangerous changes. Required to increase
ledgerTimeRecordTimeTolerance
. Useset_ledger_time_record_time_tolerance_securely
to securely increaseledgerTimeRecordTimeTolerance
.
- service.update_dynamic_parameters
- Summary: Update the Dynamic Domain Parameters for the domain
- Arguments:
- Description: force: Enable potentially dangerous changes. Required to increase
ledgerTimeRecordTimeTolerance
. Useset_ledger_time_record_time_tolerance_securely
to securely increaseledgerTimeRecordTimeTolerance
.
Topology Administration¶
Same as Domain Topology Administration.
Sequencer Administration Commands¶
- clear_cache (Testing)
- Summary: Clear locally cached variables
- Description: Some commands cache values on the client side. Use this command to explicitly clear the caches of these values.
- config
- Summary: Returns the sequencer configuration
- help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- id
- Summary: Yields the globally unique id of this sequencer. Throws an exception, if the id has not yet been allocated (e.g., the sequencer has not yet been started).
- Return type:
- is_initialized
- Summary: Check if the local instance is running and is fully initialized
- Return type:
- Boolean
- is_running
- Summary: Check if the local instance is running
- Return type:
- Boolean
- start
- Summary: Start the instance
- stop
- Summary: Stop the instance
Sequencer¶
- sequencer.disable_member
- Summary: Disable the provided member at the Sequencer that will allow any unread data for them to be removed
- Arguments:
- Description: This will prevent any client for the given member to reconnect the Sequencer and allow any unread/unacknowledged data they have to be removed. This should only be used if the domain operation is confident the member will never need to reconnect as there is no way to re-enable the member. To view members using the sequencer run sequencer.status().”
- sequencer.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- sequencer.pruning.clear_schedule
- Summary: Deactivate automatic pruning.
- sequencer.pruning.force_prune
- Summary: Force remove data from the Sequencer including data that may have not been read by offline clients
- Arguments:
dryRun
: Boolean
- Return type:
- String
- Description: Will force pruning up until the default retention period by potentially disabling clients that have not yet read data we would like to remove. Disabling these clients will prevent them from ever reconnecting to the Domain so should only be used if the Domain operator is confident they can be permanently ignored. Run with dryRun = true to review a description of which clients will be disabled first. Run with dryRun = false to disable these clients and perform a forced pruning.
- sequencer.pruning.force_prune_at
- Summary: Force removing data from the Sequencer including data that may have not been read by offline clients up until the specified time
- Arguments:
timestamp
: com.digitalasset.canton.data.CantonTimestampdryRun
: Boolean
- Return type:
- String
- Description: Similar to the above force_prune command but allows specifying the exact time at which to prune
- sequencer.pruning.force_prune_with_retention_period
- Summary: Force removing data from the Sequencer including data that may have not been read by offline clients up until a custom retention period
- Arguments:
retentionPeriod
: scala.concurrent.duration.FiniteDurationdryRun
: Boolean
- Return type:
- String
- Description: Similar to the above force_prune command but allows specifying a custom retention period
- sequencer.pruning.get_schedule
- Summary: Inspect the automatic pruning schedule.
- Description: The schedule consists of a “cron” expression and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period. Returns None if no schedule has been configured via set_schedule or if clear_schedule has been invoked.
- sequencer.pruning.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- sequencer.pruning.locate_pruning_timestamp
- Summary: Obtain a timestamp at or near the beginning of sequencer state
- Arguments:
- Return type:
- Description: This command provides insight into the current state of sequencer pruning when called with the default value of index 1. When pruning the sequencer manually via prune_at and with the intent to prune in batches, specify a value such as 1000 to obtain a pruning timestamp that corresponds to the “end” of the batch.
- sequencer.pruning.prune
- Summary: Remove unnecessary data from the Sequencer up until the default retention point
- Return type:
- String
- Description: Removes unnecessary data from the Sequencer that is earlier than the default retention period. The default retention period is set in the configuration of the canton processing running this command under parameters.retention-period-defaults.sequencer. This pruning command requires that data is read and acknowledged by clients before considering it safe to remove. If no data is being removed it could indicate that clients are not reading or acknowledging data in a timely fashion (typically due to nodes going offline for long periods). You have the option of disabling the members running on these nodes to allow removal of this data, however this will mean that they will be unable to reconnect to the domain in the future. To do this run force_prune(dryRun = true) to return a description of which members would be disabled in order to prune the Sequencer. If you are happy to disable the described clients then run force_prune(dryRun = false) to permanently remove their unread data. Once offline clients have been disabled you can continue to run prune normally.
- sequencer.pruning.prune_at
- Summary: Remove data that has been read up until the specified time
- Arguments:
timestamp
: com.digitalasset.canton.data.CantonTimestamp
- Return type:
- String
- Description: Similar to the above prune command but allows specifying the exact time at which to prune. The command will fail if a client has not yet read and acknowledged some data up to the specified time.
- sequencer.pruning.prune_with_retention_period
- Summary: Remove data that has been read up until a custom retention period
- Arguments:
retentionPeriod
: scala.concurrent.duration.FiniteDuration
- Return type:
- String
- Description: Similar to the above prune command but allows specifying a custom retention period
- sequencer.pruning.set_cron
- Summary: Modify the cron used by automatic pruning.
- Arguments:
cron
: String
- Description: The schedule is specified in cron format and refers to pruning start times in the GMT time zone. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- sequencer.pruning.set_max_duration
- Summary: Modify the maximum duration used by automatic pruning.
- Arguments:
- Description: The maxDuration is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- sequencer.pruning.set_retention
- Summary: Update the pruning retention used by automatic pruning.
- Arguments:
- Description: The retention is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this update, pruning is actively running, a best effort is made to pause pruning and restart with the newly specified retention. This allows for the case that the new retention mandates retaining more data than previously.
- sequencer.pruning.set_schedule
- Summary: Activate automatic pruning according to the specified schedule.
- Arguments:
cron
: StringmaxDuration
: com.digitalasset.canton.config.PositiveDurationSecondsretention
: com.digitalasset.canton.config.PositiveDurationSeconds
- Description: The schedule is specified in cron format and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period.
- sequencer.pruning.status
- Summary: Status of the sequencer and its connected clients
- Description: Provides a detailed breakdown of information required for pruning: - the current time according to this sequencer instance - domain members that the sequencer supports - for each member when they were registered and whether they are enabled - a list of clients for each member, their last acknowledgement, and whether they are enabled
Health¶
- health.active
- Summary: Check if the node is running and is the active instance (mediator, participant)
- Return type:
- Boolean
- health.dump
- Summary: Creates a zip file containing diagnostic information about the canton process running this node
- Arguments:
outputFile
: better.files.Filetimeout
: com.digitalasset.canton.config.NonNegativeDurationchunkSize
: Option[Int]
- Return type:
- String
- health.has_identity
- Summary: Returns true if the node has an identity
- Return type:
- Boolean
- health.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- health.initialized
- Summary: Returns true if node has been initialized.
- Return type:
- Boolean
- health.running
- Summary: Check if the node is running
- Return type:
- Boolean
- health.status
- Summary: Get human (and machine) readable status info
- Return type:
- com.digitalasset.canton.health.admin.data.NodeStatus[S]
- health.wait_for_identity
- Summary: Wait for the node to have an identity
- Description: This is specifically useful for the Domain Manager which needs its identity to be ready for bootstrapping, but for which we can’t rely on wait_for_initialized() because it will be initialized only after being bootstrapped.
- health.wait_for_initialized
- Summary: Wait for the node to be initialized
- health.wait_for_running
- Summary: Wait for the node to be running
Database¶
- db.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- db.migrate
- Summary: Migrates the instance’s database if using a database storage
- db.repair_migration
- Summary: Only use when advised - repairs the database migration of the instance’s database
- Arguments:
force
: Boolean
- Description: In some rare cases, we change already applied database migration files in a new release and the repair command resets the checksums we use to ensure that in general already applied migration files have not been changed. You should only use db.repair_migration when advised and otherwise use it at your own risk - in the worst case running it may lead to data corruption when an incompatible database migration (one that should be rejected because the already applied database migration files have changed) is subsequently falsely applied.
Mediator Administration Commands¶
- clear_cache (Testing)
- Summary: Clear locally cached variables
- Description: Some commands cache values on the client side. Use this command to explicitly clear the caches of these values.
- config
- Summary: Returns the mediator configuration
- help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- id
- Summary: Yields the mediator id of this mediator. Throws an exception, if the id has not yet been allocated (e.g., the mediator has not yet been initialised).
- Return type:
- is_initialized
- Summary: Check if the local instance is running and is fully initialized
- Return type:
- Boolean
- is_running
- Summary: Check if the local instance is running
- Return type:
- Boolean
- start
- Summary: Start the instance
- stop
- Summary: Stop the instance
Mediator¶
- mediator.clear_schedule
- Summary: Deactivate automatic pruning.
- mediator.get_schedule
- Summary: Inspect the automatic pruning schedule.
- Description: The schedule consists of a “cron” expression and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period. Returns None if no schedule has been configured via set_schedule or if clear_schedule has been invoked.
- mediator.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- mediator.initialize
- Summary: Initialize a mediator
- Arguments:
domainId
: com.digitalasset.canton.topology.DomainIdmediatorId
: com.digitalasset.canton.topology.MediatorIddomainParameters
: com.digitalasset.canton.admin.api.client.data.StaticDomainParameterssequencerConnection
: com.digitalasset.canton.sequencing.SequencerConnectiontopologySnapshot
: Option[com.digitalasset.canton.topology.store.StoredTopologyTransactions[com.digitalasset.canton.topology.transaction.TopologyChangeOp.Positive]]signingKeyFingerprint
: Option[com.digitalasset.canton.crypto.Fingerprint]
- Return type:
- mediator.initialize
- Summary: Initialize a mediator
- Arguments:
domainId
: com.digitalasset.canton.topology.DomainIdmediatorId
: com.digitalasset.canton.topology.MediatorIddomainParameters
: com.digitalasset.canton.admin.api.client.data.StaticDomainParameterssequencerConnections
: com.digitalasset.canton.sequencing.SequencerConnectionstopologySnapshot
: Option[com.digitalasset.canton.topology.store.StoredTopologyTransactions[com.digitalasset.canton.topology.transaction.TopologyChangeOp.Positive]]signingKeyFingerprint
: Option[com.digitalasset.canton.crypto.Fingerprint]
- Return type:
- mediator.locate_pruning_timestamp
- Summary: Obtain a timestamp at or near the beginning of mediator state
- Arguments:
- Return type:
- Description: This command provides insight into the current state of mediator pruning when called with the default value of index 1. When pruning the mediator manually via prune_at and with the intent to prune in batches, specify a value such as 1000 to obtain a pruning timestamp that corresponds to the “end” of the batch.
- mediator.prune
- Summary: Prune the mediator of unnecessary data while keeping data for the default retention period
- Description: Removes unnecessary data from the Mediator that is earlier than the default retention period. The default retention period is set in the configuration of the canton node running this command under parameters.retention-period-defaults.mediator.
- mediator.prune_at
- Summary: Prune the mediator of unnecessary data up to and including the given timestamp
- Arguments:
timestamp
: com.digitalasset.canton.data.CantonTimestamp
- mediator.prune_with_retention_period
- Summary: Prune the mediator of unnecessary data while keeping data for the provided retention period
- Arguments:
retentionPeriod
: scala.concurrent.duration.FiniteDuration
- mediator.set_cron
- Summary: Modify the cron used by automatic pruning.
- Arguments:
cron
: String
- Description: The schedule is specified in cron format and refers to pruning start times in the GMT time zone. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- mediator.set_max_duration
- Summary: Modify the maximum duration used by automatic pruning.
- Arguments:
- Description: The maxDuration is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this modification, pruning is actively running, a best effort is made to pause pruning and restart according to the new schedule. This allows for the case that the new schedule no longer allows pruning at the current time.
- mediator.set_retention
- Summary: Update the pruning retention used by automatic pruning.
- Arguments:
- Description: The retention is specified as a positive duration and has at most per-second granularity. This call returns an error if no schedule has been configured via set_schedule or if automatic pruning has been disabled via clear_schedule. Additionally if at the time of this update, pruning is actively running, a best effort is made to pause pruning and restart with the newly specified retention. This allows for the case that the new retention mandates retaining more data than previously.
- mediator.set_schedule
- Summary: Activate automatic pruning according to the specified schedule.
- Arguments:
cron
: StringmaxDuration
: com.digitalasset.canton.config.PositiveDurationSecondsretention
: com.digitalasset.canton.config.PositiveDurationSeconds
- Description: The schedule is specified in cron format and “max_duration” and “retention” durations. The cron string indicates the points in time at which pruning should begin in the GMT time zone, and the maximum duration indicates how long from the start time pruning is allowed to run as long as pruning has not finished pruning up to the specified retention period.
Health¶
- health.active
- Summary: Check if the node is running and is the active instance (mediator, participant)
- Return type:
- Boolean
- health.dump
- Summary: Creates a zip file containing diagnostic information about the canton process running this node
- Arguments:
outputFile
: better.files.Filetimeout
: com.digitalasset.canton.config.NonNegativeDurationchunkSize
: Option[Int]
- Return type:
- String
- health.has_identity
- Summary: Returns true if the node has an identity
- Return type:
- Boolean
- health.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- health.initialized
- Summary: Returns true if node has been initialized.
- Return type:
- Boolean
- health.running
- Summary: Check if the node is running
- Return type:
- Boolean
- health.status
- Summary: Get human (and machine) readable status info
- Return type:
- com.digitalasset.canton.health.admin.data.NodeStatus[S]
- health.wait_for_identity
- Summary: Wait for the node to have an identity
- Description: This is specifically useful for the Domain Manager which needs its identity to be ready for bootstrapping, but for which we can’t rely on wait_for_initialized() because it will be initialized only after being bootstrapped.
- health.wait_for_initialized
- Summary: Wait for the node to be initialized
- health.wait_for_running
- Summary: Wait for the node to be running
Database¶
- db.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- db.migrate
- Summary: Migrates the instance’s database if using a database storage
- db.repair_migration
- Summary: Only use when advised - repairs the database migration of the instance’s database
- Arguments:
force
: Boolean
- Description: In some rare cases, we change already applied database migration files in a new release and the repair command resets the checksums we use to ensure that in general already applied migration files have not been changed. You should only use db.repair_migration when advised and otherwise use it at your own risk - in the worst case running it may lead to data corruption when an incompatible database migration (one that should be rejected because the already applied database migration files have changed) is subsequently falsely applied.
Sequencer Connection¶
- sequencer_connection.get
- Summary: Get Sequencer Connection
- Description: Use this command to get the currently configured sequencer connection details for this sequencer client. If this node has not yet been initialized, this will return None.
- sequencer_connection.help
- Summary: Help for specific commands (use help() or help(“method”) for more information)
- Arguments:
methodName
: String
- sequencer_connection.modify
- Summary: Modify Default Sequencer Connection
- Description: Modify sequencer connection details for this sequencer client node, by passing a modifier function that operates on the existing default connection.
- sequencer_connection.modify_connections
- Summary: Modify Sequencer Connections
- Description: Modify sequencer connection details for this sequencer client node, by passing a modifier function that operates on the existing connection configuration.
- sequencer_connection.set
- Summary: Set Sequencer Connection
- Arguments:
- Description: Set new sequencer connection details for this sequencer client node. This will replace any pre-configured connection details. This command will only work after the node has been initialized.
- sequencer_connection.set
- Summary: Set Sequencer Connection
- Arguments:
- Description: Set new sequencer connection details for this sequencer client node. This will replace any pre-configured connection details. This command will only work after the node has been initialized.