@canton-network/core-token-standard-service 1.13.0 → 2.0.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,164 +1,38 @@
1
- import { TokenStandardClient, type HoldingView, type AllocationFactory_Allocate, type AllocationSpecification, type Transfer, type ExtraArgs, type Metadata, type Beneficiaries, type OffLedger } from '@canton-network/core-token-standard';
2
- import { type LedgerCommonSchemas } from '@canton-network/core-ledger-client-types';
3
- import type { Logger, PartyId } from '@canton-network/core-types';
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 { PartyId } from '@canton-network/core-types';
4
4
  import { type PrettyContract, type ViewValue, type PrettyTransactions, type Transaction, type TransferObject } from '@canton-network/core-tx-parser';
5
5
  import type { AccessTokenProvider } from '@canton-network/core-wallet-auth';
6
- import type { 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
- };
18
- };
19
- };
20
- type CreateTransferChoiceArgs = {
21
- expectedAdmin: PartyId;
22
- transfer: Transfer;
23
- extraArgs: ExtraArgs;
24
- };
25
- type ApiVersion = 'v1' | 'v2';
26
- type SupportedVersions = ApiVersion[];
27
- export interface AssetCapabilities {
28
- holding: SupportedVersions;
29
- transferInstruction: SupportedVersions;
30
- allocation: SupportedVersions;
31
- allocationInstruction: SupportedVersions;
32
- allocationRequest: SupportedVersions;
33
- }
34
- export type InstrumentInfo = {
35
- id: string;
36
- displayName: string;
37
- symbol: string;
38
- registryUrl: string;
39
- admin: PartyId;
40
- capabilities: AssetCapabilities;
41
- };
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;
42
15
  export declare function resolveCapabilities(opts: {
43
16
  supportedApis: {
44
17
  [key: string]: number;
45
18
  };
46
19
  }): AssetCapabilities;
