@fairmint/canton-node-sdk 0.0.90 → 0.0.92

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 (39) hide show
  1. package/build/src/clients/ledger-json-api/operations/v2/commands/completions.d.ts.map +1 -1
  2. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.d.ts.map +1 -1
  3. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.d.ts.map +1 -1
  4. package/build/src/clients/ledger-json-api/operations/v2/events/get-events-by-contract-id.d.ts.map +1 -1
  5. package/build/src/clients/ledger-json-api/operations/v2/parties/get-party-details.d.ts.map +1 -1
  6. package/build/src/clients/ledger-json-api/operations/v2/parties/get.d.ts.map +1 -1
  7. package/build/src/clients/ledger-json-api/operations/v2/parties/update-party-details.d.ts.map +1 -1
  8. package/build/src/clients/ledger-json-api/operations/v2/state/get-active-contracts.d.ts.map +1 -1
  9. package/build/src/clients/ledger-json-api/operations/v2/state/get-connected-synchronizers.d.ts.map +1 -1
  10. package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-by-id.d.ts.map +1 -1
  11. package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-by-offset.d.ts.map +1 -1
  12. package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-tree-by-id.d.ts.map +1 -1
  13. package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-tree-by-offset.d.ts.map +1 -1
  14. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.d.ts.map +1 -1
  15. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.d.ts.map +1 -1
  16. package/build/src/clients/ledger-json-api/operations/v2/users/create-user.d.ts.map +1 -1
  17. package/build/src/clients/ledger-json-api/operations/v2/users/get-user.d.ts.map +1 -1
  18. package/build/src/clients/ledger-json-api/operations/v2/users/grant-user-rights.d.ts.map +1 -1
  19. package/build/src/clients/ledger-json-api/operations/v2/users/list-user-rights.d.ts.map +1 -1
  20. package/build/src/clients/ledger-json-api/operations/v2/users/list-users.d.ts.map +1 -1
  21. package/build/src/clients/ledger-json-api/operations/v2/users/revoke-user-rights.d.ts.map +1 -1
  22. package/build/src/clients/ledger-json-api/operations/v2/users/update-user.d.ts.map +1 -1
  23. package/build/src/clients/validator-api/operations/v0/ans/get-rules.d.ts.map +1 -1
  24. package/build/src/clients/validator-api/operations/v0/ans/lookup-by-name.d.ts.map +1 -1
  25. package/build/src/clients/validator-api/operations/v0/ans/lookup-by-party.d.ts.map +1 -1
  26. package/build/src/clients/validator-api/operations/v0/scan-proxy/get-amulet-rules.d.ts.map +1 -1
  27. package/build/src/clients/validator-api/operations/v0/scan-proxy/lookup-featured-app-right.d.ts.map +1 -1
  28. package/build/src/core/logging/FileLogger.d.ts.map +1 -1
  29. package/build/src/core/logging/FileLogger.js +8 -1
  30. package/build/src/core/logging/FileLogger.js.map +1 -1
  31. package/build/src/generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi.d.ts +330 -6
  32. package/build/src/generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi.d.ts.map +1 -1
  33. package/build/src/utils/amulet/pre-approve-transfers.d.ts.map +1 -1
  34. package/build/src/utils/amulet/pre-approve-transfers.js +3 -2
  35. package/build/src/utils/amulet/pre-approve-transfers.js.map +1 -1
  36. package/build/src/utils/party/createParty.d.ts.map +1 -1
  37. package/build/src/utils/party/createParty.js +3 -0
  38. package/build/src/utils/party/createParty.js.map +1 -1
  39. package/package.json +1 -1
@@ -114,7 +114,12 @@ export interface paths {
114
114
  };
115
115
  get?: never;
116
116
  put?: never;
117
- /** @description Query completions list (blocking call) */
117
+ /** @description Query completions list (blocking call)
118
+ * Notice: This endpoint should be used for small results set.
119
+ * When number of results exceeded node configuration limit (`http-list-max-elements-limit`)
120
+ * there will be an error (`413 Content Too Large`) returned.
121
+ * Increasing this limit may lead to performance issues and high memory consumption.
122
+ * Consider using websockets (asyncapi) for better efficiency with larger results. */
118
123
  post: operations["postV2CommandsCompletions"];
119
124
  delete?: never;
120
125
  options?: never;
@@ -226,6 +231,23 @@ export interface paths {
226
231
  patch?: never;
227
232
  trace?: never;
228
233
  };
