@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.
- package/@cds-models/CardanoAgentService/index.d.ts +99 -51
- package/@cds-models/CardanoAgentService/index.js +15 -0
- package/@cds-models/CardanoBackendService/index.d.ts +358 -0
- package/@cds-models/CardanoBackendService/index.js +41 -0
- package/@cds-models/CardanoIndexerService/index.d.ts +594 -11
- package/@cds-models/CardanoIndexerService/index.js +74 -0
- package/@cds-models/CardanoODataService/index.d.ts +417 -57
- package/@cds-models/CardanoODataService/index.js +42 -0
- package/@cds-models/CardanoSignService/index.d.ts +45 -19
- package/@cds-models/CardanoSignService/index.js +4 -0
- package/@cds-models/CardanoTransactionService/index.d.ts +70 -44
- package/@cds-models/CardanoTransactionService/index.js +5 -0
- package/@cds-models/CardanoWorkerService/index.d.ts +35 -22
- package/@cds-models/CardanoWorkerService/index.js +2 -0
- package/@cds-models/index.d.ts +114 -4
- package/@cds-models/index.js +20 -4
- package/@cds-models/odatano/cardano/index.d.ts +451 -32
- package/@cds-models/odatano/cardano/index.js +48 -0
- package/README.md +103 -167
- package/db/schema.cds +2455 -1705
- package/db/types.cds +456 -295
- package/package.json +41 -53
- package/scripts/deploy-schema.mjs +113 -0
- package/scripts/migrate-schema.mjs +528 -0
- package/scripts/migrate-slot-leader.mjs +96 -0
- package/src/index.d.ts +20 -21
- package/src/index.js +45 -31
- package/src/plugin.js +17 -35
- package/srv/blockchain/asset-decimals.d.ts +7 -0
- package/srv/blockchain/asset-decimals.js +91 -0
- package/srv/blockchain/backends/blockfrost-backend.d.ts +25 -137
- package/srv/blockchain/backends/blockfrost-backend.js +125 -215
- package/srv/blockchain/backends/call-signal.d.ts +7 -0
- package/srv/blockchain/backends/call-signal.js +22 -0
- package/srv/blockchain/backends/cardano-backend.d.ts +100 -189
- package/srv/blockchain/backends/cardano-backend.js +29 -5
- package/srv/blockchain/backends/koios-backend.d.ts +108 -170
- package/srv/blockchain/backends/koios-backend.js +488 -482
- package/srv/blockchain/backends/odatano-backend.d.ts +55 -0
- package/srv/blockchain/backends/odatano-backend.js +211 -0
- package/srv/blockchain/backends/ogmios-backend.d.ts +122 -190
- package/srv/blockchain/backends/ogmios-backend.js +683 -327
- package/srv/blockchain/backends/ogmios-frame-guard.d.ts +14 -0
- package/srv/blockchain/backends/ogmios-frame-guard.js +89 -0
- package/srv/blockchain/cardano-client.d.ts +71 -241
- package/srv/blockchain/cardano-client.js +354 -322
- package/srv/blockchain/cardano-indexer.d.ts +295 -283
- package/srv/blockchain/cardano-indexer.js +1690 -502
- package/srv/blockchain/cardano-tx-builder.d.ts +25 -89
- package/srv/blockchain/cardano-tx-builder.js +164 -140
- package/srv/blockchain/circuit-breaker.d.ts +2 -13
- package/srv/blockchain/circuit-breaker.js +11 -15
- package/srv/blockchain/crawler/account-snapshots.d.ts +29 -0
- package/srv/blockchain/crawler/account-snapshots.js +173 -0
- package/srv/blockchain/crawler/asset-decimals-backfill.d.ts +17 -0
- package/srv/blockchain/crawler/asset-decimals-backfill.js +56 -0
- package/srv/blockchain/crawler/asset-registry-backfill.d.ts +46 -0
- package/srv/blockchain/crawler/asset-registry-backfill.js +157 -0
- package/srv/blockchain/crawler/asset-slice-backfill.d.ts +35 -0
- package/srv/blockchain/crawler/asset-slice-backfill.js +149 -0
- package/srv/blockchain/crawler/certificate-backfill.d.ts +56 -0
- package/srv/blockchain/crawler/certificate-backfill.js +174 -0
- package/srv/blockchain/crawler/crawler.d.ts +125 -81
- package/srv/blockchain/crawler/crawler.js +738 -167
- package/srv/blockchain/crawler/credential-backfill.d.ts +30 -0
- package/srv/blockchain/crawler/credential-backfill.js +101 -0
- package/srv/blockchain/crawler/hooks.d.ts +2 -17
- package/srv/blockchain/crawler/index.d.ts +1 -8
- package/srv/blockchain/crawler/index.js +31 -17
- package/srv/blockchain/crawler/input-asset-copies.d.ts +34 -0
- package/srv/blockchain/crawler/input-asset-copies.js +161 -0
- package/srv/blockchain/crawler/key-pages.d.ts +12 -0
- package/srv/blockchain/crawler/key-pages.js +48 -0
- package/srv/blockchain/crawler/metadata-position-backfill.d.ts +22 -0
- package/srv/blockchain/crawler/metadata-position-backfill.js +59 -0
- package/srv/blockchain/crawler/output-datum-backfill.d.ts +41 -0
- package/srv/blockchain/crawler/output-datum-backfill.js +100 -0
- package/srv/blockchain/crawler/sync-state.d.ts +31 -47
- package/srv/blockchain/crawler/sync-state.js +135 -128
- package/srv/blockchain/crawler/transaction-backfill.d.ts +46 -0
- package/srv/blockchain/crawler/transaction-backfill.js +271 -0
- package/srv/blockchain/crawler/utxo-set-import.d.ts +66 -0
- package/srv/blockchain/crawler/utxo-set-import.js +399 -0
- package/srv/blockchain/crawler/window-plan.d.ts +31 -0
- package/srv/blockchain/crawler/window-plan.js +59 -0
- package/srv/blockchain/ledger-state.d.ts +62 -0
- package/srv/blockchain/ledger-state.js +521 -0
- package/srv/blockchain/pending-spends.d.ts +16 -0
- package/srv/blockchain/pending-spends.js +81 -0
- package/srv/blockchain/pool-metadata.d.ts +15 -0
- package/srv/blockchain/pool-metadata.js +132 -0
- package/srv/blockchain/request-coalescer.d.ts +2 -16
- package/srv/blockchain/request-coalescer.js +2 -16
- package/srv/blockchain/signing/cose-verifier.d.ts +3 -17
- package/srv/blockchain/signing/cose-verifier.js +146 -70
- package/srv/blockchain/signing/external-signer.d.ts +15 -115
- package/srv/blockchain/signing/external-signer.js +22 -131
- package/srv/blockchain/signing/failed-recheck.d.ts +17 -0
- package/srv/blockchain/signing/failed-recheck.js +135 -0
- package/srv/blockchain/signing/hsm-signer.d.ts +10 -54
- package/srv/blockchain/signing/hsm-signer.js +28 -79
- package/srv/blockchain/signing/landing-proof.d.ts +60 -0
- package/srv/blockchain/signing/landing-proof.js +224 -0
- package/srv/blockchain/signing/signature-verifier.d.ts +9 -47
- package/srv/blockchain/signing/signature-verifier.js +71 -87
- package/srv/blockchain/signing/submission-finalizer.d.ts +37 -45
- package/srv/blockchain/signing/submission-finalizer.js +280 -86
- package/srv/blockchain/stored-chain.d.ts +19 -0
- package/srv/blockchain/stored-chain.js +258 -0
- package/srv/blockchain/transaction-building/buildooor-tx.d.ts +31 -229
- package/srv/blockchain/transaction-building/buildooor-tx.js +663 -421
- package/srv/blockchain/transaction-building/cardano-tx.d.ts +9 -37
- package/srv/blockchain/transaction-presence.d.ts +12 -0
- package/srv/blockchain/transaction-presence.js +29 -0
- package/srv/blockchain/transaction-rows.d.ts +12 -0
- package/srv/blockchain/transaction-rows.js +44 -0
- package/srv/blockchain/wallet-worker/build-request.d.ts +8 -23
- package/srv/blockchain/wallet-worker/build-request.js +40 -353
- package/srv/blockchain/wallet-worker/confirmation-tracker.d.ts +27 -47
- package/srv/blockchain/wallet-worker/confirmation-tracker.js +158 -61
- package/srv/blockchain/wallet-worker/index.d.ts +1 -1
- package/srv/blockchain/wallet-worker/index.js +3 -11
- package/srv/blockchain/wallet-worker/invalidation.d.ts +35 -0
- package/srv/blockchain/wallet-worker/invalidation.js +128 -0
- package/srv/blockchain/wallet-worker/job-store.d.ts +58 -150
- package/srv/blockchain/wallet-worker/job-store.js +200 -273
- package/srv/blockchain/wallet-worker/lease-heartbeat.d.ts +2 -26
- package/srv/blockchain/wallet-worker/lease-heartbeat.js +6 -28
- package/srv/blockchain/wallet-worker/signers.d.ts +5 -24
- package/srv/blockchain/wallet-worker/signers.js +4 -12
- package/srv/blockchain/wallet-worker/wallet-worker.d.ts +29 -82
- package/srv/blockchain/wallet-worker/wallet-worker.js +334 -198
- package/srv/cardano-agent-service.cds +122 -84
- package/srv/cardano-agent-service.js +12 -9
- package/srv/cardano-backend-service.cds +81 -0
- package/srv/cardano-backend-service.d.ts +2 -0
- package/srv/cardano-backend-service.js +259 -0
- package/srv/cardano-indexer-service.cds +393 -18
- package/srv/cardano-indexer-service.d.ts +5 -1
- package/srv/cardano-indexer-service.js +477 -16
- package/srv/cardano-service.cds +426 -269
- package/srv/cardano-service.js +640 -217
- package/srv/cardano-sign-service.cds +211 -180
- package/srv/cardano-sign-service.js +210 -287
- package/srv/cardano-tx-service.cds +462 -370
- package/srv/cardano-tx-service.js +283 -800
- package/srv/cardano-ui.cds +16 -16
- package/srv/cardano-worker-service.cds +141 -125
- package/srv/cardano-worker-service.js +104 -61
- package/srv/cbor/cip68.d.ts +13 -0
- package/srv/cbor/cip68.js +56 -0
- package/srv/cbor/index.d.ts +3 -1
- package/srv/cbor/index.js +9 -1
- package/srv/cbor/parse.d.ts +30 -18
- package/srv/cbor/parse.js +44 -9
- package/srv/cbor/plutus-data-json.d.ts +20 -0
- package/srv/cbor/plutus-data-json.js +32 -0
- package/srv/config.d.ts +117 -0
- package/srv/config.js +419 -0
- package/srv/server.d.ts +15 -110
- package/srv/server.js +83 -405
- package/srv/utils/agent-access.d.ts +11 -0
- package/srv/utils/agent-access.js +86 -0
- package/srv/utils/agent-grants-config.d.ts +0 -46
- package/srv/utils/agent-grants-config.js +17 -85
- package/srv/utils/agent-grants.d.ts +106 -122
- package/srv/utils/agent-grants.js +538 -237
- package/srv/utils/agent-token-auth.d.ts +4 -99
- package/srv/utils/agent-token-auth.js +62 -186
- package/srv/utils/backend-request-handler.d.ts +3 -17
- package/srv/utils/backend-request-handler.js +3 -18
- package/srv/utils/build-request.d.ts +52 -0
- package/srv/utils/build-request.js +487 -0
- package/srv/utils/collections.d.ts +4 -10
- package/srv/utils/collections.js +14 -10
- package/srv/utils/const.d.ts +32 -75
- package/srv/utils/const.js +40 -80
- package/srv/utils/crypto.d.ts +3 -12
- package/srv/utils/crypto.js +11 -25
- package/srv/utils/db-indexes.d.ts +31 -0
- package/srv/utils/db-indexes.js +185 -0
- package/srv/utils/db-kind.d.ts +23 -0
- package/srv/utils/db-kind.js +42 -0
- package/srv/utils/db-sanitize.d.ts +20 -0
- package/srv/utils/db-sanitize.js +80 -0
- package/srv/utils/deep-json.d.ts +6 -0
- package/srv/utils/deep-json.js +240 -0
- package/srv/utils/detached-run.d.ts +41 -0
- package/srv/utils/detached-run.js +101 -0
- package/srv/utils/epoch-slots.d.ts +14 -0
- package/srv/utils/epoch-slots.js +45 -0
- package/srv/utils/error-codes.d.ts +26 -75
- package/srv/utils/error-codes.js +27 -72
- package/srv/utils/errors.d.ts +55 -187
- package/srv/utils/errors.js +161 -235
- package/srv/utils/lease.d.ts +20 -0
- package/srv/utils/lease.js +62 -0
- package/srv/utils/liveness.d.ts +12 -0
- package/srv/utils/liveness.js +35 -0
- package/srv/utils/mappers.d.ts +111 -223
- package/srv/utils/mappers.js +432 -371
- package/srv/utils/navigation.d.ts +17 -0
- package/srv/utils/navigation.js +52 -0
- package/srv/utils/network-context.d.ts +0 -1
- package/srv/utils/network-context.js +9 -15
- package/srv/utils/paging.d.ts +31 -0
- package/srv/utils/paging.js +43 -0
- package/srv/utils/pg-inline-json.d.ts +8 -0
- package/srv/utils/pg-inline-json.js +58 -0
- package/srv/utils/pg-order-nulls.d.ts +14 -0
- package/srv/utils/pg-order-nulls.js +54 -0
- package/srv/utils/plutus-placeholders.d.ts +16 -22
- package/srv/utils/plutus-placeholders.js +62 -33
- package/srv/utils/rate-limiter.d.ts +2 -21
- package/srv/utils/rate-limiter.js +5 -17
- package/srv/utils/readiness.d.ts +12 -0
- package/srv/utils/readiness.js +29 -0
- package/srv/utils/reference-script.d.ts +19 -0
- package/srv/utils/reference-script.js +84 -0
- package/srv/utils/resolution.d.ts +13 -0
- package/srv/utils/resolution.js +47 -0
- package/srv/utils/result-numbers.d.ts +15 -0
- package/srv/utils/result-numbers.js +61 -0
- package/srv/utils/row-values.d.ts +7 -0
- package/srv/utils/row-values.js +27 -0
- package/srv/utils/service-events.d.ts +0 -24
- package/srv/utils/service-events.js +3 -25
- package/srv/utils/signing-helper.d.ts +3 -20
- package/srv/utils/signing-helper.js +35 -64
- package/srv/utils/tx-build-helper.d.ts +25 -105
- package/srv/utils/tx-build-helper.js +108 -156
- package/srv/utils/tx-request-parsers.d.ts +82 -33
- package/srv/utils/tx-request-parsers.js +401 -49
- package/srv/utils/tx-utils.d.ts +3 -27
- package/srv/utils/tx-utils.js +32 -50
- package/srv/utils/types.d.ts +294 -232
- package/srv/utils/types.js +2 -22
- package/srv/utils/validators.d.ts +22 -92
- package/srv/utils/validators.js +60 -170
package/srv/cardano-service.cds
CHANGED
|
@@ -1,269 +1,426 @@
|
|
|
1
|
-
using {odatano.cardano as db} from '../db/schema';
|
|
2
|
-
using { Blake2b256, Bech32, AssetUnit, ParsedTransaction } from '../db/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@readonly
|
|
41
|
-
@title : '
|
|
42
|
-
@description: 'Projection for
|
|
43
|
-
entity
|
|
44
|
-
|
|
45
|
-
@readonly
|
|
46
|
-
@title : '
|
|
47
|
-
@description: 'Projection for
|
|
48
|
-
entity
|
|
49
|
-
|
|
50
|
-
@readonly
|
|
51
|
-
@title : '
|
|
52
|
-
@description: 'Projection for
|
|
53
|
-
entity
|
|
54
|
-
|
|
55
|
-
@readonly
|
|
56
|
-
@title : '
|
|
57
|
-
@description: 'Projection for
|
|
58
|
-
entity
|
|
59
|
-
|
|
60
|
-
@readonly
|
|
61
|
-
@title : '
|
|
62
|
-
@description: 'Projection for
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
@
|
|
67
|
-
@
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
@
|
|
72
|
-
@
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
@
|
|
77
|
-
@
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
@
|
|
82
|
-
@
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
@
|
|
87
|
-
@
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
@
|
|
102
|
-
@
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
@
|
|
107
|
-
@
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
@
|
|
112
|
-
@
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
@
|
|
117
|
-
@
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
@
|
|
122
|
-
@
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
@
|
|
127
|
-
@
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
@
|
|
132
|
-
@
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
@
|
|
137
|
-
@
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
@
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
@title : '
|
|
148
|
-
@description: '
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
@
|
|
162
|
-
@
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
@
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
@
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
@title : '
|
|
183
|
-
@description: '
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
@title : 'Get
|
|
200
|
-
@description: 'Retrieve
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
@
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
@
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
@
|
|
242
|
-
@
|
|
243
|
-
action
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
@
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
@
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
1
|
+
using {odatano.cardano as db} from '../db/schema';
|
|
2
|
+
using { Blake2b256, Bech32, AssetUnit, ParsedTransaction, TransactionConfirmations } from '../db/types';
|
|
3
|
+
|
|
4
|
+
// Read queries for Cardano chain data. Every operation needs an authenticated user;
|
|
5
|
+
// per-address ownership is not checked (docs/guides/SECURITY_GUIDE.md).
|
|
6
|
+
@requires: 'Read'
|
|
7
|
+
@path: '/odata/v4/cardano'
|
|
8
|
+
service CardanoODataService @(impl: './cardano-service') {
|
|
9
|
+
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
// Entity Projections
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
@readonly
|
|
15
|
+
@title : 'Network Information'
|
|
16
|
+
@description: 'Projection for Network Information'
|
|
17
|
+
entity NetworkInformation as projection on db.NetworkInformation;
|
|
18
|
+
|
|
19
|
+
@readonly
|
|
20
|
+
@title : 'Blocks'
|
|
21
|
+
@description: 'Projection for Blocks'
|
|
22
|
+
// withdrawalsReported is bookkeeping of the crawl, not chain data
|
|
23
|
+
entity Blocks as projection on db.Blocks excluding { withdrawalsReported };
|
|
24
|
+
|
|
25
|
+
@readonly
|
|
26
|
+
@title : 'Epochs'
|
|
27
|
+
@description: 'Projection for Epochs'
|
|
28
|
+
entity Epochs as projection on db.Epochs;
|
|
29
|
+
|
|
30
|
+
@readonly
|
|
31
|
+
@title : 'Pools'
|
|
32
|
+
@description: 'Projection for Pools'
|
|
33
|
+
entity Pools as projection on db.Pools;
|
|
34
|
+
|
|
35
|
+
@readonly
|
|
36
|
+
@title : 'Dreps'
|
|
37
|
+
@description: 'Projection for Dreps'
|
|
38
|
+
entity Dreps as projection on db.Dreps;
|
|
39
|
+
|
|
40
|
+
@readonly
|
|
41
|
+
@title : 'Pool Epoch Snapshots'
|
|
42
|
+
@description: 'Projection for per-epoch stake-pool snapshots written by the chain crawler'
|
|
43
|
+
entity PoolEpochSnapshots as projection on db.PoolEpochSnapshots;
|
|
44
|
+
|
|
45
|
+
@readonly
|
|
46
|
+
@title : 'DRep Epoch Snapshots'
|
|
47
|
+
@description: 'Projection for per-epoch DRep snapshots written by the chain crawler'
|
|
48
|
+
entity DrepEpochSnapshots as projection on db.DrepEpochSnapshots;
|
|
49
|
+
|
|
50
|
+
@readonly
|
|
51
|
+
@title : 'Epoch Ledger Snapshots'
|
|
52
|
+
@description: 'Projection for per-epoch network ledger figures written by the chain crawler'
|
|
53
|
+
entity EpochLedgerSnapshots as projection on db.EpochLedgerSnapshots;
|
|
54
|
+
|
|
55
|
+
@readonly
|
|
56
|
+
@title : 'Account Epoch Snapshots'
|
|
57
|
+
@description: 'Projection for per-epoch reward account snapshots written by the chain crawler'
|
|
58
|
+
entity AccountEpochSnapshots as projection on db.AccountEpochSnapshots;
|
|
59
|
+
|
|
60
|
+
@readonly
|
|
61
|
+
@title : 'Assets'
|
|
62
|
+
@description: 'Projection for Native-Asset Information'
|
|
63
|
+
// firstSeenSlot is bookkeeping of the crawl, not chain data
|
|
64
|
+
entity Assets as projection on db.Assets excluding { firstSeenSlot };
|
|
65
|
+
|
|
66
|
+
@readonly
|
|
67
|
+
@title : 'Asset History'
|
|
68
|
+
@description: 'Projection for Native-Asset Mint/Burn History'
|
|
69
|
+
entity AssetHistory as projection on db.AssetHistory;
|
|
70
|
+
|
|
71
|
+
@readonly
|
|
72
|
+
@title : 'Transactions'
|
|
73
|
+
@description: 'Projection for Transactions'
|
|
74
|
+
entity Transactions as projection on db.Transactions;
|
|
75
|
+
|
|
76
|
+
@readonly
|
|
77
|
+
@title : 'Transaction Inputs'
|
|
78
|
+
@description: 'Projection for Transaction Inputs'
|
|
79
|
+
entity TransactionInputs as projection on db.TransactionInputs;
|
|
80
|
+
|
|
81
|
+
@readonly
|
|
82
|
+
@title : 'Transaction Outputs'
|
|
83
|
+
@description: 'Projection for Transaction Outputs'
|
|
84
|
+
entity TransactionOutputs as projection on db.TransactionOutputs;
|
|
85
|
+
|
|
86
|
+
@readonly
|
|
87
|
+
@title : 'Transaction Input Assets'
|
|
88
|
+
@description: 'Projection for Transaction Input Assets'
|
|
89
|
+
entity TransactionInputAssets as
|
|
90
|
+
select from db.TransactionInputAssets
|
|
91
|
+
mixin {
|
|
92
|
+
input : Association to TransactionInputs
|
|
93
|
+
on input.txSeq = $projection.input_txSeq
|
|
94
|
+
and input.inputIndex = $projection.input_inputIndex;
|
|
95
|
+
}
|
|
96
|
+
into {
|
|
97
|
+
*,
|
|
98
|
+
input
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
@readonly
|
|
102
|
+
@title : 'Transaction Output Assets'
|
|
103
|
+
@description: 'Projection for Transaction Output Assets'
|
|
104
|
+
entity TransactionOutputAssets as projection on db.TransactionOutputAssets;
|
|
105
|
+
|
|
106
|
+
@readonly
|
|
107
|
+
@title : 'Transaction Certificates'
|
|
108
|
+
@description: 'Projection for Transaction Certificates (crawler-fed, crawler.certificates)'
|
|
109
|
+
entity TransactionCertificates as projection on db.TransactionCertificates;
|
|
110
|
+
|
|
111
|
+
@readonly
|
|
112
|
+
@title : 'Transaction Withdrawals'
|
|
113
|
+
@description: 'Projection for Transaction Withdrawals (crawler-fed, crawler.certificates)'
|
|
114
|
+
entity TransactionWithdrawals as projection on db.TransactionWithdrawals;
|
|
115
|
+
|
|
116
|
+
@readonly
|
|
117
|
+
@title : 'Transaction Redeemers'
|
|
118
|
+
@description: 'Projection for Transaction Redeemers (crawler-fed, Ogmios chain-sync)'
|
|
119
|
+
entity TransactionRedeemers as projection on db.TransactionRedeemers;
|
|
120
|
+
|
|
121
|
+
@readonly
|
|
122
|
+
@title : 'Transaction Datums'
|
|
123
|
+
@description: 'Projection for Transaction Datums (crawler-fed, Ogmios chain-sync): witness-set datums byte for byte'
|
|
124
|
+
entity TransactionDatums as projection on db.TransactionDatums;
|
|
125
|
+
|
|
126
|
+
@readonly
|
|
127
|
+
@title : 'Ledger UTxOs'
|
|
128
|
+
@description: 'Crawler-maintained UTxO set (crawler.utxoSet); unspent while spentTxHash is null'
|
|
129
|
+
entity LedgerUTxOs as projection on db.LedgerUTxOs;
|
|
130
|
+
|
|
131
|
+
@readonly
|
|
132
|
+
@title : 'Ledger UTxO Assets'
|
|
133
|
+
@description: 'Native assets of a LedgerUTxOs row'
|
|
134
|
+
entity LedgerUTxOAssets as projection on db.LedgerUTxOAssets;
|
|
135
|
+
|
|
136
|
+
@readonly
|
|
137
|
+
@title : 'Ledger Addresses'
|
|
138
|
+
@description: 'Per-address balances from the crawler-maintained UTxO set (crawler.utxoSet)'
|
|
139
|
+
entity LedgerAddresses as projection on db.LedgerAddresses;
|
|
140
|
+
|
|
141
|
+
@readonly
|
|
142
|
+
@title : 'Ledger Address Assets'
|
|
143
|
+
@description: 'Native-asset balances per address (crawler.utxoSet)'
|
|
144
|
+
entity LedgerAddressAssets as projection on db.LedgerAddressAssets;
|
|
145
|
+
|
|
146
|
+
@readonly
|
|
147
|
+
@title : 'Ledger Accounts'
|
|
148
|
+
@description: 'Per-stake-key balances from the crawler-maintained UTxO set (crawler.utxoSet)'
|
|
149
|
+
entity LedgerAccounts as projection on db.LedgerAccounts;
|
|
150
|
+
|
|
151
|
+
@readonly
|
|
152
|
+
@title : 'Accounts'
|
|
153
|
+
@description: 'Projection for Accounts'
|
|
154
|
+
entity Accounts as projection on db.Accounts excluding { addressList };
|
|
155
|
+
|
|
156
|
+
@readonly
|
|
157
|
+
@title : 'Addresses'
|
|
158
|
+
@description: 'Projection for Addresses'
|
|
159
|
+
entity Addresses as projection on db.Addresses;
|
|
160
|
+
|
|
161
|
+
@readonly
|
|
162
|
+
@title : 'Address Assets'
|
|
163
|
+
@description: 'Projection for Address Assets'
|
|
164
|
+
entity AddressAssets as projection on db.AddressAssets;
|
|
165
|
+
|
|
166
|
+
@readonly
|
|
167
|
+
@title : 'Address UTxOs'
|
|
168
|
+
@description: 'Projection for Address UTxOs'
|
|
169
|
+
entity AddressUTxOs as projection on db.AddressUTxOs;
|
|
170
|
+
|
|
171
|
+
@readonly
|
|
172
|
+
@title : 'Address Transactions'
|
|
173
|
+
@description: 'Projection for Address Transactions'
|
|
174
|
+
entity AddressTransactions as projection on db.AddressTransactions;
|
|
175
|
+
|
|
176
|
+
@readonly
|
|
177
|
+
@title : 'UTxO Assets'
|
|
178
|
+
@description: 'Projection for UTxO Assets'
|
|
179
|
+
entity UTxOAssets as projection on db.UTxOAssets;
|
|
180
|
+
|
|
181
|
+
@readonly
|
|
182
|
+
@title : 'Transaction Metadata'
|
|
183
|
+
@description: 'Projection for Transaction Metadata'
|
|
184
|
+
entity TransactionMetadata as projection on db.TransactionMetadata;
|
|
185
|
+
|
|
186
|
+
@readonly
|
|
187
|
+
@title : 'Ledger Protocol Parameters'
|
|
188
|
+
@description: 'Projection for Ledger Protocol Parameters'
|
|
189
|
+
entity LedgerProtocolParameters as projection on db.LedgerProtocolParameters;
|
|
190
|
+
|
|
191
|
+
// ---------------------------------------------------------------------------
|
|
192
|
+
// Actions
|
|
193
|
+
// ---------------------------------------------------------------------------
|
|
194
|
+
@title : 'Get Network Information'
|
|
195
|
+
@description: 'Retrieve current network information including network type and genesis hash'
|
|
196
|
+
@odatano.agent: 'read'
|
|
197
|
+
action GetNetworkInformation() returns NetworkInformation;
|
|
198
|
+
|
|
199
|
+
@title : 'Get Blocks by Block Hash'
|
|
200
|
+
@description: 'Retrieve block information using the Block Hash'
|
|
201
|
+
@odatano.agent: 'read'
|
|
202
|
+
action GetBlockByHash(
|
|
203
|
+
@title: 'Block Hash'
|
|
204
|
+
@description: 'The unique identifier of the block'
|
|
205
|
+
hash: Blake2b256) returns Blocks;
|
|
206
|
+
|
|
207
|
+
@title : 'Get Epochs by Epoch Number'
|
|
208
|
+
@description: 'Retrieve epoch information using the Epoch Number'
|
|
209
|
+
@odatano.agent: 'read'
|
|
210
|
+
action GetEpochByNumber(
|
|
211
|
+
@title: 'Epoch Number'
|
|
212
|
+
@description: 'The sequential number of the epoch'
|
|
213
|
+
@assert.range: [0, _]
|
|
214
|
+
epochNumber: Integer) returns Epochs;
|
|
215
|
+
|
|
216
|
+
@title : 'Get Pools by Pool Id'
|
|
217
|
+
@description: 'Retrieve pool information using the Pool Id'
|
|
218
|
+
@odatano.agent: 'read'
|
|
219
|
+
action GetPoolById(
|
|
220
|
+
@title: 'Pool Id'
|
|
221
|
+
@description: 'The unique identifier of the stake pool'
|
|
222
|
+
poolId: String) returns Pools;
|
|
223
|
+
|
|
224
|
+
@title : 'Get Dreps by Drep Id'
|
|
225
|
+
@description: 'Retrieve drep information using the Drep Id'
|
|
226
|
+
@odatano.agent: 'read'
|
|
227
|
+
action GetDrepById(
|
|
228
|
+
@title: 'Drep Id'
|
|
229
|
+
@description: 'The unique identifier of the drep'
|
|
230
|
+
drepId: String) returns Dreps;
|
|
231
|
+
|
|
232
|
+
@title : 'Get Asset Info'
|
|
233
|
+
@description: 'Retrieve native-asset information (supply, mint history, CIP-25 + CIP-26 metadata) by unit. Multi-backend (Blockfrost, Koios). Field availability differs slightly per backend; see entity description.'
|
|
234
|
+
@odatano.agent: 'read'
|
|
235
|
+
action GetAssetInfo(
|
|
236
|
+
@title: 'Asset Unit'
|
|
237
|
+
@description: 'Concatenation of policyId (56 hex) and assetNameHex (0-64 hex; ledger caps asset names at 32 bytes)'
|
|
238
|
+
unit: AssetUnit) returns Assets;
|
|
239
|
+
|
|
240
|
+
@title : 'Get Asset Mint/Burn History'
|
|
241
|
+
@description: 'Retrieve recent mint/burn events for a native asset, newest first. Koios is preferred (provides block timestamps); Blockfrost is the fallback (timestamps null). Always-fresh fetch, UPSERTs entries by (unit, txHash). skip + limit covers at most the newest 100 events; older events are read from the AssetHistory entity with $top/$skip.'
|
|
242
|
+
@odatano.agent: 'read'
|
|
243
|
+
action GetAssetHistory(
|
|
244
|
+
@title: 'Asset Unit'
|
|
245
|
+
@description: 'Concatenation of policyId (56 hex) and assetNameHex (0-64 hex; ledger caps asset names at 32 bytes)'
|
|
246
|
+
unit: AssetUnit,
|
|
247
|
+
@title: 'Limit'
|
|
248
|
+
@description: 'Maximum number of rows (default 100, at most 100)'
|
|
249
|
+
@assert.range: [1, 100]
|
|
250
|
+
limit: Integer,
|
|
251
|
+
@title: 'Skip'
|
|
252
|
+
@description: 'Number of rows to skip (default 0)'
|
|
253
|
+
@assert.range: [0, 99]
|
|
254
|
+
skip: Integer) returns many AssetHistory;
|
|
255
|
+
|
|
256
|
+
@title : 'Get Accounts by Stake Address'
|
|
257
|
+
@description: 'Retrieve account information using the Bech32 Stake Address'
|
|
258
|
+
@odatano.agent: 'read'
|
|
259
|
+
action GetAccountByStakeAddress(
|
|
260
|
+
@title: 'Stake Address'
|
|
261
|
+
@description: 'The Bech32 encoded stake address'
|
|
262
|
+
stakeAddress: Bech32) returns Accounts;
|
|
263
|
+
|
|
264
|
+
@title : 'Get Transactions by Tx Hash'
|
|
265
|
+
@description: 'Retrieve transaction information using the Transaction Hash'
|
|
266
|
+
@odatano.agent: 'read'
|
|
267
|
+
action GetTransactionByHash(
|
|
268
|
+
@title: 'Transaction Hash'
|
|
269
|
+
@description: 'The unique identifier of the transaction'
|
|
270
|
+
hash: Blake2b256) returns Transactions;
|
|
271
|
+
|
|
272
|
+
@title : 'Get Transaction Confirmations'
|
|
273
|
+
@description: 'Number of blocks on top of a transaction, its own block included; 0 while it is not on chain. Uses the crawled chain when the crawler is synced, else the backends.'
|
|
274
|
+
@odatano.agent: 'read'
|
|
275
|
+
action GetTransactionConfirmations(
|
|
276
|
+
@title: 'Transaction Hash'
|
|
277
|
+
@description: 'The unique identifier of the transaction'
|
|
278
|
+
txHash: Blake2b256) returns TransactionConfirmations;
|
|
279
|
+
|
|
280
|
+
@title : 'Get Transaction Metadata by Tx Hash'
|
|
281
|
+
@description: 'Retrieve transaction metadata using the Transaction Hash'
|
|
282
|
+
@odatano.agent: 'read'
|
|
283
|
+
action GetMetadataByTxHash(
|
|
284
|
+
@title: 'Transaction Hash'
|
|
285
|
+
@description: 'The unique identifier of the transaction'
|
|
286
|
+
txHash: Blake2b256,
|
|
287
|
+
@title: 'Limit'
|
|
288
|
+
@description: 'Maximum number of rows (default 1000, at most 5000)'
|
|
289
|
+
@assert.range: [1, 5000]
|
|
290
|
+
limit: Integer,
|
|
291
|
+
@title: 'Skip'
|
|
292
|
+
@description: 'Number of rows to skip (default 0)'
|
|
293
|
+
@assert.range: [0, _]
|
|
294
|
+
skip: Integer) returns many TransactionMetadata;
|
|
295
|
+
|
|
296
|
+
@title : 'Get Transaction Metadata by Label'
|
|
297
|
+
@description: 'Stored transaction metadata of one label in chain order, oldest first: the metadata of crawled transactions and of transactions read earlier. No backend is asked. Each row carries txSeq (slot * 65536 + txIndex); read on from a slot with fromSlot, or page with skip.'
|
|
298
|
+
@odatano.agent: 'read'
|
|
299
|
+
action GetMetadataByLabel(
|
|
300
|
+
@title: 'Label'
|
|
301
|
+
@description: 'The metadata label, an unsigned 64-bit integer as string'
|
|
302
|
+
label: String(20),
|
|
303
|
+
@title: 'From Slot'
|
|
304
|
+
@description: 'Only transactions in this slot or later (default 0)'
|
|
305
|
+
@assert.range: [0, _]
|
|
306
|
+
fromSlot: Integer64,
|
|
307
|
+
@title: 'Limit'
|
|
308
|
+
@description: 'Maximum number of rows (default 100, at most 1000)'
|
|
309
|
+
@assert.range: [1, 1000]
|
|
310
|
+
limit: Integer,
|
|
311
|
+
@title: 'Skip'
|
|
312
|
+
@description: 'Number of rows to skip (default 0)'
|
|
313
|
+
@assert.range: [0, _]
|
|
314
|
+
skip: Integer) returns many TransactionMetadata;
|
|
315
|
+
|
|
316
|
+
@title : 'Get Addresses by Bech32 Address'
|
|
317
|
+
@description: 'Retrieve address information using the Bech32 Address'
|
|
318
|
+
@odatano.agent: 'read'
|
|
319
|
+
action GetAddressByBech32(
|
|
320
|
+
@title: 'Bech32 Address'
|
|
321
|
+
@description: 'The Bech32 encoded address'
|
|
322
|
+
address: Bech32) returns Addresses;
|
|
323
|
+
|
|
324
|
+
@title : 'Get UTxOs by Bech32 Address'
|
|
325
|
+
@description: 'Retrieve UTxO information using the Bech32 Address'
|
|
326
|
+
@odatano.agent: 'read'
|
|
327
|
+
action GetUTxOsByAddress(
|
|
328
|
+
@title: 'Bech32 Address'
|
|
329
|
+
@description: 'The Bech32 encoded address'
|
|
330
|
+
address: Bech32,
|
|
331
|
+
@title: 'Limit'
|
|
332
|
+
@description: 'Maximum number of rows (default 1000, at most 5000)'
|
|
333
|
+
@assert.range: [1, 5000]
|
|
334
|
+
limit: Integer,
|
|
335
|
+
@title: 'Skip'
|
|
336
|
+
@description: 'Number of rows to skip (default 0)'
|
|
337
|
+
@assert.range: [0, _]
|
|
338
|
+
skip: Integer) returns many AddressUTxOs;
|
|
339
|
+
|
|
340
|
+
@title : 'Get UTxOs by Payment Credential'
|
|
341
|
+
@description: 'Retrieve UTxOs across all bech32 addresses sharing the given 28-byte payment credential (key hash or script hash). Useful for protocols that write to multiple bech32 forms of the same script (e.g. Indigo CDPs, Liqwid positions). Served from the crawled UTxO set (crawler.utxoSet active and synced) with outputs read from the node at the tip, else from Koios; throws ProviderUnavailableError when neither is available. Always fresh, no cache check.'
|
|
342
|
+
@odatano.agent: 'read'
|
|
343
|
+
action GetUTxOsByCredential(
|
|
344
|
+
@title: 'Payment Credential'
|
|
345
|
+
@description: '28-byte payment credential hash as 56-char lowercase hex string'
|
|
346
|
+
credential: String,
|
|
347
|
+
@title: 'Limit'
|
|
348
|
+
@description: 'Maximum number of rows (default 1000, at most 5000)'
|
|
349
|
+
@assert.range: [1, 5000]
|
|
350
|
+
limit: Integer,
|
|
351
|
+
@title: 'Skip'
|
|
352
|
+
@description: 'Number of rows to skip (default 0)'
|
|
353
|
+
@assert.range: [0, _]
|
|
354
|
+
skip: Integer) returns many AddressUTxOs;
|
|
355
|
+
|
|
356
|
+
@title : 'Get Assets by Bech32 Address'
|
|
357
|
+
@description: 'Retrieve asset information using the Bech32 Address'
|
|
358
|
+
@odatano.agent: 'read'
|
|
359
|
+
action GetAssetsByAddress(
|
|
360
|
+
@title: 'Bech32 Address'
|
|
361
|
+
@description: 'The Bech32 encoded address'
|
|
362
|
+
address: Bech32,
|
|
363
|
+
@title: 'Limit'
|
|
364
|
+
@description: 'Maximum number of rows (default 1000, at most 5000)'
|
|
365
|
+
@assert.range: [1, 5000]
|
|
366
|
+
limit: Integer,
|
|
367
|
+
@title: 'Skip'
|
|
368
|
+
@description: 'Number of rows to skip (default 0)'
|
|
369
|
+
@assert.range: [0, _]
|
|
370
|
+
skip: Integer) returns many AddressAssets;
|
|
371
|
+
|
|
372
|
+
@title : 'Get latest Transactions by Bech32 Address'
|
|
373
|
+
@description: 'Retrieve the latest transactions of the Bech32 Address, newest first. skip + limit covers at most the newest 100 transactions.'
|
|
374
|
+
@odatano.agent: 'read'
|
|
375
|
+
action GetLatestTransactionsByAddress(
|
|
376
|
+
@title: 'Bech32 Address'
|
|
377
|
+
@description: 'The Bech32 encoded address'
|
|
378
|
+
address: Bech32,
|
|
379
|
+
@title: 'Limit'
|
|
380
|
+
@description: 'Maximum number of rows (default 10, at most 100)'
|
|
381
|
+
@assert.range: [1, 100]
|
|
382
|
+
limit: Integer,
|
|
383
|
+
@title: 'Skip'
|
|
384
|
+
@description: 'Number of rows to skip (default 0)'
|
|
385
|
+
@assert.range: [0, 99]
|
|
386
|
+
skip: Integer,
|
|
387
|
+
@title: 'Since Time'
|
|
388
|
+
@description: 'Only transactions with a block time after this unix time in seconds'
|
|
389
|
+
@assert.range: [0, _]
|
|
390
|
+
sinceTime: Integer64,
|
|
391
|
+
@title: 'Wait (ms)'
|
|
392
|
+
@description: 'With sinceTime: when no newer transaction is known, read again every 5 seconds until one appears or this time is up (at most 30000)'
|
|
393
|
+
@assert.range: [0, 30000]
|
|
394
|
+
waitMs: Integer) returns many AddressTransactions;
|
|
395
|
+
|
|
396
|
+
@title : 'Get Latest Block'
|
|
397
|
+
@description: 'Retrieve the latest block information'
|
|
398
|
+
@odatano.agent: 'read'
|
|
399
|
+
action GetLatestBlock() returns Blocks;
|
|
400
|
+
|
|
401
|
+
@title : 'Get Latest Epoch'
|
|
402
|
+
@description: 'Retrieve the latest epoch information'
|
|
403
|
+
@odatano.agent: 'read'
|
|
404
|
+
action GetLatestEpoch() returns Epochs;
|
|
405
|
+
|
|
406
|
+
@title : 'Get Ledger Protocol Parameters'
|
|
407
|
+
@description: 'Retrieve the current ledger protocol parameters'
|
|
408
|
+
@odatano.agent: 'read'
|
|
409
|
+
action GetLedgerProtocolParameters() returns LedgerProtocolParameters;
|
|
410
|
+
|
|
411
|
+
@title : 'Parse Transaction CBOR'
|
|
412
|
+
@description: 'Parse hex-encoded transaction CBOR (signed or unsigned) into structured fields. Pure function, no network call, no DB write.'
|
|
413
|
+
@odatano.agent: 'read'
|
|
414
|
+
action ParseTransactionCbor(
|
|
415
|
+
@title: 'Transaction CBOR'
|
|
416
|
+
@description: 'Hex-encoded transaction CBOR; signed or unsigned. At most 65536 hex characters (32 KiB).'
|
|
417
|
+
cbor: LargeString) returns ParsedTransaction;
|
|
418
|
+
|
|
419
|
+
@title : 'Decode Plutus Data'
|
|
420
|
+
@description: 'Decode PlutusData CBOR hex (an inline datum, a witness datum, a redeemer) into the JSON the build actions accept as outputDatumJson (DetailedSchema: constructor/fields, int, bytes, list, map). Integers beyond 2^53 are decimal strings. Pure function, no network call, no DB write.'
|
|
421
|
+
@odatano.agent: 'read'
|
|
422
|
+
action DecodePlutusData(
|
|
423
|
+
@title: 'PlutusData CBOR'
|
|
424
|
+
@description: 'Hex-encoded PlutusData CBOR. At most 65536 hex characters (32 KiB).'
|
|
425
|
+
cbor: LargeString) returns LargeString;
|
|
426
|
+
}
|