@canton-network/core-token-standard-service 1.12.3 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,130 +1,22 @@
1
- import { TokenStandardClient, HoldingView, AllocationFactory_Allocate, AllocationSpecification, Transfer, ExtraArgs, Metadata, Beneficiaries, OffLedger } from '@canton-network/core-token-standard';
2
- import { type LedgerCommonSchemas } from '@canton-network/core-ledger-client-types';
3
- import { Logger, PartyId } from '@canton-network/core-types';
4
- import { PrettyContract, ViewValue, PrettyTransactions, Transaction, TransferObject } from '@canton-network/core-tx-parser';
5
- import { AccessTokenProvider } from '@canton-network/core-wallet-auth';
6
- import { AbstractLedgerProvider, Ops } from '@canton-network/core-provider-ledger';
7
- import { Decimal } from 'decimal.js';
8
- export type ExerciseCommand = LedgerCommonSchemas['ExerciseCommand'];
9
- export type DisclosedContract = LedgerCommonSchemas['DisclosedContract'];
10
- type JsGetActiveContractsResponse = LedgerCommonSchemas['JsGetActiveContractsResponse'];
11
- type JsGetUpdatesResponse = Ops.PostV2Updates['ledgerApi']['result'][number];
12
- type JsGetUpdateResponse = LedgerCommonSchemas['JsGetUpdateResponse'];
13
- type JsActiveContractEntryResponse = JsGetActiveContractsResponse & {
14
- contractEntry: {
15
- JsActiveContract: {
16
- createdEvent: LedgerCommonSchemas['CreatedEvent'];
17
- };
1
+ import { type HoldingView, type Metadata, type Beneficiaries } from '@canton-network/core-token-standard';
2
+ import type { HoldingView as HoldingViewV2 } from '@canton-network/core-token-standard-v2';
3
+ import type { Logger, PartyId } from '@canton-network/core-types';
4
+ import { type PrettyContract, type ViewValue, type PrettyTransactions, type Transaction, type TransferObject } from '@canton-network/core-tx-parser';
5
+ import type { AccessTokenProvider } from '@canton-network/core-wallet-auth';
6
+ import type { AbstractLedgerProvider } from '@canton-network/core-provider-ledger';
7
+ import type { Decimal } from 'decimal.js';
8
+ import { type ApiVersion, type AssetCapabilities, type DisclosedContract, type ExerciseCommand, type AssetBody } from './types.js';
9
+ import { TransferServiceV2 } from './v2/transfer-service.js';
10
+ import { TransferService } from './v1/transfer-service.js';
11
+ import { AllocationService } from './v1/allocation-service.js';
12
+ import { CoreService } from './core-service.js';
13
+ import { AllocationService as AllocationServiceV2 } from './v2/allocation-service.js';
14
+ export declare function isApiVersion(v: string): v is ApiVersion;
15
+ export declare function resolveCapabilities(opts: {
16
+ supportedApis: {
17
+ [key: string]: number;
18
18
  };
19
- };
20
- type CreateTransferChoiceArgs = {
21
- expectedAdmin: PartyId;
22
- transfer: Transfer;
23
- extraArgs: ExtraArgs;
24
- };
25
- export declare class CoreService {
26
- private ledgerProvider;
27
- private readonly logger;
28
- private accessTokenProvider;
29
- private readonly isMasterUser;
30
- constructor(ledgerProvider: AbstractLedgerProvider, logger: Logger, accessTokenProvider: AccessTokenProvider, isMasterUser: boolean);
31
- getTokenStandardClient(registryUrl: string): TokenStandardClient;
32
- getInputHoldingsCids(options: {
33
- sender: PartyId;
34
- instrumentAdmin?: string;
35
- instrumentId?: string;
36
- inputUtxos?: string[];
37
- amount?: Decimal;
38
- continueUntilCompletion?: boolean;
39
- }): Promise<string[]>;
40
- static filterHoldingsByInstrument(options: {
41
- holdings: PrettyContract<HoldingView>[];
42
- instrumentAdmin: string;
43
- instrumentId: string;
44
- }): Promise<PrettyContract<HoldingView>[]>;
45
- static getInputHoldingsCidsForAmount(amount: Decimal, unlockedSenderHoldings: PrettyContract<HoldingView>[]): Promise<string[]>;
46
- listContractsByInterface<T = ViewValue>(interfaceId: string, partyId?: PartyId, limit?: number, offset?: number, continueUntilCompletion?: boolean): Promise<PrettyContract<T>[]>;
47
- toPrettyTransactions(updates: JsGetUpdatesResponse[], partyId: PartyId): Promise<PrettyTransactions>;
48
- toPrettyTransaction(getUpdateResponse: JsGetUpdateResponse, partyId: PartyId): Promise<Transaction>;
49
- toPrettyTransferObjects(getUpdateResponse: JsGetUpdateResponse, partyId: PartyId): Promise<TransferObject[]>;
50
- private getTransactionFromUpdate;
51
- toPrettyTransactionsPerParty(updates: JsGetUpdatesResponse[], parties: PartyId[]): Promise<Map<PartyId, PrettyTransactions>>;
52
- toPrettyContract<T>(interfaceId: string, response: JsActiveContractEntryResponse, offset?: number): PrettyContract<T>;
53
- toQualifiedMemberId(memberId: string): string;
54
- }
55
- declare class AllocationService {
56
- private core;
57
- private readonly logger;
58
- constructor(core: CoreService, logger: Logger);
59
- buildAllocationFactoryChoiceArgs(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, inputUtxos?: string[], requestedAt?: string): Promise<AllocationFactory_Allocate>;
60
- fetchAllocationFactoryChoiceContext(registryUrl: string, choiceArgs: AllocationFactory_Allocate, excludeDebugFields?: boolean): Promise<OffLedger.AllocationInstructionV1.components['schemas']['FactoryWithChoiceContext']>;
61
- createAllocationInstructionFromContext(factoryId: string, choiceArgs: AllocationFactory_Allocate, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
62
- createAllocationInstruction(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, registryUrl: string, inputUtxos?: string[], requestedAt?: string, prefetchedRegistryChoiceContext?: {
63
- factoryId: string;
64
- choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext'];
65
- }): Promise<[ExerciseCommand, DisclosedContract[]]>;
66
- private buildAllocationExerciseWithContext;
67
- fetchExecuteTransferChoiceContext(allocationId: string, registryUrl: string): Promise<{
68
- choiceContextData: Record<string, never>;
69
- disclosedContracts: OffLedger.AllocationV1.components["schemas"]["DisclosedContract"][];
70
- }>;
71
- createExecuteTransferAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
72
- createExecuteTransferAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
73
- fetchWithdrawAllocationChoiceContext(allocationCid: string, registryUrl: string): Promise<OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']>;
74
- createWithdrawAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
75
- createWithdrawAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
76
- fetchCancelAllocationChoiceContext(allocationCid: string, registryUrl: string): Promise<OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']>;
77
- createCancelAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
78
- createCancelAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
79
- createWithdrawAllocationInstruction(allocationInstructionCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
80
- createUpdateAllocationInstruction(allocationInstructionCid: string, extraActors?: PartyId[], extraArgsContext?: Record<string, unknown>, extraArgsMeta?: Record<string, unknown>): Promise<[ExerciseCommand, DisclosedContract[]]>;
81
- createRejectAllocationRequest(allocationRequestCid: string, actor: PartyId): Promise<[ExerciseCommand, DisclosedContract[]]>;
82
- createWithdrawAllocationRequest(allocationRequestCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
83
- }
84
- declare class TransferService {
85
- private core;
86
- private readonly logger;
87
- constructor(core: CoreService, logger: Logger);
88
- buildTransferChoiceArgs(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, instrumentId: string, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata, continueUntilCompletion?: boolean): Promise<CreateTransferChoiceArgs>;
89
- fetchTransferFactoryChoiceContext(registryUrl: string, choiceArgs: CreateTransferChoiceArgs, excludeDebugFields?: boolean): Promise<OffLedger.TransferInstructionV1.components['schemas']['TransferFactoryWithChoiceContext']>;
90
- createTransferFromContext(factoryId: string, choiceArgs: CreateTransferChoiceArgs, choiceContext: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
91
- createTransfer(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, // TODO (#907): replace with registry call
92
- instrumentId: string, registryUrl: string, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata, prefetchedRegistryChoiceContext?: {
93
- factoryId: string;
94
- choiceContext: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext'];
95
- }, continueUntilCompletion?: boolean): Promise<[ExerciseCommand, DisclosedContract[]]>;
96
- fetchAcceptTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
97
- choiceContextData: unknown;
98
- disclosedContracts: DisclosedContract[];
99
- }>;
100
- createAcceptTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
101
- choiceContextData: unknown;
102
- disclosedContracts: DisclosedContract[];
103
- }): Promise<[ExerciseCommand, DisclosedContract[]]>;
104
- exerciseDelegateProxyTransferInstructionAccept(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
105
- exerciseDelegateProxyTransferInstructionReject(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
106
- exerciseDelegateProxyTransferInstructioWithdraw(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
107
- createAcceptTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
108
- fetchRejectTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
109
- choiceContextData: unknown;
110
- disclosedContracts: DisclosedContract[];
111
- }>;
112
- createRejectTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
113
- choiceContextData: unknown;
114
- disclosedContracts: DisclosedContract[];
115
- }): Promise<[ExerciseCommand, DisclosedContract[]]>;
116
- createRejectTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
117
- fetchWithdrawTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
118
- choiceContextData: unknown;
119
- disclosedContracts: DisclosedContract[];
120
- }>;
121
- createWithdrawTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
122
- choiceContextData: unknown;
123
- disclosedContracts: DisclosedContract[];
124
- }): Promise<[ExerciseCommand, DisclosedContract[]]>;
125
- createWithdrawTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
126
- createTransferInstruction(transferInstructionCid: string, registryUrl: string, instructionChoice: 'Accept' | 'Reject' | 'Withdraw', prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
127
- }
19
+ }): AssetCapabilities;
128
20
  export declare class TokenStandardService {
129
21
  private ledgerProvider;
130
22
  private logger;
@@ -134,8 +26,13 @@ export declare class TokenStandardService {
134
26
  readonly core: CoreService;
135
27
  readonly allocation: AllocationService;
136
28
  readonly transfer: TransferService;
29
+ readonly v2: {
30
+ readonly transfer: TransferServiceV2;
31
+ readonly allocation: AllocationServiceV2;
32
+ };
137
33
  constructor(ledgerProvider: AbstractLedgerProvider, logger: Logger, accessTokenProvider: AccessTokenProvider, isMasterUser: boolean);
138
- getInstrumentById(registryUrl: string, instrumentId: string): Promise<{
34
+ resolveCapabilitiesFromRegistryByInstrumentId(registryUrl: URL, instrumentId: string): Promise<AssetCapabilities>;
35
+ getInstrumentById(registryUrl: URL, instrumentId: string): Promise<{
139
36
  id: string;
140
37
  name: string;
141
38
  symbol: string;
@@ -143,39 +40,55 @@ export declare class TokenStandardService {
143
40
  totalSupplyAsOf?: string;
144
41
  decimals: number;
145
42
  paused: boolean;
146
- pauseInfo?: OffLedger.MetadataV1.components["schemas"]["PauseInfo"];
147
- supportedApis: OffLedger.MetadataV1.components["schemas"]["SupportedApis"];
43
+ pauseInfo?: {
44
+ reason?: string;
45
+ until?: string;
46
+ };
47
+ supportedApis: {
48
+ [key: string]: number;
49
+ };
148
50
  showAccountInputFields: boolean;
149
- accountInputFieldsToShow?: OffLedger.MetadataV1.components["schemas"]["AccountInputFieldsToShow"];
51
+ accountInputFieldsToShow?: ("provider" | "accountId")[];
150
52
  }>;
151
- getInstrumentAdmin(registryUrl: string): Promise<string>;
152
- listInstruments(registryUrl: string, pageSize?: number, pageToken?: string): Promise<{
153
- instruments: OffLedger.MetadataV1.components["schemas"]["Instrument"][];
53
+ getInstrumentAdmin(registryUrl: URL): Promise<string>;
54
+ listInstruments(registryUrl: URL, pageSize?: number, pageToken?: string): Promise<{
55
+ instruments: {
56
+ id: string;
57
+ name: string;
58
+ symbol: string;
59
+ totalSupply?: string;
60
+ totalSupplyAsOf?: string;
61
+ decimals: number;
62
+ paused: boolean;
63
+ pauseInfo?: {
64
+ reason?: string;
65
+ until?: string;
66
+ };
67
+ supportedApis: {
68
+ [key: string]: number;
69
+ };
70
+ showAccountInputFields: boolean;
71
+ accountInputFieldsToShow?: ("provider" | "accountId")[];
72
+ }[];
154
73
  nextPageToken?: string;
155
74
  }>;
156
- instrumentsToAsset(registryUrl: string): Promise<{
157
- id: string;
158
- displayName: string;
159
- symbol: string;
160
- registryUrl: string;
161
- admin: string;
162
- }[]>;
163
- registriesToAssets(registryUrls: string[]): Promise<{
75
+ instrumentsToAsset(registryUrl: URL): Promise<{
164
76
  id: string;
165
77
  displayName: string;
166
78
  symbol: string;
167
- registryUrl: string;
79
+ registryUrl: URL;
168
80
  admin: PartyId;
81
+ capabilities: AssetCapabilities;
169
82
  }[]>;
83
+ registriesToAssets(registryUrls: URL[]): Promise<AssetBody[]>;
170
84
  listContractsByInterface<T = ViewValue>(interfaceId: string, partyId?: PartyId, limit?: number, offset?: number, continueUntilCompletion?: boolean): Promise<PrettyContract<T>[]>;
171
85
  listHoldingTransactions(partyId: PartyId, afterOffset?: number, beforeOffset?: number): Promise<PrettyTransactions>;
172
86
  getTransactionById(updateId: string, partyId: PartyId): Promise<Transaction>;
173
87
  getTransferObjectsById(updateId: string, partyId: PartyId): Promise<TransferObject[]>;
174
88
  getInputHoldingsCids(sender: PartyId, inputUtxos?: string[], amount?: Decimal): Promise<string[]>;
175
89
  createDelegateProxyTransfer(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, // TODO (#907): replace with registry call
176
- instrumentId: string, registryUrl: string, featuredAppRightCid: string, proxyCid: string, beneficiaries: Beneficiaries[], inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata): Promise<[ExerciseCommand, DisclosedContract[]]>;
177
- exerciseDelegateProxyTransferInstructionAccept(exchangeParty: PartyId, proxyCid: string, transferInstructionCid: string, registryUrl: string, featuredAppRightCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
178
- static isHoldingLocked(holding: PrettyContract<HoldingView>, currentTime?: Date): boolean;
90
+ instrumentId: string, registryUrl: URL, featuredAppRightCid: string, proxyCid: string, beneficiaries: Beneficiaries[], inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata): Promise<[ExerciseCommand, DisclosedContract[]]>;
91
+ exerciseDelegateProxyTransferInstructionAccept(exchangeParty: PartyId, proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
92
+ static isHoldingLocked(holding: PrettyContract<HoldingView> | PrettyContract<HoldingViewV2>, currentTime?: Date): boolean;
179
93
  }
180
- export {};
181
94
  //# sourceMappingURL=token-standard-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-standard-service.d.ts","sourceRoot":"","sources":["../src/token-standard-service.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,mBAAmB,EAQnB,WAAW,EACX,0BAA0B,EAC1B,uBAAuB,EACvB,QAAQ,EACR,SAAS,EACT,QAAQ,EAGR,aAAa,EACb,SAAS,EACZ,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAEH,KAAK,mBAAmB,EAC3B,MAAM,0CAA0C,CAAA;AACjD,OAAO,EAAc,MAAM,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAExE,OAAO,EAIH,cAAc,EAEd,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,cAAc,EACjB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EACH,sBAAsB,EACtB,GAAG,EACN,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAIpC,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAA;AACpE,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;AAGxE,KAAK,4BAA4B,GAC7B,mBAAmB,CAAC,8BAA8B,CAAC,CAAA;AACvD,KAAK,oBAAoB,GAAG,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAC5E,KAAK,mBAAmB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAA;AAcrE,KAAK,6BAA6B,GAAG,4BAA4B,GAAG;IAChE,aAAa,EAAE;Q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C,cAAc,EAAE,CAAC;IA6BtB,oBAAoB,CACtB,MAAM,EAAE,OAAO,EACf,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,MAAM,CAAC,EAAE,OAAO;IAgBd,2BAA2B,CAC7B,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,OAAO,EAAE,0CAA0C;IACpE,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,GAAG,EAChB,mBAAmB,EAAE,MAAM,EAC3B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,aAAa,EAAE,EAC9B,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,IAAI,EACjB,IAAI,CAAC,EAAE,QAAQ,GAChB,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IA2C5C,8CAA8C,CAChD,aAAa,EAAE,OAAO,EACtB,QAAQ,EAAE,MAAM,EAChB,sBAAsB,EAAE,MAAM,EAC9B,WAAW,EAAE,GAAG,EAChB,mBAAmB,EAAE,MAAM,GAC5B,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAiClD,MAAM,CAAC,eAAe,CAClB,OAAO,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,aAAa,CAAC,EACpE,WAAW,GAAE,IAAiB,GAC/B,OAAO;CAwCb"}
@@ -0,0 +1,61 @@
1
+ import type { LedgerCommonSchemas } from '@canton-network/core-ledger-client-types';
2
+ import type { Ops } from '@canton-network/core-provider-ledger';
3
+ import type { TokenStandardClient, Metadata, Transfer, ExtraArgs } from '@canton-network/core-token-standard';
4
+ import type { PartyId } from '@canton-network/core-types';
5
+ import type { TokenStandardClient as TokenStandardClientV2 } from '@canton-network/core-token-standard-v2';
6
+ export declare const REQUESTED_AT_SKEW_MS = 60000;
7
+ export type ExerciseCommand = LedgerCommonSchemas['ExerciseCommand'];
8
+ export type DisclosedContract = LedgerCommonSchemas['DisclosedContract'];
9
+ export type GenericTokenStandardClient = TokenStandardClient | TokenStandardClientV2;
10
+ export declare const EMPTY_META: Metadata;
11
+ export type JsGetActiveContractsResponse = LedgerCommonSchemas['JsGetActiveContractsResponse'];
12
+ export type JsGetUpdatesResponse = Ops.PostV2Updates['ledgerApi']['result'][number];
13
+ export type JsGetUpdateResponse = LedgerCommonSchemas['JsGetUpdateResponse'];
14
+ export type OffsetCheckpoint2 = LedgerCommonSchemas['OffsetCheckpoint2'];
15
+ export type JsTransaction = LedgerCommonSchemas['JsTransaction'];
16
+ export type UpdateFormat = LedgerCommonSchemas['UpdateFormat'];
17
+ export type JsActiveContract = LedgerCommonSchemas['JsActiveContract'];
18
+ export type OffsetCheckpointUpdate = {
19
+ update: {
20
+ OffsetCheckpoint: OffsetCheckpoint2;
21
+ };
22
+ };
23
+ export type TransactionUpdate = {
24
+ update: {
25
+ Transaction: {
26
+ value: JsTransaction;
27
+ };
28
+ };
29
+ };
30
+ export type JsActiveContractEntryResponse = JsGetActiveContractsResponse & {
31
+ contractEntry: {
32
+ JsActiveContract: {
33
+ createdEvent: LedgerCommonSchemas['CreatedEvent'];
34
+ };
35
+ };
36
+ };
37
+ export type CreateTransferChoiceArgs = {
38
+ expectedAdmin: PartyId;
39
+ transfer: Transfer;
40
+ extraArgs: ExtraArgs;
41
+ };
42
+ export type ApiVersion = 'v1' | 'v2';
43
+ export type SupportedVersions = ApiVersion[];
44
+ export declare const SUPPORTED_VERSIONS: readonly ApiVersion[];
45
+ export interface AssetCapabilities {
46
+ holding: SupportedVersions;
47
+ transferInstruction: SupportedVersions;
48
+ allocation: SupportedVersions;
49
+ allocationInstruction: SupportedVersions;
50
+ allocationRequest: SupportedVersions;
51
+ }
52
+ export declare const KEY_MAPPING: Record<string, keyof AssetCapabilities>;
53
+ export type AssetBody = {
54
+ id: string;
55
+ displayName: string;
56
+ symbol: string;
57
+ registryUrl: URL;
58
+ admin: PartyId;
59
+ capabilities: AssetCapabilities;
60
+ };
61
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAA;AAC/D,OAAO,KAAK,EACR,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,SAAS,EACZ,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,mBAAmB,IAAI,qBAAqB,EAAE,MAAM,wCAAwC,CAAA;AAE1G,eAAO,MAAM,oBAAoB,QAAS,CAAA;AAE1C,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAA;AACpE,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;AACxE,MAAM,MAAM,0BAA0B,GAClC,mBAAmB,GAAG,qBAAqB,CAAA;AAC/C,eAAO,MAAM,UAAU,EAAE,QAAyB,CAAA;AAElD,MAAM,MAAM,4BAA4B,GACpC,mBAAmB,CAAC,8BAA8B,CAAC,CAAA;AACvD,MAAM,MAAM,oBAAoB,GAC5B,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AACpD,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAA;AAC5E,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;AACxE,MAAM,MAAM,aAAa,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAA;AAChE,MAAM,MAAM,YAAY,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAA;AAE9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O,CAAA;IACd,YAAY,EAAE,iBAAiB,CAAA;CAClC,CAAA"}
@@ -0,0 +1,34 @@
1
+ import { type AllocationFactory_Allocate, type AllocationSpecification, type OffLedger } from '@canton-network/core-token-standard';
2
+ import type { Logger, PartyId } from '@canton-network/core-types';
3
+ import { type DisclosedContract, type ExerciseCommand } from '../types.js';
4
+ import type { CoreService } from '../core-service.js';
5
+ export declare class AllocationService {
6
+ private core;
7
+ private readonly logger;
8
+ constructor(core: CoreService, logger: Logger);
9
+ buildAllocationFactoryChoiceArgs(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, inputUtxos?: string[], requestedAt?: string): Promise<AllocationFactory_Allocate>;
10
+ fetchAllocationFactoryChoiceContext(registryUrl: URL, choiceArgs: AllocationFactory_Allocate, excludeDebugFields?: boolean): Promise<OffLedger.AllocationInstructionV1.components['schemas']['FactoryWithChoiceContext']>;
11
+ createAllocationInstructionFromContext(factoryId: string, choiceArgs: AllocationFactory_Allocate, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
12
+ createAllocationInstruction(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, registryUrl: URL, inputUtxos?: string[], requestedAt?: string, prefetchedRegistryChoiceContext?: {
13
+ factoryId: string;
14
+ choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext'];
15
+ }): Promise<[ExerciseCommand, DisclosedContract[]]>;
16
+ private buildAllocationExerciseWithContext;
17
+ fetchExecuteTransferChoiceContext(allocationId: string, registryUrl: URL): Promise<{
18
+ choiceContextData: Record<string, never>;
19
+ disclosedContracts: OffLedger.AllocationV1.components["schemas"]["DisclosedContract"][];
20
+ }>;
21
+ createExecuteTransferAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
22
+ createExecuteTransferAllocation(allocationCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
23
+ fetchWithdrawAllocationChoiceContext(allocationCid: string, registryUrl: URL): Promise<OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']>;
24
+ createWithdrawAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
25
+ createWithdrawAllocation(allocationCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
26
+ fetchCancelAllocationChoiceContext(allocationCid: string, registryUrl: URL): Promise<OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']>;
27
+ createCancelAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
28
+ createCancelAllocation(allocationCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
29
+ createWithdrawAllocationInstruction(allocationInstructionCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
30
+ createUpdateAllocationInstruction(allocationInstructionCid: string, extraActors?: PartyId[], extraArgsContext?: Record<string, unknown>, extraArgsMeta?: Record<string, unknown>): Promise<[ExerciseCommand, DisclosedContract[]]>;
31
+ createRejectAllocationRequest(allocationRequestCid: string, actor: PartyId): Promise<[ExerciseCommand, DisclosedContract[]]>;
32
+ createWithdrawAllocationRequest(allocationRequestCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
33
+ }
34
+ //# sourceMappingURL=allocation-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allocation-service.d.ts","sourceRoot":"","sources":["../../src/v1/allocation-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAKH,KAAK,0B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EAAE,GAAG,GACjB,OAAO,CACN,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAC3E;IAUD,iCAAiC,CAC7B,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,GACxF,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC;IASnC,sBAAsB,CACxB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,GAAG,EAChB,+BAA+B,CAAC,EAAE,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,GAC3G,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAiB5C,mCAAmC,CACrC,wBAAwB,EAAE,MAAM,GACjC,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAe5C,iCAAiC,CACnC,wBAAwB,EAAE,MAAM,EAChC,WAAW,GAAE,OAAO,EAAO,EAC3B,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EAC9C,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAC5C,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAgB5C,6BAA6B,CAC/B,oBAAoB,EAAE,MAAM,EAC5B,KAAK,EAAE,OAAO,GACf,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAgB5C,+BAA+B,CACjC,oBAAoB,EAAE,MAAM,GAC7B,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;CAcrD"}
@@ -0,0 +1,49 @@
1
+ import { type Metadata, type Beneficiaries, type OffLedger } from '@canton-network/core-token-standard';
2
+ import type { Logger, PartyId } from '@canton-network/core-types';
3
+ import { type CreateTransferChoiceArgs, type DisclosedContract, type ExerciseCommand } from '../types.js';
4
+ import type { CoreService } from '../core-service.js';
5
+ export declare class TransferService {
6
+ private core;
7
+ private readonly logger;
8
+ constructor(core: CoreService, logger: Logger);
9
+ buildTransferChoiceArgs(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, instrumentId: string, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata, continueUntilCompletion?: boolean): Promise<CreateTransferChoiceArgs>;
10
+ fetchTransferFactoryChoiceContext(registryUrl: URL, choiceArgs: CreateTransferChoiceArgs, excludeDebugFields?: boolean): Promise<OffLedger.TransferInstructionV1.components['schemas']['TransferFactoryWithChoiceContext']>;
11
+ createTransferFromContext(factoryId: string, choiceArgs: CreateTransferChoiceArgs, choiceContext: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
12
+ createTransfer(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, // TODO (#907): replace with registry call
13
+ instrumentId: string, registryUrl: URL, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata, prefetchedRegistryChoiceContext?: {
14
+ factoryId: string;
15
+ choiceContext: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext'];
16
+ }, continueUntilCompletion?: boolean): Promise<[ExerciseCommand, DisclosedContract[]]>;
17
+ fetchAcceptTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: URL): Promise<{
18
+ choiceContextData: unknown;
19
+ disclosedContracts: DisclosedContract[];
20
+ }>;
21
+ createAcceptTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
22
+ choiceContextData: unknown;
23
+ disclosedContracts: DisclosedContract[];
24
+ }): Promise<[ExerciseCommand, DisclosedContract[]]>;
25
+ exerciseDelegateProxyTransferInstructionAccept(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
26
+ exerciseDelegateProxyTransferInstructionReject(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
27
+ exerciseDelegateProxyTransferInstructioWithdraw(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
28
+ createAcceptTransferInstruction(transferInstructionCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
29
+ fetchRejectTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: URL): Promise<{
30
+ choiceContextData: unknown;
31
+ disclosedContracts: DisclosedContract[];
32
+ }>;
33
+ createRejectTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
34
+ choiceContextData: unknown;
35
+ disclosedContracts: DisclosedContract[];
36
+ }): Promise<[ExerciseCommand, DisclosedContract[]]>;
37
+ createRejectTransferInstruction(transferInstructionCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
38
+ fetchWithdrawTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: URL): Promise<{
39
+ choiceContextData: unknown;
40
+ disclosedContracts: DisclosedContract[];
41
+ }>;
42
+ createWithdrawTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
43
+ choiceContextData: unknown;
44
+ disclosedContracts: DisclosedContract[];
45
+ }): Promise<[ExerciseCommand, DisclosedContract[]]>;
46
+ createWithdrawTransferInstruction(transferInstructionCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
47
+ createTransferInstruction(transferInstructionCid: string, registryUrl: URL, instructionChoice: 'Accept' | 'Reject' | 'Withdraw', prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
48
+ }
49
+ //# sourceMappingURL=transfer-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-service.d.ts","sourceRoot":"","sources":["../../src/v1/transfer-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAGH,KAAK,QAAQ,EAGb,KAAK,aAAa,EAClB,KAAK,SAAS,EAEjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAc,MAAM,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE7E,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAEvB,MAAM,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,qBAAa,eAAe;IAEpB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADf,IAAI,EAAE,WAAW,EACR,MAAM,EAAE,MAAM;IAGtB,uBAAuB,CAChC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,OAAO,EACxB,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,IAAI,EACjB,IAAI,CAAC,EAAE,QAAQ,EACf,uBAAuB,CAAC,EAAE,OAAO,GAClC,OAAO,CAAC,wBAAwB,CAAC;IAyC9B,iCAAiC,CACnC,WAAW,EAAE,GAAG,EAChB,UAAU,EAAE,wBAAwB,EACpC,kBAAkB,GAAE,OAAc,GACnC,OAAO,CACN,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,kCAAkC,CAAC,CAC5F;IASK,yBAAyB,CAC3B,SAAS,EAAE,MAAM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AAqB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,GACzG,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAuB5C,6CAA6C,CAC/C,sBAAsB,EAAE,MAAM,EAC9B,WAAW,EAAE,GAAG,GACjB,OAAO,CAAC;QACP,iBAAiB,EAAE,OAAO,CAAA;QAC1B,kBAAkB,EAAE,iBAAiB,EAAE,CAAA;KAC1C,CAAC;IAoBI,4CAA4C,CAC9C,sBAAsB,EAAE,MAAM,EAC9B,aAAa,EAAE;QACX,iBAAiB,EAAE,OAAO,CAAA;QAC1B,kBAAkB,EAAE,iBAAiB,EAAE,CAAA;KAC1C,GACF,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAwB5C,iCAAiC,CACnC,sBAAsB,EAAE,MAAM,EAC9B,WAAW,EAAE,GAAG,EAChB,+BAA+B,CAAC,EAAE,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,GACzG,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAuB5C,yBAAyB,CAC3B,sBAAsB,EAAE,MAAM,EAC9B,WAAW,EAAE,GAAG,EAChB,iBAAiB,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,EACnD,+BAA+B,CAAC,EAAE,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,GACzG,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;CAsBrD"}
@@ -0,0 +1,44 @@
1
+ import type { CoreService } from '../core-service';
2
+ import { type AllocationFactory_Allocate, type AllocationSpecification, type SettlementInfo, type SettlementFactory_SettleBatch as SettlementFactory_SettleBatchV2, type AllocationRequestView as AllocationRequestViewV2, type OffLedger } from '@canton-network/core-token-standard-v2';
3
+ import { type DisclosedContract, type ExerciseCommand } from '../types';
4
+ import Decimal from 'decimal.js';
5
+ import type { PartyId, Logger } from '@canton-network/core-types';
6
+ type AllocationChoiceContextV2 = OffLedger.AllocationInstructionV2.components['schemas']['ChoiceContext'];
7
+ type CreateAllocateChoiceArgs = {
8
+ settlement: SettlementInfo;
9
+ spec: AllocationSpecification;
10
+ admin: PartyId;
11
+ actors?: PartyId[] | undefined;
12
+ inputUtxos?: string[];
13
+ excludeCids?: ReadonlySet<string>;
14
+ requestedAt?: string;
15
+ };
16
+ export declare class AllocationService {
17
+ private core;
18
+ private readonly logger;
19
+ constructor(core: CoreService, logger: Logger);
20
+ static fundingNeeds(spec: AllocationSpecification): Map<string, Decimal>;
21
+ buildAllocateChoiceArgs(opts: CreateAllocateChoiceArgs): Promise<AllocationFactory_Allocate>;
22
+ createAllocation(args: CreateAllocateChoiceArgs, registryUrl: URL, prefetched?: {
23
+ factoryId: string;
24
+ choiceContext: AllocationChoiceContextV2;
25
+ }): Promise<[ExerciseCommand, DisclosedContract[]]>;
26
+ fetchAllocationChoiceContext(action: 'withdraw' | 'cancel', allocationCid: string, registryUrl: URL): Promise<AllocationChoiceContextV2>;
27
+ createAllocationChoiceFromContext(action: 'withdraw' | 'cancel', allocationCid: string, actors: PartyId[], ctx: AllocationChoiceContextV2): Promise<[ExerciseCommand, DisclosedContract[]]>;
28
+ createAllocationChoice(action: 'withdraw' | 'cancel', allocationCid: string, actors: PartyId[], registryUrl: URL, prefetched?: AllocationChoiceContextV2): Promise<[ExerciseCommand, DisclosedContract[]]>;
29
+ createAllocationRequestChoice(action: 'withdraw' | 'reject', allocationRequestCid: string, actors: PartyId[]): [ExerciseCommand, DisclosedContract[]];
30
+ createWithdrawAllocationInstruction(withdrawCid: string, actors: PartyId[]): [ExerciseCommand, DisclosedContract[]];
31
+ createAllocationFromContext(factoryId: string, choiceArgs: AllocationFactory_Allocate, choiceContext: OffLedger.AllocationInstructionV2.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
32
+ fetchSettlementFactory(args: SettlementFactory_SettleBatchV2, registryUrl: URL): Promise<{
33
+ factoryId: string;
34
+ choiceContext: OffLedger.AllocationV2.components["schemas"]["ChoiceContext"];
35
+ }>;
36
+ createAllocationsForRequest(opts: {
37
+ requestCid: string;
38
+ request: AllocationRequestViewV2;
39
+ registry: (admin: PartyId) => Promise<URL>;
40
+ actors?: PartyId[];
41
+ }): Promise<[ExerciseCommand[], DisclosedContract[]]>;
42
+ }
43
+ export {};
44
+ //# sourceMappingURL=allocation-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allocation-service.d.ts","sourceRoot":"","sources":["../../src/v2/allocation-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EACH,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAE5B,KAAK,cAAc,EAEnB,KAAK,6BAA6B,IAAI,+BAA+B,EAIrE,KAAK,qBAAqB,IAAI,uBAAuB,EACrD,KAAK,SAAS,EACjB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACvB,MAAM,UAAU,CAAA;AACjB,OAAO,OAAO,MAAM,YAAY,CAAA;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAGjE,KAAK,yBAAyB,GAC1B,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAA;AAE5E,KAAK,wBAAwB,GAAG;IAC5B,UAAU,EAAE,cAAc,CAAA;IAC1B,IAAI,EAAE,uBAAuB,CAAA;IAC7B,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;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AE,OAAO,EAAE,GAClB,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC;IAazC,mCAAmC,CAC/B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,OAAO,EAAE,GAClB,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC;IAUnC,2BAA2B,CAC7B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,0BAA0B,EACtC,aAAa,EAAE,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,GACxF,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAe5C,sBAAsB,CACxB,IAAI,EAAE,+BAA+B,EACrC,WAAW,EAAE,GAAG;;uBAvIZ,4CACR;;IAgJM,2BAA2B,CAAC,IAAI,EAAE;QACpC,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,uBAAuB,CAAA;QAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;QAC1C,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;KACrB,GAAG,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC;CAgExD"}
@@ -0,0 +1,32 @@
1
+ import type { Metadata } from '@canton-network/core-token-standard';
2
+ import type { Logger, PartyId } from '@canton-network/core-types';
3
+ import { type DisclosedContract, type ExerciseCommand } from '../types';
4
+ import { type Account, type TransferFactory_Transfer as TransferFactory_TransferV2, type OffLedger as OffLedgerV2 } from '@canton-network/core-token-standard-v2';
5
+ import type { CoreService } from '../core-service.js';
6
+ export declare class TransferServiceV2 {
7
+ private core;
8
+ private readonly logger;
9
+ constructor(core: CoreService, logger: Logger);
10
+ buildTransferChoiceArgs(opts: {
11
+ sender: Account;
12
+ receiver: Account;
13
+ amount: string;
14
+ instrumentAdmin: PartyId;
15
+ instrumentId: string;
16
+ inputUtxos?: string[];
17
+ memo?: string;
18
+ expiryDate?: Date;
19
+ meta?: Metadata;
20
+ actors?: PartyId[];
21
+ continueUntilCompletion?: boolean;
22
+ }): Promise<TransferFactory_TransferV2>;
23
+ createTransfer(args: Parameters<TransferServiceV2['buildTransferChoiceArgs']>[0], registryUrl: URL, prefetched?: {
24
+ factoryId: string;
25
+ choiceContext: OffLedgerV2.TransferInstructionV2.components['schemas']['ChoiceContext'];
26
+ }): Promise<[ExerciseCommand, DisclosedContract[]]>;
27
+ createTransferFromContext(factoryId: string, choiceArgs: TransferFactory_TransferV2, choiceContext: OffLedgerV2.TransferInstructionV2.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
28
+ rejectTransferInstruction(transferInstructionCid: string, actors: PartyId[], registryUrl: URL): Promise<[ExerciseCommand, DisclosedContract[]]>;
29
+ withdrawTransferInstruction(transferInstructionCid: string, actors: PartyId[], registryUrl: URL): Promise<[ExerciseCommand, DisclosedContract[]]>;
30
+ acceptTransferInstruction(transferInstructionCid: string, actors: PartyId[], registryUrl: URL): Promise<[ExerciseCommand, DisclosedContract[]]>;
31
+ }
32
+ //# sourceMappingURL=transfer-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-service.d.ts","sourceRoot":"","sources":["../../src/v2/transfer-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,KAAK,EAAc,MAAM,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAG7E,OAAO,EACH,KAAK,iBAAiB,EAEtB,KAAK,eAAe,EAEvB,MAAM,UAAU,CAAA;AACjB,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,wBAAwB,IAAI,0BAA0B,EAE3D,KAAK,SAAS,IAAI,WAAW,EAIhC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,qBAAa,iBAAiB;IAEtB,OAAO,CAA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iBAAiB,EAAE,CAAC,CAAC;IA2B5C,2BAA2B,CAC7B,sBAAsB,EAAE,MAAM,EAC9B,MAAM,EAAE,OAAO,EAAE,EACjB,WAAW,EAAE,GAAG,GACjB,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;IA2B5C,yBAAyB,CAC3B,sBAAsB,EAAE,MAAM,EAC9B,MAAM,EAAE,OAAO,EAAE,EACjB,WAAW,EAAE,GAAG,GACjB,OAAO,CAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,CAAC;CA0BrD"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@canton-network/core-token-standard-service",
3
- "version": "1.12.3",
3
+ "version": "1.14.0",
4
4
  "type": "module",
5
5
  "description": "Provides a service layer that wraps the token-standard-client and contains higher level functions for interacting with token standard contracts on Canton.",
6
6
  "license": "Apache-2.0",
7
7
  "author": "Phillip Olesen <phillip.olesen@digitalasset.com>",
8
+ "sideEffects": false,
8
9
  "main": "dist/index.cjs",
9
10
  "module": "dist/index.js",
10
11
  "types": "dist/index.d.ts",
@@ -18,23 +19,24 @@
18
19
  },
19
20
  "devDependencies": {
20
21
  "@types/node": "^25.9.4",
21
- "@vitest/browser-playwright": "^4.1.11",
22
- "@vitest/coverage-v8": "^4.1.11",
22
+ "@vitest/browser-playwright": "^5.0.1",
23
+ "@vitest/coverage-v8": "^5.0.1",
23
24
  "openapi-typescript": "^7.13.0",
24
- "playwright": "^1.61.1",
25
+ "playwright": "^1.63.0",
25
26
  "tsdown": "^0.22.9",
26
- "typescript": "^5.9.3",
27
- "vitest": "^4.1.11"
27
+ "typescript": "^6.0.3",
28
+ "vitest": "^5.0.1"
28
29
  },
29
30
  "dependencies": {
30
- "@canton-network/core-acs-reader": "^1.20.3",
31
- "@canton-network/core-ledger-client-types": "^1.12.2",
32
- "@canton-network/core-provider-ledger": "^1.12.2",
33
- "@canton-network/core-splice-client": "^1.12.1",
34
- "@canton-network/core-token-standard": "^1.12.1",
35
- "@canton-network/core-tx-parser": "^1.12.2",
36
- "@canton-network/core-types": "^1.12.1",
37
- "@canton-network/core-wallet-auth": "^1.12.1",
31
+ "@canton-network/core-acs-reader": "1.22.0",
32
+ "@canton-network/core-ledger-client-types": "1.14.0",
33
+ "@canton-network/core-provider-ledger": "1.14.0",
34
+ "@canton-network/core-splice-client": "1.14.0",
35
+ "@canton-network/core-token-standard": "1.14.0",
36
+ "@canton-network/core-token-standard-v2": "1.2.0",
37
+ "@canton-network/core-tx-parser": "1.14.0",
38
+ "@canton-network/core-types": "1.14.0",
39
+ "@canton-network/core-wallet-auth": "1.14.0",
38
40
  "dayjs": "^1.11.21",
39
41
  "decimal.js": "^10.6.0",
40
42
  "openapi-fetch": "^0.17.0",
@@ -60,8 +62,6 @@
60
62
  "build": "tsdown --onSuccess \"tsc\"",
61
63
  "dev": "tsdown --watch --onSuccess \"tsc\"",
62
64
  "clean": "tsc -b --clean; rm -rf dist",
63
- "flatpack": "pnpm pack --pack-destination \"$FLATPACK_OUTDIR\"",
64
- "test": "vitest run --project node --project browser",
65
- "test:coverage": "vitest run --project node --project browser --coverage"
65
+ "flatpack": "pnpm pack --pack-destination \"$FLATPACK_OUTDIR\""
66
66
  }
67
67
  }