@fairmint/canton-node-sdk 0.0.63 → 0.0.65

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.
Files changed (17) hide show
  1. package/build/src/clients/ledger-json-api/operations/v2/commands/async/submit.d.ts +6 -16
  2. package/build/src/clients/ledger-json-api/operations/v2/commands/async/submit.d.ts.map +1 -1
  3. package/build/src/clients/ledger-json-api/operations/v2/commands/async/submit.js +7 -1
  4. package/build/src/clients/ledger-json-api/operations/v2/commands/async/submit.js.map +1 -1
  5. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.d.ts +55 -14
  6. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.d.ts.map +1 -1
  7. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.js +41 -3
  8. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.js.map +1 -1
  9. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.d.ts +8 -5
  10. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.d.ts.map +1 -1
  11. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.js +10 -1
  12. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.js.map +1 -1
  13. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.d.ts +6 -16
  14. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.d.ts.map +1 -1
  15. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.js +7 -1
  16. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.js.map +1 -1
  17. package/package.json +1 -1
@@ -1,25 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  import type { paths } from '../../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi';
3
3
  declare const endpoint: "/v2/commands/async/submit";
4
- export type AsyncSubmitParams = paths[typeof endpoint]['post']['requestBody']['content']['application/json'];
4
+ type BaseAsyncSubmitParams = paths[typeof endpoint]['post']['requestBody']['content']['application/json'];
5
+ export type AsyncSubmitParams = Omit<BaseAsyncSubmitParams, 'commandId' | 'actAs'> & {
6
+ commandId?: string;
7
+ actAs?: string[];
8
+ };
5
9
  export type AsyncSubmitResponse = paths[typeof endpoint]['post']['responses']['200']['content']['application/json'];