234
+ "/v2/parties/external/allocate": {
235
+ parameters: {
236
+ query?: never;
237
+ header?: never;
238
+ path?: never;
239
+ cookie?: never;
240
+ };
241
+ get?: never;
242
+ put?: never;
243
+ /** @description Allocate a new external party */
244
+ post: operations["postV2PartiesExternalAllocate"];
245
+ delete?: never;
246
+ options?: never;
247
+ head?: never;
248
+ patch?: never;
249
+ trace?: never;
250
+ };
229
251
  "/v2/parties/participant-id": {
230
252
  parameters: {
231
253
  query?: never;
@@ -261,6 +283,23 @@ export interface paths {
261
283
  patch: operations["patchV2PartiesParty"];
262
284
  trace?: never;
263
285
  };
286
+ "/v2/parties/external/generate-topology": {
287
+ parameters: {
288
+ query?: never;
289
+ header?: never;
290
+ path?: never;
291
+ cookie?: never;
292
+ };
293
+ get?: never;
294
+ put?: never;
295
+ /** @description Generate a topology for an external party */
296
+ post: operations["postV2PartiesExternalGenerate-topology"];
297
+ delete?: never;
298
+ options?: never;
299
+ head?: never;
300
+ patch?: never;
301
+ trace?: never;
302
+ };
264
303
  "/v2/state/active-contracts": {
265
304
  parameters: {
266
305
  query?: never;
@@ -270,7 +309,17 @@ export interface paths {
270
309
  };
271
310
  get?: never;
272
311
  put?: never;
273
- /** @description Query active contracts list (blocking call) */
312
+ /** @description Query active contracts list (blocking call).
313
+ * Querying active contracts is an expensive operation and if possible should not be repeated often.
314
+ * Consider querying active contracts initially (for a given offset)
315
+ * and then repeatedly call one of `/v2/updates/...`endpoints to get subsequent modifications.
316
+ * You can also use websockets to get updates with better performance.
317
+ *
318
+ * Notice: This endpoint should be used for small results set.
319
+ * When number of results exceeded node configuration limit (`http-list-max-elements-limit`)
320
+ * there will be an error (`413 Content Too Large`) returned.
321
+ * Increasing this limit may lead to performance issues and high memory consumption.
322
+ * Consider using websockets (asyncapi) for better efficiency with larger results. */
274
323
  post: operations["postV2StateActive-contracts"];
275
324
  delete?: never;
276
325
  options?: never;
@@ -329,6 +378,28 @@ export interface paths {
329
378
  patch?: never;
330
379
  trace?: never;
331
380
  };
381
+ "/v2/updates": {
382
+ parameters: {
383
+ query?: never;
384
+ header?: never;
385
+ path?: never;
386
+ cookie?: never;
387
+ };
388
+ get?: never;
389
+ put?: never;
390
+ /** @description Query updates list (blocking call)
391
+ * Notice: This endpoint should be used for small results set.
392
+ * When number of results exceeded node configuration limit (`http-list-max-elements-limit`)
393
+ * there will be an error (`413 Content Too Large`) returned.
394
+ * Increasing this limit may lead to performance issues and high memory consumption.
395
+ * Consider using websockets (asyncapi) for better efficiency with larger results. */
396
+ post: operations["postV2Updates"];
397
+ delete?: never;
398
+ options?: never;
399
+ head?: never;
400
+ patch?: never;
401
+ trace?: never;
402
+ };
332
403
  "/v2/updates/flats": {
333
404
  parameters: {
334
405
  query?: never;
@@ -338,7 +409,12 @@ export interface paths {
338
409
  };
339
410
  get?: never;
340
411
  put?: never;
341
- /** @description Query flat transactions update list (blocking call) */
412
+ /** @description Query flat transactions update list (blocking call)
413
+ * Notice: This endpoint should be used for small results set.
414
+ * When number of results exceeded node configuration limit (`http-list-max-elements-limit`)
415
+ * there will be an error (`413 Content Too Large`) returned.
416
+ * Increasing this limit may lead to performance issues and high memory consumption.
417
+ * Consider using websockets (asyncapi) for better efficiency with larger results. */
342
418
  post: operations["postV2UpdatesFlats"];
343
419
  delete?: never;
344
420
  options?: never;
@@ -355,7 +431,12 @@ export interface paths {
355
431
  };
356
432
  get?: never;
357
433
  put?: never;
358
- /** @description Query update transactions tree list (blocking call) */
434
+ /** @description Query update transactions tree list (blocking call)
435
+ * Notice: This endpoint should be used for small results set.
436
+ * When number of results exceeded node configuration limit (`http-list-max-elements-limit`)
437
+ * there will be an error (`413 Content Too Large`) returned.
438
+ * Increasing this limit may lead to performance issues and high memory consumption.
439
+ * Consider using websockets (asyncapi) for better efficiency with larger results. */
359
440
  post: operations["postV2UpdatesTrees"];
360
441
  delete?: never;
361
442
  options?: never;
@@ -647,6 +728,39 @@ export interface paths {
647
728
  export type webhooks = Record<string, never>;
648
729
  export interface components {
649
730
  schemas: {
731
+ /**
732
+ * AllocateExternalPartyRequest
733
+ * @description Required authorization: ``HasRight(ParticipantAdmin) OR IsAuthenticatedIdentityProviderAdmin(identity_provider_id)``
734
+ */
735
+ AllocateExternalPartyRequest: {
736
+ /** @description TODO(#27670) support synchronizer aliases
737
+ * Synchronizer ID on which to onboard the party
738
+ * Required */
739
+ synchronizer: string;
740
+ /** @description TopologyTransactions to onboard the external party
741
+ * Can contain:
742
+ * - A namespace for the party.
743
+ * This can be either a single NamespaceDelegation,
744
+ * or DecentralizedNamespaceDefinition along with its authorized namespace owners in the form of NamespaceDelegations.
745
+ * May be provided, if so it must be fully authorized by the signatures in this request combined with the existing topology state.
746
+ * - A PartyToKeyMapping to register the party's signing keys.
747
+ * May be provided, if so it must be fully authorized by the signatures in this request combined with the existing topology state.
748
+ * - A PartyToParticipant to register the hosting relationship of the party.
749
+ * Must be provided.
750
+ * Required */
751
+ onboardingTransactions?: components["schemas"]["SignedTransaction"][];
752
+ /** @description Optional signatures of the combined hash of all onboarding_transactions
753
+ * This may be used instead of providing signatures on each individual transaction */
754
+ multiHashSignatures?: components["schemas"]["Signature"][];
755
+ /** @description The id of the ``Identity Provider``
756
+ * If not set, assume the party is managed by the default identity provider.
757
+ * Optional */
758
+ identityProviderId: string;
759
+ };
760
+ /** AllocateExternalPartyResponse */
761
+ AllocateExternalPartyResponse: {
762
+ partyId: string;
763
+ };
650
764
  /**
651
765
  * AllocatePartyRequest
652
766
  * @description Required authorization: ``HasRight(ParticipantAdmin) OR IsAuthenticatedIdentityProviderAdmin(identity_provider_id)``
@@ -753,6 +867,20 @@ export interface components {
753
867
  CanActAs1: {
754
868
  party: string;
755
869
  };
870
+ /** CanExecuteAs */
871
+ CanExecuteAs: {
872
+ value: components["schemas"]["CanExecuteAs1"];
873
+ };
874
+ /** CanExecuteAs */
875
+ CanExecuteAs1: {
876
+ party: string;
877
+ };
878
+ /** CanExecuteAsAnyParty */
879
+ CanExecuteAsAnyParty: {
880
+ value: components["schemas"]["CanExecuteAsAnyParty1"];
881
+ };
882
+ /** CanExecuteAsAnyParty */
883
+ CanExecuteAsAnyParty1: Record<string, never>;
756
884
  /** CanReadAs */
757
885
  CanReadAs: {
758
886
  value: components["schemas"]["CanReadAs1"];
@@ -1437,6 +1565,44 @@ export interface components {
1437
1565
  * Optional */
1438
1566
  cumulative?: components["schemas"]["CumulativeFilter"][];
1439
1567
  };
1568
+ /** GenerateExternalPartyTopologyRequest */
1569
+ GenerateExternalPartyTopologyRequest: {
1570
+ /** @description TODO(#27670) support synchronizer aliases
1571
+ * Required: synchronizer-id for which we are building this request. */
1572
+ synchronizer: string;
1573
+ /** @description Required: the actual party id will be constructed from this hint and a fingerprint of the public key */
1574
+ partyHint: string;
1575
+ /** @description Required: public key */
1576
+ publicKey?: components["schemas"]["SigningPublicKey"];
1577
+ /** @description Optional: if true, then the local participant will only be observing, not confirming. Default false. */
1578
+ localParticipantObservationOnly: boolean;
1579
+ /** @description Optional: other participant ids which should be confirming for this party */
1580
+ otherConfirmingParticipantUids?: string[];
1581
+ /**
1582
+ * Format: int32
1583
+ * @description Optional: Confirmation threshold >= 1 for the party. Defaults to all available confirmers (or if set to 0).
1584
+ */
1585
+ confirmationThreshold: number;
1586
+ /** @description Optional: other observing participant ids for this party */
1587
+ observingParticipantUids?: string[];
1588
+ };
1589
+ /**
1590
+ * GenerateExternalPartyTopologyResponse
1591
+ * @description Response message with topology transactions and the multi-hash to be signed.
1592
+ */
1593
+ GenerateExternalPartyTopologyResponse: {
1594
+ /** @description the generated party id */
1595
+ partyId: string;
1596
+ /** @description the fingerprint of the supplied public key */
1597
+ publicKeyFingerprint: string;
1598
+ /** @description The serialized topology transactions which need to be signed and submitted as part of the allocate party process
1599
+ * Note that the serialization includes the versioning information. Therefore, the transaction here is serialized
1600
+ * as an `UntypedVersionedMessage` which in turn contains the serialized `TopologyTransaction` in the version
1601
+ * supported by the synchronizer. */
1602
+ topologyTransactions?: string[];
1603
+ /** @description the multi-hash which may be signed instead of each individual transaction */
1604
+ multiHash: string;
1605
+ };
1440
1606
  /**
1441
1607
  * GetActiveContractsRequest
1442
1608
  * @description If the given offset is different than the ledger end, and there are (un)assignments in-flight at the given offset,
@@ -2195,6 +2361,15 @@ export interface components {
2195
2361
  /** @description When true, the response will contain additional details on how the transaction was encoded and hashed
2196
2362
  * This can be useful for troubleshooting of hash mismatches. Should only be used for debugging. */
2197
2363
  verboseHashing: boolean;
2364
+ /** @description Maximum timestamp at which the transaction can be recorded onto the ledger via the synchronizer specified in the `PrepareSubmissionResponse`.
2365
+ * If submitted after it will be rejected even if otherwise valid, in which case it needs to be prepared and signed again
2366
+ * with a new valid max_record_time.
2367
+ * Use this to limit the time-to-life of a prepared transaction,
2368
+ * which is useful to know when it can definitely not be accepted
2369
+ * anymore and resorting to preparing another transaction for the same
2370
+ * intent is safe again.
2371
+ * Optional */
2372
+ maxRecordTime?: string;
2198
2373
  };
2199
2374
  /**
2200
2375
  * JsPrepareSubmissionResponse
@@ -2454,6 +2629,10 @@ export interface components {
2454
2629
  */
2455
2630
  Kind: {
2456
2631
  CanActAs: components["schemas"]["CanActAs"];
2632
+ } | {
2633
+ CanExecuteAs: components["schemas"]["CanExecuteAs"];
2634
+ } | {
2635
+ CanExecuteAsAnyParty: components["schemas"]["CanExecuteAsAnyParty"];
2457
2636
  } | {
2458
2637
  CanReadAs: components["schemas"]["CanReadAs"];
2459
2638
  } | {
@@ -2833,6 +3012,26 @@ export interface components {
2833
3012
  /** @description The signing algorithm specification used to produce this signature */
2834
3013
  signingAlgorithmSpec: string;
2835
3014
  };
3015
+ /** SignedTransaction */
3016
+ SignedTransaction: {
3017
+ transaction: string;
3018
+ signatures?: components["schemas"]["Signature"][];
3019
+ };
3020
+ /** SigningPublicKey */
3021
+ SigningPublicKey: {
3022
+ /**
3023
+ * @description The serialization format of the public key
3024
+ * @example CRYPTO_KEY_FORMAT_DER_X509_SUBJECT_PUBLIC_KEY_INFO
3025
+ */
3026
+ format: string;
3027
+ /** @description Serialized public key in the format specified above */
3028
+ keyData: string;
3029
+ /**
3030
+ * @description The key specification
3031
+ * @example SIGNING_KEY_SPEC_EC_CURVE25519
3032
+ */
3033
+ keySpec: string;
3034
+ };
2836
3035
  /**
2837
3036
  * SinglePartySignatures
2838
3037
  * @description Signatures provided by a single party
@@ -3951,6 +4150,46 @@ export interface operations {
3951
4150
  };
3952
4151
  };
3953
4152
  };
4153
+ postV2PartiesExternalAllocate: {
4154
+ parameters: {
4155
+ query?: never;
4156
+ header?: never;
4157
+ path?: never;
4158
+ cookie?: never;
4159
+ };
4160
+ requestBody: {
4161
+ content: {
4162
+ "application/json": components["schemas"]["AllocateExternalPartyRequest"];
4163
+ };
4164
+ };
4165
+ responses: {
4166
+ 200: {
4167
+ headers: {
4168
+ [name: string]: unknown;
4169
+ };
4170
+ content: {
4171
+ "application/json": components["schemas"]["AllocateExternalPartyResponse"];
4172
+ };
4173
+ };
4174
+ /** @description Invalid value for: body, Invalid value for: headers */
4175
+ 400: {
4176
+ headers: {
4177
+ [name: string]: unknown;
4178
+ };
4179
+ content: {
4180
+ "text/plain": string;
4181
+ };
4182
+ };
4183
+ default: {
4184
+ headers: {
4185
+ [name: string]: unknown;
4186
+ };
4187
+ content: {
4188
+ "application/json": components["schemas"]["JsCantonError"];
4189
+ };
4190
+ };
4191
+ };
4192
+ };
3954
4193
  "getV2PartiesParticipant-id": {
3955
4194
  parameters: {
3956
4195
  query?: never;
@@ -4070,6 +4309,46 @@ export interface operations {
4070
4309
  };
4071
4310
  };
4072
4311
  };
4312
+ "postV2PartiesExternalGenerate-topology": {
4313
+ parameters: {
4314
+ query?: never;
4315
+ header?: never;
4316
+ path?: never;
4317
+ cookie?: never;
4318
+ };
4319
+ requestBody: {
4320
+ content: {
4321
+ "application/json": components["schemas"]["GenerateExternalPartyTopologyRequest"];
4322
+ };
4323
+ };
4324
+ responses: {
4325
+ 200: {
4326
+ headers: {
4327
+ [name: string]: unknown;
4328
+ };
4329
+ content: {
4330
+ "application/json": components["schemas"]["GenerateExternalPartyTopologyResponse"];
4331
+ };
4332
+ };
4333
+ /** @description Invalid value for: body, Invalid value for: headers */
4334
+ 400: {
4335
+ headers: {
4336
+ [name: string]: unknown;
4337
+ };
4338
+ content: {
4339
+ "text/plain": string;
4340
+ };
4341
+ };
4342
+ default: {
4343
+ headers: {
4344
+ [name: string]: unknown;
4345
+ };
4346
+ content: {
4347
+ "application/json": components["schemas"]["JsCantonError"];
4348
+ };
4349
+ };
4350
+ };
4351
+ };
4073
4352
  "postV2StateActive-contracts": {
4074
4353
  parameters: {
4075
4354
  query?: {
@@ -4117,8 +4396,8 @@ export interface operations {
4117
4396
  };
4118
4397
  "getV2StateConnected-synchronizers": {
4119
4398
  parameters: {
4120
- query: {
4121
- party: string;
4399
+ query?: {
4400
+ party?: string;
4122
4401
  participantId?: string;
4123
4402
  };
4124
4403
  header?: never;
@@ -4226,6 +4505,51 @@ export interface operations {
4226
4505
  };
4227
4506
  };
4228
4507
  };
4508
+ postV2Updates: {
4509
+ parameters: {
4510
+ query?: {
4511
+ /** @description maximum number of elements to return, this param is ignored if is bigger than server setting */
4512
+ limit?: number;
4513
+ /** @description timeout to complete and send result if no new elements are received (for open ended streams) */
4514
+ stream_idle_timeout_ms?: number;
4515
+ };
4516
+ header?: never;
4517
+ path?: never;
4518
+ cookie?: never;
4519
+ };
4520
+ requestBody: {
4521
+ content: {
4522
+ "application/json": components["schemas"]["GetUpdatesRequest"];
4523
+ };
4524
+ };
4525
+ responses: {
4526
+ 200: {
4527
+ headers: {
4528
+ [name: string]: unknown;
4529
+ };
4530
+ content: {
4531
+ "application/json": components["schemas"]["JsGetUpdatesResponse"][];
4532
+ };
4533
+ };
4534
+ /** @description Invalid value for: body, Invalid value for: query parameter limit, Invalid value for: query parameter stream_idle_timeout_ms, Invalid value for: headers */
4535
+ 400: {
4536
+ headers: {
4537
+ [name: string]: unknown;
4538
+ };
4539
+ content: {
4540
+ "text/plain": string;
4541
+ };
4542
+ };
4543
+ default: {
4544
+ headers: {
4545
+ [name: string]: unknown;
4546
+ };
4547
+ content: {
4548
+ "application/json": components["schemas"]["JsCantonError"];
4549
+ };
4550
+ };
4551
+ };
4552
+ };
4229
4553
  postV2UpdatesFlats: {
4230
4554
  parameters: {
4231
4555
  query?: {