Skip to main content
Version: 1.15.0

Class: ApplyChainUpdates

Defined in: cct/canton/token-pool/operations/apply-chain-updates.ts:88

Pool applyChainUpdates operation.

Extends​

Constructors​

Constructor​

new ApplyChainUpdates(): ApplyChainUpdates

Returns​

ApplyChainUpdates

Inherited from​

CantonOperation<ApplyChainUpdatesParams>.constructor

Properties​

name​

readonly name: "applyChainUpdates" = 'applyChainUpdates'

Defined in: cct/canton/token-pool/operations/apply-chain-updates.ts:89

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

Overrides​

CantonOperation.name

Methods​

buildCommands()​

protected buildCommands(chain: CantonChain, p: CantonGenerateParams<ApplyChainUpdatesParams>): 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/apply-chain-updates.ts:145

Builds the ApplyChainUpdates exercise command against the pool.

Parameters​

ParameterType
chainCantonChain
pCantonGenerateParams<ApplyChainUpdatesParams>

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: ExecuteApplyChainUpdatesParams): Promise<ExecuteApplyChainUpdatesResult>

Defined in: cct/canton/token-pool/operations/apply-chain-updates.ts:183

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
paramsExecuteApplyChainUpdatesParams

Returns​

Promise<ExecuteApplyChainUpdatesResult>

Overrides​

CantonOperation.execute


generate()​

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

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

Run prepare and buildCommands; no signing.

Parameters​

ParameterType
chainCantonChain
paramsCantonGenerateParams<ApplyChainUpdatesParams>

Returns​

Promise<UnsignedCantonTx>

Inherited from​

CantonOperation.generate


parse()​

protected parse(params: CantonGenerateParams<ApplyChainUpdatesParams>): CantonGenerateParams

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

Normalize params without mutating the caller's input.

The default returns params unchanged. Override whenever Parsed differs from CantonGenerateParams<P>, e.g. to parse party IDs / instrument IDs into validated forms or apply defaults.

Parameters​

ParameterType
paramsCantonGenerateParams<ApplyChainUpdatesParams>

Returns​

CantonGenerateParams

Inherited from​

CantonOperation.parse


prepare()​

protected prepare(params: CantonGenerateParams<ApplyChainUpdatesParams>): CantonGenerateParams

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

Validates and normalizes params for generation or execution.

Parameters​

ParameterType
paramsCantonGenerateParams<ApplyChainUpdatesParams>

Returns​

CantonGenerateParams

Inherited from​

CantonOperation.prepare


validate()​

protected validate(p: GenerateApplyChainUpdatesParams): void

Defined in: cct/canton/token-pool/operations/apply-chain-updates.ts:92

Validates the pool target and that at least one add/remove is specified.

Parameters​

ParameterType
pGenerateApplyChainUpdatesParams

Returns​

void

Overrides​

CantonOperation.validate