@odatano/core 2.0.0-rc.5 → 2.0.0-rc.51

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 (239) hide show
  1. package/@cds-models/CardanoAgentService/index.d.ts +99 -51
  2. package/@cds-models/CardanoAgentService/index.js +15 -0
  3. package/@cds-models/CardanoBackendService/index.d.ts +358 -0
  4. package/@cds-models/CardanoBackendService/index.js +41 -0
  5. package/@cds-models/CardanoIndexerService/index.d.ts +594 -11
  6. package/@cds-models/CardanoIndexerService/index.js +74 -0
  7. package/@cds-models/CardanoODataService/index.d.ts +417 -57
  8. package/@cds-models/CardanoODataService/index.js +42 -0
  9. package/@cds-models/CardanoSignService/index.d.ts +45 -19
  10. package/@cds-models/CardanoSignService/index.js +4 -0
  11. package/@cds-models/CardanoTransactionService/index.d.ts +70 -44
  12. package/@cds-models/CardanoTransactionService/index.js +5 -0
  13. package/@cds-models/CardanoWorkerService/index.d.ts +35 -22
  14. package/@cds-models/CardanoWorkerService/index.js +2 -0
  15. package/@cds-models/index.d.ts +114 -4
  16. package/@cds-models/index.js +20 -4
  17. package/@cds-models/odatano/cardano/index.d.ts +451 -32
  18. package/@cds-models/odatano/cardano/index.js +48 -0
  19. package/README.md +103 -167
  20. package/db/schema.cds +2455 -1705
  21. package/db/types.cds +456 -295
  22. package/package.json +41 -53
  23. package/scripts/deploy-schema.mjs +113 -0
  24. package/scripts/migrate-schema.mjs +528 -0
  25. package/scripts/migrate-slot-leader.mjs +96 -0
  26. package/src/index.d.ts +20 -21
  27. package/src/index.js +45 -31
  28. package/src/plugin.js +17 -35
  29. package/srv/blockchain/asset-decimals.d.ts +7 -0
  30. package/srv/blockchain/asset-decimals.js +91 -0
  31. package/srv/blockchain/backends/blockfrost-backend.d.ts +25 -137
  32. package/srv/blockchain/backends/blockfrost-backend.js +125 -215
  33. package/srv/blockchain/backends/call-signal.d.ts +7 -0
  34. package/srv/blockchain/backends/call-signal.js +22 -0
  35. package/srv/blockchain/backends/cardano-backend.d.ts +100 -189
  36. package/srv/blockchain/backends/cardano-backend.js +29 -5
  37. package/srv/blockchain/backends/koios-backend.d.ts +108 -170
  38. package/srv/blockchain/backends/koios-backend.js +488 -482
  39. package/srv/blockchain/backends/odatano-backend.d.ts +55 -0
  40. package/srv/blockchain/backends/odatano-backend.js +211 -0
  41. package/srv/blockchain/backends/ogmios-backend.d.ts +122 -190
  42. package/srv/blockchain/backends/ogmios-backend.js +683 -327
  43. package/srv/blockchain/backends/ogmios-frame-guard.d.ts +14 -0
  44. package/srv/blockchain/backends/ogmios-frame-guard.js +89 -0
  45. package/srv/blockchain/cardano-client.d.ts +71 -241
  46. package/srv/blockchain/cardano-client.js +354 -322
  47. package/srv/blockchain/cardano-indexer.d.ts +295 -283
  48. package/srv/blockchain/cardano-indexer.js +1690 -502
  49. package/srv/blockchain/cardano-tx-builder.d.ts +25 -89
  50. package/srv/blockchain/cardano-tx-builder.js +164 -140
  51. package/srv/blockchain/circuit-breaker.d.ts +2 -13
  52. package/srv/blockchain/circuit-breaker.js +11 -15
  53. package/srv/blockchain/crawler/account-snapshots.d.ts +29 -0
  54. package/srv/blockchain/crawler/account-snapshots.js +173 -0
  55. package/srv/blockchain/crawler/asset-decimals-backfill.d.ts +17 -0
  56. package/srv/blockchain/crawler/asset-decimals-backfill.js +56 -0
  57. package/srv/blockchain/crawler/asset-registry-backfill.d.ts +46 -0
  58. package/srv/blockchain/crawler/asset-registry-backfill.js +157 -0
  59. package/srv/blockchain/crawler/asset-slice-backfill.d.ts +35 -0
  60. package/srv/blockchain/crawler/asset-slice-backfill.js +149 -0
  61. package/srv/blockchain/crawler/certificate-backfill.d.ts +56 -0
  62. package/srv/blockchain/crawler/certificate-backfill.js +174 -0
  63. package/srv/blockchain/crawler/crawler.d.ts +125 -81
  64. package/srv/blockchain/crawler/crawler.js +738 -167
  65. package/srv/blockchain/crawler/credential-backfill.d.ts +30 -0
  66. package/srv/blockchain/crawler/credential-backfill.js +101 -0
  67. package/srv/blockchain/crawler/hooks.d.ts +2 -17
  68. package/srv/blockchain/crawler/index.d.ts +1 -8
  69. package/srv/blockchain/crawler/index.js +31 -17
  70. package/srv/blockchain/crawler/input-asset-copies.d.ts +34 -0
  71. package/srv/blockchain/crawler/input-asset-copies.js +161 -0
  72. package/srv/blockchain/crawler/key-pages.d.ts +12 -0
  73. package/srv/blockchain/crawler/key-pages.js +48 -0
  74. package/srv/blockchain/crawler/metadata-position-backfill.d.ts +22 -0
  75. package/srv/blockchain/crawler/metadata-position-backfill.js +59 -0
  76. package/srv/blockchain/crawler/output-datum-backfill.d.ts +41 -0
  77. package/srv/blockchain/crawler/output-datum-backfill.js +100 -0
  78. package/srv/blockchain/crawler/sync-state.d.ts +31 -47
  79. package/srv/blockchain/crawler/sync-state.js +135 -128
  80. package/srv/blockchain/crawler/transaction-backfill.d.ts +46 -0
  81. package/srv/blockchain/crawler/transaction-backfill.js +271 -0
  82. package/srv/blockchain/crawler/utxo-set-import.d.ts +66 -0
  83. package/srv/blockchain/crawler/utxo-set-import.js +399 -0
  84. package/srv/blockchain/crawler/window-plan.d.ts +31 -0
  85. package/srv/blockchain/crawler/window-plan.js +59 -0
  86. package/srv/blockchain/ledger-state.d.ts +62 -0
  87. package/srv/blockchain/ledger-state.js +521 -0
  88. package/srv/blockchain/pending-spends.d.ts +16 -0
  89. package/srv/blockchain/pending-spends.js +81 -0
  90. package/srv/blockchain/pool-metadata.d.ts +15 -0
  91. package/srv/blockchain/pool-metadata.js +132 -0
  92. package/srv/blockchain/request-coalescer.d.ts +2 -16
  93. package/srv/blockchain/request-coalescer.js +2 -16
  94. package/srv/blockchain/signing/cose-verifier.d.ts +3 -17
  95. package/srv/blockchain/signing/cose-verifier.js +146 -70
  96. package/srv/blockchain/signing/external-signer.d.ts +15 -115
  97. package/srv/blockchain/signing/external-signer.js +22 -131
  98. package/srv/blockchain/signing/failed-recheck.d.ts +17 -0
  99. package/srv/blockchain/signing/failed-recheck.js +135 -0
  100. package/srv/blockchain/signing/hsm-signer.d.ts +10 -54
  101. package/srv/blockchain/signing/hsm-signer.js +28 -79
  102. package/srv/blockchain/signing/landing-proof.d.ts +60 -0
  103. package/srv/blockchain/signing/landing-proof.js +224 -0
  104. package/srv/blockchain/signing/signature-verifier.d.ts +9 -47
  105. package/srv/blockchain/signing/signature-verifier.js +71 -87
  106. package/srv/blockchain/signing/submission-finalizer.d.ts +37 -45
  107. package/srv/blockchain/signing/submission-finalizer.js +280 -86
  108. package/srv/blockchain/stored-chain.d.ts +19 -0
  109. package/srv/blockchain/stored-chain.js +258 -0
  110. package/srv/blockchain/transaction-building/buildooor-tx.d.ts +31 -229
  111. package/srv/blockchain/transaction-building/buildooor-tx.js +663 -421
  112. package/srv/blockchain/transaction-building/cardano-tx.d.ts +9 -37
  113. package/srv/blockchain/transaction-presence.d.ts +12 -0
  114. package/srv/blockchain/transaction-presence.js +29 -0
  115. package/srv/blockchain/transaction-rows.d.ts +12 -0
  116. package/srv/blockchain/transaction-rows.js +44 -0
  117. package/srv/blockchain/wallet-worker/build-request.d.ts +8 -23
  118. package/srv/blockchain/wallet-worker/build-request.js +40 -353
  119. package/srv/blockchain/wallet-worker/confirmation-tracker.d.ts +27 -47
  120. package/srv/blockchain/wallet-worker/confirmation-tracker.js +158 -61
  121. package/srv/blockchain/wallet-worker/index.d.ts +1 -1
  122. package/srv/blockchain/wallet-worker/index.js +3 -11
  123. package/srv/blockchain/wallet-worker/invalidation.d.ts +35 -0
  124. package/srv/blockchain/wallet-worker/invalidation.js +128 -0
  125. package/srv/blockchain/wallet-worker/job-store.d.ts +58 -150
  126. package/srv/blockchain/wallet-worker/job-store.js +200 -273
  127. package/srv/blockchain/wallet-worker/lease-heartbeat.d.ts +2 -26
  128. package/srv/blockchain/wallet-worker/lease-heartbeat.js +6 -28
  129. package/srv/blockchain/wallet-worker/signers.d.ts +5 -24
  130. package/srv/blockchain/wallet-worker/signers.js +4 -12
  131. package/srv/blockchain/wallet-worker/wallet-worker.d.ts +29 -82
  132. package/srv/blockchain/wallet-worker/wallet-worker.js +334 -198
  133. package/srv/cardano-agent-service.cds +122 -84
  134. package/srv/cardano-agent-service.js +12 -9
  135. package/srv/cardano-backend-service.cds +81 -0
  136. package/srv/cardano-backend-service.d.ts +2 -0
  137. package/srv/cardano-backend-service.js +259 -0
  138. package/srv/cardano-indexer-service.cds +393 -18
  139. package/srv/cardano-indexer-service.d.ts +5 -1
  140. package/srv/cardano-indexer-service.js +477 -16
  141. package/srv/cardano-service.cds +426 -269
  142. package/srv/cardano-service.js +640 -217
  143. package/srv/cardano-sign-service.cds +211 -180
  144. package/srv/cardano-sign-service.js +210 -287
  145. package/srv/cardano-tx-service.cds +462 -370
  146. package/srv/cardano-tx-service.js +283 -800
  147. package/srv/cardano-ui.cds +16 -16
  148. package/srv/cardano-worker-service.cds +141 -125
  149. package/srv/cardano-worker-service.js +104 -61
  150. package/srv/cbor/cip68.d.ts +13 -0
  151. package/srv/cbor/cip68.js +56 -0
  152. package/srv/cbor/index.d.ts +3 -1
  153. package/srv/cbor/index.js +9 -1
  154. package/srv/cbor/parse.d.ts +30 -18
  155. package/srv/cbor/parse.js +44 -9
  156. package/srv/cbor/plutus-data-json.d.ts +20 -0
  157. package/srv/cbor/plutus-data-json.js +32 -0
  158. package/srv/config.d.ts +117 -0
  159. package/srv/config.js +419 -0
  160. package/srv/server.d.ts +15 -110
  161. package/srv/server.js +83 -405
  162. package/srv/utils/agent-access.d.ts +11 -0
  163. package/srv/utils/agent-access.js +86 -0
  164. package/srv/utils/agent-grants-config.d.ts +0 -46
  165. package/srv/utils/agent-grants-config.js +17 -85
  166. package/srv/utils/agent-grants.d.ts +106 -122
  167. package/srv/utils/agent-grants.js +538 -237
  168. package/srv/utils/agent-token-auth.d.ts +4 -99
  169. package/srv/utils/agent-token-auth.js +62 -186
  170. package/srv/utils/backend-request-handler.d.ts +3 -17
  171. package/srv/utils/backend-request-handler.js +3 -18
  172. package/srv/utils/build-request.d.ts +52 -0
  173. package/srv/utils/build-request.js +487 -0
  174. package/srv/utils/collections.d.ts +4 -10
  175. package/srv/utils/collections.js +14 -10
  176. package/srv/utils/const.d.ts +32 -75
  177. package/srv/utils/const.js +40 -80
  178. package/srv/utils/crypto.d.ts +3 -12
  179. package/srv/utils/crypto.js +11 -25
  180. package/srv/utils/db-indexes.d.ts +31 -0
  181. package/srv/utils/db-indexes.js +185 -0
  182. package/srv/utils/db-kind.d.ts +23 -0
  183. package/srv/utils/db-kind.js +42 -0
  184. package/srv/utils/db-sanitize.d.ts +20 -0
  185. package/srv/utils/db-sanitize.js +80 -0
  186. package/srv/utils/deep-json.d.ts +6 -0
  187. package/srv/utils/deep-json.js +240 -0
  188. package/srv/utils/detached-run.d.ts +41 -0
  189. package/srv/utils/detached-run.js +101 -0
  190. package/srv/utils/epoch-slots.d.ts +14 -0
  191. package/srv/utils/epoch-slots.js +45 -0
  192. package/srv/utils/error-codes.d.ts +26 -75
  193. package/srv/utils/error-codes.js +27 -72
  194. package/srv/utils/errors.d.ts +55 -187
  195. package/srv/utils/errors.js +161 -235
  196. package/srv/utils/lease.d.ts +20 -0
  197. package/srv/utils/lease.js +62 -0
  198. package/srv/utils/liveness.d.ts +12 -0
  199. package/srv/utils/liveness.js +35 -0
  200. package/srv/utils/mappers.d.ts +111 -223
  201. package/srv/utils/mappers.js +432 -371
  202. package/srv/utils/navigation.d.ts +17 -0
  203. package/srv/utils/navigation.js +52 -0
  204. package/srv/utils/network-context.d.ts +0 -1
  205. package/srv/utils/network-context.js +9 -15
  206. package/srv/utils/paging.d.ts +31 -0
  207. package/srv/utils/paging.js +43 -0
  208. package/srv/utils/pg-inline-json.d.ts +8 -0
  209. package/srv/utils/pg-inline-json.js +58 -0
  210. package/srv/utils/pg-order-nulls.d.ts +14 -0
  211. package/srv/utils/pg-order-nulls.js +54 -0
  212. package/srv/utils/plutus-placeholders.d.ts +16 -22
  213. package/srv/utils/plutus-placeholders.js +62 -33
  214. package/srv/utils/rate-limiter.d.ts +2 -21
  215. package/srv/utils/rate-limiter.js +5 -17
  216. package/srv/utils/readiness.d.ts +12 -0
  217. package/srv/utils/readiness.js +29 -0
  218. package/srv/utils/reference-script.d.ts +19 -0
  219. package/srv/utils/reference-script.js +84 -0
  220. package/srv/utils/resolution.d.ts +13 -0
  221. package/srv/utils/resolution.js +47 -0
  222. package/srv/utils/result-numbers.d.ts +15 -0
  223. package/srv/utils/result-numbers.js +61 -0
  224. package/srv/utils/row-values.d.ts +7 -0
  225. package/srv/utils/row-values.js +27 -0
  226. package/srv/utils/service-events.d.ts +0 -24
  227. package/srv/utils/service-events.js +3 -25
  228. package/srv/utils/signing-helper.d.ts +3 -20
  229. package/srv/utils/signing-helper.js +35 -64
  230. package/srv/utils/tx-build-helper.d.ts +25 -105
  231. package/srv/utils/tx-build-helper.js +108 -156
  232. package/srv/utils/tx-request-parsers.d.ts +82 -33
  233. package/srv/utils/tx-request-parsers.js +401 -49
  234. package/srv/utils/tx-utils.d.ts +3 -27
  235. package/srv/utils/tx-utils.js +32 -50
  236. package/srv/utils/types.d.ts +294 -232
  237. package/srv/utils/types.js +2 -22
  238. package/srv/utils/validators.d.ts +22 -92
  239. package/srv/utils/validators.js +60 -170
