@fairmint/canton-node-sdk 0.0.266 → 0.0.267
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/README.md +12 -3
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts +5 -2
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js +2 -0
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js.map +1 -1
- package/build/src/clients/ledger-json-api/index.d.ts +5 -1
- package/build/src/clients/ledger-json-api/index.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/index.js +7 -1
- package/build/src/clients/ledger-json-api/index.js.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-reassignment.d.ts +2 -2
- package/build/src/clients/ledger-json-api/operations/v2/state/active-contracts-request.d.ts +49 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/active-contracts-request.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/active-contracts-request.js +127 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/active-contracts-request.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/get-active-contracts.d.ts +10 -13
- package/build/src/clients/ledger-json-api/operations/v2/state/get-active-contracts.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/state/get-active-contracts.js +18 -106
- package/build/src/clients/ledger-json-api/operations/v2/state/get-active-contracts.js.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/state/index.d.ts +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/index.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/state/index.js +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/index.js.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/state/stream-active-contracts.d.ts +64 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/stream-active-contracts.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/stream-active-contracts.js +211 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/stream-active-contracts.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.d.ts +45 -7
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.js +64 -7
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.js.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.d.ts +17 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.js +17 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.js.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.d.ts +46 -8
- 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 +12 -25
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.js.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/utils/event-format-builder.d.ts +29 -0
- package/build/src/clients/ledger-json-api/operations/v2/utils/event-format-builder.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/utils/event-format-builder.js +43 -0
- package/build/src/clients/ledger-json-api/operations/v2/utils/event-format-builder.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/event-details.d.ts +22 -4
- 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/events.d.ts +44 -8
- package/build/src/clients/ledger-json-api/schemas/api/events.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/interface-view.d.ts +28 -5
- package/build/src/clients/ledger-json-api/schemas/api/interface-view.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/interface-view.js +16 -4
- package/build/src/clients/ledger-json-api/schemas/api/interface-view.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/reassignment.d.ts +88 -16
- package/build/src/clients/ledger-json-api/schemas/api/reassignment.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/state.d.ts +176 -32
- 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 +242 -44
- package/build/src/clients/ledger-json-api/schemas/api/updates.d.ts.map +1 -1
- package/build/src/core/ws/WebSocketClient.d.ts +8 -0
- package/build/src/core/ws/WebSocketClient.d.ts.map +1 -1
- package/build/src/core/ws/WebSocketClient.js +24 -1
- package/build/src/core/ws/WebSocketClient.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,21 +3,78 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GetUpdateById = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const core_1 = require("../../../../../core");
|
|
6
|
+
const updates_1 = require("../../../schemas/operations/updates");
|
|
7
|
+
const event_format_builder_1 = require("../utils/event-format-builder");
|
|
6
8
|
const endpoint = '/v2/updates/update-by-id';
|
|
9
|
+
const GetUpdateByIdParamsSchema = zod_1.z.object({
|
|
10
|
+
/** The ID of the update to fetch. */
|
|
11
|
+
updateId: zod_1.z.string().min(1, 'updateId must be a non-empty string'),
|
|
12
|
+
/** Parties to read as. With a template or interface filter, an empty list falls back to the client's party list. */
|
|
13
|
+
readAs: zod_1.z.array(zod_1.z.string()),
|
|
14
|
+
/** Optional template filters applied server-side. */
|
|
15
|
+
templateIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
16
|
+
/** Optional interface filters applied server-side. */
|
|
17
|
+
interfaceIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
18
|
+
/** Include interface views in InterfaceFilter results (default true). */
|
|
19
|
+
includeInterfaceView: zod_1.z.boolean().optional(),
|
|
20
|
+
/**
|
|
21
|
+
* Include created event blobs in the result. Defaults to true without a template or interface filter and to false
|
|
22
|
+
* with one.
|
|
23
|
+
*/
|
|
24
|
+
includeCreatedEventBlob: zod_1.z.boolean().optional(),
|
|
25
|
+
/** Transaction shape (default TRANSACTION_SHAPE_LEDGER_EFFECTS). */
|
|
26
|
+
transactionShape: updates_1.TransactionShapeSchema.optional(),
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Fetches one update by its ID.
|
|
30
|
+
*
|
|
31
|
+
* Without `templateIds` or `interfaceIds` the request reads every event the `readAs` parties can see (a wildcard filter
|
|
32
|
+
* per party) with created event blobs included. With at least one template or interface filter, only matching events
|
|
33
|
+
* are returned, and created event blobs are included only when `includeCreatedEventBlob` is `true`. Interface views are
|
|
34
|
+
* included by default.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const update = await client.getUpdateById({
|
|
39
|
+
* updateId: '1220...',
|
|
40
|
+
* readAs: ['party1'],
|
|
41
|
+
* interfaceIds: ['#example-package:Example.Module:Asset'],
|
|
42
|
+
* });
|
|
43
|
+
* ```;
|
|
44
|
+
*/
|
|
7
45
|
exports.GetUpdateById = (0, core_1.createApiOperation)({
|
|
8
|
-
paramsSchema:
|
|
9
|
-
updateId: zod_1.z.string().min(1, 'updateId must be a non-empty string'),
|
|
10
|
-
readAs: zod_1.z.array(zod_1.z.string()),
|
|
11
|
-
}),
|
|
46
|
+
paramsSchema: GetUpdateByIdParamsSchema,
|
|
12
47
|
method: 'POST',
|
|
13
48
|
requestSemantics: 'read',
|
|
14
49
|
buildUrl: (_params, apiUrl) => `${apiUrl}${endpoint}`,
|
|
15
|
-
buildRequestData: (params) => {
|
|
50
|
+
buildRequestData: (params, client) => {
|
|
16
51
|
// Validate updateId parameter
|
|
17
52
|
if (params.updateId === 'undefined' || params.updateId.trim() === '') {
|
|
18
53
|
throw new Error(`Invalid updateId: "${params.updateId}". updateId must be a non-empty string.`);
|
|
19
54
|
}
|
|
55
|
+
const transactionShape = params.transactionShape ?? 'TRANSACTION_SHAPE_LEDGER_EFFECTS';
|
|
56
|
+
const hasFilters = (params.templateIds?.length ?? 0) > 0 || (params.interfaceIds?.length ?? 0) > 0;
|
|
20
57
|
// Build the request body according to the API specification
|
|
58
|
+
if (hasFilters) {
|
|
59
|
+
return {
|
|
60
|
+
updateId: params.updateId,
|
|
61
|
+
updateFormat: {
|
|
62
|
+
includeTransactions: {
|
|
63
|
+
eventFormat: {
|
|
64
|
+
...(0, event_format_builder_1.buildEventFormat)({
|
|
65
|
+
parties: params.readAs.length > 0 ? params.readAs : client.buildPartyList(),
|
|
66
|
+
...(params.templateIds !== undefined && { templateIds: params.templateIds }),
|
|
67
|
+
...(params.interfaceIds !== undefined && { interfaceIds: params.interfaceIds }),
|
|
68
|
+
...(params.includeInterfaceView !== undefined && { includeInterfaceView: params.includeInterfaceView }),
|
|
69
|
+
includeCreatedEventBlob: params.includeCreatedEventBlob === true,
|
|
70
|
+
}),
|
|
71
|
+
verbose: true,
|
|
72
|
+
},
|
|
73
|
+
transactionShape,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
21
78
|
return {
|
|
22
79
|
updateId: params.updateId,
|
|
23
80
|
updateFormat: {
|
|
@@ -32,7 +89,7 @@ exports.GetUpdateById = (0, core_1.createApiOperation)({
|
|
|
32
89
|
identifierFilter: {
|
|
33
90
|
WildcardFilter: {
|
|
34
91
|
value: {
|
|
35
|
-
includeCreatedEventBlob: true,
|
|
92
|
+
includeCreatedEventBlob: params.includeCreatedEventBlob ?? true,
|
|
36
93
|
},
|
|
37
94
|
},
|
|
38
95
|
},
|
|
@@ -41,7 +98,7 @@ exports.GetUpdateById = (0, core_1.createApiOperation)({
|
|
|
41
98
|
},
|
|
42
99
|
])),
|
|
43
100
|
},
|
|
44
|
-
transactionShape
|
|
101
|
+
transactionShape,
|
|
45
102
|
},
|
|
46
103
|
},
|
|
47
104
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-update-by-id.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,8CAAyD;
|
|
1
|
+
{"version":3,"file":"get-update-by-id.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,8CAAyD;AAEzD,iEAA6E;AAC7E,wEAAiE;AAEjE,MAAM,QAAQ,GAAG,0BAAmC,CAAC;AAErD,MAAM,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,qCAAqC;IACrC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,qCAAqC,CAAC;IAClE,oHAAoH;IACpH,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC3B,qDAAqD;IACrD,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C,sDAAsD;IACtD,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,yEAAyE;IACzE,oBAAoB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5C;;;OAGG;IACH,uBAAuB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/C,oEAAoE;IACpE,gBAAgB,EAAE,gCAAsB,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAMH;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,aAAa,GAAG,IAAA,yBAAkB,EAA6C;IAC1F,YAAY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AC,oBAAoB,KAAK,SAAS,IAAI,EAAE,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,EAAE,CAAC;gCACvG,uBAAuB,EAAE,MAAM,CAAC,uBAAuB,KAAK,IAAI;6BACjE,CAAC;4BACF,OAAO,EAAE,IAAI;yBACd;wBACD,gBAAgB;qBACjB;iBACF;aACF,CAAC;QACJ,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,YAAY,EAAE;gBACZ,mBAAmB,EAAE;oBACnB,WAAW,EAAE;wBACX,OAAO,EAAE,IAAI;wBACb,cAAc,EAAE,MAAM,CAAC,WAAW,CAChC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;4BAC3B,KAAK;4BACL;gCACE,UAAU,EAAE;oCACV;wCACE,gBAAgB,EAAE;4CAChB,cAAc,EAAE;gDACd,KAAK,EAAE;oDACL,uBAAuB,EAAE,MAAM,CAAC,uBAAuB,IAAI,IAAI;iDAChE;6CACF;yCACF;qCACF;iCACF;6BACF;yBACF,CAAC,CACH;qBACF;oBACD,gBAAgB;iBACjB;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -4,6 +4,23 @@ import { GetUpdateByOffsetParamsSchema } from '../../../schemas/operations';
|
|
|
4
4
|
declare const endpoint: '/v2/updates/update-by-offset';
|
|
5
5
|
export type GetUpdateByOffsetParams = z.infer<typeof GetUpdateByOffsetParamsSchema>;
|
|
6
6
|
export type GetUpdateByOffsetResponse = paths[typeof endpoint]['post']['responses']['200']['content']['application/json'];
|
|
7
|
+
/**
|
|
8
|
+
* Fetches the update at one offset, formatted by the caller's `updateFormat`.
|
|
9
|
+
*
|
|
10
|
+
* Build `updateFormat` with `buildUpdateFormat` for template or interface filters, with or without created event blobs
|
|
11
|
+
* and interface views, and for either transaction shape.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const update = await client.getUpdateByOffset({
|
|
16
|
+
* offset: 1000,
|
|
17
|
+
* updateFormat: buildUpdateFormat({
|
|
18
|
+
* parties: ['party1'],
|
|
19
|
+
* interfaceIds: ['#example-package:Example.Module:Asset'],
|
|
20
|
+
* }),
|
|
21
|
+
* });
|
|
22
|
+
* ```;
|
|
23
|
+
*/
|
|
7
24
|
export declare const GetUpdateByOffset: new (client: import("../../../../..").BaseClient) => import("../../../../..").ApiOperation<{
|
|
8
25
|
offset: number;
|
|
9
26
|
updateFormat: {
|
package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-update-by-offset.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;AACvI,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAE5E,QAAA,MAAM,QAAQ,EAAG,8BAAuC,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,yBAAyB,GACnC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAEpF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM5B,CAAC"}
|
|
1
|
+
{"version":3,"file":"get-update-by-offset.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;AACvI,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAE5E,QAAA,MAAM,QAAQ,EAAG,8BAAuC,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,yBAAyB,GACnC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM5B,CAAC"}
|
|
@@ -4,6 +4,23 @@ exports.GetUpdateByOffset = void 0;
|
|
|
4
4
|
const core_1 = require("../../../../../core");
|
|
5
5
|
const operations_1 = require("../../../schemas/operations");
|
|
6
6
|
const endpoint = '/v2/updates/update-by-offset';
|
|
7
|
+
/**
|
|
8
|
+
* Fetches the update at one offset, formatted by the caller's `updateFormat`.
|
|
9
|
+
*
|
|
10
|
+
* Build `updateFormat` with `buildUpdateFormat` for template or interface filters, with or without created event blobs
|
|
11
|
+
* and interface views, and for either transaction shape.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const update = await client.getUpdateByOffset({
|
|
16
|
+
* offset: 1000,
|
|
17
|
+
* updateFormat: buildUpdateFormat({
|
|
18
|
+
* parties: ['party1'],
|
|
19
|
+
* interfaceIds: ['#example-package:Example.Module:Asset'],
|
|
20
|
+
* }),
|
|
21
|
+
* });
|
|
22
|
+
* ```;
|
|
23
|
+
*/
|
|
7
24
|
exports.GetUpdateByOffset = (0, core_1.createApiOperation)({
|
|
8
25
|
paramsSchema: operations_1.GetUpdateByOffsetParamsSchema,
|
|
9
26
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-update-by-offset.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.ts"],"names":[],"mappings":";;;AACA,8CAAyD;AAEzD,4DAA4E;AAE5E,MAAM,QAAQ,GAAG,8BAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-update-by-offset.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.ts"],"names":[],"mappings":";;;AACA,8CAAyD;AAEzD,4DAA4E;AAE5E,MAAM,QAAQ,GAAG,8BAAuC,CAAC;AAMzD;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,iBAAiB,GAAG,IAAA,yBAAkB,EAAqD;IACtG,YAAY,EAAE,0CAA6B;IAC3C,MAAM,EAAE,MAAM;IACd,gBAAgB,EAAE,MAAM;IACxB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,QAAQ,EAAE;IACrD,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM;CACrC,CAAC,CAAC"}
|
|
@@ -30,6 +30,8 @@ export declare enum TransactionShape {
|
|
|
30
30
|
declare const SubscribeToUpdatesParamsSchema: z.ZodObject<{
|
|
31
31
|
parties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
32
|
templateIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
+
interfaceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
33
35
|
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
34
36
|
beginExclusive: z.ZodOptional<z.ZodNumber>;
|
|
35
37
|
endInclusive: z.ZodOptional<z.ZodNumber>;
|
|
@@ -140,16 +142,34 @@ export declare const UpdatesWsMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
140
142
|
[key: string]: string | number | boolean | any | any | null;
|
|
141
143
|
} | null, unknown>>>;
|
|
142
144
|
createdEventBlob: z.ZodOptional<z.ZodString>;
|
|
143
|
-
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
145
|
+
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
144
146
|
interfaceId: z.ZodString;
|
|
145
|
-
implementationPackageId: z.ZodOptional<z.ZodString
|
|
147
|
+
implementationPackageId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
146
148
|
viewStatus: z.ZodObject<{
|
|
147
149
|
code: z.ZodNumber;
|
|
148
150
|
message: z.ZodString;
|
|
149
151
|
details: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
150
152
|
}, z.core.$strict>;
|
|
151
|
-
viewValue: z.ZodOptional<z.ZodUnknown
|
|
152
|
-
}, z.core.$strict
|
|
153
|
+
viewValue: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUnknown, z.ZodNull]>, z.ZodTransform<unknown, unknown>>>;
|
|
154
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
155
|
+
interfaceId: string;
|
|
156
|
+
implementationPackageId?: string;
|
|
157
|
+
viewStatus: {
|
|
158
|
+
code: number;
|
|
159
|
+
message: string;
|
|
160
|
+
details?: unknown[] | undefined;
|
|
161
|
+
};
|
|
162
|
+
viewValue?: {} | null;
|
|
163
|
+
}, {
|
|
164
|
+
interfaceId: string;
|
|
165
|
+
implementationPackageId?: string | undefined;
|
|
166
|
+
viewStatus: {
|
|
167
|
+
code: number;
|
|
168
|
+
message: string;
|
|
169
|
+
details?: unknown[] | undefined;
|
|
170
|
+
};
|
|
171
|
+
viewValue?: unknown;
|
|
172
|
+
}>>>>>;
|
|
153
173
|
witnessParties: z.ZodArray<z.ZodString>;
|
|
154
174
|
signatories: z.ZodArray<z.ZodString>;
|
|
155
175
|
observers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -340,16 +360,34 @@ export declare const UpdatesWsMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
340
360
|
[key: string]: string | number | boolean | any | any | null;
|
|
341
361
|
} | null, unknown>>>;
|
|
342
362
|
createdEventBlob: z.ZodOptional<z.ZodString>;
|
|
343
|
-
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
363
|
+
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
344
364
|
interfaceId: z.ZodString;
|
|
345
|
-
implementationPackageId: z.ZodOptional<z.ZodString
|
|
365
|
+
implementationPackageId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
346
366
|
viewStatus: z.ZodObject<{
|
|
347
367
|
code: z.ZodNumber;
|
|
348
368
|
message: z.ZodString;
|
|
349
369
|
details: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
350
370
|
}, z.core.$strict>;
|
|
351
|
-
viewValue: z.ZodOptional<z.ZodUnknown
|
|
352
|
-
}, z.core.$strict
|
|
371
|
+
viewValue: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUnknown, z.ZodNull]>, z.ZodTransform<unknown, unknown>>>;
|
|
372
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
373
|
+
interfaceId: string;
|
|
374
|
+
implementationPackageId?: string;
|
|
375
|
+
viewStatus: {
|
|
376
|
+
code: number;
|
|
377
|
+
message: string;
|
|
378
|
+
details?: unknown[] | undefined;
|
|
379
|
+
};
|
|
380
|
+
viewValue?: {} | null;
|
|
381
|
+
}, {
|
|
382
|
+
interfaceId: string;
|
|
383
|
+
implementationPackageId?: string | undefined;
|
|
384
|
+
viewStatus: {
|
|
385
|
+
code: number;
|
|
386
|
+
message: string;
|
|
387
|
+
details?: unknown[] | undefined;
|
|
388
|
+
};
|
|
389
|
+
viewValue?: unknown;
|
|
390
|
+
}>>>>>;
|
|
353
391
|
witnessParties: z.ZodArray<z.ZodString>;
|
|
354
392
|
signatories: z.ZodArray<z.ZodString>;
|
|
355
393
|
observers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
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
|
|
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;;;;;;;;;;;iBA8BlC,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;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAYtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,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,CAgJpE;CACF"}
|
|
@@ -40,7 +40,11 @@ const SubscribeToUpdatesParamsSchema = zod_1.z.object({
|
|
|
40
40
|
parties: zod_1.z.array(zod_1.z.string()).optional(),
|
|
41
41
|
/** Optional template filters applied server-side. */
|
|
42
42
|
templateIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
43
|
-
/**
|
|
43
|
+
/** Optional interface filters applied server-side. */
|
|
44
|
+
interfaceIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
45
|
+
/** Include interface views in InterfaceFilter results (default true). */
|
|
46
|
+
includeInterfaceView: zod_1.z.boolean().optional(),
|
|
47
|
+
/** Include created event blobs in template and interface filter results (default false). */
|
|
44
48
|
includeCreatedEventBlob: zod_1.z.boolean().optional(),
|
|
45
49
|
/** Beginning of the requested ledger section. Defaults to ledger end if not provided. */
|
|
46
50
|
beginExclusive: zod_1.z.number().optional(),
|
|
@@ -127,36 +131,19 @@ class SubscribeToUpdates {
|
|
|
127
131
|
}
|
|
128
132
|
// Build party list - default to client's party list if not provided
|
|
129
133
|
const partyList = validated.parties && validated.parties.length > 0 ? validated.parties : this.client.buildPartyList();
|
|
130
|
-
// Build
|
|
131
|
-
const
|
|
134
|
+
// Build update format: transactions, plus reassignments (default) and topology events (opt-in)
|
|
135
|
+
const updateFormat = (0, event_format_builder_1.buildUpdateFormat)({
|
|
132
136
|
parties: partyList,
|
|
133
137
|
...(validated.templateIds !== undefined && { templateIds: validated.templateIds }),
|
|
138
|
+
...(validated.interfaceIds !== undefined && { interfaceIds: validated.interfaceIds }),
|
|
139
|
+
...(validated.includeInterfaceView !== undefined && { includeInterfaceView: validated.includeInterfaceView }),
|
|
134
140
|
...(validated.includeCreatedEventBlob !== undefined && {
|
|
135
141
|
includeCreatedEventBlob: validated.includeCreatedEventBlob,
|
|
136
142
|
}),
|
|
143
|
+
...(validated.transactionShape !== undefined && { transactionShape: validated.transactionShape }),
|
|
144
|
+
...(validated.includeReassignments !== undefined && { includeReassignments: validated.includeReassignments }),
|
|
145
|
+
...(validated.includeTopologyEvents !== undefined && { includeTopologyEvents: validated.includeTopologyEvents }),
|
|
137
146
|
});
|
|
138
|
-
// Build update format with optional features
|
|
139
|
-
const updateFormat = {
|
|
140
|
-
includeTransactions: {
|
|
141
|
-
eventFormat,
|
|
142
|
-
transactionShape: validated.transactionShape ?? TransactionShape.TRANSACTION_SHAPE_LEDGER_EFFECTS,
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
// Add reassignments if enabled (default true)
|
|
146
|
-
if (validated.includeReassignments !== false) {
|
|
147
|
-
updateFormat.includeReassignments = {
|
|
148
|
-
filtersByParty: eventFormat.filtersByParty,
|
|
149
|
-
verbose: false,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
// Add topology events if enabled (default false)
|
|
153
|
-
if (validated.includeTopologyEvents === true) {
|
|
154
|
-
updateFormat.includeTopologyEvents = {
|
|
155
|
-
includeParticipantAuthorizationEvents: {
|
|
156
|
-
parties: partyList,
|
|
157
|
-
},
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
147
|
// Build request message
|
|
161
148
|
const requestMessage = {
|
|
162
149
|
beginExclusive,
|
|
@@ -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,0DAA8D;AAC9D,
|
|
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,0DAA8D;AAC9D,wEAAkE;AAElE,MAAM,IAAI,GAAG,aAAsB,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,+EAA2D,CAAA;IAC3D,yFAAqE,CAAA;AACvE,CAAC,EAHW,gBAAgB,aAAhB,gBAAgB,GAAhB,gBAAgB,QAG3B;AAED,MAAM,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,oDAAoD;IACpD,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,qDAAqD;IACrD,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C,sDAAsD;IACtD,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ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M,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"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Shared utility for building eventFormat configuration used across multiple Ledger JSON API operations. This module
|
|
3
3
|
* provides a consistent way to construct the complex eventFormat structure from simple parameters.
|
|
4
4
|
*/
|
|
5
|
+
import type { TransactionFormat, TransactionShape, UpdateFormat } from '../../../schemas/operations/updates';
|
|
5
6
|
export interface EventFormatBuilderParams {
|
|
6
7
|
/** List of parties to scope the filter. At least one party is required. */
|
|
7
8
|
parties: string[];
|
|
@@ -14,6 +15,16 @@ export interface EventFormatBuilderParams {
|
|
|
14
15
|
/** Include created event blobs in template and interface filter results (default false). */
|
|
15
16
|
includeCreatedEventBlob?: boolean | undefined;
|
|
16
17
|
}
|
|
18
|
+
export type TransactionFormatBuilderParams = EventFormatBuilderParams & {
|
|
19
|
+
/** Transaction shape (default TRANSACTION_SHAPE_LEDGER_EFFECTS). */
|
|
20
|
+
transactionShape?: TransactionShape | undefined;
|
|
21
|
+
};
|
|
22
|
+
export type UpdateFormatBuilderParams = TransactionFormatBuilderParams & {
|
|
23
|
+
/** Include reassignments with the same filters (default true). */
|
|
24
|
+
includeReassignments?: boolean | undefined;
|
|
25
|
+
/** Include participant authorization topology events for the parties (default false). */
|
|
26
|
+
includeTopologyEvents?: boolean | undefined;
|
|
27
|
+
};
|
|
17
28
|
type FilterCumulative = Array<{
|
|
18
29
|
identifierFilter: {
|
|
19
30
|
TemplateFilter: {
|
|
@@ -56,5 +67,23 @@ export declare function buildEventFormat(params: EventFormatBuilderParams): {
|
|
|
56
67
|
cumulative: FilterCumulative;
|
|
57
68
|
}>;
|
|
58
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* Builds a transaction format: the event format plus a transaction shape. The result also fits the `transactionFormat`
|
|
72
|
+
* of `submitAndWaitForTransaction`.
|
|
73
|
+
*
|
|
74
|
+
* @param params - Event format parameters and an optional `transactionShape`
|
|
75
|
+
* @returns A transaction format using `TRANSACTION_SHAPE_LEDGER_EFFECTS` unless a shape is given
|
|
76
|
+
* @throws Error if no parties are provided
|
|
77
|
+
*/
|
|
78
|
+
export declare function buildTransactionFormat(params: TransactionFormatBuilderParams): TransactionFormat;
|
|
79
|
+
/**
|
|
80
|
+
* Builds the update format that `subscribeToUpdates` sends, so it can also be passed as the `updateFormat` of
|
|
81
|
+
* `getUpdateByOffset`. Reassignments reuse the same party filters; topology events cover the same parties.
|
|
82
|
+
*
|
|
83
|
+
* @param params - Transaction format parameters and the optional reassignment and topology switches
|
|
84
|
+
* @returns An update format with transactions, reassignments (unless disabled) and topology events (when enabled)
|
|
85
|
+
* @throws Error if no parties are provided
|
|
86
|
+
*/
|
|
87
|
+
export declare function buildUpdateFormat(params: UpdateFormatBuilderParams): UpdateFormat;
|
|
59
88
|
export {};
|
|
60
89
|
//# sourceMappingURL=event-format-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-format-builder.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/utils/event-format-builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,wBAAwB;IACvC,2EAA2E;IAC3E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACnC,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACpC,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,4FAA4F;IAC5F,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/C;AAED,KAAK,gBAAgB,GAAG,KAAK,CACzB;IACE,gBAAgB,EAAE;QAChB,cAAc,EAAE;YACd,KAAK,EAAE;gBACL,UAAU,EAAE,MAAM,CAAC;gBACnB,uBAAuB,EAAE,OAAO,CAAC;aAClC,CAAC;SACH,CAAC;KACH,CAAC;CACH,GACD;IACE,gBAAgB,EAAE;QAChB,eAAe,EAAE;YACf,KAAK,EAAE;gBACL,WAAW,EAAE,MAAM,CAAC;gBACpB,oBAAoB,EAAE,OAAO,CAAC;gBAC9B,uBAAuB,EAAE,OAAO,CAAC;aAClC,CAAC;SACH,CAAC;KACH,CAAC;CACH,GACD;IACE,gBAAgB,EAAE;QAChB,cAAc,EAAE;YACd,KAAK,EAAE;gBACL,uBAAuB,EAAE,OAAO,CAAC;aAClC,CAAC;SACH,CAAC;KACH,CAAC;CACH,CACJ,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,wBAAwB,GAAG;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAC;CAClE,CA6DA"}
|
|
1
|
+
{"version":3,"file":"event-format-builder.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/utils/event-format-builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAE7G,MAAM,WAAW,wBAAwB;IACvC,2EAA2E;IAC3E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACnC,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACpC,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,4F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H,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,yBAAyB,GAAG,YAAY,CAmBjF"}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.buildEventFormat = buildEventFormat;
|
|
8
|
+
exports.buildTransactionFormat = buildTransactionFormat;
|
|
9
|
+
exports.buildUpdateFormat = buildUpdateFormat;
|
|
8
10
|
/**
|
|
9
11
|
* Builds the eventFormat object structure used in various Ledger JSON API operations. This centralizes the logic for
|
|
10
12
|
* creating filtersByParty configurations from simple parameters.
|
|
@@ -70,4 +72,45 @@ function buildEventFormat(params) {
|
|
|
70
72
|
])),
|
|
71
73
|
};
|
|
72
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Builds a transaction format: the event format plus a transaction shape. The result also fits the `transactionFormat`
|
|
77
|
+
* of `submitAndWaitForTransaction`.
|
|
78
|
+
*
|
|
79
|
+
* @param params - Event format parameters and an optional `transactionShape`
|
|
80
|
+
* @returns A transaction format using `TRANSACTION_SHAPE_LEDGER_EFFECTS` unless a shape is given
|
|
81
|
+
* @throws Error if no parties are provided
|
|
82
|
+
*/
|
|
83
|
+
function buildTransactionFormat(params) {
|
|
84
|
+
return {
|
|
85
|
+
eventFormat: buildEventFormat(params),
|
|
86
|
+
transactionShape: params.transactionShape ?? 'TRANSACTION_SHAPE_LEDGER_EFFECTS',
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Builds the update format that `subscribeToUpdates` sends, so it can also be passed as the `updateFormat` of
|
|
91
|
+
* `getUpdateByOffset`. Reassignments reuse the same party filters; topology events cover the same parties.
|
|
92
|
+
*
|
|
93
|
+
* @param params - Transaction format parameters and the optional reassignment and topology switches
|
|
94
|
+
* @returns An update format with transactions, reassignments (unless disabled) and topology events (when enabled)
|
|
95
|
+
* @throws Error if no parties are provided
|
|
96
|
+
*/
|
|
97
|
+
function buildUpdateFormat(params) {
|
|
98
|
+
const includeTransactions = buildTransactionFormat(params);
|
|
99
|
+
return {
|
|
100
|
+
includeTransactions,
|
|
101
|
+
...(params.includeReassignments !== false && {
|
|
102
|
+
includeReassignments: {
|
|
103
|
+
filtersByParty: includeTransactions.eventFormat.filtersByParty,
|
|
104
|
+
verbose: false,
|
|
105
|
+
},
|
|
106
|
+
}),
|
|
107
|
+
...(params.includeTopologyEvents === true && {
|
|
108
|
+
includeTopologyEvents: {
|
|
109
|
+
includeParticipantAuthorizationEvents: {
|
|
110
|
+
parties: params.parties,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
}),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
73
116
|
//# sourceMappingURL=event-format-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-format-builder.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/utils/event-format-builder.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"event-format-builder.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/utils/event-format-builder.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AA8DH;;;;;;;GAOG;AACH,0BAAiC,MAAgC;IAI/D,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IAED,oCAAoC;IACpC,MAAM,eAAe,GAAG,GAAqB,EAAE;QAC7C,MAAM,uBAAuB,GAAG,MAAM,CAAC,uBAAuB,IAAI,KAAK,CAAC;QACxE,MAAM,eAAe,GAAqB,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YACxF,gBAAgB,EAAE;gBAChB,cAAc,EAAE;oBACd,KAAK,EAAE;wBACL,UAAU;wBACV,uBAAuB;qBACxB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CAAC,MAAM,CAAC,CAAC;IAE3D,OAAO;QACL,mBAAmB;QACnB,GAAG,CAAC,MAAM,CAAC,oBAAoB,KAAK,KAAK,IAAI;YAC3C,oBAAoB,EAAE;gBACpB,cAAc,EAAE,mBAAmB,CAAC,WAAW,CAAC,cAAc;gBAC9D,OAAO,EAAE,KAAK;aACf;SACF,CAAC;QACF,GAAG,CAAC,MAAM,CAAC,qBAAqB,KAAK,IAAI,IAAI;YAC3C,qBAAqB,EAAE;gBACrB,qCAAqC,EAAE;oBACrC,OAAO,EAAE,MAAM,CAAC,OAAO;iBACxB;aACF;SACF,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -63,16 +63,34 @@ export declare const CreatedEventDetailsSchema: z.ZodObject<{
|
|
|
63
63
|
[key: string]: string | number | boolean | any | any | null;
|
|
64
64
|
} | null, unknown>>>;
|
|
65
65
|
createdEventBlob: z.ZodOptional<z.ZodString>;
|
|
66
|
-
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
|
+
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
67
67
|
interfaceId: z.ZodString;
|
|
68
|
-
implementationPackageId: z.ZodOptional<z.ZodString
|
|
68
|
+
implementationPackageId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
69
69
|
viewStatus: z.ZodObject<{
|
|
70
70
|
code: z.ZodNumber;
|
|
71
71
|
message: z.ZodString;
|
|
72
72
|
details: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
73
73
|
}, z.core.$strict>;
|
|
74
|
-
viewValue: z.ZodOptional<z.ZodUnknown
|
|
75
|
-
}, z.core.$strict
|
|
74
|
+
viewValue: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUnknown, z.ZodNull]>, z.ZodTransform<unknown, unknown>>>;
|
|
75
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
76
|
+
interfaceId: string;
|
|
77
|
+
implementationPackageId?: string;
|
|
78
|
+
viewStatus: {
|
|
79
|
+
code: number;
|
|
80
|
+
message: string;
|
|
81
|
+
details?: unknown[] | undefined;
|
|
82
|
+
};
|
|
83
|
+
viewValue?: {} | null;
|
|
84
|
+
}, {
|
|
85
|
+
interfaceId: string;
|
|
86
|
+
implementationPackageId?: string | undefined;
|
|
87
|
+
viewStatus: {
|
|
88
|
+
code: number;
|
|
89
|
+
message: string;
|
|
90
|
+
details?: unknown[] | undefined;
|
|
91
|
+
};
|
|
92
|
+
viewValue?: unknown;
|
|
93
|
+
}>>>>>;
|
|
76
94
|
witnessParties: z.ZodArray<z.ZodString>;
|
|
77
95
|
signatories: z.ZodArray<z.ZodString>;
|
|
78
96
|
observers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -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;AAKxB,cAAc,kBAAkB,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB
|
|
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"}
|
|
@@ -154,16 +154,34 @@ export declare const CreatedEventSchema: z.ZodObject<{
|
|
|
154
154
|
[key: string]: string | number | boolean | any | any | null;
|
|
155
155
|
} | null, unknown>>>;
|
|
156
156
|
createdEventBlob: z.ZodString;
|
|
157
|
-
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
157
|
+
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
158
158
|
interfaceId: z.ZodString;
|
|
159
|
-
implementationPackageId: z.ZodOptional<z.ZodString
|
|
159
|
+
implementationPackageId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
160
160
|
viewStatus: z.ZodObject<{
|
|
161
161
|
code: z.ZodNumber;
|
|
162
162
|
message: z.ZodString;
|
|
163
163
|
details: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
164
164
|
}, z.core.$strict>;
|
|
165
|
-
viewValue: z.ZodOptional<z.ZodUnknown
|
|
166
|
-
}, z.core.$strict
|
|
165
|
+
viewValue: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUnknown, z.ZodNull]>, z.ZodTransform<unknown, unknown>>>;
|
|
166
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
167
|
+
interfaceId: string;
|
|
168
|
+
implementationPackageId?: string;
|
|
169
|
+
viewStatus: {
|
|
170
|
+
code: number;
|
|
171
|
+
message: string;
|
|
172
|
+
details?: unknown[] | undefined;
|
|
173
|
+
};
|
|
174
|
+
viewValue?: {} | null;
|
|
175
|
+
}, {
|
|
176
|
+
interfaceId: string;
|
|
177
|
+
implementationPackageId?: string | undefined;
|
|
178
|
+
viewStatus: {
|
|
179
|
+
code: number;
|
|
180
|
+
message: string;
|
|
181
|
+
details?: unknown[] | undefined;
|
|
182
|
+
};
|
|
183
|
+
viewValue?: unknown;
|
|
184
|
+
}>>>>>;
|
|
167
185
|
witnessParties: z.ZodArray<z.ZodString>;
|
|
168
186
|
signatories: z.ZodArray<z.ZodString>;
|
|
169
187
|
observers: z.ZodArray<z.ZodString>;
|
|
@@ -242,16 +260,34 @@ export declare const EventsByContractIdResponseSchema: z.ZodObject<{
|
|
|
242
260
|
[key: string]: string | number | boolean | any | any | null;
|
|
243
261
|
} | null, unknown>>>;
|
|
244
262
|
createdEventBlob: z.ZodString;
|
|
245
|
-
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
263
|
+
interfaceViews: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
246
264
|
interfaceId: z.ZodString;
|
|
247
|
-
implementationPackageId: z.ZodOptional<z.ZodString
|
|
265
|
+
implementationPackageId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>, z.ZodTransform<string | undefined, string | null>>>;
|
|
248
266
|
viewStatus: z.ZodObject<{
|
|
249
267
|
code: z.ZodNumber;
|
|
250
268
|
message: z.ZodString;
|
|
251
269
|
details: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
252
270
|
}, z.core.$strict>;
|
|
253
|
-
viewValue: z.ZodOptional<z.ZodUnknown
|
|
254
|
-
}, z.core.$strict
|
|
271
|
+
viewValue: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUnknown, z.ZodNull]>, z.ZodTransform<unknown, unknown>>>;
|
|
272
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
273
|
+
interfaceId: string;
|
|
274
|
+
implementationPackageId?: string;
|
|
275
|
+
viewStatus: {
|
|
276
|
+
code: number;
|
|
277
|
+
message: string;
|
|
278
|
+
details?: unknown[] | undefined;
|
|
279
|
+
};
|
|
280
|
+
viewValue?: {} | null;
|
|
281
|
+
}, {
|
|
282
|
+
interfaceId: string;
|
|
283
|
+
implementationPackageId?: string | undefined;
|
|
284
|
+
viewStatus: {
|
|
285
|
+
code: number;
|
|
286
|
+
message: string;
|
|
287
|
+
details?: unknown[] | undefined;
|
|
288
|
+
};
|
|
289
|
+
viewValue?: unknown;
|
|
290
|
+
}>>>>>;
|
|
255
291
|
witnessParties: z.ZodArray<z.ZodString>;
|
|
256
292
|
signatories: z.ZodArray<z.ZodString>;
|
|
257
293
|
observers: z.ZodArray<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,wCAAwC;AACxC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQf,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAcnB,CAAC;AAEZ,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOjC,CAAC;AAEZ,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../../src/clients/ledger-json-api/schemas/api/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,wCAAwC;AACxC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQf,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAcnB,CAAC;AAEZ,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOjC,CAAC;AAEZ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoCpB,CAAC;AAEZ,eAAO,MAAM,mBAAmB;;;;;;;;;;;kBAwBrB,CAAC;AAEZ,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUzC,CAAC;AAEL,MAAM,MAAM,OAAO,GAAG,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