47
- export declare class CoreService {
48
- private ledgerProvider;
49
- private readonly logger;
50
- private accessTokenProvider;
51
- private readonly isMasterUser;
52
- constructor(ledgerProvider: AbstractLedgerProvider, logger: Logger, accessTokenProvider: AccessTokenProvider, isMasterUser: boolean);
53
- getTokenStandardClient(registryUrl: string): TokenStandardClient;
54
- getInputHoldingsCids(options: {
55
- sender: PartyId;
56
- instrumentAdmin?: string;
57
- instrumentId?: string;
58
- inputUtxos?: string[];
59
- amount?: Decimal;
60
- continueUntilCompletion?: boolean;
61
- }): Promise<string[]>;
62
- static filterHoldingsByInstrument(options: {
63
- holdings: PrettyContract<HoldingView>[];
64
- instrumentAdmin: string;
65
- instrumentId: string;
66
- }): Promise<PrettyContract<HoldingView>[]>;
67
- static getInputHoldingsCidsForAmount(amount: Decimal, unlockedSenderHoldings: PrettyContract<HoldingView>[]): Promise<string[]>;
68
- listContractsByInterface<T = ViewValue>(interfaceId: string, partyId?: PartyId, limit?: number, offset?: number, continueUntilCompletion?: boolean): Promise<PrettyContract<T>[]>;
69
- toPrettyTransactions(updates: JsGetUpdatesResponse[], partyId: PartyId): Promise<PrettyTransactions>;
70
- toPrettyTransaction(getUpdateResponse: JsGetUpdateResponse, partyId: PartyId): Promise<Transaction>;
71
- toPrettyTransferObjects(getUpdateResponse: JsGetUpdateResponse, partyId: PartyId): Promise<TransferObject[]>;
72
- private getTransactionFromUpdate;
73
- toPrettyTransactionsPerParty(updates: JsGetUpdatesResponse[], parties: PartyId[]): Promise<Map<PartyId, PrettyTransactions>>;
74
- toPrettyContract<T>(interfaceId: string, response: JsActiveContractEntryResponse, offset?: number): PrettyContract<T>;
75
- toQualifiedMemberId(memberId: string): string;
76
- }
77
- declare class AllocationService {
78
- private core;
79
- private readonly logger;
80
- constructor(core: CoreService, logger: Logger);
81
- buildAllocationFactoryChoiceArgs(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, inputUtxos?: string[], requestedAt?: string): Promise<AllocationFactory_Allocate>;
82
- fetchAllocationFactoryChoiceContext(registryUrl: string, choiceArgs: AllocationFactory_Allocate, excludeDebugFields?: boolean): Promise<OffLedger.AllocationInstructionV1.components['schemas']['FactoryWithChoiceContext']>;
83
- createAllocationInstructionFromContext(factoryId: string, choiceArgs: AllocationFactory_Allocate, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
84
- createAllocationInstruction(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, registryUrl: string, inputUtxos?: string[], requestedAt?: string, prefetchedRegistryChoiceContext?: {
85
- factoryId: string;
86
- choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext'];
87
- }): Promise<[ExerciseCommand, DisclosedContract[]]>;
88
- private buildAllocationExerciseWithContext;
89
- fetchExecuteTransferChoiceContext(allocationId: string, registryUrl: string): Promise<{
90
- choiceContextData: Record<string, never>;
91
- disclosedContracts: OffLedger.AllocationV1.components["schemas"]["DisclosedContract"][];
92
- }>;
93
- createExecuteTransferAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
94
- createExecuteTransferAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
95
- fetchWithdrawAllocationChoiceContext(allocationCid: string, registryUrl: string): Promise<OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']>;
96
- createWithdrawAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
97
- createWithdrawAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
98
- fetchCancelAllocationChoiceContext(allocationCid: string, registryUrl: string): Promise<OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']>;
99
- createCancelAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
100
- createCancelAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
101
- createWithdrawAllocationInstruction(allocationInstructionCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
102
- createUpdateAllocationInstruction(allocationInstructionCid: string, extraActors?: PartyId[], extraArgsContext?: Record<string, unknown>, extraArgsMeta?: Record<string, unknown>): Promise<[ExerciseCommand, DisclosedContract[]]>;
103
- createRejectAllocationRequest(allocationRequestCid: string, actor: PartyId): Promise<[ExerciseCommand, DisclosedContract[]]>;
104
- createWithdrawAllocationRequest(allocationRequestCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
105
- }
106
- declare class TransferService {
107
- private core;
108
- private readonly logger;
109
- constructor(core: CoreService, logger: Logger);
110
- buildTransferChoiceArgs(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, instrumentId: string, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata, continueUntilCompletion?: boolean): Promise<CreateTransferChoiceArgs>;
111
- fetchTransferFactoryChoiceContext(registryUrl: string, choiceArgs: CreateTransferChoiceArgs, excludeDebugFields?: boolean): Promise<OffLedger.TransferInstructionV1.components['schemas']['TransferFactoryWithChoiceContext']>;
112
- createTransferFromContext(factoryId: string, choiceArgs: CreateTransferChoiceArgs, choiceContext: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
113
- createTransfer(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, // TODO (#907): replace with registry call
114
- instrumentId: string, registryUrl: string, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata, prefetchedRegistryChoiceContext?: {
115
- factoryId: string;
116
- choiceContext: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext'];
117
- }, continueUntilCompletion?: boolean): Promise<[ExerciseCommand, DisclosedContract[]]>;
118
- fetchAcceptTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
119
- choiceContextData: unknown;
120
- disclosedContracts: DisclosedContract[];
121
- }>;
122
- createAcceptTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
123
- choiceContextData: unknown;
124
- disclosedContracts: DisclosedContract[];
125
- }): Promise<[ExerciseCommand, DisclosedContract[]]>;
126
- exerciseDelegateProxyTransferInstructionAccept(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
127
- exerciseDelegateProxyTransferInstructionReject(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
128
- exerciseDelegateProxyTransferInstructioWithdraw(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
129
- createAcceptTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
130
- fetchRejectTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
131
- choiceContextData: unknown;
132
- disclosedContracts: DisclosedContract[];
133
- }>;
134
- createRejectTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
135
- choiceContextData: unknown;
136
- disclosedContracts: DisclosedContract[];
137
- }): Promise<[ExerciseCommand, DisclosedContract[]]>;
138
- createRejectTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
139
- fetchWithdrawTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
140
- choiceContextData: unknown;
141
- disclosedContracts: DisclosedContract[];
142
- }>;
143
- createWithdrawTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
144
- choiceContextData: unknown;
145
- disclosedContracts: DisclosedContract[];
146
- }): Promise<[ExerciseCommand, DisclosedContract[]]>;
147
- createWithdrawTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
148
- createTransferInstruction(transferInstructionCid: string, registryUrl: string, instructionChoice: 'Accept' | 'Reject' | 'Withdraw', prefetchedRegistryChoiceContext?: OffLedger.TransferInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
149
- }
150
20
  export declare class TokenStandardService {
151
21
  private ledgerProvider;
152
- private logger;
153
22
  private accessTokenProvider;
154
23
  private readonly isMasterUser;
155
24
  static readonly MEMO_KEY = "splice.lfdecentralizedtrust.org/reason";
25
+ private logger;
156
26
  readonly core: CoreService;
157
27
  readonly allocation: AllocationService;
158
28
  readonly transfer: TransferService;
159
- constructor(ledgerProvider: AbstractLedgerProvider, logger: Logger, accessTokenProvider: AccessTokenProvider, isMasterUser: boolean);
160
- resolveCapabilitiesFromRegistryByInstrumentId(registryUrl: string, instrumentId: string): Promise<AssetCapabilities>;
161
- getInstrumentById(registryUrl: string, instrumentId: string): Promise<{
29
+ readonly v2: {
30
+ readonly transfer: TransferServiceV2;
31
+ readonly allocation: AllocationServiceV2;
32
+ };
33
+ constructor(ledgerProvider: AbstractLedgerProvider, accessTokenProvider: AccessTokenProvider, isMasterUser: boolean);
34
+ resolveCapabilitiesFromRegistryByInstrumentId(registryUrl: URL, instrumentId: string): Promise<AssetCapabilities>;
35
+ getInstrumentById(registryUrl: URL, instrumentId: string): Promise<{
162
36
  id: string;
163
37
  name: string;
164
38
  symbol: string;
@@ -166,34 +40,55 @@ export declare class TokenStandardService {
166
40
  totalSupplyAsOf?: string;
167
41
  decimals: number;
168
42
  paused: boolean;
169
- pauseInfo?: OffLedger.MetadataV1.components["schemas"]["PauseInfo"];
170
- supportedApis: OffLedger.MetadataV1.components["schemas"]["SupportedApis"];
43
+ pauseInfo?: {
44
+ reason?: string;
45
+ until?: string;
46
+ };
47
+ supportedApis: {
48
+ [key: string]: number;
49
+ };
171
50
  showAccountInputFields: boolean;
172
- accountInputFieldsToShow?: OffLedger.MetadataV1.components["schemas"]["AccountInputFieldsToShow"];
51
+ accountInputFieldsToShow?: ("provider" | "accountId")[];
173
52
  }>;
174
- getInstrumentAdmin(registryUrl: string): Promise<string>;
175
- listInstruments(registryUrl: string, pageSize?: number, pageToken?: string): Promise<{
176
- 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
+ }[];
177
73
  nextPageToken?: string;
178
74
  }>;
179
- instrumentsToAsset(registryUrl: string): Promise<{
75
+ instrumentsToAsset(registryUrl: URL): Promise<{
180
76
  id: string;
181
77
  displayName: string;
182
78
  symbol: string;
183
- registryUrl: string;
79
+ registryUrl: URL;
184
80
  admin: PartyId;
185
81
  capabilities: AssetCapabilities;
186
82
  }[]>;
187
- registriesToAssets(registryUrls: string[]): Promise<InstrumentInfo[]>;
83
+ registriesToAssets(registryUrls: URL[]): Promise<AssetBody[]>;
188
84
  listContractsByInterface<T = ViewValue>(interfaceId: string, partyId?: PartyId, limit?: number, offset?: number, continueUntilCompletion?: boolean): Promise<PrettyContract<T>[]>;
189
85
  listHoldingTransactions(partyId: PartyId, afterOffset?: number, beforeOffset?: number): Promise<PrettyTransactions>;
190
86
  getTransactionById(updateId: string, partyId: PartyId): Promise<Transaction>;
191
87
  getTransferObjectsById(updateId: string, partyId: PartyId): Promise<TransferObject[]>;
192
88
  getInputHoldingsCids(sender: PartyId, inputUtxos?: string[], amount?: Decimal): Promise<string[]>;
193
89
  createDelegateProxyTransfer(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, // TODO (#907): replace with registry call
194
- instrumentId: string, registryUrl: string, featuredAppRightCid: string, proxyCid: string, beneficiaries: Beneficiaries[], inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata): Promise<[ExerciseCommand, DisclosedContract[]]>;
195
- exerciseDelegateProxyTransferInstructionAccept(exchangeParty: PartyId, proxyCid: string, transferInstructionCid: string, registryUrl: string, featuredAppRightCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
196
- 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;
197
93
  }
198
- export {};
199
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,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,QAAQ,EAGb,KAAK,aAAa,EAClB,KAAK,SAAS,EACjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAEH,KAAK,mBAAmB,EAC3B,MAAM,0CAA0C,CAAA;AACjD,OAAO,KAAK,EAAc,MAAM,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE7E,OAAO,EAIH,KAAK,cAAc,EAEnB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,cAAc,EACtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAC3E,OAAO,KAAK,EACR,sBAAsB,EACtB,GAAG,EACN,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE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EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,GACjB,OAAO,CAAC,WAAW,CAAC;IA6BjB,sBAAsB,CACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,GACjB,OAAO,CAAC,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,mB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S,GAAG;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,GAAG,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;IACd,YAAY,EAAE,iBAAiB,CAAA;CAClC,CAAA"}
@@ -0,0 +1,33 @@
1
+ import { type AllocationFactory_Allocate, type AllocationSpecification, type OffLedger } from '@canton-network/core-token-standard';
2
+ import type { 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
+ constructor(core: CoreService);
8
+ buildAllocationFactoryChoiceArgs(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, inputUtxos?: string[], requestedAt?: string): Promise<AllocationFactory_Allocate>;
9
+ fetchAllocationFactoryChoiceContext(registryUrl: URL, choiceArgs: AllocationFactory_Allocate, excludeDebugFields?: boolean): Promise<OffLedger.AllocationInstructionV1.components['schemas']['FactoryWithChoiceContext']>;
10
+ createAllocationInstructionFromContext(factoryId: string, choiceArgs: AllocationFactory_Allocate, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
11
+ createAllocationInstruction(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, registryUrl: URL, inputUtxos?: string[], requestedAt?: string, prefetchedRegistryChoiceContext?: {
12
+ factoryId: string;
13
+ choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext'];
14
+ }): Promise<[ExerciseCommand, DisclosedContract[]]>;
15
+ private buildAllocationExerciseWithContext;
16
+ fetchExecuteTransferChoiceContext(allocationId: string, registryUrl: URL): Promise<{
17
+ choiceContextData: Record<string, never>;
18
+ disclosedContracts: OffLedger.AllocationV1.components["schemas"]["DisclosedContract"][];
19
+ }>;
20
+ createExecuteTransferAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
21
+ createExecuteTransferAllocation(allocationCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
22
+ fetchWithdrawAllocationChoiceContext(allocationCid: string, registryUrl: URL): Promise<OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']>;
23
+ createWithdrawAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
24
+ createWithdrawAllocation(allocationCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
25
+ fetchCancelAllocationChoiceContext(allocationCid: string, registryUrl: URL): Promise<OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']>;
26
+ createCancelAllocationFromContext(allocationCid: string, choiceContext: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
27
+ createCancelAllocation(allocationCid: string, registryUrl: URL, prefetchedRegistryChoiceContext?: OffLedger.AllocationInstructionV1.components['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
28
+ createWithdrawAllocationInstruction(allocationInstructionCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
29
+ createUpdateAllocationInstruction(allocationInstructionCid: string, extraActors?: PartyId[], extraArgsContext?: Record<string, unknown>, extraArgsMeta?: Record<string, unknown>): Promise<[ExerciseCommand, DisclosedContract[]]>;
30
+ createRejectAllocationRequest(allocationRequestCid: string, actor: PartyId): Promise<[ExerciseCommand, DisclosedContract[]]>;
31
+ createWithdrawAllocationRequest(allocationRequestCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
32
+ }
33
+ //# sourceMappingURL=allocation-service.d.ts.map
@@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} 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 logger;
8
+ constructor(core: CoreService);
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;AAE5C,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAErE,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;IAOZ,OAAO,CAAC,IAAI;IANxB,OAAO,CAAC,MAAM,CAIZ;gBAEkB,IAAI,EAAE,WAAW;IAExB,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,EACjB,UAA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,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;IA0B5C,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 } 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 logger;
19
+ constructor(core: CoreService);
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,4BAA4B,CAAA;AAIzD,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;IACjC,WAAW,CAAC,EAAE,MAAM,CAAA;CACv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,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;;uBA1IhB,4CAAmB;;IAoJjB,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 { 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 logger;
9
+ constructor(core: CoreService);
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,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGrE,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;AAGrD,qBAAa,iBAAiB;IAOd,OAAO,CAAC,IAAI;IANxB,OAAO,CAAC,MAAM,CAIZ;gBAEkB,IAAI,EAAE,WAAW;IAExB,uBAAuB,CAAC,IAA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