@fairmint/canton-node-sdk 0.0.252 → 0.0.254
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/build/src/clients/ledger-json-api/operations/v2/commands/async/submit.d.ts +6 -0
- package/build/src/clients/ledger-json-api/operations/v2/commands/async/submit.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-reassignment.d.ts +14 -3
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-reassignment.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.d.ts +34 -28
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.d.ts +6 -0
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.d.ts +58 -52
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.d.ts +268 -473
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.js +26 -6
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/completions.d.ts +75 -21
- package/build/src/clients/ledger-json-api/schemas/api/completions.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/completions.js +9 -4
- package/build/src/clients/ledger-json-api/schemas/api/completions.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/event-details.d.ts +83 -8
- package/build/src/clients/ledger-json-api/schemas/api/event-details.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/event-details.js +65 -12
- package/build/src/clients/ledger-json-api/schemas/api/event-details.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/reassignment.d.ts +86 -34
- package/build/src/clients/ledger-json-api/schemas/api/reassignment.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/reassignment.js +14 -3
- package/build/src/clients/ledger-json-api/schemas/api/reassignment.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/state.d.ts +65 -41
- package/build/src/clients/ledger-json-api/schemas/api/state.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/updates.d.ts +2341 -1414
- package/build/src/clients/ledger-json-api/schemas/api/updates.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/updates.js +86 -42
- package/build/src/clients/ledger-json-api/schemas/api/updates.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/common.d.ts +13 -6
- package/build/src/clients/ledger-json-api/schemas/common.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/common.js +16 -6
- package/build/src/clients/ledger-json-api/schemas/common.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/operations/commands.d.ts +28 -20
- package/build/src/clients/ledger-json-api/schemas/operations/commands.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/wire.d.ts +23 -2
- package/build/src/clients/ledger-json-api/schemas/wire.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/wire.js +23 -3
- package/build/src/clients/ledger-json-api/schemas/wire.js.map +1 -1
- package/build/src/utils/traffic/paid-traffic-cost.d.ts +2 -2
- package/build/src/utils/traffic/paid-traffic-cost.d.ts.map +1 -1
- package/build/src/utils/traffic/paid-traffic-cost.js +2 -5
- package/build/src/utils/traffic/paid-traffic-cost.js.map +1 -1
- package/package.json +9 -9
package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe-to-updates.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAYlF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,oBAAY,gBAAgB;IAC1B,2BAA2B,gCAAgC;IAC3D,gCAAgC,qCAAqC;CACtE;AAED,QAAA,MAAM,8BAA8B;;;;;;;;;iBA0BlC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,GAAG;IACtF,uEAAuE;IACvE,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhE;;;OAGG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IAEtD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;CACjE,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"subscribe-to-updates.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAYlF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,oBAAY,gBAAgB;IAC1B,2BAA2B,gCAAgC;IAC3D,gCAAgC,qCAAqC;CACtE;AAED,QAAA,MAAM,8BAA8B;;;;;;;;;iBA0BlC,CAAC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kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAnC,YAA6B,MAAM,EAAE,mBAAmB,EAAI;IAE/C,OAAO,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkLpE;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscribeToUpdates = exports.TransactionShape = void 0;
|
|
3
|
+
exports.SubscribeToUpdates = exports.UpdatesWsMessageSchema = exports.TransactionShape = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const errors_1 = require("../../../../../core/errors");
|
|
6
6
|
const WebSocketClient_1 = require("../../../../../core/ws/WebSocketClient");
|
|
@@ -62,12 +62,27 @@ const SubscribeToUpdatesParamsSchema = zod_1.z.object({
|
|
|
62
62
|
/** Transaction shape (default TRANSACTION_SHAPE_LEDGER_EFFECTS). */
|
|
63
63
|
transactionShape: zod_1.z.nativeEnum(TransactionShape).optional(),
|
|
64
64
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Runtime wire union for `/v2/updates` WebSocket frames.
|
|
67
|
+
*
|
|
68
|
+
* AsyncAPI-only: value-wrapped {@link WsUpdateSchema} (`Transaction` / `Reassignment` / `TopologyTransaction` /
|
|
69
|
+
* `OffsetCheckpoint`). REST `JsTransaction`-named wrappers stay on REST response schemas, not this WS stream.
|
|
70
|
+
*/
|
|
71
|
+
exports.UpdatesWsMessageSchema = zod_1.z.union([
|
|
72
|
+
// Preserve unknown top-level WS frame fields (future Ledger extensions beyond `update`).
|
|
73
|
+
zod_1.z.looseObject({ update: updates_1.WsUpdateSchema }),
|
|
68
74
|
errors_2.JsCantonErrorSchema,
|
|
69
75
|
errors_2.WsCantonErrorSchema,
|
|
70
76
|
]);
|
|
77
|
+
/** Format Zod issues for ApiError messages / Slack logs. */
|
|
78
|
+
function formatZodIssues(error) {
|
|
79
|
+
return error.issues
|
|
80
|
+
.map((issue) => {
|
|
81
|
+
const issuePath = issue.path.length > 0 ? issue.path.join('.') : '(root)';
|
|
82
|
+
return `${issuePath}: ${issue.message}`;
|
|
83
|
+
})
|
|
84
|
+
.join('; ');
|
|
85
|
+
}
|
|
71
86
|
/**
|
|
72
87
|
* Subscribes to ledger updates via WebSocket connection.
|
|
73
88
|
*
|
|
@@ -185,10 +200,15 @@ class SubscribeToUpdates {
|
|
|
185
200
|
void wsClient
|
|
186
201
|
.connect(path, requestMessage, {
|
|
187
202
|
onMessage: async (parsed) => {
|
|
188
|
-
const decoded = UpdatesWsMessageSchema.safeParse(parsed);
|
|
203
|
+
const decoded = exports.UpdatesWsMessageSchema.safeParse(parsed);
|
|
189
204
|
if (!decoded.success) {
|
|
190
|
-
|
|
205
|
+
// Include Zod issue details so Slack/logs can diagnose the next wire-shape mismatch.
|
|
206
|
+
throw new errors_1.ApiError(`Unexpected ledger updates WebSocket message: ${formatZodIssues(decoded.error)}`, undefined, undefined, {
|
|
207
|
+
zodIssues: decoded.error.issues,
|
|
208
|
+
});
|
|
191
209
|
}
|
|
210
|
+
// Deliver normalized Zod output (not the raw wire frame): null optionals → undefined,
|
|
211
|
+
// paidTrafficCost coerced to digit string, while `z.looseObject` preserves unknown Ledger fields.
|
|
192
212
|
const message = decoded.data;
|
|
193
213
|
// Surface Canton error frames immediately; a slow consumer callback must not delay stream failure.
|
|
194
214
|
if (isErrorMessage(message)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe-to-updates.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uDAAsD;AACtD,4EAIgD;AAEhD,wDAKqC;AACrC,
|
|
1
|
+
{"version":3,"file":"subscribe-to-updates.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/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,CAAC,CAAC,CAAC;oBAC9D,CAAC;gBACH,CAAC;gBACD,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,OAAO,GAAG,IAAI,CAAC;wBACf,OAAO,EAAE,CAAC;oBACZ,CAAC;gBACH,CAAC;aACF,EACD,SAAS,CACV;iBACA,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE;gBAClB,YAAY,GAAG,SAAS,CAAC;gBACzB,IAAI,kBAAkB,EAAE,CAAC;oBACvB,SAAS,CAAC,KAAK,EAAE,CAAC;gBACpB,CAAC;YACH,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;gBACtB,IAAI,CAAC,OAAO,EAAE,CAAC;oBACb,OAAO,GAAG,IAAI,CAAC;oBACf,MAAM,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC9D,CAAC;YACH,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -177,13 +177,31 @@ export declare const CompletionSchema: z.ZodObject<{
|
|
|
177
177
|
}, z.core.$strip>, z.ZodObject<{
|
|
178
178
|
Empty: z.ZodObject<{}, z.core.$strict>;
|
|
179
179
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$strict>]>>>;
|
|
180
|
-
traceContext: z.ZodOptional<z.ZodObject<{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
180
|
+
traceContext: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
181
|
+
traceparent: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
182
|
+
tracestate: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
183
|
+
traceId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
184
|
+
spanId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
185
|
+
parentSpanId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
186
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodNull]>, z.ZodTransform<Record<string, string> | undefined, Record<string, string> | null>>>;
|
|
187
|
+
}, z.core.$loose>, z.ZodNull]>, z.ZodTransform<{
|
|
188
|
+
[x: string]: unknown;
|
|
189
|
+
traceparent?: string | undefined;
|
|
190
|
+
tracestate?: string | undefined;
|
|
191
|
+
traceId?: string | undefined;
|
|
192
|
+
spanId?: string | undefined;
|
|
193
|
+
parentSpanId?: string | undefined;
|
|
194
|
+
metadata?: Record<string, string> | undefined;
|
|
195
|
+
} | undefined, {
|
|
196
|
+
[x: string]: unknown;
|
|
197
|
+
traceparent?: string | undefined;
|
|
198
|
+
tracestate?: string | undefined;
|
|
199
|
+
traceId?: string | undefined;
|
|
200
|
+
spanId?: string | undefined;
|
|
201
|
+
parentSpanId?: string | undefined;
|
|
202
|
+
metadata?: Record<string, string> | undefined;
|
|
203
|
+
} | null>>>;
|
|
204
|
+
paidTrafficCost: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<string, string | number>>, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
187
205
|
offset: z.ZodNumber;
|
|
188
206
|
synchronizerTime: z.ZodObject<{
|
|
189
207
|
synchronizerId: z.ZodString;
|
|
@@ -316,13 +334,31 @@ export declare const CompletionResponseSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
316
334
|
}, z.core.$strip>, z.ZodObject<{
|
|
317
335
|
Empty: z.ZodObject<{}, z.core.$strict>;
|
|
318
336
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$strict>]>>>;
|
|
319
|
-
traceContext: z.ZodOptional<z.ZodObject<{
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
337
|
+
traceContext: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
338
|
+
traceparent: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
339
|
+
tracestate: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
340
|
+
traceId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
341
|
+
spanId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
342
|
+
parentSpanId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
343
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodNull]>, z.ZodTransform<Record<string, string> | undefined, Record<string, string> | null>>>;
|
|
344
|
+
}, z.core.$loose>, z.ZodNull]>, z.ZodTransform<{
|
|
345
|
+
[x: string]: unknown;
|
|
346
|
+
traceparent?: string | undefined;
|
|
347
|
+
tracestate?: string | undefined;
|
|
348
|
+
traceId?: string | undefined;
|
|
349
|
+
spanId?: string | undefined;
|
|
350
|
+
parentSpanId?: string | undefined;
|
|
351
|
+
metadata?: Record<string, string> | undefined;
|
|
352
|
+
} | undefined, {
|
|
353
|
+
[x: string]: unknown;
|
|
354
|
+
traceparent?: string | undefined;
|
|
355
|
+
tracestate?: string | undefined;
|
|
356
|
+
traceId?: string | undefined;
|
|
357
|
+
spanId?: string | undefined;
|
|
358
|
+
parentSpanId?: string | undefined;
|
|
359
|
+
metadata?: Record<string, string> | undefined;
|
|
360
|
+
} | null>>>;
|
|
361
|
+
paidTrafficCost: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<string, string | number>>, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
326
362
|
offset: z.ZodNumber;
|
|
327
363
|
synchronizerTime: z.ZodObject<{
|
|
328
364
|
synchronizerId: z.ZodString;
|
|
@@ -465,13 +501,31 @@ export declare const CompletionStreamResponseSchema: z.ZodObject<{
|
|
|
465
501
|
}, z.core.$strip>, z.ZodObject<{
|
|
466
502
|
Empty: z.ZodObject<{}, z.core.$strict>;
|
|
467
503
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$strict>]>>>;
|
|
468
|
-
traceContext: z.ZodOptional<z.ZodObject<{
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
504
|
+
traceContext: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
505
|
+
traceparent: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
506
|
+
tracestate: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
507
|
+
traceId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
508
|
+
spanId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
509
|
+
parentSpanId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
510
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodNull]>, z.ZodTransform<Record<string, string> | undefined, Record<string, string> | null>>>;
|
|
511
|
+
}, z.core.$loose>, z.ZodNull]>, z.ZodTransform<{
|
|
512
|
+
[x: string]: unknown;
|
|
513
|
+
traceparent?: string | undefined;
|
|
514
|
+
tracestate?: string | undefined;
|
|
515
|
+
traceId?: string | undefined;
|
|
516
|
+
spanId?: string | undefined;
|
|
517
|
+
parentSpanId?: string | undefined;
|
|
518
|
+
metadata?: Record<string, string> | undefined;
|
|
519
|
+
} | undefined, {
|
|
520
|
+
[x: string]: unknown;
|
|
521
|
+
traceparent?: string | undefined;
|
|
522
|
+
tracestate?: string | undefined;
|
|
523
|
+
traceId?: string | undefined;
|
|
524
|
+
spanId?: string | undefined;
|
|
525
|
+
parentSpanId?: string | undefined;
|
|
526
|
+
metadata?: Record<string, string> | undefined;
|
|
527
|
+
} | null>>>;
|
|
528
|
+
paidTrafficCost: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<string, string | number>>, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
475
529
|
offset: z.ZodNumber;
|
|
476
530
|
synchronizerTime: z.ZodObject<{
|
|
477
531
|
synchronizerId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/completions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/completions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAGvD,0CAA0C;AAC1C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOzB,CAAC;AAEH,qCAAqC;AACrC,eAAO,MAAM,sBAAsB;;;iBAKjC,CAAC;AAEH,0BAA0B;AAC1B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsD3B,CAAC;AAEH,+CAA+C;AAC/C,eAAO,MAAM,sBAAsB;;;;;;;;iBAQjC,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAInC,CAAC;AAEH,iCAAiC;AACjC,eAAO,MAAM,6BAA6B;;;;iBAOxC,CAAC;AAEH,kCAAkC;AAClC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGzC,CAAC;AAGH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CompletionStreamResponseSchema = exports.CompletionStreamRequestSchema = exports.CompletionResponseSchema = exports.OffsetCheckpointSchema = exports.CompletionSchema = exports.SynchronizerTimeSchema = exports.JsStatusSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_1 = require("../common");
|
|
6
|
+
const wire_1 = require("../wire");
|
|
6
7
|
const commands_1 = require("./commands");
|
|
7
8
|
const event_details_1 = require("./event-details");
|
|
8
9
|
/** Status information for completions. */
|
|
@@ -59,13 +60,17 @@ exports.CompletionSchema = zod_1.z.object({
|
|
|
59
60
|
])
|
|
60
61
|
.optional()
|
|
61
62
|
.nullable(),
|
|
62
|
-
/**
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Trace context (optional). Wire may send `null` or nested null W3C fields (`tracestate` / `traceparent`);
|
|
65
|
+
* outputs normalize to `undefined`.
|
|
66
|
+
*/
|
|
67
|
+
traceContext: (0, wire_1.ledgerNullableOptionalResponseField)(common_1.TraceContextSchema),
|
|
64
68
|
/**
|
|
65
69
|
* Traffic cost (in traffic units) paid by this participant for ordering the confirmation request. Present on recent
|
|
66
|
-
* Canton Ledger API versions; omitted or zero for older nodes.
|
|
70
|
+
* Canton Ledger API versions; omitted or zero for older nodes. Wire may send number, digit string, or `null`;
|
|
71
|
+
* outputs normalize to digit string or `undefined`.
|
|
67
72
|
*/
|
|
68
|
-
paidTrafficCost:
|
|
73
|
+
paidTrafficCost: wire_1.ledgerOptionalPaidTrafficCostSchema,
|
|
69
74
|
/** Offset for resuming the stream. */
|
|
70
75
|
offset: zod_1.z.number(),
|
|
71
76
|
/** Synchronizer time information. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/completions.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAA+C;AAC/C,yCAAuD;AACvD,mDAAsD;AAEtD,0CAA0C;AAC7B,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,mBAAmB;IACnB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,sBAAsB;IACtB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,qCAAqC;IACrC,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,mCAAmB,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAEH,qCAAqC;AACxB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,uBAAuB;IACvB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,mBAAmB;IACnB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC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AAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,4DAA4D;IAC5D,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAEH,kCAAkC;AACrB,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,+BAA+B;IAC/B,kBAAkB,EAAE,QAAA,wBAAwB;CAC7C,CAAC,CAAC"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export * from './interface-view';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Created event details.
|
|
5
|
+
*
|
|
6
|
+
* `z.looseObject` keeps unknown wire fields on parse output so subscribe-to-updates can deliver
|
|
7
|
+
* normalized Zod output (null → undefined) without stripping newer Ledger fields.
|
|
8
|
+
*/
|
|
4
9
|
export declare const CreatedEventDetailsSchema: z.ZodObject<{
|
|
5
10
|
offset: z.ZodNumber;
|
|
6
11
|
nodeId: z.ZodNumber;
|
|
7
12
|
contractId: z.ZodString;
|
|
8
13
|
templateId: z.ZodString;
|
|
9
|
-
contractKey: z.
|
|
14
|
+
contractKey: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodType<import("..").LedgerJsonValue, unknown, z.core.$ZodTypeInternals<import("..").LedgerJsonValue, unknown>>, z.ZodNull]>, z.ZodTransform<import("..").LedgerJsonValue | undefined, import("..").LedgerJsonValue>>>;
|
|
15
|
+
contractKeyHash: z.ZodOptional<z.ZodString>;
|
|
10
16
|
createArgument: z.ZodRecord<z.ZodString, z.ZodType<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
11
17
|
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
12
18
|
} | null)[] | {
|
|
@@ -56,7 +62,7 @@ export declare const CreatedEventDetailsSchema: z.ZodObject<{
|
|
|
56
62
|
} | null)[] | {
|
|
57
63
|
[key: string]: string | number | boolean | any | any | null;
|
|
58
64
|
} | null, unknown>>>;
|
|
59
|
-
createdEventBlob: z.ZodString
|
|
65
|
+
createdEventBlob: z.ZodOptional<z.ZodString>;
|
|
60
66
|
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61
67
|
interfaceId: z.ZodString;
|
|
62
68
|
implementationPackageId: z.ZodOptional<z.ZodString>;
|
|
@@ -69,11 +75,13 @@ export declare const CreatedEventDetailsSchema: z.ZodObject<{
|
|
|
69
75
|
}, z.core.$strict>>>>;
|
|
70
76
|
witnessParties: z.ZodArray<z.ZodString>;
|
|
71
77
|
signatories: z.ZodArray<z.ZodString>;
|
|
72
|
-
observers: z.ZodArray<z.ZodString
|
|
78
|
+
observers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
79
|
createdAt: z.ZodString;
|
|
74
80
|
packageName: z.ZodString;
|
|
81
|
+
representativePackageId: z.ZodOptional<z.ZodString>;
|
|
82
|
+
acsDelta: z.ZodOptional<z.ZodBoolean>;
|
|
75
83
|
implementedInterfaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
76
|
-
}, z.core.$
|
|
84
|
+
}, z.core.$loose>;
|
|
77
85
|
/** Archived event details. */
|
|
78
86
|
export declare const ArchivedEventDetailsSchema: z.ZodObject<{
|
|
79
87
|
offset: z.ZodNumber;
|
|
@@ -83,7 +91,73 @@ export declare const ArchivedEventDetailsSchema: z.ZodObject<{
|
|
|
83
91
|
witnessParties: z.ZodArray<z.ZodString>;
|
|
84
92
|
packageName: z.ZodString;
|
|
85
93
|
implementedInterfaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
|
-
}, z.core.$
|
|
94
|
+
}, z.core.$loose>;
|
|
95
|
+
/** Exercised event details (LEDGER_EFFECTS transaction shape). */
|
|
96
|
+
export declare const ExercisedEventDetailsSchema: z.ZodObject<{
|
|
97
|
+
offset: z.ZodNumber;
|
|
98
|
+
nodeId: z.ZodNumber;
|
|
99
|
+
contractId: z.ZodString;
|
|
100
|
+
templateId: z.ZodString;
|
|
101
|
+
interfaceId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
102
|
+
choice: z.ZodString;
|
|
103
|
+
choiceArgument: z.ZodRecord<z.ZodString, z.ZodType<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
104
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
105
|
+
} | null)[] | {
|
|
106
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
107
|
+
} | null)[] | {
|
|
108
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
109
|
+
} | null)[] | {
|
|
110
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
111
|
+
} | null)[] | {
|
|
112
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
113
|
+
} | null)[] | {
|
|
114
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
115
|
+
} | null)[] | {
|
|
116
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
117
|
+
} | null)[] | {
|
|
118
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
119
|
+
} | null)[] | {
|
|
120
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
121
|
+
} | null)[] | {
|
|
122
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
123
|
+
} | null)[] | {
|
|
124
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
125
|
+
} | null)[] | {
|
|
126
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
127
|
+
} | null, unknown, z.core.$ZodTypeInternals<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
|
|
128
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
129
|
+
} | null)[] | {
|
|
130
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
131
|
+
} | null)[] | {
|
|
132
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
133
|
+
} | null)[] | {
|
|
134
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
135
|
+
} | null)[] | {
|
|
136
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
137
|
+
} | null)[] | {
|
|
138
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
139
|
+
} | null)[] | {
|
|
140
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
141
|
+
} | null)[] | {
|
|
142
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
143
|
+
} | null)[] | {
|
|
144
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
145
|
+
} | null)[] | {
|
|
146
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
147
|
+
} | null)[] | {
|
|
148
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
149
|
+
} | null)[] | {
|
|
150
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
151
|
+
} | null, unknown>>>;
|
|
152
|
+
actingParties: z.ZodArray<z.ZodString>;
|
|
153
|
+
consuming: z.ZodBoolean;
|
|
154
|
+
witnessParties: z.ZodArray<z.ZodString>;
|
|
155
|
+
lastDescendantNodeId: z.ZodNumber;
|
|
156
|
+
exerciseResult: z.ZodOptional<z.ZodType<import("..").LedgerJsonValue, unknown, z.core.$ZodTypeInternals<import("..").LedgerJsonValue, unknown>>>;
|
|
157
|
+
packageName: z.ZodString;
|
|
158
|
+
implementedInterfaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
159
|
+
acsDelta: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
}, z.core.$loose>;
|
|
87
161
|
/** Assigned event details. */
|
|
88
162
|
export declare const AssignedEventDetailsSchema: z.ZodObject<{
|
|
89
163
|
offset: z.ZodNumber;
|
|
@@ -96,7 +170,7 @@ export declare const AssignedEventDetailsSchema: z.ZodObject<{
|
|
|
96
170
|
submitter: z.ZodString;
|
|
97
171
|
reassignmentCounter: z.ZodNumber;
|
|
98
172
|
packageName: z.ZodString;
|
|
99
|
-
}, z.core.$
|
|
173
|
+
}, z.core.$loose>;
|
|
100
174
|
/** Unassigned event details. */
|
|
101
175
|
export declare const UnassignedEventDetailsSchema: z.ZodObject<{
|
|
102
176
|
offset: z.ZodNumber;
|
|
@@ -109,7 +183,7 @@ export declare const UnassignedEventDetailsSchema: z.ZodObject<{
|
|
|
109
183
|
submitter: z.ZodString;
|
|
110
184
|
reassignmentCounter: z.ZodNumber;
|
|
111
185
|
packageName: z.ZodString;
|
|
112
|
-
}, z.core.$
|
|
186
|
+
}, z.core.$loose>;
|
|
113
187
|
/** Empty command. */
|
|
114
188
|
export declare const EmptyCommandSchema: z.ZodObject<{}, z.core.$strip>;
|
|
115
189
|
/** Status details for completions. */
|
|
@@ -168,6 +242,7 @@ export declare const StatusDetailsSchema: z.ZodObject<{
|
|
|
168
242
|
}, z.core.$strip>;
|
|
169
243
|
export type CreatedEventDetails = z.infer<typeof CreatedEventDetailsSchema>;
|
|
170
244
|
export type ArchivedEventDetails = z.infer<typeof ArchivedEventDetailsSchema>;
|
|
245
|
+
export type ExercisedEventDetails = z.infer<typeof ExercisedEventDetailsSchema>;
|
|
171
246
|
export type AssignedEventDetails = z.infer<typeof AssignedEventDetailsSchema>;
|
|
172
247
|
export type UnassignedEventDetails = z.infer<typeof UnassignedEventDetailsSchema>;
|
|
173
248
|
export type EmptyCommand = z.infer<typeof EmptyCommandSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-details.d.ts","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/event-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"event-details.d.ts","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/event-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,cAAc,kBAAkB,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2CpC,CAAC;AAEH,8BAA8B;AAC9B,eAAO,MAAM,0BAA0B;;;;;;;;iBAerC,CAAC;AAEH,kEAAkE;AAClE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BtC,CAAC;AAEH,8BAA8B;AAC9B,eAAO,MAAM,0BAA0B;;;;;;;;;;;iBAqBrC,CAAC;AAEH,gCAAgC;AAChC,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAqBvC,CAAC;AAEH,qBAAqB;AACrB,eAAO,MAAM,kBAAkB,gCAAe,CAAC;AAE/C,sCAAsC;AACtC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO9B,CAAC;AAGH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -14,13 +14,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.StatusDetailsSchema = exports.EmptyCommandSchema = exports.UnassignedEventDetailsSchema = exports.AssignedEventDetailsSchema = exports.ArchivedEventDetailsSchema = exports.CreatedEventDetailsSchema = void 0;
|
|
17
|
+
exports.StatusDetailsSchema = exports.EmptyCommandSchema = exports.UnassignedEventDetailsSchema = exports.AssignedEventDetailsSchema = exports.ExercisedEventDetailsSchema = exports.ArchivedEventDetailsSchema = exports.CreatedEventDetailsSchema = void 0;
|
|
18
18
|
const zod_1 = require("zod");
|
|
19
19
|
const base_1 = require("../base");
|
|
20
|
+
const wire_1 = require("../wire");
|
|
20
21
|
const interface_view_1 = require("./interface-view");
|
|
21
22
|
__exportStar(require("./interface-view"), exports);
|
|
22
|
-
/**
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Created event details.
|
|
25
|
+
*
|
|
26
|
+
* `z.looseObject` keeps unknown wire fields on parse output so subscribe-to-updates can deliver
|
|
27
|
+
* normalized Zod output (null → undefined) without stripping newer Ledger fields.
|
|
28
|
+
*/
|
|
29
|
+
exports.CreatedEventDetailsSchema = zod_1.z.looseObject({
|
|
24
30
|
/** Offset of the event in the ledger stream. */
|
|
25
31
|
offset: zod_1.z.number(),
|
|
26
32
|
/** Node ID of the event in the transaction tree. */
|
|
@@ -29,12 +35,22 @@ exports.CreatedEventDetailsSchema = zod_1.z.object({
|
|
|
29
35
|
contractId: zod_1.z.string(),
|
|
30
36
|
/** Template ID of the created contract. */
|
|
31
37
|
templateId: zod_1.z.string(),
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Contract key, if present. Wire may send any Daml JSON value, or `null` for absent / Optional.None.
|
|
40
|
+
* Outputs normalize wire `null` to `undefined` (optional property), not `null`.
|
|
41
|
+
*
|
|
42
|
+
* Unlike `LedgerCreatedEventSchema`, this stream/event-details path does not keep hash-aware `null`
|
|
43
|
+
* for present Daml `Optional.None` keys: subscribe-to-updates delivers the PR null→undefined
|
|
44
|
+
* consumer shape. Use `LedgerCreatedEventSchema` (e.g. contract-by-id) when Optional.None must be
|
|
45
|
+
* distinguished via `contractKeyHash`.
|
|
46
|
+
*/
|
|
47
|
+
contractKey: (0, wire_1.ledgerNullableOptionalResponseField)(wire_1.LedgerJsonValueSchema),
|
|
48
|
+
/** Canonical Base64 encoding of a 32-byte contract-key hash when a key is present. */
|
|
49
|
+
contractKeyHash: zod_1.z.string().optional(),
|
|
50
|
+
/** Arguments used to create the contract (Daml create args are always a record). */
|
|
35
51
|
createArgument: base_1.RecordSchema,
|
|
36
|
-
/** Serialized event blob for the created contract. */
|
|
37
|
-
createdEventBlob: zod_1.z.string(),
|
|
52
|
+
/** Serialized event blob for the created contract (optional when includeCreatedEventBlob is false). */
|
|
53
|
+
createdEventBlob: zod_1.z.string().optional(),
|
|
38
54
|
/** Interface views requested by matching interface filters. */
|
|
39
55
|
interfaceViews: zod_1.z.array(interface_view_1.JsInterfaceViewSchema).optional().default([]),
|
|
40
56
|
/** Parties that witnessed the creation. */
|
|
@@ -42,16 +58,20 @@ exports.CreatedEventDetailsSchema = zod_1.z.object({
|
|
|
42
58
|
/** Parties that must sign the contract. */
|
|
43
59
|
signatories: zod_1.z.array(zod_1.z.string()),
|
|
44
60
|
/** Parties that observe the contract. */
|
|
45
|
-
observers: zod_1.z.array(zod_1.z.string()),
|
|
61
|
+
observers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
46
62
|
/** ISO 8601 timestamp when the contract was created. */
|
|
47
63
|
createdAt: zod_1.z.string(),
|
|
48
64
|
/** Name of the Daml package containing the template. */
|
|
49
65
|
packageName: zod_1.z.string(),
|
|
66
|
+
/** Package-id used to render create arguments / interface views. */
|
|
67
|
+
representativePackageId: zod_1.z.string().optional(),
|
|
68
|
+
/** Whether this create contributes to an ACS delta projection. */
|
|
69
|
+
acsDelta: zod_1.z.boolean().optional(),
|
|
50
70
|
/** List of interface IDs implemented by the contract. */
|
|
51
71
|
implementedInterfaces: zod_1.z.array(zod_1.z.string()).optional(),
|
|
52
72
|
});
|
|
53
73
|
/** Archived event details. */
|
|
54
|
-
exports.ArchivedEventDetailsSchema = zod_1.z.
|
|
74
|
+
exports.ArchivedEventDetailsSchema = zod_1.z.looseObject({
|
|
55
75
|
/** Offset of the event in the ledger stream. */
|
|
56
76
|
offset: zod_1.z.number(),
|
|
57
77
|
/** Node ID of the event in the transaction tree. */
|
|
@@ -67,8 +87,41 @@ exports.ArchivedEventDetailsSchema = zod_1.z.object({
|
|
|
67
87
|
/** List of interface IDs implemented by the contract. */
|
|
68
88
|
implementedInterfaces: zod_1.z.array(zod_1.z.string()).optional(),
|
|
69
89
|
});
|
|
90
|
+
/** Exercised event details (LEDGER_EFFECTS transaction shape). */
|
|
91
|
+
exports.ExercisedEventDetailsSchema = zod_1.z.looseObject({
|
|
92
|
+
/** Offset of the event in the ledger stream. */
|
|
93
|
+
offset: zod_1.z.number(),
|
|
94
|
+
/** Node ID of the event in the transaction tree. */
|
|
95
|
+
nodeId: zod_1.z.number(),
|
|
96
|
+
/** Contract ID of the exercised contract. */
|
|
97
|
+
contractId: zod_1.z.string(),
|
|
98
|
+
/** Template ID of the exercised contract. */
|
|
99
|
+
templateId: zod_1.z.string(),
|
|
100
|
+
/** Interface ID if the choice was exercised via an interface. Wire may send `null`. */
|
|
101
|
+
interfaceId: (0, wire_1.ledgerNullableOptionalResponseField)(zod_1.z.string()),
|
|
102
|
+
/** Name of the exercised choice. */
|
|
103
|
+
choice: zod_1.z.string(),
|
|
104
|
+
/** Arguments passed to the exercised choice (Daml choice args are always a record). */
|
|
105
|
+
choiceArgument: base_1.RecordSchema,
|
|
106
|
+
/** Parties acting in the exercise. */
|
|
107
|
+
actingParties: zod_1.z.array(zod_1.z.string()),
|
|
108
|
+
/** Whether the exercise archived the contract. */
|
|
109
|
+
consuming: zod_1.z.boolean(),
|
|
110
|
+
/** Parties that witnessed the exercise. */
|
|
111
|
+
witnessParties: zod_1.z.array(zod_1.z.string()),
|
|
112
|
+
/** Upper bound of descendant node IDs in the transaction tree. */
|
|
113
|
+
lastDescendantNodeId: zod_1.z.number(),
|
|
114
|
+
/** Result returned by the exercised choice (any Daml JSON value). */
|
|
115
|
+
exerciseResult: wire_1.LedgerJsonValueSchema.optional(),
|
|
116
|
+
/** Name of the Daml package containing the template. */
|
|
117
|
+
packageName: zod_1.z.string(),
|
|
118
|
+
/** List of interface IDs implemented by the contract. */
|
|
119
|
+
implementedInterfaces: zod_1.z.array(zod_1.z.string()).optional(),
|
|
120
|
+
/** Whether this exercise contributes to an ACS delta projection. */
|
|
121
|
+
acsDelta: zod_1.z.boolean().optional(),
|
|
122
|
+
});
|
|
70
123
|
/** Assigned event details. */
|
|
71
|
-
exports.AssignedEventDetailsSchema = zod_1.z.
|
|
124
|
+
exports.AssignedEventDetailsSchema = zod_1.z.looseObject({
|
|
72
125
|
/** Offset of the event in the ledger stream. */
|
|
73
126
|
offset: zod_1.z.number(),
|
|
74
127
|
/** Node ID of the event in the transaction tree. */
|
|
@@ -91,7 +144,7 @@ exports.AssignedEventDetailsSchema = zod_1.z.object({
|
|
|
91
144
|
packageName: zod_1.z.string(),
|
|
92
145
|
});
|
|
93
146
|
/** Unassigned event details. */
|
|
94
|
-
exports.UnassignedEventDetailsSchema = zod_1.z.
|
|
147
|
+
exports.UnassignedEventDetailsSchema = zod_1.z.looseObject({
|
|
95
148
|
/** Offset of the event in the ledger stream. */
|
|
96
149
|
offset: zod_1.z.number(),
|
|
97
150
|
/** Node ID of the event in the transaction tree. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-details.js","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/event-details.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6BAAwB;AACxB,kCAAuC;AACvC,qDAAyD;AAEzD,mDAAiC;AAEjC
|
|
1
|
+
{"version":3,"file":"event-details.js","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/event-details.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6BAAwB;AACxB,kCAAuC;AACvC,kCAAqF;AACrF,qDAAyD;AAEzD,mDAAiC;AAEjC;;;;;GAKG;AACU,QAAA,yBAAyB,GAAG,OAAC,CAAC,WAAW,CAAC;IACrD,gDAAgD;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,oDAAoD;IACpD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,2CAA2C;IAC3C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,2CAA2C;IAC3C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB;;;;;;;;OAQG;IACH,WAAW,EAAE,IAAA,0CAAmC,EAAC,4BAAqB,CAAC;IACvE,sFAAsF;IACtF,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,oFAAoF;IACpF,cAAc,EAAE,mBAAY;IAC5B,uGAAuG;IACvG,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,+DAA+D;IAC/D,cAAc,EAAE,OAAC,CAAC,KAAK,CAAC,sCAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CA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