6
10
  export declare const AsyncSubmit: {
7
11
  new (client: import("../../../../../../core").BaseClient): {
8
- execute(params: {
9
- commands?: import("../../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["Command"][];
10
- commandId: string;
11
- actAs?: string[];
12
- userId?: string;
13
- readAs?: string[];
14
- workflowId?: string;
15
- deduplicationPeriod?: import("../../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["DeduplicationPeriod"];
16
- minLedgerTimeAbs?: string;
17
- minLedgerTimeRel?: import("../../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["Duration"];
18
- submissionId?: string;
19
- disclosedContracts?: import("../../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["DisclosedContract"][];
20
- synchronizerId?: string;
21
- packageIdSelectionPreference?: string[];
22
- }): Promise<Record<string, never>>;
12
+ execute(params: AsyncSubmitParams): Promise<Record<string, never>>;
23
13
  client: import("../../../../../../core").BaseClient;
24
14
  validateParams<T>(params: T, schema: z.ZodSchema<T>): T;
25
15
  makeGetRequest<T>(url: string, config?: import("../../../../../../core").RequestConfig): Promise<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"submit.d.ts","sourceRoot":"","sources":["../../../../../../../../src/clients/ledger-json-api/operations/v2/commands/async/submit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,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SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAEpH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAWtB,CAAC"}
@@ -8,6 +8,12 @@ exports.AsyncSubmit = (0, core_1.createApiOperation)({
8
8
  paramsSchema: zod_1.z.any(),
9
9
  method: 'POST',
10
10
  buildUrl: (_params, apiUrl) => `${apiUrl}${endpoint}`,
11
- buildRequestData: (params) => params,
11
+ buildRequestData: (params, client) => {
12
+ return {
13
+ ...params,
14
+ commandId: params.commandId || `async-submit-${Date.now()}`,
15
+ actAs: params.actAs || [client.getPartyId()],
16
+ };
17
+ },
12
18
  });
13
19
  //# sourceMappingURL=submit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"submit.js","sourceRoot":"","sources":["../../../../../../../../src/clients/ledger-json-api/operations/v2/commands/async/submit.ts"],"names":[],"mappings":";;;AAAA,iDAA4D;AAC5D,6BAAwB;AAGxB,MAAM,QAAQ,GAAG,2BAAoC,CAAC;AAKzC,QAAA,WAAW,GAAG,IAAA,yBAAkB,EAAyC;IACpF,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM;IACd,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"}
1
+ {"version":3,"file":"submit.js","sourceRoot":"","sources":["../../../../../../../../src/clients/ledger-json-api/operations/v2/commands/async/submit.ts"],"names":[],"mappings":";;;AAAA,iDAA4D;AAC5D,6BAAwB;AAGxB,MAAM,QAAQ,GAAG,2BAAoC,CAAC;AAazC,QAAA,WAAW,GAAG,IAAA,yBAAkB,EAAyC;IACpF,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,QAAQ,EAAE;IACrD,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QACnC,OAAO;YACL,GAAG,MAAM;YACT,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,gBAAgB,IAAI,CAAC,GAAG,EAAE,EAAE;YAC3D,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -1,24 +1,65 @@
1
1
  import { z } from 'zod';
2
2
  import type { paths } from '../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi';
3
3
  declare const endpoint: "/v2/commands/submit-and-wait-for-transaction-tree";
4
- export type SubmitAndWaitForTransactionTreeParams = paths[typeof endpoint]['post']['requestBody']['content']['application/json'];
4
+ export declare const SubmitAndWaitForTransactionTreeParamsSchema: z.ZodObject<{
5
+ commands: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
6
+ CreateCommand: z.ZodObject<{
7
+ templateId: z.ZodString;
8
+ createArguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
9
+ }, z.core.$strict>;
10
+ }, z.core.$strict>, z.ZodObject<{
11
+ ExerciseCommand: z.ZodObject<{
12
+ templateId: z.ZodString;
13
+ contractId: z.ZodString;
14
+ choice: z.ZodString;
15
+ choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
16
+ }, z.core.$strict>;
17
+ }, z.core.$strict>]>>;
18
+ commandId: z.ZodOptional<z.ZodString>;
19
+ actAs: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ userId: z.ZodOptional<z.ZodString>;
21
+ readAs: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ workflowId: z.ZodOptional<z.ZodString>;
23
+ deduplicationPeriod: z.ZodOptional<z.ZodAny>;
24
+ minLedgerTimeAbs: z.ZodOptional<z.ZodString>;
25
+ minLedgerTimeRel: z.ZodOptional<z.ZodAny>;
26
+ submissionId: z.ZodOptional<z.ZodString>;
27
+ disclosedContracts: z.ZodOptional<z.ZodArray<z.ZodAny>>;
28
+ synchronizerId: z.ZodOptional<z.ZodString>;
29
+ packageIdSelectionPreference: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ prefetchContractKeys: z.ZodOptional<z.ZodArray<z.ZodAny>>;
31
+ }, z.core.$strip>;
32
+ export type SubmitAndWaitForTransactionTreeParams = z.infer<typeof SubmitAndWaitForTransactionTreeParamsSchema>;
5
33
  export type SubmitAndWaitForTransactionTreeResponse = paths[typeof endpoint]['post']['responses']['200']['content']['application/json'];
6
34
  export declare const SubmitAndWaitForTransactionTree: {
7
35
  new (client: import("../../../../../core").BaseClient): {
8
36
  execute(params: {
9
- commands?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["Command"][];
10
- commandId: string;
11
- actAs?: string[];
12
- userId?: string;
13
- readAs?: string[];
14
- workflowId?: string;
15
- deduplicationPeriod?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["DeduplicationPeriod"];
16
- minLedgerTimeAbs?: string;
17
- minLedgerTimeRel?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["Duration"];
18
- submissionId?: string;
19
- disclosedContracts?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["DisclosedContract"][];
20
- synchronizerId?: string;
21
- packageIdSelectionPreference?: string[];
37
+ commands: ({
38
+ CreateCommand: {
39
+ templateId: string;
40
+ createArguments: Record<string, string | number | boolean | any[] | Record<string, any> | null>;
41
+ };
42
+ } | {
43
+ ExerciseCommand: {
44
+ templateId: string;
45
+ contractId: string;
46
+ choice: string;
47
+ choiceArgument: Record<string, string | number | boolean | any[] | Record<string, any> | null>;
48
+ };
49
+ })[];
50
+ commandId?: string | undefined;
51
+ actAs?: string[] | undefined;
52
+ userId?: string | undefined;
53
+ readAs?: string[] | undefined;
54
+ workflowId?: string | undefined;
55
+ deduplicationPeriod?: any;
56
+ minLedgerTimeAbs?: string | undefined;
57
+ minLedgerTimeRel?: any;
58
+ submissionId?: string | undefined;
59
+ disclosedContracts?: any[] | undefined;
60
+ synchronizerId?: string | undefined;
61
+ packageIdSelectionPreference?: string[] | undefined;
62
+ prefetchContractKeys?: any[] | undefined;
22
63
  }): Promise<{
23
64
  transactionTree: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["JsTransactionTree"];
24
65
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"submit-and-wait-for-transaction-tree.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;AAEvI,QAAA,MAAM,QAAQ,EAAG,mDAA4D,CAAC;AAE9E,MAAM,MAAM,qCAAqC,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AACjI,MAAM,MAAM,uCAAuC,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAExI,eAAO,MAAM,+BAA+B;;;uBAKyxlF,yIAAsB;;;;;;kCAAolF,yIAAsB;;+BAA64B,yIAAsB;;iCAA6tB,yIAAsB;;;;6BAAq8jB,yIAAsB;;;;;;;;;;;;;CAApjyG,CAAC"}
1
+ {"version":3,"file":"submit-and-wait-for-transaction-tree.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;AAGvI,QAAA,MAAM,QAAQ,EAAG,mDAA4D,CAAC;AAG9E,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BtD,CAAC;AAGH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAEhH,MAAM,MAAM,uCAAuC,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAExI,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAWmuuG,yIAAsB;;;;;;;;;;;;;CAAnyuG,CAAC"}
@@ -1,13 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubmitAndWaitForTransactionTree = void 0;
3
+ exports.SubmitAndWaitForTransactionTree = exports.SubmitAndWaitForTransactionTreeParamsSchema = void 0;
4
4
  const core_1 = require("../../../../../core");
5
5
  const zod_1 = require("zod");
6
+ const commands_1 = require("../../../schemas/api/commands");
6
7
  const endpoint = '/v2/commands/submit-and-wait-for-transaction-tree';
8
+ // Zod schema for the input parameters
9
+ exports.SubmitAndWaitForTransactionTreeParamsSchema = zod_1.z.object({
10
+ /** Commands to submit and wait for transaction tree. */
11
+ commands: zod_1.z.array(commands_1.CommandSchema),
12
+ /** Unique identifier for the command (optional, will be auto-generated if not provided). */
13
+ commandId: zod_1.z.string().optional(),
14
+ /** Parties on whose behalf the command should be executed (optional, will use client's party ID if not provided). */
15
+ actAs: zod_1.z.array(zod_1.z.string()).optional(),
16
+ /** User ID submitting the command (optional if using authentication). */
17
+ userId: zod_1.z.string().optional(),
18
+ /** Parties to read as (optional). */
19
+ readAs: zod_1.z.array(zod_1.z.string()).optional(),
20
+ /** Workflow ID (optional). */
21
+ workflowId: zod_1.z.string().optional(),
22
+ /** Deduplication period (optional). */
23
+ deduplicationPeriod: zod_1.z.any().optional(),
24
+ /** Minimum ledger time absolute (optional). */
25
+ minLedgerTimeAbs: zod_1.z.string().optional(),
26
+ /** Minimum ledger time relative (optional). */
27
+ minLedgerTimeRel: zod_1.z.any().optional(),
28
+ /** Submission ID (optional). */
29
+ submissionId: zod_1.z.string().optional(),
30
+ /** Disclosed contracts (optional). */
31
+ disclosedContracts: zod_1.z.array(zod_1.z.any()).optional(),
32
+ /** Synchronizer ID (optional). */
33
+ synchronizerId: zod_1.z.string().optional(),
34
+ /** Package ID selection preference (optional). */
35
+ packageIdSelectionPreference: zod_1.z.array(zod_1.z.string()).optional(),
36
+ /** Prefetch contract keys (optional). */
37
+ prefetchContractKeys: zod_1.z.array(zod_1.z.any()).optional(),
38
+ });
7
39
  exports.SubmitAndWaitForTransactionTree = (0, core_1.createApiOperation)({
8
- paramsSchema: zod_1.z.any(),
40
+ paramsSchema: exports.SubmitAndWaitForTransactionTreeParamsSchema,
9
41
  method: 'POST',
10
42
  buildUrl: (_params, apiUrl) => `${apiUrl}${endpoint}`,
11
- buildRequestData: (params) => params,
43
+ buildRequestData: (params, client) => {
44
+ return {
45
+ ...params,
46
+ commandId: params.commandId || `submit-and-wait-for-transaction-tree-${Date.now()}`,
47
+ actAs: params.actAs || [client.getPartyId()],
48
+ };
49
+ },
12
50
  });
13
51
  //# sourceMappingURL=submit-and-wait-for-transaction-tree.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"submit-and-wait-for-transaction-tree.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.ts"],"names":[],"mappings":";;;AAAA,8CAAyD;AACzD,6BAAwB;AAGxB,MAAM,QAAQ,GAAG,mDAA4D,CAAC;AAKjE,QAAA,+BAA+B,GAAG,IAAA,yBAAkB,EAAiF;IAChJ,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM;IACd,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"}
1
+ {"version":3,"file":"submit-and-wait-for-transaction-tree.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.ts"],"names":[],"mappings":";;;AAAA,8CAAyD;AACzD,6BAAwB;AAExB,4DAA8D;AAE9D,MAAM,QAAQ,GAAG,mDAA4D,CAAC;AAE9E,sCAAsC;AACzB,QAAA,2CAA2C,GAAG,OAAC,CAAC,MAAM,CAAC;IAClE,wDAAwD;IACxD,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,wBAAa,CAAC;IAChC,4FAA4F;IAC5F,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,qHAAqH;IACrH,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrC,yEAAyE;IACzE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,qCAAqC;IACrC,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,8B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AAC;SAC7C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -1,14 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  import type { paths } from '../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi';
3
3
  declare const endpoint: "/v2/commands/submit-and-wait-for-transaction";
4
- export type SubmitAndWaitForTransactionParams = paths[typeof endpoint]['post']['requestBody']['content']['application/json'];
4
+ type BaseSubmitAndWaitForTransactionParams = paths[typeof endpoint]['post']['requestBody']['content']['application/json'];
5
+ export type SubmitAndWaitForTransactionParams = Omit<BaseSubmitAndWaitForTransactionParams, 'commands'> & {
6
+ commands: Omit<BaseSubmitAndWaitForTransactionParams['commands'], 'commandId' | 'actAs'> & {
7
+ commandId?: string;
8
+ actAs?: string[];
9
+ };
10
+ };
5
11
  export type SubmitAndWaitForTransactionResponse = paths[typeof endpoint]['post']['responses']['200']['content']['application/json'];
6
12
  export declare const SubmitAndWaitForTransaction: {
7
13
  new (client: import("../../../../../core").BaseClient): {
8
- execute(params: {
9
- commands: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["JsCommands"];
10
- transactionFormat?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["TransactionFormat"];
11
- }): Promise<{
14
+ execute(params: SubmitAndWaitForTransactionParams): Promise<{
12
15
  transaction: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["JsTransaction"];
13
16
  }>;
14
17
  client: import("../../../../../core").BaseClient;
@@ -1 +1 @@
1
- {"version":3,"file":"submit-and-wait-for-transaction.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;AAEvI,QAAA,MAAM,QAAQ,EAAG,8CAAuD,CAAC;AAEzE,MAAM,MAAM,iCAAiC,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAC7H,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAEpI,eAAO,MAAM,2BAA2B;;;sBAKs1vG,yIAAsB;gCAAoc,yIAAsB;;yBAA2Y,yIAAsB;;;;;;;;;;;;;CAA7wxG,CAAC"}
1
+ {"version":3,"file":"submit-and-wait-for-transaction.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;AAEvI,QAAA,MAAM,QAAQ,EAAG,8CAAuD,CAAC;AAGzE,KAAK,qCAAqC,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAG1H,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC,qCAAqC,EAAE,UAAU,CAAC,GAAG;IACxG,QAAQ,EAAE,IAAI,CAAC,qCAAqC,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG;QACzF,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAEpI,eAAO,MAAM,2BAA2B;;;yBAc+lwG,yIAAsB;;;;;;;;;;;;;CAA3pwG,CAAC"}
@@ -8,6 +8,15 @@ exports.SubmitAndWaitForTransaction = (0, core_1.createApiOperation)({
8
8
  paramsSchema: zod_1.z.any(),
9
9
  method: 'POST',
10
10
  buildUrl: (_params, apiUrl) => `${apiUrl}${endpoint}`,
11
- buildRequestData: (params) => params,
11
+ buildRequestData: (params, client) => {
12
+ return {
13
+ commands: {
14
+ ...params.commands,
15
+ commandId: params.commands.commandId || `submit-and-wait-for-transaction-${Date.now()}`,
16
+ actAs: params.commands.actAs || [client.getPartyId()],
17
+ },
18
+ transactionFormat: params.transactionFormat,
19
+ };
20
+ },
12
21
  });
13
22
  //# sourceMappingURL=submit-and-wait-for-transaction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"submit-and-wait-for-transaction.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.ts"],"names":[],"mappings":";;;AAAA,8CAAyD;AACzD,6BAAwB;AAGxB,MAAM,QAAQ,GAAG,8CAAuD,CAAC;AAK5D,QAAA,2BAA2B,GAAG,IAAA,yBAAkB,EAAyE;IACpI,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM;IACd,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"}
1
+ {"version":3,"file":"submit-and-wait-for-transaction.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.ts"],"names":[],"mappings":";;;AAAA,8CAAyD;AACzD,6BAAwB;AAGxB,MAAM,QAAQ,GAAG,8CAAuD,CAAC;AAe5D,QAAA,2BAA2B,GAAG,IAAA,yBAAkB,EAAyE;IACpI,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,QAAQ,EAAE;IACrD,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QACnC,OAAO;YACL,QAAQ,EAAE;gBACR,GAAG,MAAM,CAAC,QAAQ;gBAClB,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,IAAI,mCAAmC,IAAI,CAAC,GAAG,EAAE,EAAE;gBACvF,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;aACtD;YACD,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;SAC5C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -1,25 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  import type { paths } from '../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi';
3
3
  declare const endpoint: "/v2/commands/submit-and-wait";
4
- export type SubmitAndWaitParams = paths[typeof endpoint]['post']['requestBody']['content']['application/json'];
4
+ type BaseSubmitAndWaitParams = paths[typeof endpoint]['post']['requestBody']['content']['application/json'];
5
+ export type SubmitAndWaitParams = Omit<BaseSubmitAndWaitParams, 'commandId' | 'actAs'> & {
6
+ commandId?: string;
7
+ actAs?: string[];
8
+ };
5
9
  export type SubmitAndWaitResponse = paths[typeof endpoint]['post']['responses']['200']['content']['application/json'];
6
10
  export declare const SubmitAndWait: {
7
11
  new (client: import("../../../../../core").BaseClient): {
8
- execute(params: {
9
- commands?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["Command"][];
10
- commandId: string;
11
- actAs?: string[];
12
- userId?: string;
13
- readAs?: string[];
14
- workflowId?: string;
15
- deduplicationPeriod?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["DeduplicationPeriod"];
16
- minLedgerTimeAbs?: string;
17
- minLedgerTimeRel?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["Duration"];
18
- submissionId?: string;
19
- disclosedContracts?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["DisclosedContract"][];
20
- synchronizerId?: string;
21
- packageIdSelectionPreference?: string[];
22
- }): Promise<{
12
+ execute(params: SubmitAndWaitParams): Promise<{
23
13
  updateId: string;
24
14
  completionOffset: number;
25
15
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"submit-and-wait.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;AAEvI,QAAA,MAAM,QAAQ,EAAG,8BAAuC,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAC/G,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAEtH,eAAO,MAAM,aAAa;;;uBAK05lF,yIAAsB;;;;;;kCAAolF,yIAAsB;;+BAA64B,yIAAsB;;iCAA6tB,yIAAsB;;;;;;;;;;;;;;;;;;CAAxsuF,CAAC"}
1
+ {"version":3,"file":"submit-and-wait.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;AAEvI,QAAA,MAAM,QAAQ,EAAG,8BAAuC,CAAC;AAGzD,KAAK,uBAAuB,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAG5G,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,uBAAuB,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAEtH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAWxB,CAAC"}
@@ -8,6 +8,12 @@ exports.SubmitAndWait = (0, core_1.createApiOperation)({
8
8
  paramsSchema: zod_1.z.any(),
9
9
  method: 'POST',
10
10
  buildUrl: (_params, apiUrl) => `${apiUrl}${endpoint}`,
11
- buildRequestData: (params) => params,
11
+ buildRequestData: (params, client) => {
12
+ return {
13
+ ...params,
14
+ commandId: params.commandId || `submit-and-wait-${Date.now()}`,
15
+ actAs: params.actAs || [client.getPartyId()],
16
+ };
17
+ },
12
18
  });
13
19
  //# sourceMappingURL=submit-and-wait.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"submit-and-wait.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.ts"],"names":[],"mappings":";;;AAAA,8CAAyD;AACzD,6BAAwB;AAGxB,MAAM,QAAQ,GAAG,8BAAuC,CAAC;AAK5C,QAAA,aAAa,GAAG,IAAA,yBAAkB,EAA6C;IAC1F,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM;IACd,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"}
1
+ {"version":3,"file":"submit-and-wait.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.ts"],"names":[],"mappings":";;;AAAA,8CAAyD;AACzD,6BAAwB;AAGxB,MAAM,QAAQ,GAAG,8BAAuC,CAAC;AAa5C,QAAA,aAAa,GAAG,IAAA,yBAAkB,EAA6C;IAC1F,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,QAAQ,EAAE;IACrD,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QACnC,OAAO;YACL,GAAG,MAAM;YACT,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,mBAAmB,IAAI,CAAC,GAAG,EAAE,EAAE;YAC9D,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairmint/canton-node-sdk",
3
- "version": "0.0.63",
3
+ "version": "0.0.65",
4
4
  "description": "Canton Node SDK",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",