@c7-digital/ledger 0.0.2

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 (98) hide show
  1. package/BUILD.md +125 -0
  2. package/LICENSE +17 -0
  3. package/README.md +97 -0
  4. package/lib/scripts/build.d.ts +9 -0
  5. package/lib/scripts/build.js +366 -0
  6. package/lib/scripts/enhance-types.d.ts +3 -0
  7. package/lib/scripts/enhance-types.js +174 -0
  8. package/lib/scripts/generate-asyncapi-types.d.ts +9 -0
  9. package/lib/scripts/generate-asyncapi-types.js +129 -0
  10. package/lib/scripts/generate-schema-modules.d.ts +3 -0
  11. package/lib/scripts/generate-schema-modules.js +33 -0
  12. package/lib/src/TemplateEmitterMap.d.ts +40 -0
  13. package/lib/src/TemplateEmitterMap.js +57 -0
  14. package/lib/src/client.d.ts +55 -0
  15. package/lib/src/client.js +62 -0
  16. package/lib/src/generated/api.d.ts +7147 -0
  17. package/lib/src/generated/api.js +1 -0
  18. package/lib/src/generated/async-api.d.ts +1665 -0
  19. package/lib/src/generated/async-api.js +1 -0
  20. package/lib/src/generated/asyncapi-schema.d.ts +1 -0
  21. package/lib/src/generated/asyncapi-schema.js +2233 -0
  22. package/lib/src/generated/openapi-schema.d.ts +1 -0
  23. package/lib/src/generated/openapi-schema.js +7321 -0
  24. package/lib/src/generated/sdk-version.d.ts +1 -0
  25. package/lib/src/generated/sdk-version.js +3 -0
  26. package/lib/src/index.d.ts +8 -0
  27. package/lib/src/index.js +8 -0
  28. package/lib/src/ledger.d.ts +188 -0
  29. package/lib/src/ledger.js +849 -0
  30. package/lib/src/ledger.test.d.ts +1 -0
  31. package/lib/src/ledger.test.js +23 -0
  32. package/lib/src/logger.d.ts +41 -0
  33. package/lib/src/logger.js +56 -0
  34. package/lib/src/multistream.d.ts +47 -0
  35. package/lib/src/multistream.js +123 -0
  36. package/lib/src/translate.d.ts +5 -0
  37. package/lib/src/translate.js +30 -0
  38. package/lib/src/types.d.ts +201 -0
  39. package/lib/src/types.js +1 -0
  40. package/lib/src/util.d.ts +3 -0
  41. package/lib/src/util.js +7 -0
  42. package/lib/src/validation.d.ts +27 -0
  43. package/lib/src/validation.js +182 -0
  44. package/lib/src/valueTypes.d.ts +34 -0
  45. package/lib/src/valueTypes.js +76 -0
  46. package/lib/src/websocket.d.ts +69 -0
  47. package/lib/src/websocket.js +125 -0
  48. package/lib/tsconfig.tsbuildinfo +1 -0
  49. package/lib-lite/scripts/build.d.ts +9 -0
  50. package/lib-lite/scripts/build.js +366 -0
  51. package/lib-lite/scripts/enhance-types.d.ts +3 -0
  52. package/lib-lite/scripts/enhance-types.js +174 -0
  53. package/lib-lite/scripts/generate-asyncapi-types.d.ts +9 -0
  54. package/lib-lite/scripts/generate-asyncapi-types.js +129 -0
  55. package/lib-lite/scripts/generate-schema-modules.d.ts +3 -0
  56. package/lib-lite/scripts/generate-schema-modules.js +33 -0
  57. package/lib-lite/src/TemplateEmitterMap.d.ts +40 -0
  58. package/lib-lite/src/TemplateEmitterMap.js +57 -0
  59. package/lib-lite/src/client.d.ts +55 -0
  60. package/lib-lite/src/client.js +62 -0
  61. package/lib-lite/src/generated/api.d.ts +7147 -0
  62. package/lib-lite/src/generated/api.js +1 -0
  63. package/lib-lite/src/generated/async-api.d.ts +1665 -0
  64. package/lib-lite/src/generated/async-api.js +1 -0
  65. package/lib-lite/src/generated/asyncapi-schema.d.ts +1 -0
  66. package/lib-lite/src/generated/asyncapi-schema.js +2 -0
  67. package/lib-lite/src/generated/openapi-schema.d.ts +1 -0
  68. package/lib-lite/src/generated/openapi-schema.js +2 -0
  69. package/lib-lite/src/generated/sdk-version.d.ts +1 -0
  70. package/lib-lite/src/generated/sdk-version.js +3 -0
  71. package/lib-lite/src/index.d.ts +8 -0
  72. package/lib-lite/src/index.js +8 -0
  73. package/lib-lite/src/ledger.d.ts +188 -0
  74. package/lib-lite/src/ledger.js +849 -0
  75. package/lib-lite/src/ledger.test.d.ts +1 -0
  76. package/lib-lite/src/ledger.test.js +23 -0
  77. package/lib-lite/src/logger.d.ts +41 -0
  78. package/lib-lite/src/logger.js +56 -0
  79. package/lib-lite/src/multistream.d.ts +47 -0
  80. package/lib-lite/src/multistream.js +123 -0
  81. package/lib-lite/src/translate.d.ts +5 -0
  82. package/lib-lite/src/translate.js +30 -0
  83. package/lib-lite/src/types.d.ts +201 -0
  84. package/lib-lite/src/types.js +1 -0
  85. package/lib-lite/src/util.d.ts +3 -0
  86. package/lib-lite/src/util.js +7 -0
  87. package/lib-lite/src/validation.d.ts +14 -0
  88. package/lib-lite/src/validation.js +31 -0
  89. package/lib-lite/src/valueTypes.d.ts +34 -0
  90. package/lib-lite/src/valueTypes.js +76 -0
  91. package/lib-lite/src/websocket.d.ts +69 -0
  92. package/lib-lite/src/websocket.js +125 -0
  93. package/lib-lite/tsconfig.temp.tsbuildinfo +1 -0
  94. package/package.json +72 -0
  95. package/scripts/build.ts +456 -0
  96. package/scripts/enhance-types.ts +223 -0
  97. package/scripts/generate-asyncapi-types.ts +158 -0
  98. package/scripts/generate-schema-modules.ts +52 -0
