Skip to main content
Version: 1.15.0

Class: DeployTokenPool

Defined in: cct/canton/token-pool/operations/deploy-token-pool.ts:162

deployTokenPool operation (atomic CreateAndExercise + Initialize).

Extends​

Constructors​

Constructor​

new DeployTokenPool(): DeployTokenPool

Returns​

DeployTokenPool

Inherited from​

CantonOperation< DeployTokenPoolParams, ParsedDeployTokenPoolParams >.constructor

Properties​

name​

readonly name: "deployTokenPool" = 'deployTokenPool'

Defined in: cct/canton/token-pool/operations/deploy-token-pool.ts:166

camelCase id; matches the token-manager facade method and error context.

Overrides​

CantonOperation.name

Methods​

buildCommands()​

protected buildCommands(chain: CantonChain, p: ParsedDeployTokenPoolParams): Promise<{ actAs: string[]; commandId: string; commands: ({ CreateAndExerciseCommand: { choice: string; choiceArgument: unknown; createArguments: unknown; templateId: string; }; } | { CreateCommand: { createArguments: unknown; templateId: string; }; } | { ExerciseByKeyCommand: { choice: string; choiceArgument: unknown; contractKey: unknown; templateId: string; }; } | { ExerciseCommand: { choice: string; choiceArgument: unknown; contractId: string; templateId: string; }; })[]; deduplicationPeriod?: { DeduplicationDuration: { value: { nanos: number; seconds: number; unknownFields?: { fields: {[key: string]: { fixed32?: ... | ...; fixed64?: ... | ...; lengthDelimited?: ... | ...; varint?: ... | ...; }; }; }; }; }; } | { DeduplicationOffset: { value: number; }; } | { Empty: Record<string, never>; }; disclosedContracts?: { contractId?: string; createdEventBlob: string; synchronizerId?: string; templateId?: string; }[]; minLedgerTimeAbs?: string; minLedgerTimeRel?: { nanos: number; seconds: number; unknownFields?: { fields: {[key: string]: { fixed32?: number[]; fixed64?: number[]; lengthDelimited?: string[]; varint?: number[]; }; }; }; }; packageIdSelectionPreference?: string[]; prefetchContractKeys?: { contractKey: unknown; templateId: string; }[]; readAs?: string[]; submissionId?: string; synchronizerId?: string; userId?: string; workflowId?: string; }>

Defined in: cct/canton/token-pool/operations/deploy-token-pool.ts:250

Resolves + discloses the TAR, then builds a single CreateAndExercise command: create the pool, then exercise Initialize on it.

Parameters​

ParameterType
chainCantonChain
pParsedDeployTokenPoolParams

Returns​

Promise<{ actAs: string[]; commandId: string; commands: ({ CreateAndExerciseCommand: { choice: string; choiceArgument: unknown; createArguments: unknown; templateId: string; }; } | { CreateCommand: { createArguments: unknown; templateId: string; }; } | { ExerciseByKeyCommand: { choice: string; choiceArgument: unknown; contractKey: unknown; templateId: string; }; } | { ExerciseCommand: { choice: string; choiceArgument: unknown; contractId: string; templateId: string; }; })[]; deduplicationPeriod?: { DeduplicationDuration: { value: { nanos: number; seconds: number; unknownFields?: { fields: {[key: string]: { fixed32?: ... | ...; fixed64?: ... | ...; lengthDelimited?: ... | ...; varint?: ... | ...; }; }; }; }; }; } | { DeduplicationOffset: { value: number; }; } | { Empty: Record<string, never>; }; disclosedContracts?: { contractId?: string; createdEventBlob: string; synchronizerId?: string; templateId?: string; }[]; minLedgerTimeAbs?: string; minLedgerTimeRel?: { nanos: number; seconds: number; unknownFields?: { fields: {[key: string]: { fixed32?: number[]; fixed64?: number[]; lengthDelimited?: string[]; varint?: number[]; }; }; }; }; packageIdSelectionPreference?: string[]; prefetchContractKeys?: { contractKey: unknown; templateId: string; }[]; readAs?: string[]; submissionId?: string; synchronizerId?: string; userId?: string; workflowId?: string; }>

Overrides​

CantonOperation.buildCommands


execute()​

execute(chain: CantonChain, params: ExecuteDeployTokenPoolParams): Promise<CantonDeployResult>

Defined in: cct/canton/token-pool/operations/deploy-token-pool.ts:337

Validates the wallet, derives sender from wallet.party, builds the commands, and submits via submitCantonCommands. Returns the confirmed updateId plus the raw ledger response for result parsing.

Parameters​

ParameterType
chainCantonChain
paramsExecuteDeployTokenPoolParams

Returns​

Promise<CantonDeployResult>

Overrides​

CantonOperation.execute


generate()​

generate(chain: CantonChain, params: CantonGenerateParams<DeployTokenPoolParams>): Promise<UnsignedCantonTx>

Defined in: cct/canton/operation.ts:110

Run prepare and buildCommands; no signing.

Parameters​

ParameterType
chainCantonChain
paramsCantonGenerateParams<DeployTokenPoolParams>

Returns​

Promise<UnsignedCantonTx>

Inherited from​

CantonOperation.generate


parse()​

protected parse(p: GenerateDeployTokenPoolParams): ParsedDeployTokenPoolParams

Defined in: cct/canton/token-pool/operations/deploy-token-pool.ts:239

Parses the instrument ID.

Parameters​

ParameterType
pGenerateDeployTokenPoolParams

Returns​

ParsedDeployTokenPoolParams

Overrides​

CantonOperation.parse


prepare()​

protected prepare(params: CantonGenerateParams<DeployTokenPoolParams>): ParsedDeployTokenPoolParams

Defined in: cct/canton/operation.ts:96

Validates and normalizes params for generation or execution.

Parameters​

ParameterType
paramsCantonGenerateParams<DeployTokenPoolParams>

Returns​

ParsedDeployTokenPoolParams

Inherited from​

CantonOperation.prepare


validate()​

protected validate(p: GenerateDeployTokenPoolParams): void

Defined in: cct/canton/token-pool/operations/deploy-token-pool.ts:169

Validates party IDs, instrument ID, instance ID, decimals, observers, and lanes.

Parameters​

ParameterType
pGenerateDeployTokenPoolParams

Returns​

void

Overrides​

CantonOperation.validate