Skip to main content

Daml.Script.Internal

Contains all Internal and Alpha functionality provided by Daml Script. Use these with care. No stability guarantees are given for them across SDK upgrades.

Module Snapshot

Lifecycle

Stable.

Notices

Status: active Introduced in: 3.4.9 Removed in: - Warnings: 0 Deprecations: 0 Deprecated since: -

Data Types

data CommandName

Name of the Daml Script Command (or Question) that failed Constructors:
  • CommandName
Text
Instances:

data ErrorClassName

Scala class name of the exception thrown Constructors:
  • ErrorClassName
Text
Instances:

data ErrorMessage

Result of the getMessage method on the Scala exception Constructors:
  • ErrorMessage
Text
Instances:

data FailedCmd

Daml type representing a Scala exception thrown during script interpretation. Used for internal testing of the Daml Script library. Constructors:
  • FailedCmd
CommandName
ErrorClassName
ErrorMessage
Instances:

data ContractNotFoundAdditionalInfo

Additional debugging information provided only by IDE Ledger Instances:

data PackageName

Used for vetting and unvetting packages Constructors:
  • PackageName
Text
Text
Instances:

Functions

tryCommands

tryCommands : Script a -> Script (Either FailedCmd a) Internal testing tool that allows us to catch FailedCmds in the daml language

liftFailedCommandToFailureStatus

liftFailedCommandToFailureStatus : Script a -> Script a Runs a script and lifts FailedCmd scala exceptions into a FailureStatus, which can be caught via tryFailureStatus

isNotActive

isNotActive : ContractNotFoundAdditionalInfo -> Optional AnyContractId Exacts nonactive contract ID from ContractNotFoundAdditionalInfo

vetPackages

vetPackages : HasCallStack => [PackageName] -> Script () Vet a set of packages on all participants. Note that the Admin API port must be provided when using this with a Canton Ledger Use --admin-port with the daml script CLI tool.

vetPackagesOnParticipant

vetPackagesOnParticipant : HasCallStack => [PackageName] -> ParticipantName -> Script () Vet a set of packages on a single participant. Note that the Admin API port must be provided when using this with a Canton Ledger Use --admin-port with the daml script CLI tool.

unvetPackages

unvetPackages : HasCallStack => [PackageName] -> Script () Unvet a set of packages on all participants. Note that the Admin API port must be provided when using this with a Canton Ledger Use --admin-port with the daml script CLI tool.

unvetPackagesOnParticipant

unvetPackagesOnParticipant : HasCallStack => [PackageName] -> ParticipantName -> Script () Unvet a set of packages on a single participant. Note that the Admin API port must be provided when using this with a Canton Ledger Use --admin-port with the daml script CLI tool.

listVettedPackages

listVettedPackages : HasCallStack => Script [PackageName] Lists the vetted packages on the default participant Note that the Admin API port must be provided when using this with a Canton Ledger Use --admin-port with the daml script CLI tool.

listAllPackages

listAllPackages : HasCallStack => Script [PackageName] Lists all packages (vetted and unvetted) on the default participant Note that the Admin API port must be provided when using this with a Canton Ledger Use --admin-port with the daml script CLI tool.

allocateReplicatedPartyOn

allocateReplicatedPartyOn : Text -> ParticipantName -> [ParticipantName] -> Script Party Allocate a party with the given display name on the specified main participant using the party management service and replicates it to the specified (possibly empty) list of additional participants. Commands submitted by the allocated party will be routed to the main participant.

allocateReplicatedPartyWithHintOn

allocateReplicatedPartyWithHintOn : Text -> PartyIdHint -> ParticipantName -> [ParticipantName] -> Script Party Allocate a party with the given display name and id hint on the specified main participant using the party management service and replicates it to the specified (possibly empty) list of additional participants. Commands submitted by the allocated party will be routed to the main participant.

throwAnyException

throwAnyException : AnyException -> Script t Throws an AnyException, note that this function discards the stacktrace