@@ -0,0 +1,2233 @@
1
+ // Auto-generated file - do not edit manually
2
+ // Generated from /Users/stefanpla/Development/c7/sandbox/publish_to_npm/c7_ledger/ledger/specs/asyncapi_3.4.7.yaml
3
+ export const ASYNCAPI_SCHEMA = `asyncapi: 2.6.0
4
+ info:
5
+ title: JSON Ledger API WebSocket endpoints
6
+ version: 3.4.7
7
+ channels:
8
+ /v2/commands/completions:
9
+ description: Get completions stream
10
+ subscribe:
11
+ operationId: onV2CommandsCompletions
12
+ description: Get completions stream
13
+ message:
14
+ $ref: '#/components/messages/Either_JsCantonError_CompletionStreamResponse'
15
+ publish:
16
+ operationId: sendV2CommandsCompletions
17
+ description: Get completions stream
18
+ message:
19
+ $ref: '#/components/messages/CompletionStreamRequest'
20
+ bindings:
21
+ ws:
22
+ method: GET
23
+ /v2/state/active-contracts:
24
+ description: Get active contracts stream
25
+ subscribe:
26
+ operationId: onV2StateActive-contracts
27
+ description: Get active contracts stream
28
+ message:
29
+ $ref: '#/components/messages/Either_JsCantonError_JsGetActiveContractsResponse'
30
+ publish:
31
+ operationId: sendV2StateActive-contracts
32
+ description: Get active contracts stream
33
+ message:
34
+ $ref: '#/components/messages/GetActiveContractsRequest'
35
+ bindings:
36
+ ws:
37
+ method: GET
38
+ /v2/updates:
39
+ description: Get updates stream
40
+ subscribe:
41
+ operationId: onV2Updates
42
+ description: Get updates stream
43
+ message:
44
+ $ref: '#/components/messages/Either_JsCantonError_JsGetUpdatesResponse'
45
+ publish:
46
+ operationId: sendV2Updates
47
+ description: Get updates stream
48
+ message:
49
+ $ref: '#/components/messages/GetUpdatesRequest'
50
+ bindings:
51
+ ws:
52
+ method: GET
53
+ /v2/updates/flats:
54
+ description: Get flat transactions update stream. Provided for backwards compatibility,
55
+ it will be removed in the Canton version 3.5.0, use v2/updates instead.
56
+ subscribe:
57
+ operationId: onV2UpdatesFlats
58
+ description: Get flat transactions update stream. Provided for backwards compatibility,
59
+ it will be removed in the Canton version 3.5.0, use v2/updates instead.
60
+ message:
61
+ $ref: '#/components/messages/Either_JsCantonError_JsGetUpdatesResponse'
62
+ publish:
63
+ operationId: sendV2UpdatesFlats
64
+ description: Get flat transactions update stream. Provided for backwards compatibility,
65
+ it will be removed in the Canton version 3.5.0, use v2/updates instead.
66
+ message:
67
+ $ref: '#/components/messages/GetUpdatesRequest'
68
+ bindings:
69
+ ws:
70
+ method: GET
71
+ /v2/updates/trees:
72
+ description: Get update transactions tree stream. Provided for backwards compatibility,
73
+ it will be removed in the Canton version 3.5.0, use v2/updates instead.
74
+ subscribe:
75
+ operationId: onV2UpdatesTrees
76
+ description: Get update transactions tree stream. Provided for backwards compatibility,
77
+ it will be removed in the Canton version 3.5.0, use v2/updates instead.
78
+ message:
79
+ $ref: '#/components/messages/Either_JsCantonError_JsGetUpdateTreesResponse'
80
+ publish:
81
+ operationId: sendV2UpdatesTrees
82
+ description: Get update transactions tree stream. Provided for backwards compatibility,
83
+ it will be removed in the Canton version 3.5.0, use v2/updates instead.
84
+ message:
85
+ $ref: '#/components/messages/GetUpdatesRequest'
86
+ bindings:
87
+ ws:
88
+ method: GET
89
+ components:
90
+ schemas:
91
+ JsCantonError:
92
+ title: JsCantonError
93
+ type: object
94
+ required:
95
+ - code
96
+ - cause
97
+ - context
98
+ - errorCategory
99
+ properties:
100
+ code:
101
+ type: string
102
+ cause:
103
+ type: string
104
+ correlationId:
105
+ type: string
106
+ traceId:
107
+ type: string
108
+ context:
109
+ $ref: '#/components/schemas/Map_String'
110
+ resources:
111
+ type: array
112
+ items:
113
+ $ref: '#/components/schemas/Tuple2_String_String'
114
+ errorCategory:
115
+ type: integer
116
+ format: int32
117
+ grpcCodeValue:
118
+ type: integer
119
+ format: int32
120
+ retryInfo:
121
+ type: string
122
+ definiteAnswer:
123
+ type: boolean
124
+ Map_String:
125
+ title: Map_String
126
+ type: object
127
+ additionalProperties:
128
+ type: string
129
+ Tuple2_String_String:
130
+ title: Tuple2_String_String
131
+ type: array
132
+ prefixItems:
133
+ - type: string
134
+ - type: string
135
+ CompletionStreamRequest:
136
+ title: CompletionStreamRequest
137
+ type: object
138
+ required:
139
+ - userId
140
+ - beginExclusive
141
+ properties:
142
+ userId:
143
+ description: |-
144
+ Only completions of commands submitted with the same user_id will be visible in the stream.
145
+ Must be a valid UserIdString (as described in \`\`value.proto\`\`).
146
+ Required unless authentication is used with a user token.
147
+ In that case, the token's user-id will be used for the request's user_id.
148
+ type: string
149
+ parties:
150
+ description: |-
151
+ Non-empty list of parties whose data should be included.
152
+ The stream shows only completions of commands for which at least one of the \`\`act_as\`\` parties is in the given set of parties.
153
+ Must be a valid PartyIdString (as described in \`\`value.proto\`\`).
154
+ Required
155
+ type: array
156
+ items:
157
+ type: string
158
+ beginExclusive:
159
+ description: |-
160
+ This optional field indicates the minimum offset for completions. This can be used to resume an earlier completion stream.
161
+ If not set the ledger uses the ledger begin offset instead.
162
+ If specified, it must be a valid absolute offset (positive integer) or zero (ledger begin offset).
163
+ If the ledger has been pruned, this parameter must be specified and greater than the pruning offset.
164
+ type: integer
165
+ format: int64
166
+ Either_JsCantonError_CompletionStreamResponse:
167
+ title: Either_JsCantonError_CompletionStreamResponse
168
+ oneOf:
169
+ - $ref: '#/components/schemas/CompletionStreamResponse'
170
+ - $ref: '#/components/schemas/JsCantonError'
171
+ Map_K_V:
172
+ title: Map_K_V
173
+ type: object
174
+ additionalProperties:
175
+ type: string
176
+ CompletionStreamResponse:
177
+ title: CompletionStreamResponse
178
+ type: object
179
+ required:
180
+ - completionResponse
181
+ properties:
182
+ completionResponse:
183
+ $ref: '#/components/schemas/CompletionResponse'
184
+ CompletionResponse:
185
+ title: CompletionResponse
186
+ oneOf:
187
+ - type: object
188
+ required:
189
+ - Completion
190
+ properties:
191
+ Completion:
192
+ $ref: '#/components/schemas/Completion'
193
+ - type: object
194
+ required:
195
+ - Empty
196
+ properties:
197
+ Empty:
198
+ $ref: '#/components/schemas/Empty1'
199
+ - type: object
200
+ required:
201
+ - OffsetCheckpoint
202
+ properties:
203
+ OffsetCheckpoint:
204
+ $ref: '#/components/schemas/OffsetCheckpoint'
205
+ Completion:
206
+ title: Completion
207
+ description: 'A completion represents the status of a submitted command on the
208
+ ledger: it can be successful or failed.'
209
+ type: object
210
+ required:
211
+ - value
212
+ properties:
213
+ value:
214
+ $ref: '#/components/schemas/Completion1'
215
+ Completion1:
216
+ title: Completion
217
+ description: 'A completion represents the status of a submitted command on the
218
+ ledger: it can be successful or failed.'
219
+ type: object
220
+ required:
221
+ - commandId
222
+ - updateId
223
+ - userId
224
+ - submissionId
225
+ - deduplicationPeriod
226
+ - offset
227
+ properties:
228
+ commandId:
229
+ description: |-
230
+ The ID of the succeeded or failed command.
231
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
232
+ Required
233
+ type: string
234
+ status:
235
+ $ref: '#/components/schemas/JsStatus'
236
+ description: |-
237
+ Identifies the exact type of the error.
238
+ It uses the same format of conveying error details as it is used for the RPC responses of the APIs.
239
+ Optional
240
+ updateId:
241
+ description: |-
242
+ The update_id of the transaction or reassignment that resulted from the command with command_id.
243
+ Only set for successfully executed commands.
244
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
245
+ type: string
246
+ userId:
247
+ description: |-
248
+ The user-id that was used for the submission, as described in \`\`commands.proto\`\`.
249
+ Must be a valid UserIdString (as described in \`\`value.proto\`\`).
250
+ Optional for historic completions where this data is not available.
251
+ type: string
252
+ actAs:
253
+ description: |-
254
+ The set of parties on whose behalf the commands were executed.
255
+ Contains the \`\`act_as\`\` parties from \`\`commands.proto\`\`
256
+ filtered to the requesting parties in CompletionStreamRequest.
257
+ The order of the parties need not be the same as in the submission.
258
+ Each element must be a valid PartyIdString (as described in \`\`value.proto\`\`).
259
+ Optional for historic completions where this data is not available.
260
+ type: array
261
+ items:
262
+ type: string
263
+ submissionId:
264
+ description: |-
265
+ The submission ID this completion refers to, as described in \`\`commands.proto\`\`.
266
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
267
+ Optional
268
+ type: string
269
+ deduplicationPeriod:
270
+ $ref: '#/components/schemas/DeduplicationPeriod'
271
+ traceContext:
272
+ $ref: '#/components/schemas/TraceContext'
273
+ description: |-
274
+ Optional; ledger API trace context
275
+
276
+ The trace context transported in this message corresponds to the trace context supplied
277
+ by the client application in a HTTP2 header of the original command submission.
278
+ We typically use a header to transfer this type of information. Here we use message
279
+ body, because it is used in gRPC streams which do not support per message headers.
280
+ This field will be populated with the trace context contained in the original submission.
281
+ If that was not provided, a unique ledger-api-server generated trace context will be used
282
+ instead.
283
+ offset:
284
+ description: |-
285
+ May be used in a subsequent CompletionStreamRequest to resume the consumption of this stream at a later time.
286
+ Required, must be a valid absolute offset (positive integer).
287
+ type: integer
288
+ format: int64
289
+ synchronizerTime:
290
+ $ref: '#/components/schemas/SynchronizerTime'
291
+ description: |-
292
+ The synchronizer along with its record time.
293
+ The synchronizer id provided, in case of
294
+
295
+ - successful/failed transactions: identifies the synchronizer of the transaction
296
+ - for successful/failed unassign commands: identifies the source synchronizer
297
+ - for successful/failed assign commands: identifies the target synchronizer
298
+
299
+ Required
300
+ JsStatus:
301
+ title: JsStatus
302
+ type: object
303
+ required:
304
+ - code
305
+ - message
306
+ properties:
307
+ code:
308
+ type: integer
309
+ format: int32
310
+ message:
311
+ type: string
312
+ details:
313
+ type: array
314
+ items:
315
+ $ref: '#/components/schemas/ProtoAny'
316
+ ProtoAny:
317
+ title: ProtoAny
318
+ type: object
319
+ required:
320
+ - typeUrl
321
+ - value
322
+ - unknownFields
323
+ properties:
324
+ typeUrl:
325
+ type: string
326
+ value:
327
+ type: string
328
+ unknownFields:
329
+ $ref: '#/components/schemas/UnknownFieldSet'
330
+ valueDecoded:
331
+ type: string
332
+ UnknownFieldSet:
333
+ title: UnknownFieldSet
334
+ type: object
335
+ required:
336
+ - fields
337
+ properties:
338
+ fields:
339
+ $ref: '#/components/schemas/Map_Int_Field'
340
+ Map_Int_Field:
341
+ title: Map_Int_Field
342
+ type: object
343
+ additionalProperties:
344
+ $ref: '#/components/schemas/Field'
345
+ Field:
346
+ title: Field
347
+ type: object
348
+ properties:
349
+ varint:
350
+ type: array
351
+ items:
352
+ type: integer
353
+ format: int64
354
+ fixed64:
355
+ type: array
356
+ items:
357
+ type: integer
358
+ format: int64
359
+ fixed32:
360
+ type: array
361
+ items:
362
+ type: integer
363
+ format: int32
364
+ lengthDelimited:
365
+ type: array
366
+ items:
367
+ type: string
368
+ DeduplicationPeriod:
369
+ title: DeduplicationPeriod
370
+ oneOf:
371
+ - type: object
372
+ required:
373
+ - DeduplicationDuration
374
+ properties:
375
+ DeduplicationDuration:
376
+ $ref: '#/components/schemas/DeduplicationDuration'
377
+ - type: object
378
+ required:
379
+ - DeduplicationOffset
380
+ properties:
381
+ DeduplicationOffset:
382
+ $ref: '#/components/schemas/DeduplicationOffset'
383
+ - type: object
384
+ required:
385
+ - Empty
386
+ properties:
387
+ Empty:
388
+ $ref: '#/components/schemas/Empty'
389
+ DeduplicationDuration:
390
+ title: DeduplicationDuration
391
+ type: object
392
+ required:
393
+ - value
394
+ properties:
395
+ value:
396
+ $ref: '#/components/schemas/Duration'
397
+ Duration:
398
+ title: Duration
399
+ type: object
400
+ required:
401
+ - seconds
402
+ - nanos
403
+ properties:
404
+ seconds:
405
+ type: integer
406
+ format: int64
407
+ nanos:
408
+ type: integer
409
+ format: int32
410
+ unknownFields:
411
+ $ref: '#/components/schemas/UnknownFieldSet'
412
+ description: This field is automatically added as part of protobuf to json
413
+ mapping
414
+ DeduplicationOffset:
415
+ title: DeduplicationOffset
416
+ type: object
417
+ required:
418
+ - value
419
+ properties:
420
+ value:
421
+ type: integer
422
+ format: int64
423
+ Empty:
424
+ title: Empty
425
+ type: object
426
+ TraceContext:
427
+ title: TraceContext
428
+ type: object
429
+ properties:
430
+ traceparent:
431
+ description: https://www.w3.org/TR/trace-context/
432
+ type: string
433
+ tracestate:
434
+ description: ''
435
+ type: string
436
+ SynchronizerTime:
437
+ title: SynchronizerTime
438
+ type: object
439
+ required:
440
+ - synchronizerId
441
+ properties:
442
+ synchronizerId:
443
+ description: |-
444
+ The id of the synchronizer.
445
+ Required
446
+ type: string
447
+ recordTime:
448
+ description: |-
449
+ All commands with a maximum record time below this value MUST be considered lost if their completion has not arrived before this checkpoint.
450
+ Required
451
+ type: string
452
+ Empty1:
453
+ title: Empty
454
+ type: object
455
+ OffsetCheckpoint:
456
+ title: OffsetCheckpoint
457
+ description: |-
458
+ OffsetCheckpoints may be used to:
459
+
460
+ - detect time out of commands.
461
+ - provide an offset which can be used to restart consumption.
462
+ type: object
463
+ required:
464
+ - value
465
+ properties:
466
+ value:
467
+ $ref: '#/components/schemas/OffsetCheckpoint1'
468
+ OffsetCheckpoint1:
469
+ title: OffsetCheckpoint
470
+ description: |-
471
+ OffsetCheckpoints may be used to:
472
+
473
+ - detect time out of commands.
474
+ - provide an offset which can be used to restart consumption.
475
+ type: object
476
+ required:
477
+ - offset
478
+ properties:
479
+ offset:
480
+ description: |-
481
+ The participant's offset, the details of the offset field are described in \`\`community/ledger-api/README.md\`\`.
482
+ Required, must be a valid absolute offset (positive integer).
483
+ type: integer
484
+ format: int64
485
+ synchronizerTimes:
486
+ description: ''
487
+ type: array
488
+ items:
489
+ $ref: '#/components/schemas/SynchronizerTime'
490
+ GetActiveContractsRequest:
491
+ title: GetActiveContractsRequest
492
+ description: |-
493
+ If the given offset is different than the ledger end, and there are (un)assignments in-flight at the given offset,
494
+ the snapshot may fail with "FAILED_PRECONDITION/PARTICIPANT_PRUNED_DATA_ACCESSED".
495
+ Note that it is ok to request acs snapshots for party migration with offsets other than ledger end, because party
496
+ migration is not concerned with incomplete (un)assignments.
497
+ type: object
498
+ required:
499
+ - verbose
500
+ - activeAtOffset
501
+ properties:
502
+ filter:
503
+ $ref: '#/components/schemas/TransactionFilter'
504
+ description: |-
505
+ Provided for backwards compatibility, it will be removed in the Canton version 3.5.0.
506
+ Templates to include in the served snapshot, per party.
507
+ Optional, if specified event_format must be unset, if not specified event_format must be set.
508
+ verbose:
509
+ description: |-
510
+ Provided for backwards compatibility, it will be removed in the Canton version 3.5.0.
511
+ If enabled, values served over the API will contain more information than strictly necessary to interpret the data.
512
+ In particular, setting the verbose flag to true triggers the ledger to include labels for record fields.
513
+ Optional, if specified event_format must be unset.
514
+ type: boolean
515
+ activeAtOffset:
516
+ description: |-
517
+ The offset at which the snapshot of the active contracts will be computed.
518
+ Must be no greater than the current ledger end offset.
519
+ Must be greater than or equal to the last pruning offset.
520
+ Required, must be a valid absolute offset (positive integer) or ledger begin offset (zero).
521
+ If zero, the empty set will be returned.
522
+ type: integer
523
+ format: int64
524
+ eventFormat:
525
+ $ref: '#/components/schemas/EventFormat'
526
+ description: |-
527
+ Format of the contract_entries in the result. In case of CreatedEvent the presentation will be of
528
+ TRANSACTION_SHAPE_ACS_DELTA.
529
+ Optional for backwards compatibility, defaults to an EventFormat where:
530
+
531
+ - filters_by_party is the filter.filters_by_party from this request
532
+ - filters_for_any_party is the filter.filters_for_any_party from this request
533
+ - verbose is the verbose field from this request
534
+ TransactionFilter:
535
+ title: TransactionFilter
536
+ description: |-
537
+ Provided for backwards compatibility, it will be removed in the Canton version 3.5.0.
538
+ Used both for filtering create and archive events as well as for filtering transaction trees.
539
+ type: object
540
+ required:
541
+ - filtersByParty
542
+ properties:
543
+ filtersByParty:
544
+ $ref: '#/components/schemas/Map_Filters'
545
+ description: |-
546
+ Each key must be a valid PartyIdString (as described in \`\`value.proto\`\`).
547
+ The interpretation of the filter depends on the transaction-shape being filtered:
548
+
549
+ 1. For **transaction trees** (used in GetUpdateTreesResponse for backwards compatibility) all party keys used as
550
+ wildcard filters, and all subtrees whose root has one of the listed parties as an informee are returned.
551
+ If there are \`\`CumulativeFilter\`\`s, those will control returned \`\`CreatedEvent\`\` fields where applicable, but will
552
+ not be used for template/interface filtering.
553
+ 2. For **ledger-effects** create and exercise events are returned, for which the witnesses include at least one of
554
+ the listed parties and match the per-party filter.
555
+ 3. For **transaction and active-contract-set streams** create and archive events are returned for all contracts whose
556
+ stakeholders include at least one of the listed parties and match the per-party filter.
557
+ filtersForAnyParty:
558
+ $ref: '#/components/schemas/Filters'
559
+ description: |-
560
+ Wildcard filters that apply to all the parties existing on the participant. The interpretation of the filters is the same
561
+ with the per-party filter as described above.
562
+ Map_Filters:
563
+ title: Map_Filters
564
+ type: object
565
+ additionalProperties:
566
+ $ref: '#/components/schemas/Filters'
567
+ Filters:
568
+ title: Filters
569
+ description: The union of a set of template filters, interface filters, or a
570
+ wildcard.
571
+ type: object
572
+ properties:
573
+ cumulative:
574
+ description: |-
575
+ Every filter in the cumulative list expands the scope of the resulting stream. Each interface,
576
+ template or wildcard filter means additional events that will match the query.
577
+ The impact of include_interface_view and include_created_event_blob fields in the filters will
578
+ also be accumulated.
579
+ A template or an interface SHOULD NOT appear twice in the accumulative field.
580
+ A wildcard filter SHOULD NOT be defined more than once in the accumulative field.
581
+ Optional, if no \`\`CumulativeFilter\`\` defined, the default of a single \`\`WildcardFilter\`\` with
582
+ include_created_event_blob unset is used.
583
+ type: array
584
+ items:
585
+ $ref: '#/components/schemas/CumulativeFilter'
586
+ CumulativeFilter:
587
+ title: CumulativeFilter
588
+ description: |-
589
+ A filter that matches all contracts that are either an instance of one of
590
+ the \`\`template_filters\`\` or that match one of the \`\`interface_filters\`\`.
591
+ type: object
592
+ required:
593
+ - identifierFilter
594
+ properties:
595
+ identifierFilter:
596
+ $ref: '#/components/schemas/IdentifierFilter'
597
+ IdentifierFilter:
598
+ title: IdentifierFilter
599
+ oneOf:
600
+ - type: object
601
+ required:
602
+ - Empty
603
+ properties:
604
+ Empty:
605
+ $ref: '#/components/schemas/Empty2'
606
+ - type: object
607
+ required:
608
+ - InterfaceFilter
609
+ properties:
610
+ InterfaceFilter:
611
+ $ref: '#/components/schemas/InterfaceFilter'
612
+ - type: object
613
+ required:
614
+ - TemplateFilter
615
+ properties:
616
+ TemplateFilter:
617
+ $ref: '#/components/schemas/TemplateFilter'
618
+ - type: object
619
+ required:
620
+ - WildcardFilter
621
+ properties:
622
+ WildcardFilter:
623
+ $ref: '#/components/schemas/WildcardFilter'
624
+ Empty2:
625
+ title: Empty
626
+ type: object
627
+ InterfaceFilter:
628
+ title: InterfaceFilter
629
+ description: This filter matches contracts that implement a specific interface.
630
+ type: object
631
+ required:
632
+ - value
633
+ properties:
634
+ value:
635
+ $ref: '#/components/schemas/InterfaceFilter1'
636
+ InterfaceFilter1:
637
+ title: InterfaceFilter
638
+ description: This filter matches contracts that implement a specific interface.
639
+ type: object
640
+ required:
641
+ - includeInterfaceView
642
+ - includeCreatedEventBlob
643
+ properties:
644
+ interfaceId:
645
+ description: |-
646
+ The interface that a matching contract must implement.
647
+ The \`\`interface_id\`\` needs to be valid: corresponding interface should be defined in
648
+ one of the available packages at the time of the query.
649
+ Both package-name and package-id reference formats for the identifier are supported.
650
+ Note: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.
651
+
652
+ Required
653
+ type: string
654
+ includeInterfaceView:
655
+ description: |-
656
+ Whether to include the interface view on the contract in the returned \`\`CreatedEvent\`\`.
657
+ Use this to access contract data in a uniform manner in your API client.
658
+ Optional
659
+ type: boolean
660
+ includeCreatedEventBlob:
661
+ description: |-
662
+ Whether to include a \`\`created_event_blob\`\` in the returned \`\`CreatedEvent\`\`.
663
+ Use this to access the contract create event payload in your API client
664
+ for submitting it as a disclosed contract with future commands.
665
+ Optional
666
+ type: boolean
667
+ TemplateFilter:
668
+ title: TemplateFilter
669
+ description: This filter matches contracts of a specific template.
670
+ type: object
671
+ required:
672
+ - value
673
+ properties:
674
+ value:
675
+ $ref: '#/components/schemas/TemplateFilter1'
676
+ TemplateFilter1:
677
+ title: TemplateFilter
678
+ description: This filter matches contracts of a specific template.
679
+ type: object
680
+ required:
681
+ - includeCreatedEventBlob
682
+ properties:
683
+ templateId:
684
+ description: |-
685
+ A template for which the payload should be included in the response.
686
+ The \`\`template_id\`\` needs to be valid: corresponding template should be defined in
687
+ one of the available packages at the time of the query.
688
+ Both package-name and package-id reference formats for the identifier are supported.
689
+ Note: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.
690
+
691
+ Required
692
+ type: string
693
+ includeCreatedEventBlob:
694
+ description: |-
695
+ Whether to include a \`\`created_event_blob\`\` in the returned \`\`CreatedEvent\`\`.
696
+ Use this to access the contract event payload in your API client
697
+ for submitting it as a disclosed contract with future commands.
698
+ Optional
699
+ type: boolean
700
+ WildcardFilter:
701
+ title: WildcardFilter
702
+ description: This filter matches all templates.
703
+ type: object
704
+ required:
705
+ - value
706
+ properties:
707
+ value:
708
+ $ref: '#/components/schemas/WildcardFilter1'
709
+ WildcardFilter1:
710
+ title: WildcardFilter
711
+ description: This filter matches all templates.
712
+ type: object
713
+ required:
714
+ - includeCreatedEventBlob
715
+ properties:
716
+ includeCreatedEventBlob:
717
+ description: |-
718
+ Whether to include a \`\`created_event_blob\`\` in the returned \`\`CreatedEvent\`\`.
719
+ Use this to access the contract create event payload in your API client
720
+ for submitting it as a disclosed contract with future commands.
721
+ Optional
722
+ type: boolean
723
+ EventFormat:
724
+ title: EventFormat
725
+ description: |-
726
+ A format for events which defines both which events should be included
727
+ and what data should be computed and included for them.
728
+
729
+ Note that some of the filtering behavior depends on the \`TransactionShape\`,
730
+ which is expected to be specified alongside usages of \`EventFormat\`.
731
+ type: object
732
+ required:
733
+ - filtersByParty
734
+ - verbose
735
+ properties:
736
+ filtersByParty:
737
+ $ref: '#/components/schemas/Map_Filters'
738
+ description: |-
739
+ Each key must be a valid PartyIdString (as described in \`\`value.proto\`\`).
740
+ The interpretation of the filter depends on the transaction-shape being filtered:
741
+
742
+ 1. For **ledger-effects** create and exercise events are returned, for which the witnesses include at least one of
743
+ the listed parties and match the per-party filter.
744
+ 2. For **transaction and active-contract-set streams** create and archive events are returned for all contracts whose
745
+ stakeholders include at least one of the listed parties and match the per-party filter.
746
+
747
+ Optional
748
+ filtersForAnyParty:
749
+ $ref: '#/components/schemas/Filters'
750
+ description: |-
751
+ Wildcard filters that apply to all the parties existing on the participant. The interpretation of the filters is the same
752
+ with the per-party filter as described above.
753
+ Optional
754
+ verbose:
755
+ description: |-
756
+ If enabled, values served over the API will contain more information than strictly necessary to interpret the data.
757
+ In particular, setting the verbose flag to true triggers the ledger to include labels for record fields.
758
+ Optional
759
+ type: boolean
760
+ Either_JsCantonError_JsGetActiveContractsResponse:
761
+ title: Either_JsCantonError_JsGetActiveContractsResponse
762
+ oneOf:
763
+ - $ref: '#/components/schemas/JsCantonError'
764
+ - $ref: '#/components/schemas/JsGetActiveContractsResponse'
765
+ JsGetActiveContractsResponse:
766
+ title: JsGetActiveContractsResponse
767
+ type: object
768
+ required:
769
+ - workflowId
770
+ - contractEntry
771
+ properties:
772
+ workflowId:
773
+ description: |-
774
+ The workflow ID used in command submission which corresponds to the contract_entry. Only set if
775
+ the \`\`workflow_id\`\` for the command was set.
776
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
777
+ Optional
778
+ type: string
779
+ contractEntry:
780
+ $ref: '#/components/schemas/JsContractEntry'
781
+ JsContractEntry:
782
+ title: JsContractEntry
783
+ oneOf:
784
+ - type: object
785
+ required:
786
+ - JsActiveContract
787
+ properties:
788
+ JsActiveContract:
789
+ $ref: '#/components/schemas/JsActiveContract'
790
+ - type: object
791
+ required:
792
+ - JsEmpty
793
+ properties:
794
+ JsEmpty:
795
+ $ref: '#/components/schemas/JsEmpty'
796
+ - type: object
797
+ required:
798
+ - JsIncompleteAssigned
799
+ properties:
800
+ JsIncompleteAssigned:
801
+ $ref: '#/components/schemas/JsIncompleteAssigned'
802
+ - type: object
803
+ required:
804
+ - JsIncompleteUnassigned
805
+ properties:
806
+ JsIncompleteUnassigned:
807
+ $ref: '#/components/schemas/JsIncompleteUnassigned'
808
+ JsActiveContract:
809
+ title: JsActiveContract
810
+ type: object
811
+ required:
812
+ - createdEvent
813
+ - synchronizerId
814
+ - reassignmentCounter
815
+ properties:
816
+ createdEvent:
817
+ $ref: '#/components/schemas/CreatedEvent'
818
+ description: |-
819
+ Required
820
+ The event as it appeared in the context of its last update (i.e. daml transaction or
821
+ reassignment). In particular, the last offset, node_id pair is preserved.
822
+ The last update is the most recent update created or assigned this contract on synchronizer_id synchronizer.
823
+ The offset of the CreatedEvent might point to an already pruned update, therefore it cannot necessarily be used
824
+ for lookups.
825
+ synchronizerId:
826
+ description: |-
827
+ A valid synchronizer id
828
+ Required
829
+ type: string
830
+ reassignmentCounter:
831
+ description: |-
832
+ Each corresponding assigned and unassigned event has the same reassignment_counter. This strictly increases
833
+ with each unassign command for the same contract. Creation of the contract corresponds to reassignment_counter
834
+ equals zero.
835
+ This field will be the reassignment_counter of the latest observable activation event on this synchronizer, which is
836
+ before the active_at_offset.
837
+ Required
838
+ type: integer
839
+ format: int64
840
+ CreatedEvent:
841
+ title: CreatedEvent
842
+ description: Records that a contract has been created, and choices may now be
843
+ exercised on it.
844
+ type: object
845
+ required:
846
+ - offset
847
+ - nodeId
848
+ - contractId
849
+ - templateId
850
+ - createdEventBlob
851
+ - createdAt
852
+ - packageName
853
+ - representativePackageId
854
+ - acsDelta
855
+ properties:
856
+ offset:
857
+ description: |-
858
+ The offset of origin, which has contextual meaning, please see description at messages that include a CreatedEvent.
859
+ Offsets are managed by the participant nodes.
860
+ Transactions can thus NOT be assumed to have the same offsets on different participant nodes.
861
+ Required, it is a valid absolute offset (positive integer)
862
+ type: integer
863
+ format: int64
864
+ nodeId:
865
+ description: |-
866
+ The position of this event in the originating transaction or reassignment.
867
+ The origin has contextual meaning, please see description at messages that include a CreatedEvent.
868
+ Node IDs are not necessarily equal across participants,
869
+ as these may see different projections/parts of transactions.
870
+ Required, must be valid node ID (non-negative integer)
871
+ type: integer
872
+ format: int32
873
+ contractId:
874
+ description: |-
875
+ The ID of the created contract.
876
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
877
+ Required
878
+ type: string
879
+ templateId:
880
+ description: |-
881
+ The template of the created contract.
882
+ The identifier uses the package-id reference format.
883
+
884
+ Required
885
+ type: string
886
+ contractKey:
887
+ description: |-
888
+ The key of the created contract.
889
+ This will be set if and only if \`\`template_id\`\` defines a contract key.
890
+ Optional
891
+ createArgument: {}
892
+ createdEventBlob:
893
+ description: |-
894
+ Opaque representation of contract create event payload intended for forwarding
895
+ to an API server as a contract disclosed as part of a command
896
+ submission.
897
+ Optional
898
+ type: string
899
+ interfaceViews:
900
+ description: |-
901
+ Interface views specified in the transaction filter.
902
+ Includes an \`\`InterfaceView\`\` for each interface for which there is a \`\`InterfaceFilter\`\` with
903
+
904
+ - its party in the \`\`witness_parties\`\` of this event,
905
+ - and which is implemented by the template of this event,
906
+ - and which has \`\`include_interface_view\`\` set.
907
+
908
+ Optional
909
+ type: array
910
+ items:
911
+ $ref: '#/components/schemas/JsInterfaceView'
912
+ witnessParties:
913
+ description: |-
914
+ The parties that are notified of this event. When a \`\`CreatedEvent\`\`
915
+ is returned as part of a transaction tree or ledger-effects transaction, this will include all
916
+ the parties specified in the \`\`TransactionFilter\`\` that are witnesses of the event
917
+ (the stakeholders of the contract and all informees of all the ancestors
918
+ of this create action that this participant knows about).
919
+ If served as part of a ACS delta transaction those will
920
+ be limited to all parties specified in the \`\`TransactionFilter\`\` that
921
+ are stakeholders of the contract (i.e. either signatories or observers).
922
+ If the \`\`CreatedEvent\`\` is returned as part of an AssignedEvent,
923
+ ActiveContract or IncompleteUnassigned (so the event is related to
924
+ an assignment or unassignment): this will include all parties of the
925
+ \`\`TransactionFilter\`\` that are stakeholders of the contract.
926
+
927
+ The behavior of reading create events visible to parties not hosted
928
+ on the participant node serving the Ledger API is undefined. Concretely,
929
+ there is neither a guarantee that the participant node will serve all their
930
+ create events on the ACS stream, nor is there a guarantee that matching archive
931
+ events are delivered for such create events.
932
+
933
+ For most clients this is not a problem, as they only read events for parties
934
+ that are hosted on the participant node. If you need to read events
935
+ for parties that may not be hosted at all times on the participant node,
936
+ subscribe to the \`\`TopologyEvent\`\`s for that party by setting a corresponding
937
+ \`\`UpdateFormat\`\`. Using these events, query the ACS as-of an offset where the
938
+ party is hosted on the participant node, and ignore create events at offsets
939
+ where the party is not hosted on the participant node.
940
+ Required
941
+ type: array
942
+ items:
943
+ type: string
944
+ signatories:
945
+ description: |-
946
+ The signatories for this contract as specified by the template.
947
+ Required
948
+ type: array
949
+ items:
950
+ type: string
951
+ observers:
952
+ description: |-
953
+ The observers for this contract as specified explicitly by the template or implicitly as choice controllers.
954
+ This field never contains parties that are signatories.
955
+ Required
956
+ type: array
957
+ items:
958
+ type: string
959
+ createdAt:
960
+ description: |-
961
+ Ledger effective time of the transaction that created the contract.
962
+ Required
963
+ type: string
964
+ packageName:
965
+ description: |-
966
+ The package name of the created contract.
967
+ Required
968
+ type: string
969
+ representativePackageId:
970
+ description: |-
971
+ A package-id present in the participant package store that typechecks the contract's argument.
972
+ This may differ from the package-id of the template used to create the contract.
973
+ For contracts created before Canton 3.4, this field matches the contract's creation package-id.
974
+
975
+ NOTE: Experimental, server internal concept, not for client consumption. Subject to change without notice.
976
+
977
+ Required
978
+ type: string
979
+ acsDelta:
980
+ description: |-
981
+ Whether this event would be part of respective ACS_DELTA shaped stream,
982
+ and should therefore considered when tracking contract activeness on the client-side.
983
+ Required
984
+ type: boolean
985
+ JsInterfaceView:
986
+ title: JsInterfaceView
987
+ description: View of a create event matched by an interface filter.
988
+ type: object
989
+ required:
990
+ - interfaceId
991
+ - viewStatus
992
+ properties:
993
+ interfaceId:
994
+ description: |-
995
+ The interface implemented by the matched event.
996
+ The identifier uses the package-id reference format.
997
+
998
+ Required
999
+ type: string
1000
+ viewStatus:
1001
+ $ref: '#/components/schemas/JsStatus'
1002
+ description: |-
1003
+ Whether the view was successfully computed, and if not,
1004
+ the reason for the error. The error is reported using the same rules
1005
+ for error codes and messages as the errors returned for API requests.
1006
+ Required
1007
+ viewValue:
1008
+ description: |-
1009
+ The value of the interface's view method on this event.
1010
+ Set if it was requested in the \`\`InterfaceFilter\`\` and it could be
1011
+ successfully computed.
1012
+ Optional
1013
+ JsEmpty:
1014
+ title: JsEmpty
1015
+ type: object
1016
+ JsIncompleteAssigned:
1017
+ title: JsIncompleteAssigned
1018
+ type: object
1019
+ required:
1020
+ - assignedEvent
1021
+ properties:
1022
+ assignedEvent:
1023
+ $ref: '#/components/schemas/JsAssignedEvent'
1024
+ description: Required
1025
+ JsAssignedEvent:
1026
+ title: JsAssignedEvent
1027
+ description: Records that a contract has been assigned, and it can be used on
1028
+ the target synchronizer.
1029
+ type: object
1030
+ required:
1031
+ - source
1032
+ - target
1033
+ - reassignmentId
1034
+ - submitter
1035
+ - reassignmentCounter
1036
+ - createdEvent
1037
+ properties:
1038
+ source:
1039
+ description: |-
1040
+ The ID of the source synchronizer.
1041
+ Must be a valid synchronizer id.
1042
+ Required
1043
+ type: string
1044
+ target:
1045
+ description: |-
1046
+ The ID of the target synchronizer.
1047
+ Must be a valid synchronizer id.
1048
+ Required
1049
+ type: string
1050
+ reassignmentId:
1051
+ description: |-
1052
+ The ID from the unassigned event.
1053
+ For correlation capabilities.
1054
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1055
+ Required
1056
+ type: string
1057
+ submitter:
1058
+ description: |-
1059
+ Party on whose behalf the assign command was executed.
1060
+ Empty if the assignment happened offline via the repair service.
1061
+ Must be a valid PartyIdString (as described in \`\`value.proto\`\`).
1062
+ Optional
1063
+ type: string
1064
+ reassignmentCounter:
1065
+ description: |-
1066
+ Each corresponding assigned and unassigned event has the same reassignment_counter. This strictly increases
1067
+ with each unassign command for the same contract. Creation of the contract corresponds to reassignment_counter
1068
+ equals zero.
1069
+ Required
1070
+ type: integer
1071
+ format: int64
1072
+ createdEvent:
1073
+ $ref: '#/components/schemas/CreatedEvent'
1074
+ description: |-
1075
+ Required
1076
+ The offset of this event refers to the offset of the assignment,
1077
+ while the node_id is the index of within the batch.
1078
+ JsIncompleteUnassigned:
1079
+ title: JsIncompleteUnassigned
1080
+ type: object
1081
+ required:
1082
+ - createdEvent
1083
+ - unassignedEvent
1084
+ properties:
1085
+ createdEvent:
1086
+ $ref: '#/components/schemas/CreatedEvent'
1087
+ description: |-
1088
+ Required
1089
+ The event as it appeared in the context of its last activation update (i.e. daml transaction or
1090
+ reassignment). In particular, the last activation offset, node_id pair is preserved.
1091
+ The last activation update is the most recent update created or assigned this contract on synchronizer_id synchronizer before
1092
+ the unassigned_event.
1093
+ The offset of the CreatedEvent might point to an already pruned update, therefore it cannot necessarily be used
1094
+ for lookups.
1095
+ unassignedEvent:
1096
+ $ref: '#/components/schemas/UnassignedEvent'
1097
+ description: Required
1098
+ UnassignedEvent:
1099
+ title: UnassignedEvent
1100
+ description: Records that a contract has been unassigned, and it becomes unusable
1101
+ on the source synchronizer
1102
+ type: object
1103
+ required:
1104
+ - reassignmentId
1105
+ - contractId
1106
+ - source
1107
+ - target
1108
+ - submitter
1109
+ - reassignmentCounter
1110
+ - packageName
1111
+ - offset
1112
+ - nodeId
1113
+ properties:
1114
+ reassignmentId:
1115
+ description: |-
1116
+ The ID of the unassignment. This needs to be used as an input for a assign ReassignmentCommand.
1117
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1118
+ Required
1119
+ type: string
1120
+ contractId:
1121
+ description: |-
1122
+ The ID of the reassigned contract.
1123
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1124
+ Required
1125
+ type: string
1126
+ templateId:
1127
+ description: |-
1128
+ The template of the reassigned contract.
1129
+ The identifier uses the package-id reference format.
1130
+
1131
+ Required
1132
+ type: string
1133
+ source:
1134
+ description: |-
1135
+ The ID of the source synchronizer
1136
+ Must be a valid synchronizer id
1137
+ Required
1138
+ type: string
1139
+ target:
1140
+ description: |-
1141
+ The ID of the target synchronizer
1142
+ Must be a valid synchronizer id
1143
+ Required
1144
+ type: string
1145
+ submitter:
1146
+ description: |-
1147
+ Party on whose behalf the unassign command was executed.
1148
+ Empty if the unassignment happened offline via the repair service.
1149
+ Must be a valid PartyIdString (as described in \`\`value.proto\`\`).
1150
+ Optional
1151
+ type: string
1152
+ reassignmentCounter:
1153
+ description: |-
1154
+ Each corresponding assigned and unassigned event has the same reassignment_counter. This strictly increases
1155
+ with each unassign command for the same contract. Creation of the contract corresponds to reassignment_counter
1156
+ equals zero.
1157
+ Required
1158
+ type: integer
1159
+ format: int64
1160
+ assignmentExclusivity:
1161
+ description: |-
1162
+ Assignment exclusivity
1163
+ Before this time (measured on the target synchronizer), only the submitter of the unassignment can initiate the assignment
1164
+ Defined for reassigning participants.
1165
+ Optional
1166
+ type: string
1167
+ witnessParties:
1168
+ description: |-
1169
+ The parties that are notified of this event.
1170
+ Required
1171
+ type: array
1172
+ items:
1173
+ type: string
1174
+ packageName:
1175
+ description: |-
1176
+ The package name of the contract.
1177
+ Required
1178
+ type: string
1179
+ offset:
1180
+ description: |-
1181
+ The offset of origin.
1182
+ Offsets are managed by the participant nodes.
1183
+ Reassignments can thus NOT be assumed to have the same offsets on different participant nodes.
1184
+ Required, it is a valid absolute offset (positive integer)
1185
+ type: integer
1186
+ format: int64
1187
+ nodeId:
1188
+ description: |-
1189
+ The position of this event in the originating reassignment.
1190
+ Node IDs are not necessarily equal across participants,
1191
+ as these may see different projections/parts of reassignments.
1192
+ Required, must be valid node ID (non-negative integer)
1193
+ type: integer
1194
+ format: int32
1195
+ GetUpdatesRequest:
1196
+ title: GetUpdatesRequest
1197
+ type: object
1198
+ required:
1199
+ - beginExclusive
1200
+ - verbose
1201
+ properties:
1202
+ beginExclusive:
1203
+ description: |-
1204
+ Beginning of the requested ledger section (non-negative integer).
1205
+ The response will only contain transactions whose offset is strictly greater than this.
1206
+ If zero, the stream will start from the beginning of the ledger.
1207
+ If positive, the streaming will start after this absolute offset.
1208
+ If the ledger has been pruned, this parameter must be specified and be greater than the pruning offset.
1209
+ type: integer
1210
+ format: int64
1211
+ endInclusive:
1212
+ description: |-
1213
+ End of the requested ledger section.
1214
+ The response will only contain transactions whose offset is less than or equal to this.
1215
+ Optional, if empty, the stream will not terminate.
1216
+ If specified, the stream will terminate after this absolute offset (positive integer) is reached.
1217
+ type: integer
1218
+ format: int64
1219
+ filter:
1220
+ $ref: '#/components/schemas/TransactionFilter'
1221
+ description: |-
1222
+ Provided for backwards compatibility, it will be removed in the Canton version 3.5.0.
1223
+ Requesting parties with template filters.
1224
+ Template filters must be empty for GetUpdateTrees requests.
1225
+ Optional for backwards compatibility, if defined update_format must be unset
1226
+ verbose:
1227
+ description: |-
1228
+ Provided for backwards compatibility, it will be removed in the Canton version 3.5.0.
1229
+ If enabled, values served over the API will contain more information than strictly necessary to interpret the data.
1230
+ In particular, setting the verbose flag to true triggers the ledger to include labels, record and variant type ids
1231
+ for record fields.
1232
+ Optional for backwards compatibility, if defined update_format must be unset
1233
+ type: boolean
1234
+ updateFormat:
1235
+ $ref: '#/components/schemas/UpdateFormat'
1236
+ description: |-
1237
+ Must be unset for GetUpdateTrees request.
1238
+ Optional for backwards compatibility for GetUpdates request: defaults to an UpdateFormat where:
1239
+
1240
+ - include_transactions.event_format.filters_by_party = the filter.filters_by_party on this request
1241
+ - include_transactions.event_format.filters_for_any_party = the filter.filters_for_any_party on this request
1242
+ - include_transactions.event_format.verbose = the same flag specified on this request
1243
+ - include_transactions.transaction_shape = TRANSACTION_SHAPE_ACS_DELTA
1244
+ - include_reassignments.filter = the same filter specified on this request
1245
+ - include_reassignments.verbose = the same flag specified on this request
1246
+ - include_topology_events.include_participant_authorization_events.parties = all the parties specified in filter
1247
+ UpdateFormat:
1248
+ title: UpdateFormat
1249
+ description: A format specifying what updates to include and how to render them.
1250
+ type: object
1251
+ properties:
1252
+ includeTransactions:
1253
+ $ref: '#/components/schemas/TransactionFormat'
1254
+ description: |-
1255
+ Include Daml transactions in streams.
1256
+ Optional, if unset, no transactions are emitted in the stream.
1257
+ includeReassignments:
1258
+ $ref: '#/components/schemas/EventFormat'
1259
+ description: |-
1260
+ Include (un)assignments in the stream.
1261
+ The events in the result take the shape TRANSACTION_SHAPE_ACS_DELTA.
1262
+ Optional, if unset, no (un)assignments are emitted in the stream.
1263
+ includeTopologyEvents:
1264
+ $ref: '#/components/schemas/TopologyFormat'
1265
+ description: |-
1266
+ Include topology events in streams.
1267
+ Optional, if unset no topology events are emitted in the stream.
1268
+ TransactionFormat:
1269
+ title: TransactionFormat
1270
+ description: |-
1271
+ A format that specifies what events to include in Daml transactions
1272
+ and what data to compute and include for them.
1273
+ type: object
1274
+ required:
1275
+ - transactionShape
1276
+ properties:
1277
+ eventFormat:
1278
+ $ref: '#/components/schemas/EventFormat'
1279
+ description: Required
1280
+ transactionShape:
1281
+ description: |-
1282
+ What transaction shape to use for interpreting the filters of the event format.
1283
+ Required
1284
+ type: string
1285
+ enum:
1286
+ - TRANSACTION_SHAPE_UNSPECIFIED
1287
+ - TRANSACTION_SHAPE_ACS_DELTA
1288
+ - TRANSACTION_SHAPE_LEDGER_EFFECTS
1289
+ TopologyFormat:
1290
+ title: TopologyFormat
1291
+ description: A format specifying which topology transactions to include and
1292
+ how to render them.
1293
+ type: object
1294
+ properties:
1295
+ includeParticipantAuthorizationEvents:
1296
+ $ref: '#/components/schemas/ParticipantAuthorizationTopologyFormat'
1297
+ description: |-
1298
+ Include participant authorization topology events in streams.
1299
+ Optional, if unset no participant authorization topology events are emitted in the stream.
1300
+ ParticipantAuthorizationTopologyFormat:
1301
+ title: ParticipantAuthorizationTopologyFormat
1302
+ description: A format specifying which participant authorization topology transactions
1303
+ to include and how to render them.
1304
+ type: object
1305
+ properties:
1306
+ parties:
1307
+ description: |-
1308
+ List of parties for which the topology transactions should be sent.
1309
+ Empty means: for all parties.
1310
+ type: array
1311
+ items:
1312
+ type: string
1313
+ Either_JsCantonError_JsGetUpdatesResponse:
1314
+ title: Either_JsCantonError_JsGetUpdatesResponse
1315
+ oneOf:
1316
+ - $ref: '#/components/schemas/JsCantonError'
1317
+ - $ref: '#/components/schemas/JsGetUpdatesResponse'
1318
+ JsGetUpdatesResponse:
1319
+ title: JsGetUpdatesResponse
1320
+ type: object
1321
+ required:
1322
+ - update
1323
+ properties:
1324
+ update:
1325
+ $ref: '#/components/schemas/Update'
1326
+ Update:
1327
+ title: Update
1328
+ oneOf:
1329
+ - type: object
1330
+ required:
1331
+ - OffsetCheckpoint
1332
+ properties:
1333
+ OffsetCheckpoint:
1334
+ $ref: '#/components/schemas/OffsetCheckpoint2'
1335
+ - type: object
1336
+ required:
1337
+ - Reassignment
1338
+ properties:
1339
+ Reassignment:
1340
+ $ref: '#/components/schemas/Reassignment'
1341
+ - type: object
1342
+ required:
1343
+ - TopologyTransaction
1344
+ properties:
1345
+ TopologyTransaction:
1346
+ $ref: '#/components/schemas/TopologyTransaction'
1347
+ - type: object
1348
+ required:
1349
+ - Transaction
1350
+ properties:
1351
+ Transaction:
1352
+ $ref: '#/components/schemas/Transaction'
1353
+ OffsetCheckpoint2:
1354
+ title: OffsetCheckpoint
1355
+ description: |-
1356
+ OffsetCheckpoints may be used to:
1357
+
1358
+ - detect time out of commands.
1359
+ - provide an offset which can be used to restart consumption.
1360
+ type: object
1361
+ required:
1362
+ - value
1363
+ properties:
1364
+ value:
1365
+ $ref: '#/components/schemas/OffsetCheckpoint1'
1366
+ Reassignment:
1367
+ title: Reassignment
1368
+ description: Complete view of an on-ledger reassignment.
1369
+ type: object
1370
+ required:
1371
+ - value
1372
+ properties:
1373
+ value:
1374
+ $ref: '#/components/schemas/JsReassignment'
1375
+ JsReassignment:
1376
+ title: JsReassignment
1377
+ description: Complete view of an on-ledger reassignment.
1378
+ type: object
1379
+ required:
1380
+ - updateId
1381
+ - commandId
1382
+ - workflowId
1383
+ - offset
1384
+ - recordTime
1385
+ - synchronizerId
1386
+ properties:
1387
+ updateId:
1388
+ description: |-
1389
+ Assigned by the server. Useful for correlating logs.
1390
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1391
+ Required
1392
+ type: string
1393
+ commandId:
1394
+ description: |-
1395
+ The ID of the command which resulted in this reassignment. Missing for everyone except the submitting party on the submitting participant.
1396
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1397
+ Optional
1398
+ type: string
1399
+ workflowId:
1400
+ description: |-
1401
+ The workflow ID used in reassignment command submission. Only set if the \`\`workflow_id\`\` for the command was set.
1402
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1403
+ Optional
1404
+ type: string
1405
+ offset:
1406
+ description: |-
1407
+ The participant's offset. The details of this field are described in \`\`community/ledger-api/README.md\`\`.
1408
+ Required, must be a valid absolute offset (positive integer).
1409
+ type: integer
1410
+ format: int64
1411
+ events:
1412
+ description: The collection of reassignment events. Required.
1413
+ type: array
1414
+ items:
1415
+ $ref: '#/components/schemas/JsReassignmentEvent'
1416
+ traceContext:
1417
+ $ref: '#/components/schemas/TraceContext'
1418
+ description: |-
1419
+ Optional; ledger API trace context
1420
+
1421
+ The trace context transported in this message corresponds to the trace context supplied
1422
+ by the client application in a HTTP2 header of the original command submission.
1423
+ We typically use a header to transfer this type of information. Here we use message
1424
+ body, because it is used in gRPC streams which do not support per message headers.
1425
+ This field will be populated with the trace context contained in the original submission.
1426
+ If that was not provided, a unique ledger-api-server generated trace context will be used
1427
+ instead.
1428
+ recordTime:
1429
+ description: |-
1430
+ The time at which the reassignment was recorded. The record time refers to the source/target
1431
+ synchronizer for an unassign/assign event respectively.
1432
+ Required
1433
+ type: string
1434
+ synchronizerId:
1435
+ description: |-
1436
+ A valid synchronizer id.
1437
+ Identifies the synchronizer that synchronized this Reassignment.
1438
+ Required
1439
+ type: string
1440
+ JsReassignmentEvent:
1441
+ title: JsReassignmentEvent
1442
+ oneOf:
1443
+ - type: object
1444
+ required:
1445
+ - JsAssignmentEvent
1446
+ properties:
1447
+ JsAssignmentEvent:
1448
+ $ref: '#/components/schemas/JsAssignmentEvent'
1449
+ - type: object
1450
+ required:
1451
+ - JsUnassignedEvent
1452
+ properties:
1453
+ JsUnassignedEvent:
1454
+ $ref: '#/components/schemas/JsUnassignedEvent'
1455
+ JsAssignmentEvent:
1456
+ title: JsAssignmentEvent
1457
+ type: object
1458
+ required:
1459
+ - source
1460
+ - target
1461
+ - reassignmentId
1462
+ - submitter
1463
+ - reassignmentCounter
1464
+ - createdEvent
1465
+ properties:
1466
+ source:
1467
+ type: string
1468
+ target:
1469
+ type: string
1470
+ reassignmentId:
1471
+ type: string
1472
+ submitter:
1473
+ type: string
1474
+ reassignmentCounter:
1475
+ type: integer
1476
+ format: int64
1477
+ createdEvent:
1478
+ $ref: '#/components/schemas/CreatedEvent'
1479
+ JsUnassignedEvent:
1480
+ title: JsUnassignedEvent
1481
+ description: Records that a contract has been unassigned, and it becomes unusable
1482
+ on the source synchronizer
1483
+ type: object
1484
+ required:
1485
+ - value
1486
+ properties:
1487
+ value:
1488
+ $ref: '#/components/schemas/UnassignedEvent'
1489
+ TopologyTransaction:
1490
+ title: TopologyTransaction
1491
+ type: object
1492
+ required:
1493
+ - value
1494
+ properties:
1495
+ value:
1496
+ $ref: '#/components/schemas/JsTopologyTransaction'
1497
+ JsTopologyTransaction:
1498
+ title: JsTopologyTransaction
1499
+ type: object
1500
+ required:
1501
+ - updateId
1502
+ - offset
1503
+ - synchronizerId
1504
+ properties:
1505
+ updateId:
1506
+ description: |-
1507
+ Assigned by the server. Useful for correlating logs.
1508
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1509
+ Required
1510
+ type: string
1511
+ offset:
1512
+ description: |-
1513
+ The absolute offset. The details of this field are described in \`\`community/ledger-api/README.md\`\`.
1514
+ Required, it is a valid absolute offset (positive integer).
1515
+ type: integer
1516
+ format: int64
1517
+ synchronizerId:
1518
+ description: |-
1519
+ A valid synchronizer id.
1520
+ Identifies the synchronizer that synchronized the topology transaction.
1521
+ Required
1522
+ type: string
1523
+ recordTime:
1524
+ description: |-
1525
+ The time at which the changes in the topology transaction become effective. There is a small delay between a
1526
+ topology transaction being sequenced and the changes it contains becoming effective. Topology transactions appear
1527
+ in order relative to a synchronizer based on their effective time rather than their sequencing time.
1528
+ Required
1529
+ type: string
1530
+ events:
1531
+ description: |-
1532
+ A non-empty list of topology events.
1533
+ Required
1534
+ type: array
1535
+ items:
1536
+ $ref: '#/components/schemas/TopologyEvent'
1537
+ traceContext:
1538
+ $ref: '#/components/schemas/TraceContext'
1539
+ description: |-
1540
+ Optional; ledger API trace context
1541
+
1542
+ The trace context transported in this message corresponds to the trace context supplied
1543
+ by the client application in a HTTP2 header of the original command submission.
1544
+ We typically use a header to transfer this type of information. Here we use message
1545
+ body, because it is used in gRPC streams which do not support per message headers.
1546
+ This field will be populated with the trace context contained in the original submission.
1547
+ If that was not provided, a unique ledger-api-server generated trace context will be used
1548
+ instead.
1549
+ TopologyEvent:
1550
+ title: TopologyEvent
1551
+ type: object
1552
+ required:
1553
+ - event
1554
+ properties:
1555
+ event:
1556
+ $ref: '#/components/schemas/TopologyEventEvent'
1557
+ TopologyEventEvent:
1558
+ title: TopologyEventEvent
1559
+ oneOf:
1560
+ - type: object
1561
+ required:
1562
+ - Empty
1563
+ properties:
1564
+ Empty:
1565
+ $ref: '#/components/schemas/Empty3'
1566
+ - type: object
1567
+ required:
1568
+ - ParticipantAuthorizationAdded
1569
+ properties:
1570
+ ParticipantAuthorizationAdded:
1571
+ $ref: '#/components/schemas/ParticipantAuthorizationAdded'
1572
+ - type: object
1573
+ required:
1574
+ - ParticipantAuthorizationChanged
1575
+ properties:
1576
+ ParticipantAuthorizationChanged:
1577
+ $ref: '#/components/schemas/ParticipantAuthorizationChanged'
1578
+ - type: object
1579
+ required:
1580
+ - ParticipantAuthorizationRevoked
1581
+ properties:
1582
+ ParticipantAuthorizationRevoked:
1583
+ $ref: '#/components/schemas/ParticipantAuthorizationRevoked'
1584
+ Empty3:
1585
+ title: Empty
1586
+ type: object
1587
+ ParticipantAuthorizationAdded:
1588
+ title: ParticipantAuthorizationAdded
1589
+ type: object
1590
+ required:
1591
+ - value
1592
+ properties:
1593
+ value:
1594
+ $ref: '#/components/schemas/ParticipantAuthorizationAdded1'
1595
+ ParticipantAuthorizationAdded1:
1596
+ title: ParticipantAuthorizationAdded
1597
+ type: object
1598
+ required:
1599
+ - partyId
1600
+ - participantId
1601
+ - participantPermission
1602
+ properties:
1603
+ partyId:
1604
+ description: Required
1605
+ type: string
1606
+ participantId:
1607
+ description: Required
1608
+ type: string
1609
+ participantPermission:
1610
+ description: Required
1611
+ type: string
1612
+ enum:
1613
+ - PARTICIPANT_PERMISSION_UNSPECIFIED
1614
+ - PARTICIPANT_PERMISSION_SUBMISSION
1615
+ - PARTICIPANT_PERMISSION_CONFIRMATION
1616
+ - PARTICIPANT_PERMISSION_OBSERVATION
1617
+ ParticipantAuthorizationChanged:
1618
+ title: ParticipantAuthorizationChanged
1619
+ type: object
1620
+ required:
1621
+ - value
1622
+ properties:
1623
+ value:
1624
+ $ref: '#/components/schemas/ParticipantAuthorizationChanged1'
1625
+ ParticipantAuthorizationChanged1:
1626
+ title: ParticipantAuthorizationChanged
1627
+ type: object
1628
+ required:
1629
+ - partyId
1630
+ - participantId
1631
+ - participantPermission
1632
+ properties:
1633
+ partyId:
1634
+ description: Required
1635
+ type: string
1636
+ participantId:
1637
+ description: Required
1638
+ type: string
1639
+ participantPermission:
1640
+ description: Required
1641
+ type: string
1642
+ enum:
1643
+ - PARTICIPANT_PERMISSION_UNSPECIFIED
1644
+ - PARTICIPANT_PERMISSION_SUBMISSION
1645
+ - PARTICIPANT_PERMISSION_CONFIRMATION
1646
+ - PARTICIPANT_PERMISSION_OBSERVATION
1647
+ ParticipantAuthorizationRevoked:
1648
+ title: ParticipantAuthorizationRevoked
1649
+ type: object
1650
+ required:
1651
+ - value
1652
+ properties:
1653
+ value:
1654
+ $ref: '#/components/schemas/ParticipantAuthorizationRevoked1'
1655
+ ParticipantAuthorizationRevoked1:
1656
+ title: ParticipantAuthorizationRevoked
1657
+ type: object
1658
+ required:
1659
+ - partyId
1660
+ - participantId
1661
+ properties:
1662
+ partyId:
1663
+ description: Required
1664
+ type: string
1665
+ participantId:
1666
+ description: Required
1667
+ type: string
1668
+ Transaction:
1669
+ title: Transaction
1670
+ description: Filtered view of an on-ledger transaction's create and archive
1671
+ events.
1672
+ type: object
1673
+ required:
1674
+ - value
1675
+ properties:
1676
+ value:
1677
+ $ref: '#/components/schemas/JsTransaction'
1678
+ JsTransaction:
1679
+ title: JsTransaction
1680
+ description: Filtered view of an on-ledger transaction's create and archive
1681
+ events.
1682
+ type: object
1683
+ required:
1684
+ - updateId
1685
+ - commandId
1686
+ - workflowId
1687
+ - effectiveAt
1688
+ - offset
1689
+ - synchronizerId
1690
+ - recordTime
1691
+ properties:
1692
+ updateId:
1693
+ description: |-
1694
+ Assigned by the server. Useful for correlating logs.
1695
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1696
+ Required
1697
+ type: string
1698
+ commandId:
1699
+ description: |-
1700
+ The ID of the command which resulted in this transaction. Missing for everyone except the submitting party.
1701
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1702
+ Optional
1703
+ type: string
1704
+ workflowId:
1705
+ description: |-
1706
+ The workflow ID used in command submission.
1707
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1708
+ Optional
1709
+ type: string
1710
+ effectiveAt:
1711
+ description: |-
1712
+ Ledger effective time.
1713
+ Required
1714
+ type: string
1715
+ events:
1716
+ description: |-
1717
+ The collection of events.
1718
+ Contains:
1719
+
1720
+ - \`\`CreatedEvent\`\` or \`\`ArchivedEvent\`\` in case of ACS_DELTA transaction shape
1721
+ - \`\`CreatedEvent\`\` or \`\`ExercisedEvent\`\` in case of LEDGER_EFFECTS transaction shape
1722
+
1723
+ Required
1724
+ type: array
1725
+ items:
1726
+ $ref: '#/components/schemas/Event'
1727
+ offset:
1728
+ description: |-
1729
+ The absolute offset. The details of this field are described in \`\`community/ledger-api/README.md\`\`.
1730
+ Required, it is a valid absolute offset (positive integer).
1731
+ type: integer
1732
+ format: int64
1733
+ synchronizerId:
1734
+ description: |-
1735
+ A valid synchronizer id.
1736
+ Identifies the synchronizer that synchronized the transaction.
1737
+ Required
1738
+ type: string
1739
+ traceContext:
1740
+ $ref: '#/components/schemas/TraceContext'
1741
+ description: |-
1742
+ Optional; ledger API trace context
1743
+
1744
+ The trace context transported in this message corresponds to the trace context supplied
1745
+ by the client application in a HTTP2 header of the original command submission.
1746
+ We typically use a header to transfer this type of information. Here we use message
1747
+ body, because it is used in gRPC streams which do not support per message headers.
1748
+ This field will be populated with the trace context contained in the original submission.
1749
+ If that was not provided, a unique ledger-api-server generated trace context will be used
1750
+ instead.
1751
+ recordTime:
1752
+ description: |-
1753
+ The time at which the transaction was recorded. The record time refers to the synchronizer
1754
+ which synchronized the transaction.
1755
+ Required
1756
+ type: string
1757
+ externalTransactionHash:
1758
+ description: |-
1759
+ For transaction externally signed, contains the external transaction hash
1760
+ signed by the external party. Can be used to correlate an external submission with a committed transaction.
1761
+ Optional
1762
+ type: string
1763
+ Event:
1764
+ title: Event
1765
+ description: |-
1766
+ Events in transactions can have two primary shapes:
1767
+
1768
+ - ACS delta: events can be CreatedEvent or ArchivedEvent
1769
+ - ledger effects: events can be CreatedEvent or ExercisedEvent
1770
+
1771
+ In the update service the events are restricted to the events
1772
+ visible for the parties specified in the transaction filter. Each
1773
+ event message type below contains a \`\`witness_parties\`\` field which
1774
+ indicates the subset of the requested parties that can see the event
1775
+ in question.
1776
+ oneOf:
1777
+ - type: object
1778
+ required:
1779
+ - ArchivedEvent
1780
+ properties:
1781
+ ArchivedEvent:
1782
+ $ref: '#/components/schemas/ArchivedEvent'
1783
+ - type: object
1784
+ required:
1785
+ - CreatedEvent
1786
+ properties:
1787
+ CreatedEvent:
1788
+ $ref: '#/components/schemas/CreatedEvent'
1789
+ - type: object
1790
+ required:
1791
+ - ExercisedEvent
1792
+ properties:
1793
+ ExercisedEvent:
1794
+ $ref: '#/components/schemas/ExercisedEvent'
1795
+ ArchivedEvent:
1796
+ title: ArchivedEvent
1797
+ description: Records that a contract has been archived, and choices may no longer
1798
+ be exercised on it.
1799
+ type: object
1800
+ required:
1801
+ - offset
1802
+ - nodeId
1803
+ - contractId
1804
+ - templateId
1805
+ - packageName
1806
+ properties:
1807
+ offset:
1808
+ description: |-
1809
+ The offset of origin.
1810
+ Offsets are managed by the participant nodes.
1811
+ Transactions can thus NOT be assumed to have the same offsets on different participant nodes.
1812
+ Required, it is a valid absolute offset (positive integer)
1813
+ type: integer
1814
+ format: int64
1815
+ nodeId:
1816
+ description: |-
1817
+ The position of this event in the originating transaction or reassignment.
1818
+ Node IDs are not necessarily equal across participants,
1819
+ as these may see different projections/parts of transactions.
1820
+ Required, must be valid node ID (non-negative integer)
1821
+ type: integer
1822
+ format: int32
1823
+ contractId:
1824
+ description: |-
1825
+ The ID of the archived contract.
1826
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1827
+ Required
1828
+ type: string
1829
+ templateId:
1830
+ description: |-
1831
+ Identifies the template that defines the choice that archived the contract.
1832
+ This template's package-id may differ from the target contract's package-id
1833
+ if the target contract has been upgraded or downgraded.
1834
+
1835
+ The identifier uses the package-id reference format.
1836
+
1837
+ Required
1838
+ type: string
1839
+ witnessParties:
1840
+ description: |-
1841
+ The parties that are notified of this event. For an \`\`ArchivedEvent\`\`,
1842
+ these are the intersection of the stakeholders of the contract in
1843
+ question and the parties specified in the \`\`TransactionFilter\`\`. The
1844
+ stakeholders are the union of the signatories and the observers of
1845
+ the contract.
1846
+ Each one of its elements must be a valid PartyIdString (as described
1847
+ in \`\`value.proto\`\`).
1848
+ Required
1849
+ type: array
1850
+ items:
1851
+ type: string
1852
+ packageName:
1853
+ description: |-
1854
+ The package name of the contract.
1855
+ Required
1856
+ type: string
1857
+ implementedInterfaces:
1858
+ description: |-
1859
+ The interfaces implemented by the target template that have been
1860
+ matched from the interface filter query.
1861
+ Populated only in case interface filters with include_interface_view set.
1862
+
1863
+ If defined, the identifier uses the package-id reference format.
1864
+
1865
+ Optional
1866
+ type: array
1867
+ items:
1868
+ type: string
1869
+ ExercisedEvent:
1870
+ title: ExercisedEvent
1871
+ description: Records that a choice has been exercised on a target contract.
1872
+ type: object
1873
+ required:
1874
+ - offset
1875
+ - nodeId
1876
+ - contractId
1877
+ - templateId
1878
+ - choice
1879
+ - choiceArgument
1880
+ - consuming
1881
+ - lastDescendantNodeId
1882
+ - exerciseResult
1883
+ - packageName
1884
+ - acsDelta
1885
+ properties:
1886
+ offset:
1887
+ description: |-
1888
+ The offset of origin.
1889
+ Offsets are managed by the participant nodes.
1890
+ Transactions can thus NOT be assumed to have the same offsets on different participant nodes.
1891
+ Required, it is a valid absolute offset (positive integer)
1892
+ type: integer
1893
+ format: int64
1894
+ nodeId:
1895
+ description: |-
1896
+ The position of this event in the originating transaction or reassignment.
1897
+ Node IDs are not necessarily equal across participants,
1898
+ as these may see different projections/parts of transactions.
1899
+ Required, must be valid node ID (non-negative integer)
1900
+ type: integer
1901
+ format: int32
1902
+ contractId:
1903
+ description: |-
1904
+ The ID of the target contract.
1905
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
1906
+ Required
1907
+ type: string
1908
+ templateId:
1909
+ description: |-
1910
+ Identifies the template that defines the executed choice.
1911
+ This template's package-id may differ from the target contract's package-id
1912
+ if the target contract has been upgraded or downgraded.
1913
+
1914
+ The identifier uses the package-id reference format.
1915
+
1916
+ Required
1917
+ type: string
1918
+ interfaceId:
1919
+ description: |-
1920
+ The interface where the choice is defined, if inherited.
1921
+ If defined, the identifier uses the package-id reference format.
1922
+
1923
+ Optional
1924
+ type: string
1925
+ choice:
1926
+ description: |-
1927
+ The choice that was exercised on the target contract.
1928
+ Must be a valid NameString (as described in \`\`value.proto\`\`).
1929
+ Required
1930
+ type: string
1931
+ choiceArgument:
1932
+ description: |-
1933
+ The argument of the exercised choice.
1934
+ Required
1935
+ actingParties:
1936
+ description: |-
1937
+ The parties that exercised the choice.
1938
+ Each element must be a valid PartyIdString (as described in \`\`value.proto\`\`).
1939
+ Required
1940
+ type: array
1941
+ items:
1942
+ type: string
1943
+ consuming:
1944
+ description: |-
1945
+ If true, the target contract may no longer be exercised.
1946
+ Required
1947
+ type: boolean
1948
+ witnessParties:
1949
+ description: |-
1950
+ The parties that are notified of this event. The witnesses of an exercise
1951
+ node will depend on whether the exercise was consuming or not.
1952
+ If consuming, the witnesses are the union of the stakeholders,
1953
+ the actors and all informees of all the ancestors of this event this
1954
+ participant knows about.
1955
+ If not consuming, the witnesses are the union of the signatories,
1956
+ the actors and all informees of all the ancestors of this event this
1957
+ participant knows about.
1958
+ In both cases the witnesses are limited to the querying parties, or not
1959
+ limited in case anyParty filters are used.
1960
+ Note that the actors might not necessarily be observers
1961
+ and thus stakeholders. This is the case when the controllers of a
1962
+ choice are specified using "flexible controllers", using the
1963
+ \`\`choice ... controller\`\` syntax, and said controllers are not
1964
+ explicitly marked as observers.
1965
+ Each element must be a valid PartyIdString (as described in \`\`value.proto\`\`).
1966
+ Required
1967
+ type: array
1968
+ items:
1969
+ type: string
1970
+ lastDescendantNodeId:
1971
+ description: |-
1972
+ Specifies the upper boundary of the node ids of the events in the same transaction that appeared as a result of
1973
+ this \`\`ExercisedEvent\`\`. This allows unambiguous identification of all the members of the subtree rooted at this
1974
+ node. A full subtree can be constructed when all descendant nodes are present in the stream. If nodes are heavily
1975
+ filtered, it is only possible to determine if a node is in a consequent subtree or not.
1976
+ Required
1977
+ type: integer
1978
+ format: int32
1979
+ exerciseResult:
1980
+ description: |-
1981
+ The result of exercising the choice.
1982
+ Required
1983
+ packageName:
1984
+ description: |-
1985
+ The package name of the contract.
1986
+ Required
1987
+ type: string
1988
+ implementedInterfaces:
1989
+ description: |-
1990
+ If the event is consuming, the interfaces implemented by the target template that have been
1991
+ matched from the interface filter query.
1992
+ Populated only in case interface filters with include_interface_view set.
1993
+
1994
+ The identifier uses the package-id reference format.
1995
+
1996
+ Optional
1997
+ type: array
1998
+ items:
1999
+ type: string
2000
+ acsDelta:
2001
+ description: |-
2002
+ Whether this event would be part of respective ACS_DELTA shaped stream,
2003
+ and should therefore considered when tracking contract activeness on the client-side.
2004
+ Required
2005
+ type: boolean
2006
+ Either_JsCantonError_JsGetUpdateTreesResponse:
2007
+ title: Either_JsCantonError_JsGetUpdateTreesResponse
2008
+ oneOf:
2009
+ - $ref: '#/components/schemas/JsCantonError'
2010
+ - $ref: '#/components/schemas/JsGetUpdateTreesResponse'
2011
+ JsGetUpdateTreesResponse:
2012
+ title: JsGetUpdateTreesResponse
2013
+ description: Provided for backwards compatibility, it will be removed in the
2014
+ Canton version 3.5.0.
2015
+ type: object
2016
+ required:
2017
+ - update
2018
+ properties:
2019
+ update:
2020
+ $ref: '#/components/schemas/Update1'
2021
+ Update1:
2022
+ title: Update
2023
+ oneOf:
2024
+ - type: object
2025
+ required:
2026
+ - OffsetCheckpoint
2027
+ properties:
2028
+ OffsetCheckpoint:
2029
+ $ref: '#/components/schemas/OffsetCheckpoint3'
2030
+ - type: object
2031
+ required:
2032
+ - Reassignment
2033
+ properties:
2034
+ Reassignment:
2035
+ $ref: '#/components/schemas/Reassignment1'
2036
+ - type: object
2037
+ required:
2038
+ - TransactionTree
2039
+ properties:
2040
+ TransactionTree:
2041
+ $ref: '#/components/schemas/TransactionTree'
2042
+ OffsetCheckpoint3:
2043
+ title: OffsetCheckpoint
2044
+ description: |-
2045
+ OffsetCheckpoints may be used to:
2046
+
2047
+ - detect time out of commands.
2048
+ - provide an offset which can be used to restart consumption.
2049
+ type: object
2050
+ required:
2051
+ - value
2052
+ properties:
2053
+ value:
2054
+ $ref: '#/components/schemas/OffsetCheckpoint1'
2055
+ Reassignment1:
2056
+ title: Reassignment
2057
+ description: Complete view of an on-ledger reassignment.
2058
+ type: object
2059
+ required:
2060
+ - value
2061
+ properties:
2062
+ value:
2063
+ $ref: '#/components/schemas/JsReassignment'
2064
+ TransactionTree:
2065
+ title: TransactionTree
2066
+ description: |-
2067
+ Provided for backwards compatibility, it will be removed in the Canton version 3.5.0.
2068
+ Complete view of an on-ledger transaction.
2069
+ type: object
2070
+ required:
2071
+ - value
2072
+ properties:
2073
+ value:
2074
+ $ref: '#/components/schemas/JsTransactionTree'
2075
+ JsTransactionTree:
2076
+ title: JsTransactionTree
2077
+ description: |-
2078
+ Provided for backwards compatibility, it will be removed in the Canton version 3.5.0.
2079
+ Complete view of an on-ledger transaction.
2080
+ type: object
2081
+ required:
2082
+ - updateId
2083
+ - commandId
2084
+ - workflowId
2085
+ - offset
2086
+ - eventsById
2087
+ - synchronizerId
2088
+ - recordTime
2089
+ properties:
2090
+ updateId:
2091
+ description: |-
2092
+ Assigned by the server. Useful for correlating logs.
2093
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
2094
+ Required
2095
+ type: string
2096
+ commandId:
2097
+ description: |-
2098
+ The ID of the command which resulted in this transaction. Missing for everyone except the submitting party.
2099
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
2100
+ Optional
2101
+ type: string
2102
+ workflowId:
2103
+ description: |-
2104
+ The workflow ID used in command submission. Only set if the \`\`workflow_id\`\` for the command was set.
2105
+ Must be a valid LedgerString (as described in \`\`value.proto\`\`).
2106
+ Optional
2107
+ type: string
2108
+ effectiveAt:
2109
+ description: |-
2110
+ Ledger effective time.
2111
+ Required
2112
+ type: string
2113
+ offset:
2114
+ description: |-
2115
+ The absolute offset. The details of this field are described in \`\`community/ledger-api/README.md\`\`.
2116
+ Required, it is a valid absolute offset (positive integer).
2117
+ type: integer
2118
+ format: int64
2119
+ eventsById:
2120
+ $ref: '#/components/schemas/Map_Int_TreeEvent'
2121
+ description: |-
2122
+ Changes to the ledger that were caused by this transaction. Nodes of the transaction tree.
2123
+ Each key must be a valid node ID (non-negative integer).
2124
+ Required
2125
+ synchronizerId:
2126
+ description: |-
2127
+ A valid synchronizer id.
2128
+ Identifies the synchronizer that synchronized the transaction.
2129
+ Required
2130
+ type: string
2131
+ traceContext:
2132
+ $ref: '#/components/schemas/TraceContext'
2133
+ description: |-
2134
+ Optional; ledger API trace context
2135
+
2136
+ The trace context transported in this message corresponds to the trace context supplied
2137
+ by the client application in a HTTP2 header of the original command submission.
2138
+ We typically use a header to transfer this type of information. Here we use message
2139
+ body, because it is used in gRPC streams which do not support per message headers.
2140
+ This field will be populated with the trace context contained in the original submission.
2141
+ If that was not provided, a unique ledger-api-server generated trace context will be used
2142
+ instead.
2143
+ recordTime:
2144
+ description: |-
2145
+ The time at which the transaction was recorded. The record time refers to the synchronizer
2146
+ which synchronized the transaction.
2147
+ Required
2148
+ type: string
2149
+ Map_Int_TreeEvent:
2150
+ title: Map_Int_TreeEvent
2151
+ type: object
2152
+ additionalProperties:
2153
+ $ref: '#/components/schemas/TreeEvent'
2154
+ TreeEvent:
2155
+ title: TreeEvent
2156
+ description: |-
2157
+ Provided for backwards compatibility, it will be removed in the Canton version 3.5.0.
2158
+ Each tree event message type below contains a \`\`witness_parties\`\` field which
2159
+ indicates the subset of the requested parties that can see the event
2160
+ in question.
2161
+
2162
+ Note that transaction trees might contain events with
2163
+ _no_ witness parties, which were included simply because they were
2164
+ children of events which have witnesses.
2165
+ oneOf:
2166
+ - type: object
2167
+ required:
2168
+ - CreatedTreeEvent
2169
+ properties:
2170
+ CreatedTreeEvent:
2171
+ $ref: '#/components/schemas/CreatedTreeEvent'
2172
+ - type: object
2173
+ required:
2174
+ - ExercisedTreeEvent
2175
+ properties:
2176
+ ExercisedTreeEvent:
2177
+ $ref: '#/components/schemas/ExercisedTreeEvent'
2178
+ CreatedTreeEvent:
2179
+ title: CreatedTreeEvent
2180
+ type: object
2181
+ required:
2182
+ - value
2183
+ properties:
2184
+ value:
2185
+ $ref: '#/components/schemas/CreatedEvent'
2186
+ ExercisedTreeEvent:
2187
+ title: ExercisedTreeEvent
2188
+ type: object
2189
+ required:
2190
+ - value
2191
+ properties:
2192
+ value:
2193
+ $ref: '#/components/schemas/ExercisedEvent'
2194
+ messages:
2195
+ CompletionStreamRequest:
2196
+ payload:
2197
+ $ref: '#/components/schemas/CompletionStreamRequest'
2198
+ contentType: application/json
2199
+ Either_JsCantonError_CompletionStreamResponse:
2200
+ payload:
2201
+ $ref: '#/components/schemas/Either_JsCantonError_CompletionStreamResponse'
2202
+ contentType: application/json
2203
+ GetActiveContractsRequest:
2204
+ payload:
2205
+ $ref: '#/components/schemas/GetActiveContractsRequest'
2206
+ contentType: application/json
2207
+ Either_JsCantonError_JsGetActiveContractsResponse:
2208
+ payload:
2209
+ $ref: '#/components/schemas/Either_JsCantonError_JsGetActiveContractsResponse'
2210
+ contentType: application/json
2211
+ GetUpdatesRequest:
2212
+ payload:
2213
+ $ref: '#/components/schemas/GetUpdatesRequest'
2214
+ contentType: application/json
2215
+ Either_JsCantonError_JsGetUpdatesResponse:
2216
+ payload:
2217
+ $ref: '#/components/schemas/Either_JsCantonError_JsGetUpdatesResponse'
2218
+ contentType: application/json
2219
+ Either_JsCantonError_JsGetUpdateTreesResponse:
2220
+ payload:
2221
+ $ref: '#/components/schemas/Either_JsCantonError_JsGetUpdateTreesResponse'
2222
+ contentType: application/json
2223
+ securitySchemes:
2224
+ httpAuth:
2225
+ type: http
2226
+ description: Ledger API standard JWT token
2227
+ scheme: bearer
2228
+ httpApiKeyAuth:
2229
+ type: httpApiKey
2230
+ description: Ledger API standard JWT token (websocket)
2231
+ name: Sec-WebSocket-Protocol
2232
+ in: header
2233
+ `;