@canton-network/core-ledger-client 0.11.0 → 0.13.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.
- package/dist/ledger-api-utils.d.ts +16 -1
- package/dist/ledger-api-utils.d.ts.map +1 -1
- package/dist/ledger-api-utils.js +97 -17
- package/dist/ledger-client.d.ts +12 -2
- package/dist/ledger-client.d.ts.map +1 -1
- package/dist/ledger-client.js +52 -0
- package/dist/token-standard-service.d.ts +109 -27
- package/dist/token-standard-service.d.ts.map +1 -1
- package/dist/token-standard-service.js +633 -357
- package/dist/topology-write-service.d.ts +11 -1
- package/dist/topology-write-service.d.ts.map +1 -1
- package/dist/topology-write-service.js +37 -6
- package/dist/txparse/parser.js +1 -1
- package/dist/txparse/parser.test.js +6 -6
- package/package.json +7 -6
|
@@ -2,6 +2,8 @@ import { LedgerClient } from './ledger-client.js';
|
|
|
2
2
|
import { Holding, TransferInstructionView } from './txparse/types.js';
|
|
3
3
|
import { Types } from './ledger-client.js';
|
|
4
4
|
import { PartyId } from '@canton-network/core-types';
|
|
5
|
+
import { Logger } from '@canton-network/core-types';
|
|
6
|
+
import { ErrorInfo, RetryInfo } from '@canton-network/core-ledger-proto';
|
|
5
7
|
type TransactionFilter = Types['TransactionFilter'];
|
|
6
8
|
type EventFormat = Types['EventFormat'];
|
|
7
9
|
type CreatedEvent = Types['CreatedEvent'];
|
|
@@ -56,8 +58,21 @@ export declare function submitExerciseCommand(ledgerClient: LedgerClient, exerci
|
|
|
56
58
|
* the completion with the given (userId, commandId, submissionId) is returned.
|
|
57
59
|
* Then returns the updateId, synchronizerId and recordTime of that completion.
|
|
58
60
|
*/
|
|
59
|
-
export declare function awaitCompletion(ledgerClient: LedgerClient, ledgerEnd: number, partyId: PartyId, userId: string,
|
|
61
|
+
export declare function awaitCompletion(ledgerClient: LedgerClient, ledgerEnd: number, partyId: PartyId, userId: string, commandIdOrSubmissionId: string): Promise<Completion>;
|
|
60
62
|
export declare function promiseWithTimeout<T>(promise: Promise<T>, timeoutMs: number, errorMessage: string): Promise<T>;
|
|
63
|
+
export type retryableOptions = {
|
|
64
|
+
retries: number;
|
|
65
|
+
delayMs: number;
|
|
66
|
+
cantonErrorKeys: string[];
|
|
67
|
+
};
|
|
68
|
+
export declare const defaultRetryableOptions: retryableOptions;
|
|
69
|
+
export declare function retryable<T>(fn: () => Promise<T>, retryableOptions: retryableOptions, logger?: Logger): Promise<T>;
|
|
61
70
|
export declare const isJsCantonError: (e: unknown) => e is Types["JsCantonError"];
|
|
71
|
+
export declare const asGrpcError: (e: unknown) => {
|
|
72
|
+
code: number;
|
|
73
|
+
message: string;
|
|
74
|
+
errorInfo: ErrorInfo | undefined;
|
|
75
|
+
retryInfo: RetryInfo | undefined;
|
|
76
|
+
};
|
|
62
77
|
export {};
|
|
63
78
|
//# sourceMappingURL=ledger-api-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-api-utils.d.ts","sourceRoot":"","sources":["../src/ledger-api-utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"ledger-api-utils.d.ts","sourceRoot":"","sources":["../src/ledger-api-utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAKpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4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AU,CAAC,CAmDrB;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EACtC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACrB,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,MAAM,EAAE,CAAA;CAC5B,CAAA;AACD,eAAO,MAAM,uBAAuB,EAAE,gBAWrC,CAAA;AAED,wBAAsB,SAAS,CAAC,CAAC,EAC7B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,CAAC,CAAC,CA0BZ;AAGD,eAAO,MAAM,eAAe,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,KAAK,CAAC,eAAe,CACS,CAAA;AAEhF,eAAO,MAAM,WAAW,GACpB,GAAG,OAAO,KACX;IACC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;CAoDnC,CAAA"}
|
package/dist/ledger-api-utils.js
CHANGED
|
@@ -5,6 +5,7 @@ import { randomUUID } from 'node:crypto';
|
|
|
5
5
|
import { readFileSync } from 'node:fs';
|
|
6
6
|
import { AllKnownMetaKeys, matchInterfaceIds } from './constants.js';
|
|
7
7
|
import { HOLDING_INTERFACE_ID, TRANSFER_INSTRUCTION_INTERFACE_ID, } from '@canton-network/core-token-standard';
|
|
8
|
+
import { ErrorInfo, RetryInfo } from '@canton-network/core-ledger-proto';
|
|
8
9
|
export function TransactionFilterBySetup(interfaceNames, options = { includeWildcard: false, isMasterUser: false }) {
|
|
9
10
|
const interfaceArrayed = Array.isArray(interfaceNames)
|
|
10
11
|
? interfaceNames
|
|
@@ -188,6 +189,7 @@ export function removeParsedMetaKeys(meta) {
|
|
|
188
189
|
values: Object.fromEntries(Object.entries(meta?.values || {}).filter(([k]) => !AllKnownMetaKeys.includes(k))),
|
|
189
190
|
};
|
|
190
191
|
}
|
|
192
|
+
//TODO: Investigate, this method is not used anywhere ?
|
|
191
193
|
export async function submitExerciseCommand(ledgerClient, exerciseCommand, disclosedContracts, partyId, userId, publicKeyPath, privateKeyPath) {
|
|
192
194
|
const submissionId = randomUUID();
|
|
193
195
|
const commandId = `tscli-${randomUUID()}`;
|
|
@@ -195,7 +197,7 @@ export async function submitExerciseCommand(ledgerClient, exerciseCommand, discl
|
|
|
195
197
|
ExerciseCommand: exerciseCommand,
|
|
196
198
|
};
|
|
197
199
|
const synchronizerId = getSynchronizerIdFromDisclosedContracts(disclosedContracts);
|
|
198
|
-
const prepared = await ledgerClient.
|
|
200
|
+
const prepared = await ledgerClient.postWithRetry('/v2/interactive-submission/prepare', {
|
|
199
201
|
actAs: [partyId],
|
|
200
202
|
readAs: [partyId],
|
|
201
203
|
userId: userId,
|
|
@@ -225,8 +227,8 @@ export async function submitExerciseCommand(ledgerClient, exerciseCommand, discl
|
|
|
225
227
|
const deduplicationPeriod = {
|
|
226
228
|
Empty: {},
|
|
227
229
|
};
|
|
228
|
-
const ledgerEnd = await ledgerClient.
|
|
229
|
-
await ledgerClient.
|
|
230
|
+
const ledgerEnd = await ledgerClient.getWithRetry('/v2/state/ledger-end');
|
|
231
|
+
await ledgerClient.postWithRetry('/v2/interactive-submission/execute', {
|
|
230
232
|
userId,
|
|
231
233
|
submissionId,
|
|
232
234
|
preparedTransaction: prepared.preparedTransaction,
|
|
@@ -234,7 +236,7 @@ export async function submitExerciseCommand(ledgerClient, exerciseCommand, discl
|
|
|
234
236
|
partySignatures,
|
|
235
237
|
deduplicationPeriod,
|
|
236
238
|
});
|
|
237
|
-
const completionPromise = awaitCompletion(ledgerClient, ledgerEnd.offset, partyId, userId, commandId
|
|
239
|
+
const completionPromise = awaitCompletion(ledgerClient, ledgerEnd.offset, partyId, userId, commandId);
|
|
238
240
|
return promiseWithTimeout(completionPromise, 45_000 * 2, // 45s
|
|
239
241
|
`Timed out getting completion for submission with userId=${userId}, commandId=${commandId}, submissionId=${submissionId}.
|
|
240
242
|
The submission might have succeeded or failed, but it couldn't be determined in time.`);
|
|
@@ -291,15 +293,12 @@ const COMPLETIONS_STREAM_IDLE_TIMEOUT_MS = '1000';
|
|
|
291
293
|
* the completion with the given (userId, commandId, submissionId) is returned.
|
|
292
294
|
* Then returns the updateId, synchronizerId and recordTime of that completion.
|
|
293
295
|
*/
|
|
294
|
-
export async function awaitCompletion(ledgerClient, ledgerEnd, partyId, userId,
|
|
295
|
-
|
|
296
|
-
throw new Error('Either commandId or submissionId must be provided');
|
|
297
|
-
}
|
|
298
|
-
const responses = await ledgerClient.post('/v2/commands/completions', {
|
|
296
|
+
export async function awaitCompletion(ledgerClient, ledgerEnd, partyId, userId, commandIdOrSubmissionId) {
|
|
297
|
+
const responses = await ledgerClient.postWithRetry('/v2/commands/completions', {
|
|
299
298
|
userId,
|
|
300
299
|
parties: [partyId],
|
|
301
300
|
beginExclusive: ledgerEnd,
|
|
302
|
-
}, {
|
|
301
|
+
}, defaultRetryableOptions, {
|
|
303
302
|
query: {
|
|
304
303
|
limit: COMPLETIONS_LIMIT,
|
|
305
304
|
stream_idle_timeout_ms: COMPLETIONS_STREAM_IDLE_TIMEOUT_MS,
|
|
@@ -312,18 +311,18 @@ export async function awaitCompletion(ledgerClient, ledgerEnd, partyId, userId,
|
|
|
312
311
|
return false;
|
|
313
312
|
if (completion.value.userId !== userId)
|
|
314
313
|
return false;
|
|
315
|
-
if (
|
|
316
|
-
return
|
|
317
|
-
if (
|
|
318
|
-
return
|
|
319
|
-
return
|
|
314
|
+
if (completion.value.commandId === commandIdOrSubmissionId)
|
|
315
|
+
return true;
|
|
316
|
+
if (completion.value.submissionId === commandIdOrSubmissionId)
|
|
317
|
+
return true;
|
|
318
|
+
return false;
|
|
320
319
|
});
|
|
321
320
|
if (wantedCompletion) {
|
|
322
321
|
const completion = wantedCompletion.completionResponse.Completion;
|
|
323
322
|
const status = completion.value.status;
|
|
324
323
|
if (status && status.code !== 0) {
|
|
325
324
|
// status.code is 0 for success
|
|
326
|
-
throw
|
|
325
|
+
throw asGrpcError(status);
|
|
327
326
|
}
|
|
328
327
|
return completion.value;
|
|
329
328
|
}
|
|
@@ -331,7 +330,7 @@ export async function awaitCompletion(ledgerClient, ledgerEnd, partyId, userId,
|
|
|
331
330
|
const lastCompletion = completions[completions.length - 1];
|
|
332
331
|
const newLedgerEnd = lastCompletion?.completionResponse.Completion.value.offset;
|
|
333
332
|
return awaitCompletion(ledgerClient, newLedgerEnd || ledgerEnd, // !newLedgerEnd implies response was empty
|
|
334
|
-
partyId, userId,
|
|
333
|
+
partyId, userId, commandIdOrSubmissionId);
|
|
335
334
|
}
|
|
336
335
|
}
|
|
337
336
|
export async function promiseWithTimeout(promise, timeoutMs, errorMessage) {
|
|
@@ -348,5 +347,86 @@ export async function promiseWithTimeout(promise, timeoutMs, errorMessage) {
|
|
|
348
347
|
}
|
|
349
348
|
}
|
|
350
349
|
}
|
|
350
|
+
export const defaultRetryableOptions = {
|
|
351
|
+
retries: 5,
|
|
352
|
+
delayMs: 3000,
|
|
353
|
+
cantonErrorKeys: [
|
|
354
|
+
'SEQUENCER_REQUEST_FAILED',
|
|
355
|
+
'SEQUENCER_BACKPRESSURE',
|
|
356
|
+
'SUBMISSION_ALREADY_IN_FLIGHT',
|
|
357
|
+
'LOCAL_VERDICT_TIMEOUT',
|
|
358
|
+
'NOT_SEQUENCED_TIMEOUT',
|
|
359
|
+
'NO_VIEW_WITH_VALID_RECIPIENTS',
|
|
360
|
+
],
|
|
361
|
+
};
|
|
362
|
+
export async function retryable(fn, retryableOptions, logger) {
|
|
363
|
+
for (let attempts = 1; attempts <= retryableOptions.retries; attempts++) {
|
|
364
|
+
try {
|
|
365
|
+
return await fn();
|
|
366
|
+
}
|
|
367
|
+
catch (err) {
|
|
368
|
+
const grpcError = asGrpcError(err);
|
|
369
|
+
const message = grpcError.message;
|
|
370
|
+
const shouldRetry = retryableOptions.cantonErrorKeys.length === 0 ||
|
|
371
|
+
retryableOptions.cantonErrorKeys.some((key) => message.includes(key));
|
|
372
|
+
if (attempts < retryableOptions.retries && shouldRetry) {
|
|
373
|
+
logger?.warn(`Caught retryiable error: ${message}. Retrying attempt ${attempts} of ${retryableOptions.retries}...`);
|
|
374
|
+
await new Promise((res) => setTimeout(res, retryableOptions.delayMs));
|
|
375
|
+
// continue to next attempt
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
throw grpcError;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
throw new Error('retryable: Exceeded maximum retries without throwing.');
|
|
383
|
+
}
|
|
351
384
|
// Helper for differentiating ledger errors from others and satisfying TS when checking error properties
|
|
352
385
|
export const isJsCantonError = (e) => typeof e === 'object' && e !== null && 'status' in e && 'errorCategory' in e;
|
|
386
|
+
export const asGrpcError = (e) => {
|
|
387
|
+
let errorInfo = undefined;
|
|
388
|
+
let retryInfo = undefined;
|
|
389
|
+
let code = 500;
|
|
390
|
+
let message = e?.message || '';
|
|
391
|
+
if (typeof e === 'object' && e !== null && 'cause' in e) {
|
|
392
|
+
message = e.cause;
|
|
393
|
+
}
|
|
394
|
+
else if (typeof e === 'object' && e !== null && 'message' in e) {
|
|
395
|
+
message = e.message;
|
|
396
|
+
}
|
|
397
|
+
if (typeof e === 'object' &&
|
|
398
|
+
e !== null &&
|
|
399
|
+
'code' in e &&
|
|
400
|
+
'message' in e &&
|
|
401
|
+
'details' in e &&
|
|
402
|
+
Array.isArray(e.details)) {
|
|
403
|
+
code = e.code;
|
|
404
|
+
message = e.message;
|
|
405
|
+
for (const detail of e.details) {
|
|
406
|
+
if (detail.typeUrl === 'type.googleapis.com/google.rpc.ErrorInfo' &&
|
|
407
|
+
typeof detail.value === 'string') {
|
|
408
|
+
try {
|
|
409
|
+
errorInfo = ErrorInfo.fromBinary(Buffer.from(detail.value, 'base64'));
|
|
410
|
+
}
|
|
411
|
+
catch {
|
|
412
|
+
//if parsing fails, we skip adding ErrorInfo
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
else if (detail.typeUrl === 'type.googleapis.com/google.rpc.RetryInfo' &&
|
|
416
|
+
typeof detail.value === 'string') {
|
|
417
|
+
try {
|
|
418
|
+
retryInfo = RetryInfo.fromBinary(Buffer.from(detail.value, 'base64'));
|
|
419
|
+
}
|
|
420
|
+
catch {
|
|
421
|
+
//if parsing fails, we skip adding RetryInfo
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
// Not a gRPC error, rethrow
|
|
428
|
+
throw e;
|
|
429
|
+
}
|
|
430
|
+
// Fallback: just return the error message
|
|
431
|
+
return { code: code, message: message, errorInfo, retryInfo };
|
|
432
|
+
};
|
package/dist/ledger-client.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as v3_4 from './generated-clients/openapi-3.4.0-SNAPSHOT.js';
|
|
|
3
3
|
import { FetchOptions } from 'openapi-fetch';
|
|
4
4
|
import { Logger } from 'pino';
|
|
5
5
|
import { PartyId } from '@canton-network/core-types';
|
|
6
|
+
import { retryableOptions } from './ledger-api-utils.js';
|
|
6
7
|
export declare const supportedVersions: readonly ["3.3", "3.4"];
|
|
7
8
|
export type SupportedVersions = (typeof supportedVersions)[number];
|
|
8
9
|
export type Types = v3_3.components['schemas'] | v3_4.components['schemas'];
|
|
@@ -95,18 +96,27 @@ export declare class LedgerClient {
|
|
|
95
96
|
* @returns A promise that resolves when the rights have been granted.
|
|
96
97
|
*/
|
|
97
98
|
grantUserRights(userId: string, partyId: PartyId): Promise<void>;
|
|
99
|
+
grantRights(userId: string, readAs?: PartyId[], actAs?: PartyId[]): Promise<void>;
|
|
98
100
|
/** TODO: simplify once 3.4 snapshot contains this endpoint */
|
|
99
101
|
allocateExternalParty(synchronizerId: string, onboardingTransactions: OnboardingTransactions, multiHashSignatures: MultiHashSignatures): Promise<AllocateExternalPartyResponse>;
|
|
100
102
|
/** TODO: simplify once 3.4 snapshot contains this endpoint */
|
|
101
103
|
generateTopology(synchronizerId: string, publicKey: string, partyHint: string, localParticipantObservationOnly?: boolean, confirmationThreshold?: number, otherConfirmingParticipantUids?: string[]): Promise<GenerateTransactionResponse>;
|
|
102
|
-
|
|
104
|
+
postWithRetry<Path extends PostEndpoint>(path: Path, body: PostRequest<Path>, retryOptions?: retryableOptions, params?: {
|
|
103
105
|
path?: Record<string, string>;
|
|
104
106
|
query?: Record<string, string>;
|
|
105
107
|
}, additionalOptions?: ExtraPostOpts): Promise<PostResponse<Path>>;
|
|
106
|
-
|
|
108
|
+
getWithRetry<Path extends GetEndpoint>(path: Path, retryOptions?: retryableOptions, params?: {
|
|
107
109
|
path?: Record<string, string>;
|
|
108
110
|
query?: Record<string, string>;
|
|
109
111
|
}): Promise<GetResponse<Path>>;
|
|
112
|
+
/**
|
|
113
|
+
* @deprecated use postWithRetry instead, should be made private
|
|
114
|
+
*/
|
|
115
|
+
private post;
|
|
116
|
+
/**
|
|
117
|
+
* @deprecated use getWithRetry instead, should be made private
|
|
118
|
+
*/
|
|
119
|
+
private get;
|
|
110
120
|
private valueOrError;
|
|
111
121
|
}
|
|
112
122
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-client.d.ts","sourceRoot":"","sources":["../src/ledger-client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,+CAA+C,CAAA;AAErE,OAAO,KAAK,IAAI,MAAM,+CAA+C,CAAA;AACrE,OAAqB,EAAU,YAAY,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,4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AU,EACjC,8BAA8B,GAAE,MAAM,EAAO,GAC9C,OAAO,CAAC,2BAA2B,CAAC;IAkC1B,aAAa,CAAC,IAAI,SAAS,YAAY,EAChD,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,EACvB,YAAY,GAAE,gBAA0C,EACxD,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACjC,EACD,iBAAiB,CAAC,EAAE,aAAa,GAClC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAQjB,YAAY,CAAC,IAAI,SAAS,WAAW,EAC9C,IAAI,EAAE,IAAI,EACV,YAAY,GAAE,gBAA0C,EACxD,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACjC,GACF,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAQ7B;;OAEG;YACW,IAAI;IAiBlB;;OAEG;YACW,GAAG;YAcH,YAAY;CAU7B"}
|
package/dist/ledger-client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import createClient from 'openapi-fetch';
|
|
4
|
+
import { defaultRetryableOptions, retryable, } from './ledger-api-utils.js';
|
|
4
5
|
export const supportedVersions = ['3.3', '3.4'];
|
|
5
6
|
export class LedgerClient {
|
|
6
7
|
// privately manage the active connected version and associated client codegen
|
|
@@ -203,6 +204,45 @@ export class LedgerClient {
|
|
|
203
204
|
}
|
|
204
205
|
return;
|
|
205
206
|
}
|
|
207
|
+
async grantRights(userId, readAs, actAs) {
|
|
208
|
+
await this.init();
|
|
209
|
+
const rights = [];
|
|
210
|
+
for (const partyId of readAs ?? []) {
|
|
211
|
+
rights.push({
|
|
212
|
+
kind: {
|
|
213
|
+
CanReadAs: {
|
|
214
|
+
value: {
|
|
215
|
+
party: partyId,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
for (const partyId of actAs ?? []) {
|
|
222
|
+
rights.push({
|
|
223
|
+
kind: {
|
|
224
|
+
CanActAs: {
|
|
225
|
+
value: {
|
|
226
|
+
party: partyId,
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
const result = await this.post('/v2/users/{user-id}/rights', {
|
|
233
|
+
identityProviderId: '',
|
|
234
|
+
userId,
|
|
235
|
+
rights,
|
|
236
|
+
}, {
|
|
237
|
+
path: {
|
|
238
|
+
'user-id': userId,
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
if (!result.newlyGrantedRights) {
|
|
242
|
+
throw new Error('Failed to grant user rights');
|
|
243
|
+
}
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
206
246
|
/** TODO: simplify once 3.4 snapshot contains this endpoint */
|
|
207
247
|
async allocateExternalParty(synchronizerId, onboardingTransactions, multiHashSignatures) {
|
|
208
248
|
await this.init();
|
|
@@ -243,6 +283,15 @@ export class LedgerClient {
|
|
|
243
283
|
const resp = await client.POST('/v2/parties/external/generate-topology', { body });
|
|
244
284
|
return this.valueOrError(resp);
|
|
245
285
|
}
|
|
286
|
+
async postWithRetry(path, body, retryOptions = defaultRetryableOptions, params, additionalOptions) {
|
|
287
|
+
return await retryable(() => this.post(path, body, params, additionalOptions), retryOptions, this.logger);
|
|
288
|
+
}
|
|
289
|
+
async getWithRetry(path, retryOptions = defaultRetryableOptions, params) {
|
|
290
|
+
return await retryable(() => this.get(path, params), retryOptions, this.logger);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @deprecated use postWithRetry instead, should be made private
|
|
294
|
+
*/
|
|
246
295
|
async post(path, body, params,
|
|
247
296
|
// needed when posting to /packages, so content type and jsonification of bytes can be overriden
|
|
248
297
|
additionalOptions) {
|
|
@@ -251,6 +300,9 @@ export class LedgerClient {
|
|
|
251
300
|
const resp = await this.currentClient.POST(path, options);
|
|
252
301
|
return this.valueOrError(resp);
|
|
253
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* @deprecated use getWithRetry instead, should be made private
|
|
305
|
+
*/
|
|
254
306
|
async get(path, params) {
|
|
255
307
|
await this.init();
|
|
256
308
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- (cant align this with openapi-fetch generics :shrug:)
|
|
@@ -1,20 +1,117 @@
|
|
|
1
|
-
import { AllocationSpecification,
|
|
1
|
+
import { TokenStandardClient, AllocationFactory_Allocate, AllocationSpecification, Transfer, transferInstructionRegistryTypes, allocationInstructionRegistryTypes, ExtraArgs, Metadata, Beneficiaries } from '@canton-network/core-token-standard';
|
|
2
2
|
import { Logger, PartyId } from '@canton-network/core-types';
|
|
3
3
|
import { LedgerClient } from './ledger-client.js';
|
|
4
4
|
import { PrettyContract, ViewValue } from './txparse/types.js';
|
|
5
5
|
import type { PrettyTransactions, Transaction } from './txparse/types.js';
|
|
6
6
|
import { Types } from './ledger-client.js';
|
|
7
|
-
import { ScanProxyClient } from '@canton-network/core-splice-client';
|
|
7
|
+
import { ScanProxyClient, ScanProxyTypes } from '@canton-network/core-splice-client';
|
|
8
8
|
export type ExerciseCommand = Types['ExerciseCommand'];
|
|
9
9
|
export type DisclosedContract = Types['DisclosedContract'];
|
|
10
|
-
|
|
10
|
+
type JsGetUpdatesResponse = Types['JsGetUpdatesResponse'];
|
|
11
|
+
type JsGetTransactionResponse = Types['JsGetTransactionResponse'];
|
|
12
|
+
type CreateTransferChoiceArgs = {
|
|
13
|
+
expectedAdmin: PartyId;
|
|
14
|
+
transfer: Transfer;
|
|
15
|
+
extraArgs: ExtraArgs;
|
|
16
|
+
};
|
|
17
|
+
declare class CoreService {
|
|
11
18
|
private ledgerClient;
|
|
12
19
|
private scanProxyClient;
|
|
13
20
|
private readonly logger;
|
|
14
21
|
private accessToken;
|
|
15
22
|
private readonly isMasterUser;
|
|
16
23
|
constructor(ledgerClient: LedgerClient, scanProxyClient: ScanProxyClient, logger: Logger, accessToken: string, isMasterUser: boolean);
|
|
17
|
-
|
|
24
|
+
getTokenStandardClient(registryUrl: string): TokenStandardClient;
|
|
25
|
+
getInputHoldingsCids(sender: PartyId, inputUtxos?: string[]): Promise<string[]>;
|
|
26
|
+
listContractsByInterface<T = ViewValue>(interfaceId: string, partyId?: PartyId): Promise<PrettyContract<T>[]>;
|
|
27
|
+
toPrettyTransactions(updates: JsGetUpdatesResponse[], partyId: PartyId, ledgerClient: LedgerClient): Promise<PrettyTransactions>;
|
|
28
|
+
toPrettyTransaction(getTransactionResponse: JsGetTransactionResponse, partyId: PartyId, ledgerClient: LedgerClient): Promise<Transaction>;
|
|
29
|
+
toPrettyTransactionsPerParty(updates: JsGetUpdatesResponse[], parties: PartyId[], ledgerClient: LedgerClient): Promise<Map<PartyId, PrettyTransactions>>;
|
|
30
|
+
private toPrettyContract;
|
|
31
|
+
getActiveOpenMiningRound(): Promise<ScanProxyTypes['Contract'] | null>;
|
|
32
|
+
}
|
|
33
|
+
declare class AllocationService {
|
|
34
|
+
private core;
|
|
35
|
+
private readonly logger;
|
|
36
|
+
constructor(core: CoreService, logger: Logger);
|
|
37
|
+
buildAllocationFactoryChoiceArgs(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, inputUtxos?: string[], requestedAt?: string): Promise<AllocationFactory_Allocate>;
|
|
38
|
+
fetchAllocationFactoryChoiceContext(registryUrl: string, choiceArgs: AllocationFactory_Allocate): Promise<allocationInstructionRegistryTypes['schemas']['FactoryWithChoiceContext']>;
|
|
39
|
+
createAllocationInstructionFromContext(factoryId: string, choiceArgs: AllocationFactory_Allocate, choiceContext: allocationInstructionRegistryTypes['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
40
|
+
createAllocationInstruction(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, registryUrl: string, inputUtxos?: string[], requestedAt?: string, prefetchedRegistryChoiceContext?: {
|
|
41
|
+
factoryId: string;
|
|
42
|
+
choiceContext: allocationInstructionRegistryTypes['schemas']['ChoiceContext'];
|
|
43
|
+
}): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
44
|
+
private buildAllocationExerciseWithContext;
|
|
45
|
+
fetchExecuteTransferChoiceContext(allocationId: string, registryUrl: string): Promise<{
|
|
46
|
+
choiceContextData: Record<string, never>;
|
|
47
|
+
disclosedContracts: import("@canton-network/core-token-standard").allocationRegistryTypes["schemas"]["DisclosedContract"][];
|
|
48
|
+
}>;
|
|
49
|
+
createExecuteTransferAllocationFromContext(allocationCid: string, choiceContext: allocationInstructionRegistryTypes['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
|
|
50
|
+
createExecuteTransferAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: allocationInstructionRegistryTypes['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
51
|
+
fetchWithdrawAllocationChoiceContext(allocationCid: string, registryUrl: string): Promise<allocationInstructionRegistryTypes['schemas']['ChoiceContext']>;
|
|
52
|
+
createWithdrawAllocationFromContext(allocationCid: string, choiceContext: allocationInstructionRegistryTypes['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
|
|
53
|
+
createWithdrawAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: allocationInstructionRegistryTypes['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
54
|
+
fetchCancelAllocationChoiceContext(allocationCid: string, registryUrl: string): Promise<allocationInstructionRegistryTypes['schemas']['ChoiceContext']>;
|
|
55
|
+
createCancelAllocationFromContext(allocationCid: string, choiceContext: allocationInstructionRegistryTypes['schemas']['ChoiceContext']): [ExerciseCommand, DisclosedContract[]];
|
|
56
|
+
createCancelAllocation(allocationCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: allocationInstructionRegistryTypes['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
57
|
+
createWithdrawAllocationInstruction(allocationInstructionCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
58
|
+
createUpdateAllocationInstruction(allocationInstructionCid: string, extraActors?: PartyId[], extraArgsContext?: Record<string, unknown>, extraArgsMeta?: Record<string, unknown>): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
59
|
+
createRejectAllocationRequest(allocationRequestCid: string, actor: PartyId): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
60
|
+
createWithdrawAllocationRequest(allocationRequestCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
61
|
+
}
|
|
62
|
+
declare class TransferService {
|
|
63
|
+
private core;
|
|
64
|
+
private readonly logger;
|
|
65
|
+
constructor(core: CoreService, logger: Logger);
|
|
66
|
+
buildTransferChoiceArgs(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, instrumentId: string, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata): Promise<CreateTransferChoiceArgs>;
|
|
67
|
+
fetchTransferFactoryChoiceContext(registryUrl: string, choiceArgs: CreateTransferChoiceArgs): Promise<transferInstructionRegistryTypes['schemas']['TransferFactoryWithChoiceContext']>;
|
|
68
|
+
createTransferFromContext(factoryId: string, choiceArgs: CreateTransferChoiceArgs, choiceContext: transferInstructionRegistryTypes['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
69
|
+
createTransfer(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, // TODO (#907): replace with registry call
|
|
70
|
+
instrumentId: string, registryUrl: string, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata, prefetchedRegistryChoiceContext?: {
|
|
71
|
+
factoryId: string;
|
|
72
|
+
choiceContext: transferInstructionRegistryTypes['schemas']['ChoiceContext'];
|
|
73
|
+
}): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
74
|
+
fetchAcceptTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
|
|
75
|
+
choiceContextData: unknown;
|
|
76
|
+
disclosedContracts: DisclosedContract[];
|
|
77
|
+
}>;
|
|
78
|
+
createAcceptTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
|
|
79
|
+
choiceContextData: unknown;
|
|
80
|
+
disclosedContracts: DisclosedContract[];
|
|
81
|
+
}): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
82
|
+
exerciseDelegateProxyTransferInstructionAccept(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
83
|
+
exerciseDelegateProxyTransferInstructionReject(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
84
|
+
exerciseDelegateProxyTransferInstructioWithdraw(proxyCid: string, transferInstructionCid: string, registryUrl: URL, featuredAppRightCid: string, beneficiaries: Beneficiaries[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
85
|
+
createAcceptTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: transferInstructionRegistryTypes['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
86
|
+
fetchRejectTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
|
|
87
|
+
choiceContextData: unknown;
|
|
88
|
+
disclosedContracts: DisclosedContract[];
|
|
89
|
+
}>;
|
|
90
|
+
createRejectTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
|
|
91
|
+
choiceContextData: unknown;
|
|
92
|
+
disclosedContracts: DisclosedContract[];
|
|
93
|
+
}): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
94
|
+
createRejectTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: transferInstructionRegistryTypes['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
95
|
+
fetchWithdrawTransferInstructionChoiceContext(transferInstructionCid: string, registryUrl: string): Promise<{
|
|
96
|
+
choiceContextData: unknown;
|
|
97
|
+
disclosedContracts: DisclosedContract[];
|
|
98
|
+
}>;
|
|
99
|
+
createWithdrawTransferInstructionFromContext(transferInstructionCid: string, choiceContext: {
|
|
100
|
+
choiceContextData: unknown;
|
|
101
|
+
disclosedContracts: DisclosedContract[];
|
|
102
|
+
}): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
103
|
+
createWithdrawTransferInstruction(transferInstructionCid: string, registryUrl: string, prefetchedRegistryChoiceContext?: transferInstructionRegistryTypes['schemas']['ChoiceContext']): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
104
|
+
}
|
|
105
|
+
export declare class TokenStandardService {
|
|
106
|
+
private ledgerClient;
|
|
107
|
+
private scanProxyClient;
|
|
108
|
+
private logger;
|
|
109
|
+
private accessToken;
|
|
110
|
+
private readonly isMasterUser;
|
|
111
|
+
private readonly core;
|
|
112
|
+
readonly allocation: AllocationService;
|
|
113
|
+
readonly transfer: TransferService;
|
|
114
|
+
constructor(ledgerClient: LedgerClient, scanProxyClient: ScanProxyClient, logger: Logger, accessToken: string, isMasterUser: boolean);
|
|
18
115
|
getTransferPreApprovalByParty(partyId: PartyId): Promise<{
|
|
19
116
|
contract: import("@canton-network/core-splice-client/dist/generated-clients/scan-proxy.js").components["schemas"]["Contract"];
|
|
20
117
|
domain_id?: string;
|
|
@@ -33,36 +130,21 @@ export declare class TokenStandardService {
|
|
|
33
130
|
totalSupply?: string;
|
|
34
131
|
totalSupplyAsOf?: string;
|
|
35
132
|
decimals: number;
|
|
36
|
-
supportedApis: import("@canton-network/core-token-standard
|
|
133
|
+
supportedApis: import("@canton-network/core-token-standard").metadataRegistryTypes["schemas"]["SupportedApis"];
|
|
37
134
|
}>;
|
|
38
135
|
getInstrumentAdmin(registryUrl: string): Promise<string | undefined>;
|
|
39
|
-
createAcceptTransferInstruction(transferInstructionCid: string, registryUrl: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
40
|
-
createRejectTransferInstruction(transferInstructionCid: string, registryUrl: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
41
|
-
createWithdrawTransferInstruction(transferInstructionCid: string, registryUrl: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
42
|
-
createAllocationInstruction(allocationSpecification: AllocationSpecification, expectedAdmin: PartyId, registryUrl: string, inputUtxos?: string[], requestedAt?: string, extraContext?: AllocationContextValue): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
43
|
-
getAllocationExecuteTransferChoiceContext(allocationId: string, registryUrl: string): Promise<{
|
|
44
|
-
choiceContextData: Record<string, never>;
|
|
45
|
-
disclosedContracts: import("@canton-network/core-token-standard/dist/generated-clients/splice-api-token-allocation-v1/allocation-v1.js").components["schemas"]["DisclosedContract"][];
|
|
46
|
-
}>;
|
|
47
|
-
createExecuteTransferAllocation(allocationCid: string, registryUrl: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
48
|
-
createWithdrawAllocation(allocationCid: string, registryUrl: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
49
|
-
createCancelAllocation(allocationCid: string, registryUrl: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
50
|
-
createWithdrawAllocationInstruction(registryUrl: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
51
|
-
createUpdateAllocationInstruction(allocationInstructionCid: string, extraActors?: PartyId[], extraArgsContext?: Record<string, unknown>, extraArgsMeta?: Record<string, unknown>): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
52
|
-
createRejectAllocationRequest(allocationRequestCid: string, actor: PartyId): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
53
|
-
createWithdrawAllocationRequest(allocationRequestCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
54
136
|
listContractsByInterface<T = ViewValue>(interfaceId: string, partyId?: PartyId): Promise<PrettyContract<T>[]>;
|
|
55
137
|
listHoldingTransactions(partyId: PartyId, afterOffset?: string, beforeOffset?: string): Promise<PrettyTransactions>;
|
|
56
138
|
getTransactionById(updateId: string, partyId: PartyId): Promise<Transaction>;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
instrumentId: string, registryUrl: string, inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?:
|
|
139
|
+
getInputHoldingsCids(sender: PartyId, inputUtxos?: string[]): Promise<string[]>;
|
|
140
|
+
createDelegateProxyTranfser(sender: PartyId, receiver: PartyId, amount: string, instrumentAdmin: PartyId, // TODO (#907): replace with registry call
|
|
141
|
+
instrumentId: string, registryUrl: string, featuredAppRightCid: string, proxyCid: string, beneficiaries: Beneficiaries[], inputUtxos?: string[], memo?: string, expiryDate?: Date, meta?: Metadata): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
60
142
|
createTap(receiver: string, amount: string, instrumentAdmin: string, // TODO (#907): replace with registry call
|
|
61
143
|
instrumentId: string, registryUrl: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
62
144
|
selfGrantFeatureAppRight(providerPartyId: PartyId, synchronizerId: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
private toPrettyContract;
|
|
145
|
+
cancelTransferPreapproval(contractId: string, templateId: string, actor: PartyId): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
146
|
+
renewTransferPreapproval(contractId: string, templateId: string, provider: PartyId, synchronizerId: PartyId, newExpiresAt?: Date, inputUtxos?: string[]): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
147
|
+
exerciseDelegateProxyTransferInstructionAccept(exchangeParty: PartyId, proxyCid: string, transferInstructionCid: string, registryUrl: string, featuredAppRightCid: string): Promise<[ExerciseCommand, DisclosedContract[]]>;
|
|
67
148
|
}
|
|
149
|
+
export {};
|
|
68
150
|
//# 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,
|
|
1
|
+
{"version":3,"file":"token-standard-service.d.ts","sourceRoot":"","sources":["../src/token-standard-service.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,mBAAmB,EASnB,0BAA0B,EAC1B,uBAAuB,EACvB,QAAQ,EACR,gCAAgC,EAChC,kCAAkC,EAClC,SAAS,EACT,QAAQ,EAER,aAAa,EAChB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAQjD,OAAO,EACH,cAAc,EAEd,SAAS,EACZ,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EACH,eAAe,EACf,cAAc,EACjB,MAAM,oCAAoC,CAAA;AAK3C,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAA;AACtD,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAA;AAI1D,KAAK,oBAAoB,GAAG,KAAK,CAAC,sBAAsB,CAAC,CAAA;AACzD,KAAK,wBAAwB,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAA;AAoBjE,KAAK,wBAAwB,GA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