@fairmint/canton-node-sdk 0.0.89 → 0.0.91
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/LedgerJsonApiClient.generated.d.ts +9 -0
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js +8 -0
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/completions.d.ts.map +1 -1
- 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.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-completions.d.ts +17 -0
- package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-completions.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-completions.js +32 -0
- package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-completions.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/events/get-events-by-contract-id.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/parties/get-party-details.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/parties/get.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/parties/update-party-details.d.ts.map +1 -1
- 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-connected-synchronizers.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/state/subscribe-to-active-contracts.d.ts +51 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/subscribe-to-active-contracts.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/subscribe-to-active-contracts.js +34 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/subscribe-to-active-contracts.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-flats.d.ts +10 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-flats.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-by-id.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-by-offset.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-tree-by-id.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-tree-by-offset.d.ts.map +1 -1
- 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-offset.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.d.ts +237 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.js +36 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.d.ts +239 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.js +34 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.d.ts +8 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.js +95 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/users/create-user.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/get-user.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/grant-user-rights.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/list-user-rights.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/list-users.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/revoke-user-rights.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/update-user.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/completions.d.ts +120 -6
- 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 +19 -2
- package/build/src/clients/ledger-json-api/schemas/api/completions.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/errors.d.ts +17 -0
- package/build/src/clients/ledger-json-api/schemas/api/errors.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/errors.js +17 -1
- package/build/src/clients/ledger-json-api/schemas/api/errors.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/updates.d.ts +71 -0
- 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 +17 -1
- package/build/src/clients/ledger-json-api/schemas/api/updates.js.map +1 -1
- package/build/src/clients/lighthouse-api/LighthouseApiClient.generated.d.ts.map +1 -1
- package/build/src/clients/lighthouse-api/LighthouseApiClient.generated.js.map +1 -1
- package/build/src/clients/register.d.ts +0 -1
- package/build/src/clients/register.d.ts.map +1 -1
- package/build/src/clients/register.js +1 -3
- package/build/src/clients/register.js.map +1 -1
- package/build/src/clients/validator-api/ValidatorApiClient.generated.d.ts.map +1 -1
- package/build/src/clients/validator-api/ValidatorApiClient.generated.js.map +1 -1
- package/build/src/core/BaseClient.d.ts +1 -0
- package/build/src/core/BaseClient.d.ts.map +1 -1
- package/build/src/core/BaseClient.js +3 -0
- package/build/src/core/BaseClient.js.map +1 -1
- package/build/src/core/errors.d.ts +2 -1
- package/build/src/core/errors.d.ts.map +1 -1
- package/build/src/core/errors.js +2 -1
- package/build/src/core/errors.js.map +1 -1
- package/build/src/core/index.d.ts +1 -0
- package/build/src/core/index.d.ts.map +1 -1
- package/build/src/core/index.js +1 -0
- package/build/src/core/index.js.map +1 -1
- package/build/src/core/logging/FileLogger.d.ts.map +1 -1
- package/build/src/core/logging/FileLogger.js +8 -1
- package/build/src/core/logging/FileLogger.js.map +1 -1
- package/build/src/core/operations/WebSocketOperationFactory.d.ts +17 -0
- package/build/src/core/operations/WebSocketOperationFactory.d.ts.map +1 -0
- package/build/src/core/operations/WebSocketOperationFactory.js +38 -0
- package/build/src/core/operations/WebSocketOperationFactory.js.map +1 -0
- package/build/src/core/operations/index.d.ts +1 -0
- package/build/src/core/operations/index.d.ts.map +1 -1
- package/build/src/core/operations/index.js +1 -0
- package/build/src/core/operations/index.js.map +1 -1
- package/build/src/core/ws/WebSocketClient.d.ts +27 -0
- package/build/src/core/ws/WebSocketClient.d.ts.map +1 -0
- package/build/src/core/ws/WebSocketClient.js +96 -0
- package/build/src/core/ws/WebSocketClient.js.map +1 -0
- package/build/src/core/ws/WebSocketErrorUtils.d.ts +36 -0
- package/build/src/core/ws/WebSocketErrorUtils.d.ts.map +1 -0
- package/build/src/core/ws/WebSocketErrorUtils.js +71 -0
- package/build/src/core/ws/WebSocketErrorUtils.js.map +1 -0
- package/build/src/core/ws/index.d.ts +2 -0
- package/build/src/core/ws/index.d.ts.map +1 -0
- package/build/src/core/ws/index.js +18 -0
- package/build/src/core/ws/index.js.map +1 -0
- package/build/src/generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi.d.ts +280 -4
- package/build/src/generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Utility functions for consistent WebSocket error handling
|
|
4
|
+
*/
|
|
5
|
+
export declare class WebSocketErrorUtils {
|
|
6
|
+
/**
|
|
7
|
+
* Safely parses a message using multiple schemas, throwing descriptive errors if all fail
|
|
8
|
+
* @param msg - The message to parse
|
|
9
|
+
* @param schemas - Array of schemas to try in order
|
|
10
|
+
* @param operationName - Name of the operation for error context
|
|
11
|
+
* @returns The parsed message
|
|
12
|
+
* @throws CantonError if all schemas fail to parse
|
|
13
|
+
*/
|
|
14
|
+
static parseWithFallback<T>(msg: unknown, schemas: Array<{
|
|
15
|
+
schema: z.ZodSchema<T>;
|
|
16
|
+
name: string;
|
|
17
|
+
}>, operationName: string): T;
|
|
18
|
+
/**
|
|
19
|
+
* Parses a union schema and returns the result without type assertion
|
|
20
|
+
* @param msg - The message to parse
|
|
21
|
+
* @param unionSchema - The Zod union schema
|
|
22
|
+
* @param operationName - Name of the operation for error context
|
|
23
|
+
* @returns The parsed message with proper typing
|
|
24
|
+
* @throws CantonError if parsing fails
|
|
25
|
+
*/
|
|
26
|
+
static parseUnion<T>(msg: unknown, unionSchema: z.ZodSchema<T>, operationName: string): T;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a safe JSON parser that throws descriptive errors
|
|
29
|
+
* @param data - Raw data to parse
|
|
30
|
+
* @param context - Context for error messages
|
|
31
|
+
* @returns Parsed JSON object
|
|
32
|
+
* @throws CantonError if JSON parsing fails
|
|
33
|
+
*/
|
|
34
|
+
static safeJsonParse(data: string, context: string): unknown;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=WebSocketErrorUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebSocketErrorUtils.d.ts","sourceRoot":"","sources":["../../../../src/core/ws/WebSocketErrorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,qBAAa,mBAAmB;IAC9B;;;;;;;OAOG;IACH,MAAM,CAAC,iBAAiB,CAAC,CAAC,EACxB,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EACxD,aAAa,EAAE,MAAM,GACpB,CAAC;IAsBJ;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CAAC,CAAC,EACjB,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAC3B,aAAa,EAAE,MAAM,GACpB,CAAC;IAmBJ;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;CAW7D"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebSocketErrorUtils = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const errors_1 = require("../errors");
|
|
6
|
+
/**
|
|
7
|
+
* Utility functions for consistent WebSocket error handling
|
|
8
|
+
*/
|
|
9
|
+
class WebSocketErrorUtils {
|
|
10
|
+
/**
|
|
11
|
+
* Safely parses a message using multiple schemas, throwing descriptive errors if all fail
|
|
12
|
+
* @param msg - The message to parse
|
|
13
|
+
* @param schemas - Array of schemas to try in order
|
|
14
|
+
* @param operationName - Name of the operation for error context
|
|
15
|
+
* @returns The parsed message
|
|
16
|
+
* @throws CantonError if all schemas fail to parse
|
|
17
|
+
*/
|
|
18
|
+
static parseWithFallback(msg, schemas, operationName) {
|
|
19
|
+
const errors = [];
|
|
20
|
+
for (const { schema, name } of schemas) {
|
|
21
|
+
try {
|
|
22
|
+
return schema.parse(msg);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
if (error instanceof zod_1.z.ZodError) {
|
|
26
|
+
errors.push(`${name}: ${error.issues.map(e => e.message).join(', ')}`);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
errors.push(`${name}: ${error instanceof Error ? error.message : String(error)}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
throw new errors_1.CantonError(`Failed to parse ${operationName} message with any expected schema. Errors: ${errors.join('; ')}`, 'VALIDATION_ERROR', { originalMessage: msg, attemptedSchemas: schemas.map(s => s.name) });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Parses a union schema and returns the result without type assertion
|
|
37
|
+
* @param msg - The message to parse
|
|
38
|
+
* @param unionSchema - The Zod union schema
|
|
39
|
+
* @param operationName - Name of the operation for error context
|
|
40
|
+
* @returns The parsed message with proper typing
|
|
41
|
+
* @throws CantonError if parsing fails
|
|
42
|
+
*/
|
|
43
|
+
static parseUnion(msg, unionSchema, operationName) {
|
|
44
|
+
try {
|
|
45
|
+
return unionSchema.parse(msg);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (error instanceof zod_1.z.ZodError) {
|
|
49
|
+
throw new errors_1.CantonError(`Failed to parse ${operationName} message: ${error.issues.map(e => e.message).join(', ')}`, 'VALIDATION_ERROR', { originalMessage: msg, validationErrors: error.issues });
|
|
50
|
+
}
|
|
51
|
+
throw new errors_1.CantonError(`Failed to parse ${operationName} message: ${error instanceof Error ? error.message : String(error)}`, 'VALIDATION_ERROR', { originalMessage: msg });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Creates a safe JSON parser that throws descriptive errors
|
|
56
|
+
* @param data - Raw data to parse
|
|
57
|
+
* @param context - Context for error messages
|
|
58
|
+
* @returns Parsed JSON object
|
|
59
|
+
* @throws CantonError if JSON parsing fails
|
|
60
|
+
*/
|
|
61
|
+
static safeJsonParse(data, context) {
|
|
62
|
+
try {
|
|
63
|
+
return JSON.parse(data);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
throw new errors_1.CantonError(`Failed to parse JSON in ${context}: ${error instanceof Error ? error.message : String(error)}`, 'VALIDATION_ERROR', { rawData: data, context });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.WebSocketErrorUtils = WebSocketErrorUtils;
|
|
71
|
+
//# sourceMappingURL=WebSocketErrorUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebSocketErrorUtils.js","sourceRoot":"","sources":["../../../../src/core/ws/WebSocketErrorUtils.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAAwC;AAExC;;GAEG;AACH,MAAa,mBAAmB;IAC9B;;;;;;;OAOG;IACH,MAAM,CAAC,iBAAiB,CACtB,GAAY,EACZ,OAAwD,EACxD,aAAqB;QAErB,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,KAAK,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,OAAO,EAAE,CAAC;YACvC,IAAI,CAAC;gBACH,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC3B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,KAAK,YAAY,OAAC,CAAC,QAAQ,EAAE,CAAC;oBAChC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACzE,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACpF,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,IAAI,oBAAW,CACnB,mBAAmB,aAAa,8CAA8C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EACjG,kBAAkB,EAClB,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CACrE,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CACf,GAAY,EACZ,WAA2B,EAC3B,aAAqB;QAErB,IAAI,CAAC;YACH,OAAO,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,OAAC,CAAC,QAAQ,EAAE,CAAC;gBAChC,MAAM,IAAI,oBAAW,CACnB,mBAAmB,aAAa,aAAa,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAC1F,kBAAkB,EAClB,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,CAAC,MAAM,EAAE,CACzD,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,oBAAW,CACnB,mBAAmB,aAAa,aAAa,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACrG,kBAAkB,EAClB,EAAE,eAAe,EAAE,GAAG,EAAE,CACzB,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAAC,IAAY,EAAE,OAAe;QAChD,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,oBAAW,CACnB,2BAA2B,OAAO,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAC/F,kBAAkB,EAClB,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAC3B,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AApFD,kDAoFC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/ws/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./WebSocketClient"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/ws/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
|
|
@@ -226,6 +226,23 @@ export interface paths {
|
|
|
226
226
|
patch?: never;
|
|
227
227
|
trace?: never;
|
|
228
228
|
};
|
|
229
|
+
"/v2/parties/external/allocate": {
|
|
230
|
+
parameters: {
|
|
231
|
+
query?: never;
|
|
232
|
+
header?: never;
|
|
233
|
+
path?: never;
|
|
234
|
+
cookie?: never;
|
|
235
|
+
};
|
|
236
|
+
get?: never;
|
|
237
|
+
put?: never;
|
|
238
|
+
/** @description Allocate a new external party */
|
|
239
|
+
post: operations["postV2PartiesExternalAllocate"];
|
|
240
|
+
delete?: never;
|
|
241
|
+
options?: never;
|
|
242
|
+
head?: never;
|
|
243
|
+
patch?: never;
|
|
244
|
+
trace?: never;
|
|
245
|
+
};
|
|
229
246
|
"/v2/parties/participant-id": {
|
|
230
247
|
parameters: {
|
|
231
248
|
query?: never;
|
|
@@ -261,6 +278,23 @@ export interface paths {
|
|
|
261
278
|
patch: operations["patchV2PartiesParty"];
|
|
262
279
|
trace?: never;
|
|
263
280
|
};
|
|
281
|
+
"/v2/parties/external/generate-topology": {
|
|
282
|
+
parameters: {
|
|
283
|
+
query?: never;
|
|
284
|
+
header?: never;
|
|
285
|
+
path?: never;
|
|
286
|
+
cookie?: never;
|
|
287
|
+
};
|
|
288
|
+
get?: never;
|
|
289
|
+
put?: never;
|
|
290
|
+
/** @description Generate a topology for an external party */
|
|
291
|
+
post: operations["postV2PartiesExternalGenerate-topology"];
|
|
292
|
+
delete?: never;
|
|
293
|
+
options?: never;
|
|
294
|
+
head?: never;
|
|
295
|
+
patch?: never;
|
|
296
|
+
trace?: never;
|
|
297
|
+
};
|
|
264
298
|
"/v2/state/active-contracts": {
|
|
265
299
|
parameters: {
|
|
266
300
|
query?: never;
|
|
@@ -329,6 +363,23 @@ export interface paths {
|
|
|
329
363
|
patch?: never;
|
|
330
364
|
trace?: never;
|
|
331
365
|
};
|
|
366
|
+
"/v2/updates": {
|
|
367
|
+
parameters: {
|
|
368
|
+
query?: never;
|
|
369
|
+
header?: never;
|
|
370
|
+
path?: never;
|
|
371
|
+
cookie?: never;
|
|
372
|
+
};
|
|
373
|
+
get?: never;
|
|
374
|
+
put?: never;
|
|
375
|
+
/** @description Query updates list (blocking call) */
|
|
376
|
+
post: operations["postV2Updates"];
|
|
377
|
+
delete?: never;
|
|
378
|
+
options?: never;
|
|
379
|
+
head?: never;
|
|
380
|
+
patch?: never;
|
|
381
|
+
trace?: never;
|
|
382
|
+
};
|
|
332
383
|
"/v2/updates/flats": {
|
|
333
384
|
parameters: {
|
|
334
385
|
query?: never;
|
|
@@ -338,7 +389,7 @@ export interface paths {
|
|
|
338
389
|
};
|
|
339
390
|
get?: never;
|
|
340
391
|
put?: never;
|
|
341
|
-
/** @description Query flat transactions update list (blocking call) */
|
|
392
|
+
/** @description Query flat transactions update list (blocking call, deprecated: use v2/updates instead) */
|
|
342
393
|
post: operations["postV2UpdatesFlats"];
|
|
343
394
|
delete?: never;
|
|
344
395
|
options?: never;
|
|
@@ -355,7 +406,7 @@ export interface paths {
|
|
|
355
406
|
};
|
|
356
407
|
get?: never;
|
|
357
408
|
put?: never;
|
|
358
|
-
/** @description Query update transactions tree list (blocking call) */
|
|
409
|
+
/** @description Query update transactions tree list (blocking call, deprecated: use v2/updates instead) */
|
|
359
410
|
post: operations["postV2UpdatesTrees"];
|
|
360
411
|
delete?: never;
|
|
361
412
|
options?: never;
|
|
@@ -647,6 +698,39 @@ export interface paths {
|
|
|
647
698
|
export type webhooks = Record<string, never>;
|
|
648
699
|
export interface components {
|
|
649
700
|
schemas: {
|
|
701
|
+
/**
|
|
702
|
+
* AllocateExternalPartyRequest
|
|
703
|
+
* @description Required authorization: ``HasRight(ParticipantAdmin) OR IsAuthenticatedIdentityProviderAdmin(identity_provider_id)``
|
|
704
|
+
*/
|
|
705
|
+
AllocateExternalPartyRequest: {
|
|
706
|
+
/** @description TODO(#27670) support synchronizer aliases
|
|
707
|
+
* Synchronizer ID on which to onboard the party
|
|
708
|
+
* Required */
|
|
709
|
+
synchronizer: string;
|
|
710
|
+
/** @description TopologyTransactions to onboard the external party
|
|
711
|
+
* Can contain:
|
|
712
|
+
* - A namespace for the party.
|
|
713
|
+
* This can be either a single NamespaceDelegation,
|
|
714
|
+
* or DecentralizedNamespaceDefinition along with its authorized namespace owners in the form of NamespaceDelegations.
|
|
715
|
+
* May be provided, if so it must be fully authorized by the signatures in this request combined with the existing topology state.
|
|
716
|
+
* - A PartyToKeyMapping to register the party's signing keys.
|
|
717
|
+
* May be provided, if so it must be fully authorized by the signatures in this request combined with the existing topology state.
|
|
718
|
+
* - A PartyToParticipant to register the hosting relationship of the party.
|
|
719
|
+
* Must be provided.
|
|
720
|
+
* Required */
|
|
721
|
+
onboardingTransactions?: components["schemas"]["SignedTransaction"][];
|
|
722
|
+
/** @description Optional signatures of the combined hash of all onboarding_transactions
|
|
723
|
+
* This may be used instead of providing signatures on each individual transaction */
|
|
724
|
+
multiHashSignatures?: components["schemas"]["Signature"][];
|
|
725
|
+
/** @description The id of the ``Identity Provider``
|
|
726
|
+
* If not set, assume the party is managed by the default identity provider.
|
|
727
|
+
* Optional */
|
|
728
|
+
identityProviderId: string;
|
|
729
|
+
};
|
|
730
|
+
/** AllocateExternalPartyResponse */
|
|
731
|
+
AllocateExternalPartyResponse: {
|
|
732
|
+
partyId: string;
|
|
733
|
+
};
|
|
650
734
|
/**
|
|
651
735
|
* AllocatePartyRequest
|
|
652
736
|
* @description Required authorization: ``HasRight(ParticipantAdmin) OR IsAuthenticatedIdentityProviderAdmin(identity_provider_id)``
|
|
@@ -1437,6 +1521,44 @@ export interface components {
|
|
|
1437
1521
|
* Optional */
|
|
1438
1522
|
cumulative?: components["schemas"]["CumulativeFilter"][];
|
|
1439
1523
|
};
|
|
1524
|
+
/** GenerateExternalPartyTopologyRequest */
|
|
1525
|
+
GenerateExternalPartyTopologyRequest: {
|
|
1526
|
+
/** @description TODO(#27670) support synchronizer aliases
|
|
1527
|
+
* Required: synchronizer-id for which we are building this request. */
|
|
1528
|
+
synchronizer: string;
|
|
1529
|
+
/** @description Required: the actual party id will be constructed from this hint and a fingerprint of the public key */
|
|
1530
|
+
partyHint: string;
|
|
1531
|
+
/** @description Required: public key */
|
|
1532
|
+
publicKey?: components["schemas"]["SigningPublicKey"];
|
|
1533
|
+
/** @description Optional: if true, then the local participant will only be observing, not confirming. Default false. */
|
|
1534
|
+
localParticipantObservationOnly: boolean;
|
|
1535
|
+
/** @description Optional: other participant ids which should be confirming for this party */
|
|
1536
|
+
otherConfirmingParticipantUids?: string[];
|
|
1537
|
+
/**
|
|
1538
|
+
* Format: int32
|
|
1539
|
+
* @description Optional: Confirmation threshold >= 1 for the party. Defaults to all available confirmers (or if set to 0).
|
|
1540
|
+
*/
|
|
1541
|
+
confirmationThreshold: number;
|
|
1542
|
+
/** @description Optional: other observing participant ids for this party */
|
|
1543
|
+
observingParticipantUids?: string[];
|
|
1544
|
+
};
|
|
1545
|
+
/**
|
|
1546
|
+
* GenerateExternalPartyTopologyResponse
|
|
1547
|
+
* @description Response message with topology transactions and the multi-hash to be signed.
|
|
1548
|
+
*/
|
|
1549
|
+
GenerateExternalPartyTopologyResponse: {
|
|
1550
|
+
/** @description the generated party id */
|
|
1551
|
+
partyId: string;
|
|
1552
|
+
/** @description the fingerprint of the supplied public key */
|
|
1553
|
+
publicKeyFingerprint: string;
|
|
1554
|
+
/** @description The serialized topology transactions which need to be signed and submitted as part of the allocate party process
|
|
1555
|
+
* Note that the serialization includes the versioning information. Therefore, the transaction here is serialized
|
|
1556
|
+
* as an `UntypedVersionedMessage` which in turn contains the serialized `TopologyTransaction` in the version
|
|
1557
|
+
* supported by the synchronizer. */
|
|
1558
|
+
topologyTransactions?: string[];
|
|
1559
|
+
/** @description the multi-hash which may be signed instead of each individual transaction */
|
|
1560
|
+
multiHash: string;
|
|
1561
|
+
};
|
|
1440
1562
|
/**
|
|
1441
1563
|
* GetActiveContractsRequest
|
|
1442
1564
|
* @description If the given offset is different than the ledger end, and there are (un)assignments in-flight at the given offset,
|
|
@@ -2195,6 +2317,15 @@ export interface components {
|
|
|
2195
2317
|
/** @description When true, the response will contain additional details on how the transaction was encoded and hashed
|
|
2196
2318
|
* This can be useful for troubleshooting of hash mismatches. Should only be used for debugging. */
|
|
2197
2319
|
verboseHashing: boolean;
|
|
2320
|
+
/** @description Maximum timestamp at which the transaction can be recorded onto the ledger via the synchronizer specified in the `PrepareSubmissionResponse`.
|
|
2321
|
+
* If submitted after it will be rejected even if otherwise valid, in which case it needs to be prepared and signed again
|
|
2322
|
+
* with a new valid max_record_time.
|
|
2323
|
+
* Use this to limit the time-to-life of a prepared transaction,
|
|
2324
|
+
* which is useful to know when it can definitely not be accepted
|
|
2325
|
+
* anymore and resorting to preparing another transaction for the same
|
|
2326
|
+
* intent is safe again.
|
|
2327
|
+
* Optional */
|
|
2328
|
+
maxRecordTime?: string;
|
|
2198
2329
|
};
|
|
2199
2330
|
/**
|
|
2200
2331
|
* JsPrepareSubmissionResponse
|
|
@@ -2833,6 +2964,26 @@ export interface components {
|
|
|
2833
2964
|
/** @description The signing algorithm specification used to produce this signature */
|
|
2834
2965
|
signingAlgorithmSpec: string;
|
|
2835
2966
|
};
|
|
2967
|
+
/** SignedTransaction */
|
|
2968
|
+
SignedTransaction: {
|
|
2969
|
+
transaction: string;
|
|
2970
|
+
signatures?: components["schemas"]["Signature"][];
|
|
2971
|
+
};
|
|
2972
|
+
/** SigningPublicKey */
|
|
2973
|
+
SigningPublicKey: {
|
|
2974
|
+
/**
|
|
2975
|
+
* @description The serialization format of the public key
|
|
2976
|
+
* @example CRYPTO_KEY_FORMAT_DER_X509_SUBJECT_PUBLIC_KEY_INFO
|
|
2977
|
+
*/
|
|
2978
|
+
format: string;
|
|
2979
|
+
/** @description Serialized public key in the format specified above */
|
|
2980
|
+
keyData: string;
|
|
2981
|
+
/**
|
|
2982
|
+
* @description The key specification
|
|
2983
|
+
* @example SIGNING_KEY_SPEC_EC_CURVE25519
|
|
2984
|
+
*/
|
|
2985
|
+
keySpec: string;
|
|
2986
|
+
};
|
|
2836
2987
|
/**
|
|
2837
2988
|
* SinglePartySignatures
|
|
2838
2989
|
* @description Signatures provided by a single party
|
|
@@ -3951,6 +4102,46 @@ export interface operations {
|
|
|
3951
4102
|
};
|
|
3952
4103
|
};
|
|
3953
4104
|
};
|
|
4105
|
+
postV2PartiesExternalAllocate: {
|
|
4106
|
+
parameters: {
|
|
4107
|
+
query?: never;
|
|
4108
|
+
header?: never;
|
|
4109
|
+
path?: never;
|
|
4110
|
+
cookie?: never;
|
|
4111
|
+
};
|
|
4112
|
+
requestBody: {
|
|
4113
|
+
content: {
|
|
4114
|
+
"application/json": components["schemas"]["AllocateExternalPartyRequest"];
|
|
4115
|
+
};
|
|
4116
|
+
};
|
|
4117
|
+
responses: {
|
|
4118
|
+
200: {
|
|
4119
|
+
headers: {
|
|
4120
|
+
[name: string]: unknown;
|
|
4121
|
+
};
|
|
4122
|
+
content: {
|
|
4123
|
+
"application/json": components["schemas"]["AllocateExternalPartyResponse"];
|
|
4124
|
+
};
|
|
4125
|
+
};
|
|
4126
|
+
/** @description Invalid value for: body, Invalid value for: headers */
|
|
4127
|
+
400: {
|
|
4128
|
+
headers: {
|
|
4129
|
+
[name: string]: unknown;
|
|
4130
|
+
};
|
|
4131
|
+
content: {
|
|
4132
|
+
"text/plain": string;
|
|
4133
|
+
};
|
|
4134
|
+
};
|
|
4135
|
+
default: {
|
|
4136
|
+
headers: {
|
|
4137
|
+
[name: string]: unknown;
|
|
4138
|
+
};
|
|
4139
|
+
content: {
|
|
4140
|
+
"application/json": components["schemas"]["JsCantonError"];
|
|
4141
|
+
};
|
|
4142
|
+
};
|
|
4143
|
+
};
|
|
4144
|
+
};
|
|
3954
4145
|
"getV2PartiesParticipant-id": {
|
|
3955
4146
|
parameters: {
|
|
3956
4147
|
query?: never;
|
|
@@ -4070,6 +4261,46 @@ export interface operations {
|
|
|
4070
4261
|
};
|
|
4071
4262
|
};
|
|
4072
4263
|
};
|
|
4264
|
+
"postV2PartiesExternalGenerate-topology": {
|
|
4265
|
+
parameters: {
|
|
4266
|
+
query?: never;
|
|
4267
|
+
header?: never;
|
|
4268
|
+
path?: never;
|
|
4269
|
+
cookie?: never;
|
|
4270
|
+
};
|
|
4271
|
+
requestBody: {
|
|
4272
|
+
content: {
|
|
4273
|
+
"application/json": components["schemas"]["GenerateExternalPartyTopologyRequest"];
|
|
4274
|
+
};
|
|
4275
|
+
};
|
|
4276
|
+
responses: {
|
|
4277
|
+
200: {
|
|
4278
|
+
headers: {
|
|
4279
|
+
[name: string]: unknown;
|
|
4280
|
+
};
|
|
4281
|
+
content: {
|
|
4282
|
+
"application/json": components["schemas"]["GenerateExternalPartyTopologyResponse"];
|
|
4283
|
+
};
|
|
4284
|
+
};
|
|
4285
|
+
/** @description Invalid value for: body, Invalid value for: headers */
|
|
4286
|
+
400: {
|
|
4287
|
+
headers: {
|
|
4288
|
+
[name: string]: unknown;
|
|
4289
|
+
};
|
|
4290
|
+
content: {
|
|
4291
|
+
"text/plain": string;
|
|
4292
|
+
};
|
|
4293
|
+
};
|
|
4294
|
+
default: {
|
|
4295
|
+
headers: {
|
|
4296
|
+
[name: string]: unknown;
|
|
4297
|
+
};
|
|
4298
|
+
content: {
|
|
4299
|
+
"application/json": components["schemas"]["JsCantonError"];
|
|
4300
|
+
};
|
|
4301
|
+
};
|
|
4302
|
+
};
|
|
4303
|
+
};
|
|
4073
4304
|
"postV2StateActive-contracts": {
|
|
4074
4305
|
parameters: {
|
|
4075
4306
|
query?: {
|
|
@@ -4117,8 +4348,8 @@ export interface operations {
|
|
|
4117
4348
|
};
|
|
4118
4349
|
"getV2StateConnected-synchronizers": {
|
|
4119
4350
|
parameters: {
|
|
4120
|
-
query
|
|
4121
|
-
party
|
|
4351
|
+
query?: {
|
|
4352
|
+
party?: string;
|
|
4122
4353
|
participantId?: string;
|
|
4123
4354
|
};
|
|
4124
4355
|
header?: never;
|
|
@@ -4226,6 +4457,51 @@ export interface operations {
|
|
|
4226
4457
|
};
|
|
4227
4458
|
};
|
|
4228
4459
|
};
|
|
4460
|
+
postV2Updates: {
|
|
4461
|
+
parameters: {
|
|
4462
|
+
query?: {
|
|
4463
|
+
/** @description maximum number of elements to return, this param is ignored if is bigger than server setting */
|
|
4464
|
+
limit?: number;
|
|
4465
|
+
/** @description timeout to complete and send result if no new elements are received (for open ended streams) */
|
|
4466
|
+
stream_idle_timeout_ms?: number;
|
|
4467
|
+
};
|
|
4468
|
+
header?: never;
|
|
4469
|
+
path?: never;
|
|
4470
|
+
cookie?: never;
|
|
4471
|
+
};
|
|
4472
|
+
requestBody: {
|
|
4473
|
+
content: {
|
|
4474
|
+
"application/json": components["schemas"]["GetUpdatesRequest"];
|
|
4475
|
+
};
|
|
4476
|
+
};
|
|
4477
|
+
responses: {
|
|
4478
|
+
200: {
|
|
4479
|
+
headers: {
|
|
4480
|
+
[name: string]: unknown;
|
|
4481
|
+
};
|
|
4482
|
+
content: {
|
|
4483
|
+
"application/json": components["schemas"]["JsGetUpdatesResponse"][];
|
|
4484
|
+
};
|
|
4485
|
+
};
|
|
4486
|
+
/** @description Invalid value for: body, Invalid value for: query parameter limit, Invalid value for: query parameter stream_idle_timeout_ms, Invalid value for: headers */
|
|
4487
|
+
400: {
|
|
4488
|
+
headers: {
|
|
4489
|
+
[name: string]: unknown;
|
|
4490
|
+
};
|
|
4491
|
+
content: {
|
|
4492
|
+
"text/plain": string;
|
|
4493
|
+
};
|
|
4494
|
+
};
|
|
4495
|
+
default: {
|
|
4496
|
+
headers: {
|
|
4497
|
+
[name: string]: unknown;
|
|
4498
|
+
};
|
|
4499
|
+
content: {
|
|
4500
|
+
"application/json": components["schemas"]["JsCantonError"];
|
|
4501
|
+
};
|
|
4502
|
+
};
|
|
4503
|
+
};
|
|
4504
|
+
};
|
|
4229
4505
|
postV2UpdatesFlats: {
|
|
4230
4506
|
parameters: {
|
|
4231
4507
|
query?: {
|