package/db/types.cds CHANGED
@@ -1,295 +1,456 @@
1
- // -----------------------------------------------------
2
- // Basic Cardano Types
3
- // -----------------------------------------------------
4
- @title : 'Blake2b224'
5
- @description: '28 bytes Blake2b hash as hex string'
6
- type Blake2b224 : String(56);
7
-
8
- @title : 'Blake2b256'
9
- @description: '32 bytes Blake2b hash as hex string'
10
- type Blake2b256 : String(64);
11
-
12
- @title : 'HexBytes'
13
- @description: 'CBOR / bytes as hex string'
14
- type HexBytes : String(5000);
15
-
16
- @title : 'Lovelace'
17
- @description: 'Amount of ADA in lovelace (1 ADA = 1_000_000 lovelace)'
18
- type Lovelace : Decimal(20, 0);
19
-
20
- @title : 'Asset Unit'
21
- @description: 'Concatenation of policyId and assetNameHex representing a unique asset'
22
- type AssetUnit : String(120);
23
-
24
- @title : 'Metadata Label'
25
- @description: 'Metadata label as string — a uint64 (0 .. 18446744073709551615, up to 20 digits)'
26
- type MetadataLabel : String(20); // was String(5): truncated labels above 5 digits
27
-
28
- @title : 'Bech32 Address'
29
- @description: 'Bech32 encoded address string'
30
- type Bech32 : String(120);
31
-
32
- // -----------------------------------------------------
33
- // Shared structural slices
34
- // -----------------------------------------------------
35
- @title : 'Asset Slice'
36
- @description: 'Structural slice for asset details'
37
- type AssetSlice {
38
-
39
- @title : 'Asset Quantity'
40
- @description: 'Quantity of the Asset'
41
- quantity : Lovelace;
42
-
43
- @title : 'Asset Policy Id'
44
- @description: 'Policy Id of the Asset'
45
- policyId : Blake2b224;
46
-
47
- @title : 'Asset Name Hex'
48
- @description: 'Asset Name as Hex String'
49
- assetNameHex : HexBytes;
50
-
51
- @title : 'Asset Name'
52
- @description: 'Asset Name as UTF-8 String'
53
- assetName : String(128);
54
-
55
- @title : 'Asset Fingerprint'
56
- @description: 'CIP-14 Asset Fingerprint'
57
- fingerprint : String(44);
58
- }
59
-
60
- @title : 'Metadata Slice'
61
- @description: 'Structural slice for metadata details'
62
- type MetadataSlice {
63
-
64
- @title : 'Metadata Label'
65
- @description: 'Metadata label as string — a uint64 (0 .. 18446744073709551615, up to 20 digits)'
66
- label : MetadataLabel;
67
-
68
- @title : 'Metadata Payload'
69
- @description: 'Metadata payload as JSON string'
70
- payload : LargeString;
71
- }
72
-
73
- @title : 'UTxO Data Slice'
74
- @description: 'Structural slice for UTxO specific data'
75
- type UTxODataSlice {
76
-
77
- @title : 'Datum Hash'
78
- @description: 'The datum hash associated with the UTxO'
79
- dataHash : Blake2b256;
80
-
81
- @title : 'Inline Datum'
82
- @description: 'The inline datum associated with the UTxO as hex CBOR'
83
- inlineDatum : LargeString;
84
-
85
- @title : 'Reference Script Hash'
86
- @description: 'The reference script hash associated with the UTxO'
87
- referenceScriptHash : Blake2b256;
88
- }
89
-
90
- // -----------------------------------------------------
91
- // Status Enums
92
- // -----------------------------------------------------
93
- @title : 'Submission Status'
94
- @description: 'Enum type for transaction submission status'
95
- type SubmissionStatus : String(20) enum {
96
- pending = 'pending';
97
- submitted = 'submitted';
98
- confirmed = 'confirmed';
99
- failed = 'failed';
100
- }
101
-
102
- @title : 'Signing Request Status'
103
- @description: 'Enum type for signing request status'
104
- type SigningStatus : String(20) enum {
105
- pending = 'pending';
106
- signed = 'signed';
107
- verified = 'verified';
108
- submitting = 'submitting';
109
- submitted = 'submitted';
110
- expired = 'expired';
111
- failed = 'failed';
112
- }
113
-
114
- @title : 'Crawl Sync Status'
115
- @description: 'Enum type for the chain crawler / pre-sync cursor state'
116
- type CrawlSyncStatus : String(12) enum {
117
- stopped = 'stopped'; // crawler not running
118
- syncing = 'syncing'; // actively catching up / streaming
119
- synced = 'synced'; // caught up to (tip - confirmationDepth)
120
- error = 'error'; // circuit-broken after repeated failures
121
- }
122
-
123
- @title : 'Reorg Status'
124
- @description: 'Enum type for the lifecycle of a handled chain rollback'
125
- type ReorgStatus : String(12) enum {
126
- detected = 'detected';
127
- rolling_back = 'rolling_back';
128
- reindexing = 'reindexing';
129
- completed = 'completed';
130
- }
131
-
132
- @title : 'Wallet Job Status'
133
- @description: 'Enum type for the wallet-worker job lifecycle'
134
- type WalletJobStatus : String(12) enum {
135
- pending = 'pending'; // queued, waiting for the worker to pick it up
136
- building = 'building'; // build + sign in progress, nothing sent to the network yet
137
- submitting = 'submitting'; // signed tx durably stored, submit in flight or its outcome unknown
138
- submitted = 'submitted'; // accepted into the mempool, awaiting confirmation
139
- confirmed = 'confirmed'; // on-chain at the configured confirmation depth
140
- failed = 'failed'; // terminal failure (see errorCode/errorMessage)
141
- cancelled = 'cancelled'; // cancelled by the caller while still pending
142
- }
143
-
144
- @title : 'Wallet Job Kind'
145
- @description: 'Enum type for the transaction kind a wallet-worker job executes'
146
- type WalletJobKind : String(12) enum {
147
- simpleAda = 'simpleAda'; // BuildSimpleAdaTransaction payload
148
- metadata = 'metadata'; // BuildTransactionWithMetadata payload
149
- multiAsset = 'multiAsset'; // BuildMultiAssetTransaction payload
150
- mint = 'mint'; // BuildMintTransaction payload
151
- plutusSpend = 'plutusSpend'; // BuildPlutusSpendTransaction payload
152
- submitSigned = 'submitSigned'; // externally signed CBOR — managed submit + confirm only
153
- }
154
-
155
- @title : 'Worker Signer Type'
156
- @description: 'Enum type for how a worker wallet signs transactions'
157
- type WorkerSignerType : String(10) enum {
158
- hsm = 'hsm'; // PKCS#11 HSM (production) — keys never leave the module
159
- software = 'software'; // operator-configured Ed25519 key (dev/test)
160
- }
161
-
162
- // -----------------------------------------------------
163
- // Parsed Transaction (ParseTransactionCbor action result)
164
- // -----------------------------------------------------
165
- @title : 'Parsed Transaction Input'
166
- @description: 'A UTxO reference consumed by a parsed transaction'
167
- type ParsedInput {
168
- @title : 'UTxO Transaction Hash'
169
- @description: 'The 32-byte hash of the transaction that produced this UTxO'
170
- txHash : Blake2b256;
171
-
172
- @title : 'UTxO Output Index'
173
- @description: 'The output index within the producing transaction'
174
- outputIndex : Integer;
175
- }
176
-
177
- @title : 'Parsed Asset'
178
- @description: 'A single asset entry from a parsed transaction output or mint value'
179
- type ParsedAsset {
180
- @title : 'Asset Unit'
181
- @description: 'Concatenation of policyId (56 hex) and assetNameHex (0-64 hex)'
182
- unit : AssetUnit;
183
-
184
- @title : 'Asset Quantity'
185
- @description: 'Signed decimal string (BigInt-safe); negative entries indicate burns in a mint value'
186
- quantity : String(40);
187
- }
188
-
189
- @title : 'Parsed Transaction Output'
190
- @description: 'A single output of a parsed transaction'
191
- type ParsedOutput {
192
- @title : 'Output Address'
193
- @description: 'Bech32 recipient address'
194
- address : Bech32;
195
-
196
- @title : 'Output Lovelace'
197
- @description: 'ADA amount in lovelace (decimal string)'
198
- lovelace : Lovelace;
199
-
200
- @title : 'Output Assets'
201
- @description: 'Native assets attached to the output'
202
- assets : many ParsedAsset;
203
-
204
- @title : 'Datum Hash'
205
- @description: 'Blake2b-256 datum hash when the output references a datum by hash; null if inline or absent'
206
- datumHash : Blake2b256;
207
-
208
- @title : 'Inline Datum CBOR'
209
- @description: 'Hex-encoded PlutusData CBOR when the output carries an inline datum; null otherwise'
210
- inlineDatumHex : LargeString;
211
-
212
- @title : 'Reference Script CBOR'
213
- @description: 'Hex-encoded CIP-33 reference script CBOR when present; null otherwise'
214
- referenceScriptHex : LargeString;
215
- }
216
-
217
- @title : 'Parsed Witness Counts'
218
- @description: 'Counts of witness entries in a parsed transaction (no secrets included)'
219
- type ParsedWitnesses {
220
- @title : 'VKey Witness Count'
221
- @description: 'Number of Ed25519 verification-key witnesses'
222
- vkeyCount : Integer;
223
-
224
- @title : 'Native Script Count'
225
- @description: 'Number of native scripts in the witness set'
226
- nativeScripts : Integer;
227
-
228
- @title : 'Plutus Script Count'
229
- @description: 'Total count of Plutus V1/V2/V3 scripts in the witness set'
230
- plutusScripts : Integer;
231
-
232
- @title : 'Plutus Data Count'
233
- @description: 'Number of PlutusData entries attached as witnesses'
234
- plutusData : Integer;
235
-
236
- @title : 'Redeemer Count'
237
- @description: 'Number of redeemers in the witness set'
238
- redeemers : Integer;
239
- }
240
-
241
- @title : 'Parsed Transaction'
242
- @description: 'Structured view of a hex-encoded transaction CBOR. Returned by the ParseTransactionCbor action.'
243
- type ParsedTransaction {
244
- @title : 'Transaction Body Hash'
245
- @description: 'Blake2b-256 hash of the transaction body. Stable across signed/unsigned CBOR of the same body.'
246
- txHash : Blake2b256;
247
-
248
- @title : 'Network'
249
- @description: '"mainnet" or "testnet" from the tx body network ID byte; null if absent. preview vs preprod cannot be distinguished from CBOR alone.'
250
- network : String(10);
251
-
252
- @title : 'Inputs'
253
- @description: 'UTxOs consumed by the transaction'
254
- inputs : many ParsedInput;
255
-
256
- @title : 'Outputs'
257
- @description: 'Outputs produced by the transaction'
258
- outputs : many ParsedOutput;
259
-
260
- @title : 'Validity Interval Start'
261
- @description: 'Slot number at which the transaction becomes valid (decimal string); null if absent'
262
- validityStart : String(20);
263
-
264
- @title : 'Validity Interval End'
265
- @description: 'TTL slot number after which the transaction becomes invalid (decimal string); null if absent'
266
- validityEnd : String(20);
267
-
268
- @title : 'Fee'
269
- @description: 'Transaction fee in lovelace'
270
- fee : Lovelace;
271
-
272
- @title : 'Mint'
273
- @description: 'Signed native-asset mint/burn entries; empty array if the tx does not mint'
274
- mint : many ParsedAsset;
275
-
276
- @title : 'Metadata Labels'
277
- @description: 'Metadata labels (uint64 as decimal strings) present in the auxiliary data; full payload via GetMetadataByTxHash once submitted'
278
- metadataLabels : many String;
279
-
280
- @title : 'Collateral Inputs'
281
- @description: 'Collateral UTxOs for phase-2 validation (empty when no Plutus scripts run)'
282
- collateral : many ParsedInput;
283
-
284
- @title : 'Required Signers'
285
- @description: '28-byte Ed25519 key hashes listed in the tx body required_signers field'
286
- requiredSigners : many Blake2b224;
287
-
288
- @title : 'Script Data Hash'
289
- @description: 'Blake2b-256 hash over datum/redeemer/costmodels section; null if no Plutus data is present'
290
- scriptDataHash : Blake2b256;
291
-
292
- @title : 'Witness Counts'
293
- @description: 'Shape summary of the witness set (no secret material exposed)'
294
- witnesses : ParsedWitnesses;
295
- }
1
+ // -----------------------------------------------------
2
+ // Basic Cardano Types
3
+ // -----------------------------------------------------
4
+ @title : 'Blake2b224'
5
+ @description: '28 bytes Blake2b hash as hex string'
6
+ type Blake2b224 : String(56);
7
+
8
+ @title : 'Blake2b256'
9
+ @description: '32 bytes Blake2b hash as hex string'
10
+ type Blake2b256 : String(64);
11
+
12
+ @title : 'HexBytes'
13
+ @description: 'CBOR / bytes as hex string'
14
+ type HexBytes : String(5000);
15
+
16
+ @title : 'Lovelace'
17
+ @description: 'Amount of ADA in lovelace (1 ADA = 1_000_000 lovelace)'
18
+ type Lovelace : Decimal(20, 0);
19
+ // Sum of asset quantities: one output holds at most 2^64-1, a sum over an address's outputs does not
20
+ type AssetAmount : Decimal(38, 0);
21
+
22
+ @title : 'Asset Unit'
23
+ @description: 'Concatenation of policyId and assetNameHex representing a unique asset'
24
+ type AssetUnit : String(120);
25
+
26
+ @title : 'Metadata Label'
27
+ @description: 'Metadata label as string: a uint64 (0 .. 18446744073709551615, up to 20 digits)'
28
+ type MetadataLabel : String(20);
29
+
30
+ @title : 'Bech32 Address'
31
+ @description: 'Bech32 encoded address string'
32
+ type Bech32 : String(120);
33
+
34
+ // -----------------------------------------------------
35
+ // Shared structural slices
36
+ // -----------------------------------------------------
37
+ @title : 'Asset Slice'
38
+ @description: 'Structural slice for asset details'
39
+ type AssetSlice {
40
+
41
+ @title : 'Asset Quantity'
42
+ @description: 'Quantity of the Asset'
43
+ quantity : Lovelace;
44
+
45
+ @title : 'Asset Policy Id'
46
+ @description: 'Policy Id of the Asset'
47
+ policyId : Blake2b224;
48
+
49
+ @title : 'Asset Name Hex'
50
+ @description: 'Asset Name as Hex String'
51
+ assetNameHex : HexBytes;
52
+
53
+ @title : 'Asset Name'
54
+ @description: 'Asset Name as UTF-8 String'
55
+ assetName : String(128);
56
+
57
+ @title : 'Asset Fingerprint'
58
+ @description: 'CIP-14 Asset Fingerprint'
59
+ fingerprint : String(44);
60
+ }
61
+
62
+ @title : 'Asset Sum Slice'
63
+ @description: 'Asset details with the quantity summed over several outputs (per address)'
64
+ type AssetSumSlice {
65
+
66
+ @title : 'Asset Quantity'
67
+ @description: 'Quantity of the Asset summed over the outputs of the address'
68
+ quantity : AssetAmount;
69
+
70
+ @title : 'Asset Policy Id'
71
+ @description: 'Policy Id of the Asset'
72
+ policyId : Blake2b224;
73
+
74
+ @title : 'Asset Name Hex'
75
+ @description: 'Asset Name as Hex String'
76
+ assetNameHex : HexBytes;
77
+
78
+ @title : 'Asset Name'
79
+ @description: 'Asset Name as UTF-8 String'
80
+ assetName : String(128);
81
+
82
+ @title : 'Asset Fingerprint'
83
+ @description: 'CIP-14 Asset Fingerprint'
84
+ fingerprint : String(44);
85
+ }
86
+
87
+ @title : 'Metadata Slice'
88
+ @description: 'Structural slice for metadata details'
89
+ type MetadataSlice {
90
+
91
+ @title : 'Metadata Label'
92
+ @description: 'Metadata label as string: a uint64 (0 .. 18446744073709551615, up to 20 digits)'
93
+ label : MetadataLabel;
94
+
95
+ @title : 'Metadata Payload'
96
+ @description: 'Metadata payload as JSON string'
97
+ payload : LargeString;
98
+ }
99
+
100
+ @title : 'UTxO Data Slice'
101
+ @description: 'Structural slice for UTxO specific data'
102
+ type UTxODataSlice {
103
+
104
+ @title : 'Datum Hash'
105
+ @description: 'The datum hash associated with the UTxO'
106
+ dataHash : Blake2b256;
107
+
108
+ @title : 'Inline Datum'
109
+ @description: 'The inline datum associated with the UTxO as hex CBOR'
110
+ inlineDatum : LargeString;
111
+
112
+ @title : 'Reference Script Hash'
113
+ @description: 'The reference script hash associated with the UTxO'
114
+ referenceScriptHash : Blake2b256;
115
+
116
+ @title : 'Reference Script Size'
117
+ @description: 'Size of the reference script in bytes as the ledger charges it (Conway reference-script fee); null when the source reports the hash only'
118
+ referenceScriptSize : Integer;
119
+
120
+ @title : 'Reference Script Type'
121
+ @description: 'native | plutusV1 | plutusV2 | plutusV3; null when the source reports the hash only'
122
+ referenceScriptType : String(10);
123
+
124
+ @title : 'Payment Credential'
125
+ @description: 'Payment key or script hash of the output address (28 bytes hex); the same for every stake variant of an address. Null for Byron addresses'
126
+ paymentCredential : String(56);
127
+ }
128
+
129
+ // -----------------------------------------------------
130
+ // Status Enums
131
+ // -----------------------------------------------------
132
+ @title : 'Submission Status'
133
+ @description: 'Enum type for transaction submission status'
134
+ type SubmissionStatus : String(20) enum {
135
+ pending = 'pending';
136
+ submitted = 'submitted';
137
+ confirmed = 'confirmed';
138
+ failed = 'failed';
139
+ unresolved = 'unresolved'; // past the last moment it could land, nothing shows whether it did
140
+ }
141
+
142
+ @title : 'Signing Request Status'
143
+ @description: 'Enum type for signing request status'
144
+ type SigningStatus : String(20) enum {
145
+ pending = 'pending';
146
+ signed = 'signed';
147
+ verified = 'verified';
148
+ submitting = 'submitting';
149
+ submitted = 'submitted';
150
+ expired = 'expired';
151
+ failed = 'failed';
152
+ unresolved = 'unresolved'; // past the last moment it could land, nothing shows whether it did
153
+ }
154
+
155
+ @title : 'Crawl Sync Status'
156
+ @description: 'Enum type for the chain crawler / pre-sync cursor state'
157
+ type CrawlSyncStatus : String(12) enum {
158
+ stopped = 'stopped'; // crawler not running
159
+ syncing = 'syncing'; // actively catching up / streaming
160
+ synced = 'synced'; // caught up to (tip - confirmationDepth)
161
+ error = 'error'; // circuit-broken after repeated failures
162
+ }
163
+
164
+ @title : 'Reorg Status'
165
+ @description: 'Enum type for the lifecycle of a handled chain rollback'
166
+ type ReorgStatus : String(12) enum {
167
+ detected = 'detected';
168
+ rolling_back = 'rolling_back';
169
+ reindexing = 'reindexing';
170
+ completed = 'completed';
171
+ }
172
+
173
+ @title : 'Wallet Job Status'
174
+ @description: 'Enum type for the wallet-worker job lifecycle'
175
+ type WalletJobStatus : String(12) enum {
176
+ pending = 'pending'; // queued, waiting for the worker to pick it up
177
+ building = 'building'; // build + sign in progress, nothing sent to the network yet
178
+ submitting = 'submitting'; // signed tx durably stored, submit in flight or its outcome unknown
179
+ submitted = 'submitted'; // accepted into the mempool, awaiting confirmation
180
+ confirmed = 'confirmed'; // on-chain at the configured confirmation depth
181
+ failed = 'failed'; // terminal failure (see errorCode/errorMessage)
182
+ cancelled = 'cancelled'; // cancelled by the caller while still pending
183
+ unresolved = 'unresolved'; // past the last moment it could land, nothing shows whether it did; an operator resolves it
184
+ }
185
+
186
+ @title : 'Resolved Outcome'
187
+ @description: 'What an operator read on the chain for an unresolved outcome'
188
+ type ResolvedOutcome : String(10) enum {
189
+ confirmed = 'confirmed'; // the transaction is on chain with passing scripts
190
+ failed = 'failed'; // the transaction is not on chain and can no longer land
191
+ }
192
+
193
+ @title : 'Wallet Job Kind'
194
+ @description: 'Enum type for the transaction kind a wallet-worker job executes'
195
+ type WalletJobKind : String(12) enum {
196
+ simpleAda = 'simpleAda'; // BuildSimpleAdaTransaction payload
197
+ metadata = 'metadata'; // BuildTransactionWithMetadata payload
198
+ multiAsset = 'multiAsset'; // BuildMultiAssetTransaction payload
199
+ mint = 'mint'; // BuildMintTransaction payload
200
+ plutusSpend = 'plutusSpend'; // BuildPlutusSpendTransaction payload
201
+ payout = 'payout'; // several recipients in one transaction (outputsJson)
202
+ submitSigned = 'submitSigned'; // externally signed CBOR, managed submit and confirm only
203
+ }
204
+
205
+ @title : 'Worker Signer Type'
206
+ @description: 'Enum type for how a worker wallet signs transactions'
207
+ type WorkerSignerType : String(10) enum {
208
+ hsm = 'hsm'; // PKCS#11 HSM for production, keys never leave the module
209
+ software = 'software'; // operator-configured Ed25519 key (dev/test)
210
+ }
211
+
212
+ @title : 'Cardano Network'
213
+ @description: 'Enum type for the Cardano networks a deployment can target'
214
+ type CardanoNetwork : String(10) enum {
215
+ mainnet = 'mainnet';
216
+ preview = 'preview';
217
+ preprod = 'preprod';
218
+ }
219
+
220
+ @title : 'UTxO Set Import Source'
221
+ @description: 'Enum type for where importUtxoSet reads the UTxO set from'
222
+ type UtxoSetImportSource : String(12) enum {
223
+ ogmios = 'ogmios';
224
+ file = 'file';
225
+ aggregates = 'aggregates';
226
+ scripts = 'scripts';
227
+ }
228
+
229
+ @title : 'Asset Registry Source'
230
+ @description: 'Enum type for where backfillAssetRegistry reads the token registry from'
231
+ type AssetRegistrySource : String(12) enum {
232
+ koios = 'koios';
233
+ file = 'file';
234
+ }
235
+
236
+ // -----------------------------------------------------
237
+ // Transaction confirmations (GetTransactionConfirmations action result)
238
+ // -----------------------------------------------------
239
+ @title : 'Transaction Confirmations'
240
+ @description: 'Depth of a transaction in the chain. Depth 1 means it sits in the tip block.'
241
+ type TransactionConfirmations {
242
+ @title : 'Transaction Hash'
243
+ @description: 'The transaction asked for'
244
+ txHash : Blake2b256;
245
+
246
+ @title : 'Block Height'
247
+ @description: 'Height of the block holding the transaction; null while it is not on chain'
248
+ blockHeight : Integer64;
249
+
250
+ @title : 'Tip Height'
251
+ @description: 'Height of the chain tip used for the count; null while the transaction is not on chain'
252
+ tipHeight : Integer64;
253
+
254
+ @title : 'Confirmations'
255
+ @description: 'Tip height minus block height plus one; 0 while the transaction is not on chain'
256
+ confirmations : Integer;
257
+ }
258
+
259
+ // -----------------------------------------------------
260
+ // Parsed Transaction (ParseTransactionCbor action result)
261
+ // -----------------------------------------------------
262
+ @title : 'Parsed Transaction Input'
263
+ @description: 'A UTxO reference consumed by a parsed transaction'
264
+ type ParsedInput {
265
+ @title : 'UTxO Transaction Hash'
266
+ @description: 'The 32-byte hash of the transaction that produced this UTxO'
267
+ txHash : Blake2b256;
268
+
269
+ @title : 'UTxO Output Index'
270
+ @description: 'The output index within the producing transaction'
271
+ outputIndex : Integer;
272
+ }
273
+
274
+ @title : 'Parsed Asset'
275
+ @description: 'A single asset entry from a parsed transaction output or mint value'
276
+ type ParsedAsset {
277
+ @title : 'Asset Unit'
278
+ @description: 'Concatenation of policyId (56 hex) and assetNameHex (0-64 hex)'
279
+ unit : AssetUnit;
280
+
281
+ @title : 'Asset Quantity'
282
+ @description: 'Signed decimal string (BigInt-safe); negative entries indicate burns in a mint value'
283
+ quantity : String(40);
284
+ }
285
+
286
+ @title : 'Parsed Transaction Output'
287
+ @description: 'A single output of a parsed transaction'
288
+ type ParsedOutput {
289
+ @title : 'Output Address'
290
+ @description: 'Bech32 recipient address'
291
+ address : Bech32;
292
+
293
+ @title : 'Output Lovelace'
294
+ @description: 'ADA amount in lovelace (decimal string)'
295
+ lovelace : Lovelace;
296
+
297
+ @title : 'Output Assets'
298
+ @description: 'Native assets attached to the output'
299
+ assets : many ParsedAsset;
300
+
301
+ @title : 'Datum Hash'
302
+ @description: 'Blake2b-256 datum hash when the output references a datum by hash; null if inline or absent'
303
+ datumHash : Blake2b256;
304
+
305
+ @title : 'Inline Datum CBOR'
306
+ @description: 'Hex-encoded PlutusData CBOR when the output carries an inline datum; null otherwise'
307
+ inlineDatumHex : LargeString;
308
+
309
+ @title : 'Reference Script CBOR'
310
+ @description: 'Hex-encoded CIP-33 reference script CBOR when present; null otherwise'
311
+ referenceScriptHex : LargeString;
312
+
313
+ @title : 'Output CBOR Size'
314
+ @description: 'Byte length of the output as it stands in the transaction (input for the min-UTxO check)'
315
+ cborSize : Integer;
316
+ }
317
+
318
+ @title : 'Parsed Withdrawal'
319
+ @description: 'A reward withdrawal of a parsed transaction'
320
+ type ParsedWithdrawal {
321
+ @title : 'Reward Address'
322
+ @description: 'Bech32 reward address the lovelace is withdrawn from'
323
+ rewardAddress : Bech32;
324
+
325
+ @title : 'Withdrawn Lovelace'
326
+ @description: 'Withdrawn amount in lovelace (decimal string)'
327
+ lovelace : Lovelace;
328
+ }
329
+
330
+ @title : 'Parsed Certificate'
331
+ @description: 'A certificate of a parsed transaction'
332
+ type ParsedCertificate {
333
+ @title : 'Certificate Index'
334
+ @description: 'Position in the body certificate list'
335
+ index : Integer;
336
+
337
+ @title : 'Certificate Type'
338
+ @description: 'Ledger certificate name, e.g. StakeDelegation or RegistrationDrep'
339
+ type : String(40);
340
+ }
341
+
342
+ @title : 'Parsed Witness Counts'
343
+ @description: 'Counts of witness entries in a parsed transaction (no secrets included)'
344
+ type ParsedWitnesses {
345
+ @title : 'VKey Witness Count'
346
+ @description: 'Number of Ed25519 verification-key witnesses'
347
+ vkeyCount : Integer;
348
+
349
+ @title : 'Native Script Count'
350
+ @description: 'Number of native scripts in the witness set'
351
+ nativeScripts : Integer;
352
+
353
+ @title : 'Plutus Script Count'
354
+ @description: 'Total count of Plutus V1/V2/V3 scripts in the witness set'
355
+ plutusScripts : Integer;
356
+
357
+ @title : 'Plutus Data Count'
358
+ @description: 'Number of PlutusData entries attached as witnesses'
359
+ plutusData : Integer;
360
+
361
+ @title : 'Redeemer Count'
362
+ @description: 'Number of redeemers in the witness set'
363
+ redeemers : Integer;
364
+ }
365
+
366
+ @title : 'Parsed Transaction'
367
+ @description: 'Structured view of a hex-encoded transaction CBOR. Returned by the ParseTransactionCbor action.'
368
+ type ParsedTransaction {
369
+ @title : 'Transaction Body Hash'
370
+ @description: 'Blake2b-256 hash of the transaction body. Stable across signed/unsigned CBOR of the same body.'
371
+ txHash : Blake2b256;
372
+
373
+ @title : 'Network'
374
+ @description: '"mainnet" or "testnet" from the tx body network ID byte; null if absent. preview vs preprod cannot be distinguished from CBOR alone.'
375
+ network : String(10);
376
+
377
+ @title : 'Network ID'
378
+ @description: 'Body field 15: 1 = mainnet, 0 = testnet; null if absent'
379
+ networkId : Integer;
380
+
381
+ @title : 'Inputs'
382
+ @description: 'UTxOs consumed by the transaction'
383
+ inputs : many ParsedInput;
384
+
385
+ @title : 'Outputs'
386
+ @description: 'Outputs produced by the transaction'
387
+ outputs : many ParsedOutput;
388
+
389
+ @title : 'Validity Interval Start'
390
+ @description: 'Slot number at which the transaction becomes valid (decimal string); null if absent'
391
+ validityStart : String(20);
392
+
393
+ @title : 'Validity Interval End'
394
+ @description: 'TTL slot number after which the transaction becomes invalid (decimal string); null if absent'
395
+ validityEnd : String(20);
396
+
397
+ @title : 'Fee'
398
+ @description: 'Transaction fee in lovelace'
399
+ fee : Lovelace;
400
+
401
+ @title : 'Mint'
402
+ @description: 'Signed native-asset mint/burn entries; empty array if the tx does not mint'
403
+ mint : many ParsedAsset;
404
+
405
+ @title : 'Metadata Labels'
406
+ @description: 'Metadata labels (uint64 as decimal strings) present in the auxiliary data; full payload via GetMetadataByTxHash once submitted'
407
+ metadataLabels : many String;
408
+
409
+ @title : 'Collateral Inputs'
410
+ @description: 'Collateral UTxOs for phase-2 validation (empty when no Plutus scripts run)'
411
+ collateral : many ParsedInput;
412
+
413
+ @title : 'Reference Inputs'
414
+ @description: 'UTxOs the transaction reads without spending them'
415
+ referenceInputs : many ParsedInput;
416
+
417
+ @title : 'Withdrawals'
418
+ @description: 'Reward withdrawals; empty array if none'
419
+ withdrawals : many ParsedWithdrawal;
420
+
421
+ @title : 'Certificates'
422
+ @description: 'Certificates in body order; empty array if none'
423
+ certificates : many ParsedCertificate;
424
+
425
+ @title : 'Vote Count'
426
+ @description: 'Number of votes over all voters; 0 if the body has no voting procedures'
427
+ votingProcedures : Integer;
428
+
429
+ @title : 'Proposal Count'
430
+ @description: 'Number of governance proposals'
431
+ proposalProcedures : Integer;
432
+
433
+ @title : 'Treasury Donation'
434
+ @description: 'Lovelace donated to the treasury; null if absent'
435
+ treasuryDonation : Lovelace;
436
+
437
+ @title : 'Current Treasury Value'
438
+ @description: 'Treasury value the transaction asserts; null if absent'
439
+ currentTreasuryValue : Lovelace;
440
+
441
+ @title : 'Required Signers'
442
+ @description: '28-byte Ed25519 key hashes listed in the tx body required_signers field'
443
+ requiredSigners : many Blake2b224;
444
+
445
+ @title : 'Script Data Hash'
446
+ @description: 'Blake2b-256 hash over datum/redeemer/costmodels section; null if no Plutus data is present'
447
+ scriptDataHash : Blake2b256;
448
+
449
+ @title : 'Validity Flag'
450
+ @description: 'false when the transaction is flagged as failing its scripts; on chain it then spends only the collateral and creates no outputs'
451
+ isValid : Boolean;
452
+
453
+ @title : 'Witness Counts'
454
+ @description: 'Shape summary of the witness set (no secret material exposed)'
455
+ witnesses : ParsedWitnesses;
456
+ }