@odatano/core 2.0.0-rc.3 → 2.0.0-rc.30
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 +251 -0
- package/@cds-models/CardanoAgentService/index.js +36 -0
- package/@cds-models/CardanoBackendService/index.d.ts +357 -0
- package/@cds-models/CardanoBackendService/index.js +40 -0
- package/@cds-models/CardanoIndexerService/index.d.ts +194 -2
- package/@cds-models/CardanoIndexerService/index.js +25 -0
- package/@cds-models/CardanoODataService/index.d.ts +294 -7
- package/@cds-models/CardanoODataService/index.js +33 -0
- package/@cds-models/CardanoSignService/index.d.ts +28 -3
- package/@cds-models/CardanoSignService/index.js +3 -0
- package/@cds-models/CardanoTransactionService/index.d.ts +52 -19
- package/@cds-models/CardanoTransactionService/index.js +4 -0
- package/@cds-models/index.d.ts +18 -0
- package/@cds-models/index.js +3 -0
- package/@cds-models/odatano/cardano/index.d.ts +408 -7
- package/@cds-models/odatano/cardano/index.js +42 -0
- package/README.md +64 -5
- package/db/schema.cds +677 -13
- package/db/types.cds +27 -0
- package/package.json +182 -173
- package/scripts/migrate-slot-leader.mjs +104 -0
- package/scripts/migrate-txseq.mjs +147 -0
- package/src/index.d.ts +11 -10
- package/src/index.js +28 -14
- package/src/plugin.js +39 -52
- package/srv/blockchain/backends/blockfrost-backend.d.ts +29 -131
- package/srv/blockchain/backends/blockfrost-backend.js +49 -160
- package/srv/blockchain/backends/cardano-backend.d.ts +104 -158
- package/srv/blockchain/backends/cardano-backend.js +19 -5
- package/srv/blockchain/backends/koios-backend.d.ts +126 -60
- package/srv/blockchain/backends/koios-backend.js +356 -217
- package/srv/blockchain/backends/odatano-backend.d.ts +64 -0
- package/srv/blockchain/backends/odatano-backend.js +170 -0
- package/srv/blockchain/backends/ogmios-backend.d.ts +162 -94
- package/srv/blockchain/backends/ogmios-backend.js +548 -197
- package/srv/blockchain/backends/ogmios-frame-guard.d.ts +32 -0
- package/srv/blockchain/backends/ogmios-frame-guard.js +142 -0
- package/srv/blockchain/cardano-client.d.ts +78 -205
- package/srv/blockchain/cardano-client.js +186 -242
- package/srv/blockchain/cardano-indexer.d.ts +302 -242
- package/srv/blockchain/cardano-indexer.js +1191 -362
- package/srv/blockchain/cardano-tx-builder.d.ts +43 -81
- package/srv/blockchain/cardano-tx-builder.js +177 -132
- package/srv/blockchain/crawler/certificate-backfill.d.ts +67 -0
- package/srv/blockchain/crawler/certificate-backfill.js +169 -0
- package/srv/blockchain/crawler/crawler.d.ts +139 -54
- package/srv/blockchain/crawler/crawler.js +478 -96
- package/srv/blockchain/crawler/hooks.d.ts +3 -14
- package/srv/blockchain/crawler/index.d.ts +5 -0
- package/srv/blockchain/crawler/index.js +35 -7
- package/srv/blockchain/crawler/sync-state.d.ts +46 -28
- package/srv/blockchain/crawler/sync-state.js +128 -43
- package/srv/blockchain/crawler/transaction-backfill.d.ts +52 -0
- package/srv/blockchain/crawler/transaction-backfill.js +283 -0
- package/srv/blockchain/crawler/utxo-set-import.d.ts +78 -0
- package/srv/blockchain/crawler/utxo-set-import.js +363 -0
- package/srv/blockchain/ledger-state.d.ts +101 -0
- package/srv/blockchain/ledger-state.js +432 -0
- package/srv/blockchain/pending-spends.d.ts +28 -0
- package/srv/blockchain/pending-spends.js +89 -0
- package/srv/blockchain/signing/cose-verifier.d.ts +5 -12
- package/srv/blockchain/signing/cose-verifier.js +6 -12
- package/srv/blockchain/signing/external-signer.d.ts +16 -113
- package/srv/blockchain/signing/external-signer.js +19 -122
- package/srv/blockchain/signing/hsm-signer.d.ts +13 -45
- package/srv/blockchain/signing/hsm-signer.js +23 -63
- package/srv/blockchain/signing/signature-verifier.d.ts +8 -44
- package/srv/blockchain/signing/signature-verifier.js +13 -54
- package/srv/blockchain/signing/submission-finalizer.d.ts +9 -36
- package/srv/blockchain/signing/submission-finalizer.js +16 -49
- package/srv/blockchain/stored-chain.d.ts +33 -0
- package/srv/blockchain/stored-chain.js +234 -0
- package/srv/blockchain/transaction-building/buildooor-tx.d.ts +108 -160
- package/srv/blockchain/transaction-building/buildooor-tx.js +620 -285
- package/srv/blockchain/transaction-building/caller-datums.d.ts +17 -0
- package/srv/blockchain/transaction-building/caller-datums.js +50 -0
- package/srv/blockchain/transaction-building/cardano-tx.d.ts +10 -35
- package/srv/blockchain/transaction-rows.d.ts +12 -0
- package/srv/blockchain/transaction-rows.js +43 -0
- package/srv/blockchain/wallet-worker/build-request.d.ts +4 -17
- package/srv/blockchain/wallet-worker/build-request.js +48 -24
- package/srv/blockchain/wallet-worker/confirmation-tracker.d.ts +25 -17
- package/srv/blockchain/wallet-worker/confirmation-tracker.js +87 -41
- package/srv/blockchain/wallet-worker/index.js +2 -8
- package/srv/blockchain/wallet-worker/job-store.d.ts +36 -103
- package/srv/blockchain/wallet-worker/job-store.js +0 -0
- package/srv/blockchain/wallet-worker/lease-heartbeat.d.ts +4 -20
- package/srv/blockchain/wallet-worker/lease-heartbeat.js +4 -20
- package/srv/blockchain/wallet-worker/signers.d.ts +6 -19
- package/srv/blockchain/wallet-worker/signers.js +3 -8
- package/srv/blockchain/wallet-worker/wallet-worker.d.ts +15 -71
- package/srv/blockchain/wallet-worker/wallet-worker.js +40 -91
- package/srv/cardano-agent-service.cds +146 -0
- package/srv/cardano-agent-service.d.ts +2 -0
- package/srv/cardano-agent-service.js +12 -0
- package/srv/cardano-backend-service.cds +52 -0
- package/srv/cardano-backend-service.d.ts +2 -0
- package/srv/cardano-backend-service.js +244 -0
- package/srv/cardano-indexer-service.cds +201 -73
- package/srv/cardano-indexer-service.js +280 -11
- package/srv/cardano-service.cds +56 -1
- package/srv/cardano-service.js +52 -113
- package/srv/cardano-sign-service.cds +200 -180
- package/srv/cardano-sign-service.js +55 -173
- package/srv/cardano-tx-service.cds +439 -364
- package/srv/cardano-tx-service.js +305 -209
- package/srv/cardano-ui.cds +16 -16
- package/srv/cardano-worker-service.js +7 -15
- package/srv/cbor/parse.js +13 -1
- package/srv/server.d.ts +28 -86
- package/srv/server.js +127 -135
- package/srv/utils/agent-grants-config.d.ts +37 -0
- package/srv/utils/agent-grants-config.js +138 -0
- package/srv/utils/agent-grants.d.ts +262 -0
- package/srv/utils/agent-grants.js +922 -0
- package/srv/utils/agent-token-auth.d.ts +16 -0
- package/srv/utils/agent-token-auth.js +78 -0
- package/srv/utils/backend-request-handler.d.ts +2 -16
- package/srv/utils/backend-request-handler.js +3 -18
- package/srv/utils/collections.d.ts +4 -8
- package/srv/utils/collections.js +4 -8
- package/srv/utils/const.d.ts +30 -67
- package/srv/utils/const.js +32 -72
- package/srv/utils/crypto.d.ts +3 -12
- package/srv/utils/crypto.js +5 -18
- package/srv/utils/db-indexes.d.ts +25 -0
- package/srv/utils/db-indexes.js +94 -0
- package/srv/utils/db-sanitize.d.ts +27 -0
- package/srv/utils/db-sanitize.js +85 -0
- package/srv/utils/epoch-slots.d.ts +13 -0
- package/srv/utils/epoch-slots.js +25 -0
- package/srv/utils/error-codes.d.ts +20 -73
- package/srv/utils/error-codes.js +19 -70
- package/srv/utils/errors.d.ts +50 -177
- package/srv/utils/errors.js +94 -218
- package/srv/utils/liveness.d.ts +16 -0
- package/srv/utils/liveness.js +40 -0
- package/srv/utils/mappers.d.ts +128 -214
- package/srv/utils/mappers.js +354 -299
- package/srv/utils/network-context.js +2 -11
- package/srv/utils/pg-inline-json.d.ts +8 -0
- package/srv/utils/pg-inline-json.js +62 -0
- package/srv/utils/pg-order-nulls.d.ts +14 -0
- package/srv/utils/pg-order-nulls.js +56 -0
- package/srv/utils/plutus-placeholders.d.ts +23 -16
- package/srv/utils/plutus-placeholders.js +63 -27
- package/srv/utils/rate-limiter.d.ts +46 -0
- package/srv/utils/rate-limiter.js +116 -0
- package/srv/utils/service-events.d.ts +2 -22
- package/srv/utils/service-events.js +3 -23
- package/srv/utils/signing-helper.d.ts +3 -18
- package/srv/utils/signing-helper.js +10 -32
- package/srv/utils/tx-build-helper.d.ts +26 -92
- package/srv/utils/tx-build-helper.js +68 -123
- package/srv/utils/tx-request-parsers.d.ts +107 -21
- package/srv/utils/tx-request-parsers.js +433 -34
- package/srv/utils/tx-utils.d.ts +4 -23
- package/srv/utils/tx-utils.js +12 -41
- package/srv/utils/types.d.ts +238 -169
- package/srv/utils/types.js +2 -6
- package/srv/utils/validators.d.ts +24 -90
- package/srv/utils/validators.js +50 -147
package/db/schema.cds
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
using {temporal, } from '@sap/cds/common';
|
|
2
|
-
using {Lovelace, Blake2b224, Blake2b256, HexBytes, Bech32, AssetUnit, AssetSlice, SigningStatus,SubmissionStatus, UTxODataSlice, MetadataLabel, CrawlSyncStatus, ReorgStatus, WalletJobStatus, WalletJobKind, WorkerSignerType} from '../db/types';
|
|
2
|
+
using {Lovelace, Blake2b224, Blake2b256, HexBytes, Bech32, AssetUnit, AssetSlice, AssetSumSlice, SigningStatus,SubmissionStatus, UTxODataSlice, MetadataLabel, CrawlSyncStatus, ReorgStatus, WalletJobStatus, WalletJobKind, WorkerSignerType} from '../db/types';
|
|
3
3
|
|
|
4
4
|
namespace odatano.cardano;
|
|
5
5
|
|
|
@@ -62,7 +62,7 @@ entity Blocks {
|
|
|
62
62
|
height : Integer;
|
|
63
63
|
|
|
64
64
|
@title : 'Block SlotLeader'
|
|
65
|
-
@description: '
|
|
65
|
+
@description: 'Bech32 id of the pool that produced the block'
|
|
66
66
|
slotLeader : String;
|
|
67
67
|
|
|
68
68
|
@title : 'Block Epoch Number'
|
|
@@ -158,7 +158,7 @@ entity Pools : temporal {
|
|
|
158
158
|
blocksMinted : Integer;
|
|
159
159
|
|
|
160
160
|
@title : 'Blocks in Epoch'
|
|
161
|
-
@description: 'Number of blocks minted in the current epoch'
|
|
161
|
+
@description: 'Number of blocks minted in the current epoch. Null when the backend that filled the row has no such figure (Koios); a 0 is a real zero'
|
|
162
162
|
blocksEpoch : Integer;
|
|
163
163
|
|
|
164
164
|
@title : 'Live Stake'
|
|
@@ -170,8 +170,8 @@ entity Pools : temporal {
|
|
|
170
170
|
liveSize : Decimal(5, 4);
|
|
171
171
|
|
|
172
172
|
@title : 'Live Saturation'
|
|
173
|
-
@description: 'Current live saturation as fraction of ideal size'
|
|
174
|
-
liveSaturation : Decimal(
|
|
173
|
+
@description: 'Current live saturation as fraction of ideal size (1.0 = 100% saturated). Decimal(9, 4): a test-network pool can hold many times the saturation point'
|
|
174
|
+
liveSaturation : Decimal(9, 4);
|
|
175
175
|
|
|
176
176
|
@title : 'Live Delegators'
|
|
177
177
|
@description: 'Current number of live delegators'
|
|
@@ -202,12 +202,207 @@ entity Pools : temporal {
|
|
|
202
202
|
rewardAccount : String;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
@title : 'Pool Epoch Snapshot Entity'
|
|
206
|
+
@description: 'Stake-pool state as observed once per epoch by the chain crawler. Non-temporal: each row is a dated observation, not a cached slice, so the crawled range is a true time series. Written only when the crawler runs with epochSnapshots enabled, an enumerating backend (Koios) is configured, and the crawl is at the chain tip — the provider reports the pool set as it is now, so an epoch passed during a backfill is skipped rather than filled with current figures.'
|
|
207
|
+
entity PoolEpochSnapshots {
|
|
208
|
+
|
|
209
|
+
@title : 'Pool Id (Key)'
|
|
210
|
+
@description: 'Unique stake pool identifier'
|
|
211
|
+
key poolId : Bech32;
|
|
212
|
+
|
|
213
|
+
@title : 'Epoch (Key)'
|
|
214
|
+
@description: 'Epoch the observation belongs to — the epoch running at snapshotSlot'
|
|
215
|
+
key epoch : Integer;
|
|
216
|
+
|
|
217
|
+
@title : 'Snapshot Slot'
|
|
218
|
+
@description: 'Absolute slot of the block that triggered the snapshot'
|
|
219
|
+
snapshotSlot : Integer64;
|
|
220
|
+
|
|
221
|
+
@title : 'Snapshot Time'
|
|
222
|
+
@description: 'Unix timestamp of the block that triggered the snapshot'
|
|
223
|
+
snapshotTime : Integer64;
|
|
224
|
+
|
|
225
|
+
@title : 'Snapshot Block Hash'
|
|
226
|
+
@description: 'Hash of the block the ledger state was read at (Ogmios); null for provider snapshots'
|
|
227
|
+
snapshotHash : Blake2b256;
|
|
228
|
+
|
|
229
|
+
@title : 'Source'
|
|
230
|
+
@description: 'Where the observation came from: ogmios (node ledger state at the snapshot block) or koios (provider, current state)'
|
|
231
|
+
source : String(10);
|
|
232
|
+
|
|
233
|
+
@title : 'Blocks Minted'
|
|
234
|
+
@description: 'Total number of blocks minted by the pool'
|
|
235
|
+
blocksMinted : Integer;
|
|
236
|
+
|
|
237
|
+
@title : 'Blocks in Epoch'
|
|
238
|
+
@description: 'Number of blocks minted in the epoch that was running at snapshot time. Null when the enumerating backend has no such figure (Koios); a 0 is a real zero'
|
|
239
|
+
blocksEpoch : Integer;
|
|
240
|
+
|
|
241
|
+
@title : 'Live Stake'
|
|
242
|
+
@description: 'Live stake delegated to the pool'
|
|
243
|
+
liveStake : Lovelace;
|
|
244
|
+
|
|
245
|
+
@title : 'Live Size'
|
|
246
|
+
@description: 'Live size as fraction of total active stake'
|
|
247
|
+
liveSize : Decimal(5, 4);
|
|
248
|
+
|
|
249
|
+
@title : 'Live Saturation'
|
|
250
|
+
@description: 'Live saturation as fraction of ideal size (1.0 = 100% saturated). Decimal(9, 4): a test-network pool can hold many times the saturation point'
|
|
251
|
+
liveSaturation : Decimal(9, 4);
|
|
252
|
+
|
|
253
|
+
@title : 'Live Delegators'
|
|
254
|
+
@description: 'Number of live delegators'
|
|
255
|
+
liveDelegators : Integer;
|
|
256
|
+
|
|
257
|
+
@title : 'Active Stake'
|
|
258
|
+
@description: 'Active stake delegated to the pool'
|
|
259
|
+
activeStake : Lovelace;
|
|
260
|
+
|
|
261
|
+
@title : 'Active Size'
|
|
262
|
+
@description: 'Active size as fraction'
|
|
263
|
+
activeSize : Decimal(5, 4);
|
|
264
|
+
|
|
265
|
+
@title : 'Pledge'
|
|
266
|
+
@description: 'Pool pledge in lovelace'
|
|
267
|
+
pledge : Lovelace;
|
|
268
|
+
|
|
269
|
+
@title : 'Margin'
|
|
270
|
+
@description: 'Pool margin as fraction'
|
|
271
|
+
margin : Decimal(5, 4);
|
|
272
|
+
|
|
273
|
+
@title : 'Fixed Cost'
|
|
274
|
+
@description: 'Pool fixed cost in lovelace'
|
|
275
|
+
fixedCost : Lovelace;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@title : 'Drep Epoch Snapshot Entity'
|
|
279
|
+
@description: 'DRep state as observed once per epoch by the chain crawler. Non-temporal, tip-only, same reasoning as PoolEpochSnapshots.'
|
|
280
|
+
entity DrepEpochSnapshots {
|
|
281
|
+
|
|
282
|
+
@title : 'Drep Id (Key)'
|
|
283
|
+
@description: 'Unique drep identifier'
|
|
284
|
+
key drepId : Bech32;
|
|
285
|
+
|
|
286
|
+
@title : 'Epoch (Key)'
|
|
287
|
+
@description: 'Epoch the observation belongs to — the epoch running at snapshotSlot'
|
|
288
|
+
key epoch : Integer;
|
|
289
|
+
|
|
290
|
+
@title : 'Snapshot Slot'
|
|
291
|
+
@description: 'Absolute slot of the block that triggered the snapshot'
|
|
292
|
+
snapshotSlot : Integer64;
|
|
293
|
+
|
|
294
|
+
@title : 'Snapshot Time'
|
|
295
|
+
@description: 'Unix timestamp of the block that triggered the snapshot'
|
|
296
|
+
snapshotTime : Integer64;
|
|
297
|
+
|
|
298
|
+
@title : 'Snapshot Block Hash'
|
|
299
|
+
@description: 'Hash of the block the ledger state was read at (Ogmios); null for provider snapshots'
|
|
300
|
+
snapshotHash : Blake2b256;
|
|
301
|
+
|
|
302
|
+
@title : 'Source'
|
|
303
|
+
@description: 'ogmios | koios, as on PoolEpochSnapshots'
|
|
304
|
+
source : String(10);
|
|
305
|
+
|
|
306
|
+
@title : 'Deposit'
|
|
307
|
+
@description: 'DRep registration deposit in lovelace; null when the source does not report it'
|
|
308
|
+
deposit : Lovelace;
|
|
309
|
+
|
|
310
|
+
@title : 'Expires Epoch'
|
|
311
|
+
@description: 'Epoch the DRep mandate runs out (inactivity expiry); null when the source does not report it'
|
|
312
|
+
expiresEpoch : Integer;
|
|
313
|
+
|
|
314
|
+
@title : 'Delegator Count'
|
|
315
|
+
@description: 'Number of stake credentials delegated to the DRep; null when the source does not report it'
|
|
316
|
+
delegatorCount : Integer;
|
|
317
|
+
|
|
318
|
+
@title : 'Vote Power'
|
|
319
|
+
@description: 'Amount of vote power in lovelace'
|
|
320
|
+
amount : Lovelace;
|
|
321
|
+
|
|
322
|
+
@title : 'Has Script'
|
|
323
|
+
@description: 'Indicates if drep is a script drep'
|
|
324
|
+
hasScript : Boolean;
|
|
325
|
+
|
|
326
|
+
@title : 'Last Active Epoch'
|
|
327
|
+
@description: 'Epoch number of last activity'
|
|
328
|
+
lastActiveEpoch : Integer;
|
|
329
|
+
|
|
330
|
+
@title : 'Retired'
|
|
331
|
+
@description: 'Indicates if drep is retired'
|
|
332
|
+
retired : Boolean;
|
|
333
|
+
|
|
334
|
+
@title : 'Expired'
|
|
335
|
+
@description: 'Indicates if drep is expired'
|
|
336
|
+
expired : Boolean;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@title : 'Epoch Ledger Snapshot Entity'
|
|
340
|
+
@description: 'Network-wide ledger figures per epoch, written with the pool/DRep snapshot. One row per snapshotted epoch; a missing epoch was not observed. Totals above 2^53 lovelace lose precision on SQLite.'
|
|
341
|
+
entity EpochLedgerSnapshots {
|
|
342
|
+
|
|
343
|
+
@title : 'Epoch (Key)'
|
|
344
|
+
@description: 'Epoch the observation belongs to'
|
|
345
|
+
key epoch : Integer;
|
|
346
|
+
|
|
347
|
+
@title : 'Snapshot Slot'
|
|
348
|
+
@description: 'Absolute slot of the block the snapshot was taken at'
|
|
349
|
+
snapshotSlot : Integer64;
|
|
350
|
+
|
|
351
|
+
@title : 'Snapshot Time'
|
|
352
|
+
@description: 'Unix timestamp of the snapshot block'
|
|
353
|
+
snapshotTime : Integer64;
|
|
354
|
+
|
|
355
|
+
@title : 'Snapshot Block Hash'
|
|
356
|
+
@description: 'Hash of the block the ledger state was read at (Ogmios); null for provider snapshots'
|
|
357
|
+
snapshotHash : Blake2b256;
|
|
358
|
+
|
|
359
|
+
@title : 'Source'
|
|
360
|
+
@description: 'ogmios | koios'
|
|
361
|
+
source : String(10);
|
|
362
|
+
|
|
363
|
+
@title : 'Treasury'
|
|
364
|
+
@description: 'Treasury pot in lovelace; null when the source does not report it'
|
|
365
|
+
treasury : Lovelace;
|
|
366
|
+
|
|
367
|
+
@title : 'Reserves'
|
|
368
|
+
@description: 'Reserves pot in lovelace; null when the source does not report it'
|
|
369
|
+
reserves : Lovelace;
|
|
370
|
+
|
|
371
|
+
@title : 'Total Supply'
|
|
372
|
+
@description: 'Maximum supply minus reserves, in lovelace'
|
|
373
|
+
totalSupply : Lovelace;
|
|
374
|
+
|
|
375
|
+
@title : 'Live Stake'
|
|
376
|
+
@description: 'Sum of the live stake of all pools'
|
|
377
|
+
liveStake : Lovelace;
|
|
378
|
+
|
|
379
|
+
@title : 'Active Stake'
|
|
380
|
+
@description: 'Active stake of the epoch (stake snapshot used for leader election and rewards)'
|
|
381
|
+
activeStake : Lovelace;
|
|
382
|
+
|
|
383
|
+
@title : 'Pool Count'
|
|
384
|
+
@description: 'Registered stake pools observed'
|
|
385
|
+
poolCount : Integer;
|
|
386
|
+
|
|
387
|
+
@title : 'DRep Count'
|
|
388
|
+
@description: 'Registered DReps observed'
|
|
389
|
+
drepCount : Integer;
|
|
390
|
+
|
|
391
|
+
@title : 'Always-Abstain Stake'
|
|
392
|
+
@description: 'Stake delegated to the predefined always-abstain DRep; null when not reported'
|
|
393
|
+
drepAbstainStake : Lovelace;
|
|
394
|
+
|
|
395
|
+
@title : 'Always-No-Confidence Stake'
|
|
396
|
+
@description: 'Stake delegated to the predefined always-no-confidence DRep; null when not reported'
|
|
397
|
+
drepNoConfidenceStake : Lovelace;
|
|
398
|
+
}
|
|
399
|
+
|
|
205
400
|
@title : 'Asset Entity'
|
|
206
401
|
@description: 'Native-asset information entity (supply, mint history, CIP-25 + CIP-26 metadata)'
|
|
207
402
|
entity Assets : temporal {
|
|
208
403
|
|
|
209
404
|
@title : 'Asset Unit (Key)'
|
|
210
|
-
@description: 'Concatenation of policyId (56 hex) and assetNameHex (0-
|
|
405
|
+
@description: 'Concatenation of policyId (56 hex) and assetNameHex (0-64 hex, the 32-byte ledger cap)'
|
|
211
406
|
key unit : AssetUnit;
|
|
212
407
|
|
|
213
408
|
@title : 'Policy ID'
|
|
@@ -406,7 +601,7 @@ entity AddressAssets : temporal {
|
|
|
406
601
|
|
|
407
602
|
@title : 'Asset Details'
|
|
408
603
|
@description: 'Structural slice for asset details'
|
|
409
|
-
asset :
|
|
604
|
+
asset : AssetSumSlice;
|
|
410
605
|
}
|
|
411
606
|
|
|
412
607
|
@title : 'Address UTxOs'
|
|
@@ -530,6 +725,10 @@ entity Transactions {
|
|
|
530
725
|
@description: 'The unique transaction identifier as hex string'
|
|
531
726
|
key hash : Blake2b256;
|
|
532
727
|
|
|
728
|
+
@title : 'Transaction Sequence Number'
|
|
729
|
+
@description: 'Chain position slot * 65536 + txIndex; key of the input and output rows, ascending along the chain'
|
|
730
|
+
txSeq : Integer64;
|
|
731
|
+
|
|
533
732
|
@title : 'Transaction Block Hash'
|
|
534
733
|
@description: 'The block hash containing the transaction'
|
|
535
734
|
blockHash : Blake2b256;
|
|
@@ -570,12 +769,22 @@ entity Transactions {
|
|
|
570
769
|
@title : 'Transaction Inputs'
|
|
571
770
|
@description: 'The transaction inputs composition'
|
|
572
771
|
inputs : Composition of many TransactionInputs
|
|
573
|
-
on inputs.
|
|
772
|
+
on inputs.txSeq = txSeq;
|
|
574
773
|
|
|
575
774
|
@title : 'Transaction Outputs'
|
|
576
775
|
@description: 'The transaction outputs composition'
|
|
577
776
|
outputs : Composition of many TransactionOutputs
|
|
578
|
-
on outputs.
|
|
777
|
+
on outputs.txSeq = txSeq;
|
|
778
|
+
|
|
779
|
+
@title : 'Transaction Certificates'
|
|
780
|
+
@description: 'Certificates carried by the transaction (stake/pool/DRep). Filled by the chain crawler only (crawler.certificates); the lazy path leaves it empty.'
|
|
781
|
+
certificates : Composition of many TransactionCertificates
|
|
782
|
+
on certificates.tx = $self;
|
|
783
|
+
|
|
784
|
+
@title : 'Transaction Withdrawals'
|
|
785
|
+
@description: 'Reward-account withdrawals of the transaction. Filled by the chain crawler only (crawler.certificates); the lazy path leaves it empty.'
|
|
786
|
+
withdrawals : Composition of many TransactionWithdrawals
|
|
787
|
+
on withdrawals.tx = $self;
|
|
579
788
|
|
|
580
789
|
@title : 'Transaction Has Metadata'
|
|
581
790
|
@description: 'Indicates if transaction has metadata'
|
|
@@ -595,9 +804,13 @@ entity Transactions {
|
|
|
595
804
|
@readonly
|
|
596
805
|
entity TransactionInputs {
|
|
597
806
|
|
|
598
|
-
@title : 'Transaction (key)'
|
|
807
|
+
@title : 'Transaction Sequence Number (key)'
|
|
808
|
+
@description: 'Transactions.txSeq of the spending transaction'
|
|
809
|
+
key txSeq : Integer64;
|
|
810
|
+
|
|
811
|
+
@title : 'Transaction'
|
|
599
812
|
@description: 'The associated transaction'
|
|
600
|
-
|
|
813
|
+
tx : Association to one Transactions on tx.txSeq = txSeq;
|
|
601
814
|
|
|
602
815
|
@title : 'Input Index (key)'
|
|
603
816
|
@description: 'The input index of the input utxo'
|
|
@@ -611,6 +824,14 @@ entity TransactionInputs {
|
|
|
611
824
|
@description: 'The UTxO specific data of the input utxo'
|
|
612
825
|
utxoData : UTxODataSlice; // input utxo data
|
|
613
826
|
|
|
827
|
+
@title : 'Spent Transaction Hash'
|
|
828
|
+
@description: 'Hash of the transaction that created the consumed UTxO (outpoint). Null on rows indexed before the column existed.'
|
|
829
|
+
spentTxHash : Blake2b256;
|
|
830
|
+
|
|
831
|
+
@title : 'Spent Output Index'
|
|
832
|
+
@description: 'Output index of the consumed UTxO within spentTxHash (outpoint). Null on rows indexed before the column existed.'
|
|
833
|
+
spentOutputIndex : Integer;
|
|
834
|
+
|
|
614
835
|
@title : 'Input Lovelace Amount'
|
|
615
836
|
@description: 'The lovelace amount of the input utxo'
|
|
616
837
|
isCollateral : Boolean;
|
|
@@ -651,14 +872,299 @@ entity TransactionInputAssets {
|
|
|
651
872
|
asset : AssetSlice;
|
|
652
873
|
}
|
|
653
874
|
|
|
875
|
+
// -----------------------------------------------------
|
|
876
|
+
// Crawler-fed ledger state (crawler.utxoSet) — non-temporal, separate from the lazy
|
|
877
|
+
// provider-fed Addresses / AddressUTxOs so their TTL semantics stay untouched.
|
|
878
|
+
// -----------------------------------------------------
|
|
879
|
+
|
|
880
|
+
@title : 'Ledger UTxOs'
|
|
881
|
+
@description: 'UTxO set maintained by the chain crawler from an imported anchor snapshot (crawler.utxoSet). A row is unspent while spentTxHash is null. createdSlot is null for rows that came with the snapshot. Not written by the lazy path; a reorg reopens what a rolled-back block spent and drops what it created.'
|
|
882
|
+
@readonly
|
|
883
|
+
entity LedgerUTxOs {
|
|
884
|
+
|
|
885
|
+
@title : 'Transaction Hash (Key)'
|
|
886
|
+
@description: 'Transaction that created the output'
|
|
887
|
+
key txHash : Blake2b256;
|
|
888
|
+
|
|
889
|
+
@title : 'Output Index (Key)'
|
|
890
|
+
@description: 'Output index within the creating transaction'
|
|
891
|
+
key outputIndex : Integer;
|
|
892
|
+
|
|
893
|
+
@title : 'Address'
|
|
894
|
+
@description: 'Bech32 address holding the output'
|
|
895
|
+
address : Bech32;
|
|
896
|
+
|
|
897
|
+
@title : 'Stake Address'
|
|
898
|
+
@description: 'Reward account of a base address (bech32); null for enterprise, pointer and Byron addresses'
|
|
899
|
+
stakeAddress : Bech32;
|
|
900
|
+
|
|
901
|
+
@title : 'Address Type'
|
|
902
|
+
@description: 'base | enterprise | pointer | reward | byron | unknown'
|
|
903
|
+
addressType : String(20);
|
|
904
|
+
|
|
905
|
+
@title : 'Is Script Address'
|
|
906
|
+
@description: 'Payment credential is a script hash'
|
|
907
|
+
isScript : Boolean;
|
|
908
|
+
|
|
909
|
+
@title : 'Lovelace'
|
|
910
|
+
@description: 'Lovelace held by the output'
|
|
911
|
+
lovelace : Lovelace;
|
|
912
|
+
|
|
913
|
+
@title : 'Created Slot'
|
|
914
|
+
@description: 'Absolute slot of the creating block; null when the row came with the snapshot'
|
|
915
|
+
createdSlot : Integer64;
|
|
916
|
+
|
|
917
|
+
@title : 'Spent Transaction Hash'
|
|
918
|
+
@description: 'Transaction that consumed the output; null while unspent'
|
|
919
|
+
spentTxHash : Blake2b256;
|
|
920
|
+
|
|
921
|
+
@title : 'Spent Slot'
|
|
922
|
+
@description: 'Absolute slot of the consuming block; null while unspent'
|
|
923
|
+
spentSlot : Integer64;
|
|
924
|
+
|
|
925
|
+
@title : 'UTxO Data'
|
|
926
|
+
@description: 'Datum hash, inline datum and reference script hash'
|
|
927
|
+
utxo : UTxODataSlice;
|
|
928
|
+
|
|
929
|
+
@title : 'Has Assets'
|
|
930
|
+
@description: 'Output carries native assets (see assets)'
|
|
931
|
+
hasAssets : Boolean;
|
|
932
|
+
|
|
933
|
+
@title : 'Assets'
|
|
934
|
+
@description: 'Native assets of the output'
|
|
935
|
+
assets : Composition of many LedgerUTxOAssets
|
|
936
|
+
on assets.utxo = $self;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
@title : 'Ledger UTxO Assets'
|
|
940
|
+
@description: 'Native assets of a LedgerUTxOs row'
|
|
941
|
+
@readonly
|
|
942
|
+
entity LedgerUTxOAssets {
|
|
943
|
+
|
|
944
|
+
@title : 'UTxO (Key)'
|
|
945
|
+
@description: 'The owning UTxO'
|
|
946
|
+
key utxo : Association to LedgerUTxOs;
|
|
947
|
+
|
|
948
|
+
@title : 'Asset Unit (Key)'
|
|
949
|
+
@description: 'policyId + assetNameHex'
|
|
950
|
+
key unit : AssetUnit;
|
|
951
|
+
|
|
952
|
+
@title : 'Asset'
|
|
953
|
+
@description: 'Quantity and decomposed unit'
|
|
954
|
+
asset : AssetSlice;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
@title : 'Ledger Addresses'
|
|
958
|
+
@description: 'Per-address running sums over the unspent LedgerUTxOs rows (crawler.utxoSet): balance and UTxO count as of the crawl tip. firstSeenSlot / lastActiveSlot are null for addresses that only appear in the snapshot. Recounted from the open rows on a reorg.'
|
|
959
|
+
@readonly
|
|
960
|
+
entity LedgerAddresses {
|
|
961
|
+
|
|
962
|
+
@title : 'Address (Key)'
|
|
963
|
+
@description: 'Bech32 address'
|
|
964
|
+
key address : Bech32;
|
|
965
|
+
|
|
966
|
+
@title : 'Stake Address'
|
|
967
|
+
@description: 'Reward account of a base address (bech32); null otherwise'
|
|
968
|
+
stakeAddress : Bech32;
|
|
969
|
+
|
|
970
|
+
@title : 'Payment Credential'
|
|
971
|
+
@description: 'Payment key or script hash (hex, 28 bytes) of a base, pointer or enterprise address; null for Byron and reward addresses'
|
|
972
|
+
paymentCredential : String(56);
|
|
973
|
+
|
|
974
|
+
@title : 'Address Type'
|
|
975
|
+
@description: 'base | enterprise | pointer | reward | byron | unknown'
|
|
976
|
+
addressType : String(20);
|
|
977
|
+
|
|
978
|
+
@title : 'Is Script Address'
|
|
979
|
+
@description: 'Payment credential is a script hash'
|
|
980
|
+
isScript : Boolean;
|
|
981
|
+
|
|
982
|
+
@title : 'Total Lovelace'
|
|
983
|
+
@description: 'Sum of lovelace over the unspent UTxOs of the address'
|
|
984
|
+
totalLovelace : Lovelace;
|
|
985
|
+
|
|
986
|
+
@title : 'UTxO Count'
|
|
987
|
+
@description: 'Number of unspent UTxOs'
|
|
988
|
+
utxoCount : Integer;
|
|
989
|
+
|
|
990
|
+
@title : 'First Seen Slot'
|
|
991
|
+
@description: 'Slot of the first crawled block that produced an output for the address; null when the address came with the snapshot'
|
|
992
|
+
firstSeenSlot : Integer64;
|
|
993
|
+
|
|
994
|
+
@title : 'Last Active Slot'
|
|
995
|
+
@description: 'Slot of the last crawled block that touched the address'
|
|
996
|
+
lastActiveSlot : Integer64;
|
|
997
|
+
|
|
998
|
+
@title : 'Assets'
|
|
999
|
+
@description: 'Native-asset balances of the address'
|
|
1000
|
+
assets : Composition of many LedgerAddressAssets
|
|
1001
|
+
on assets.address = $self;
|
|
1002
|
+
|
|
1003
|
+
@title : 'UTxOs'
|
|
1004
|
+
@description: 'UTxO rows of the address (spent and unspent; filter spentTxHash eq null for the current set)'
|
|
1005
|
+
utxos : Association to many LedgerUTxOs
|
|
1006
|
+
on utxos.address = $self.address;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
@title : 'Ledger Address Assets'
|
|
1010
|
+
@description: 'Native-asset balance of a LedgerAddresses row; rows at zero are removed'
|
|
1011
|
+
@readonly
|
|
1012
|
+
entity LedgerAddressAssets {
|
|
1013
|
+
|
|
1014
|
+
@title : 'Address (Key)'
|
|
1015
|
+
@description: 'The owning address'
|
|
1016
|
+
key address : Association to LedgerAddresses;
|
|
1017
|
+
|
|
1018
|
+
@title : 'Asset Unit (Key)'
|
|
1019
|
+
@description: 'policyId + assetNameHex'
|
|
1020
|
+
key unit : AssetUnit;
|
|
1021
|
+
|
|
1022
|
+
@title : 'Asset'
|
|
1023
|
+
@description: 'Quantity and decomposed unit'
|
|
1024
|
+
asset : AssetSumSlice;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
@title : 'Ledger Accounts'
|
|
1028
|
+
@description: 'Per-stake-key running sums over LedgerAddresses (crawler.utxoSet): controlled amount, address and UTxO counts as of the crawl tip. Delegation is a query over TransactionCertificates (newest pool_delegation / vote_delegation for the stake key); rewards are ledger state and stay provider-fed.'
|
|
1029
|
+
@readonly
|
|
1030
|
+
entity LedgerAccounts {
|
|
1031
|
+
|
|
1032
|
+
@title : 'Stake Address (Key)'
|
|
1033
|
+
@description: 'Reward account (bech32)'
|
|
1034
|
+
key stakeAddress : Bech32;
|
|
1035
|
+
|
|
1036
|
+
@title : 'Controlled Amount'
|
|
1037
|
+
@description: 'Sum of totalLovelace over the base addresses of the stake key'
|
|
1038
|
+
controlledAmount : Lovelace;
|
|
1039
|
+
|
|
1040
|
+
@title : 'Address Count'
|
|
1041
|
+
@description: 'Number of LedgerAddresses rows under the stake key'
|
|
1042
|
+
addressCount : Integer;
|
|
1043
|
+
|
|
1044
|
+
@title : 'UTxO Count'
|
|
1045
|
+
@description: 'Number of unspent UTxOs across those addresses'
|
|
1046
|
+
utxoCount : Integer;
|
|
1047
|
+
|
|
1048
|
+
@title : 'Last Active Slot'
|
|
1049
|
+
@description: 'Slot of the last crawled block that touched one of the addresses'
|
|
1050
|
+
lastActiveSlot : Integer64;
|
|
1051
|
+
|
|
1052
|
+
@title : 'Addresses'
|
|
1053
|
+
@description: 'Addresses under the stake key'
|
|
1054
|
+
addresses : Association to many LedgerAddresses
|
|
1055
|
+
on addresses.stakeAddress = $self.stakeAddress;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
@title : 'Transaction Certificates'
|
|
1059
|
+
@description: 'Certificates of a transaction as the chain crawler saw them (crawler.certificates, off by default). One row per certificate and kind: a Conway stake+vote delegation yields a pool_delegation and a vote_delegation row with the same certIndex, so the Ogmios and Koios sources produce identical rows. Not written by the lazy path.'
|
|
1060
|
+
@readonly
|
|
1061
|
+
entity TransactionCertificates {
|
|
1062
|
+
|
|
1063
|
+
@title : 'Transaction (key)'
|
|
1064
|
+
@description: 'The transaction carrying the certificate'
|
|
1065
|
+
key tx : Association to Transactions;
|
|
1066
|
+
|
|
1067
|
+
@title : 'Certificate Index (key)'
|
|
1068
|
+
@description: 'Position of the certificate in the transaction, as reported by the source'
|
|
1069
|
+
key certIndex : Integer;
|
|
1070
|
+
|
|
1071
|
+
@title : 'Certificate Kind (key)'
|
|
1072
|
+
@description: 'stake_registration | stake_deregistration | pool_delegation | vote_delegation | pool_registration | pool_retirement | drep_registration | drep_update | drep_retirement | committee_hot_auth | committee_resign | genesis_delegation | treasury_mir | reserve_mir | pot_transfer | param_proposal — or the raw source type for anything else'
|
|
1073
|
+
key kind : String(40);
|
|
1074
|
+
|
|
1075
|
+
@title : 'Stake Address'
|
|
1076
|
+
@description: 'Reward account the certificate concerns (bech32), when it has one'
|
|
1077
|
+
stakeAddress : Bech32;
|
|
1078
|
+
|
|
1079
|
+
@title : 'Pool Id'
|
|
1080
|
+
@description: 'Stake pool (bech32) for delegation, registration and retirement certificates'
|
|
1081
|
+
poolId : Bech32;
|
|
1082
|
+
|
|
1083
|
+
@title : 'DRep Id'
|
|
1084
|
+
@description: 'DRep (CIP-129 bech32) for vote delegation and DRep certificates; drep_always_abstain / drep_always_no_confidence for the predefined ones'
|
|
1085
|
+
drepId : Bech32;
|
|
1086
|
+
|
|
1087
|
+
@title : 'Deposit'
|
|
1088
|
+
@description: 'Deposit paid (registration) or refunded (deregistration) in lovelace, when the source reports it'
|
|
1089
|
+
deposit : Lovelace;
|
|
1090
|
+
|
|
1091
|
+
@title : 'Epoch'
|
|
1092
|
+
@description: 'Retirement epoch of a pool_retirement certificate'
|
|
1093
|
+
epoch : Integer;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
@title : 'Transaction Withdrawals'
|
|
1097
|
+
@description: 'Reward-account withdrawals of a transaction as the chain crawler saw them (crawler.certificates, off by default). Not written by the lazy path.'
|
|
1098
|
+
@readonly
|
|
1099
|
+
entity TransactionWithdrawals {
|
|
1100
|
+
|
|
1101
|
+
@title : 'Transaction (key)'
|
|
1102
|
+
@description: 'The withdrawing transaction'
|
|
1103
|
+
key tx : Association to Transactions;
|
|
1104
|
+
|
|
1105
|
+
@title : 'Stake Address (key)'
|
|
1106
|
+
@description: 'Reward account withdrawn from (bech32)'
|
|
1107
|
+
key stakeAddress : Bech32;
|
|
1108
|
+
|
|
1109
|
+
@title : 'Lovelace'
|
|
1110
|
+
@description: 'Amount withdrawn in lovelace'
|
|
1111
|
+
lovelace : Lovelace;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
@title : 'Transaction Redeemers'
|
|
1115
|
+
@description: 'Redeemers of a transaction as the chain crawler saw them (Ogmios chain-sync). A spend redeemer names the redeemed input, a mint redeemer the policy. Not written by the lazy path.'
|
|
1116
|
+
@readonly
|
|
1117
|
+
entity TransactionRedeemers {
|
|
1118
|
+
|
|
1119
|
+
@title : 'Transaction (key)'
|
|
1120
|
+
@description: 'The transaction carrying the redeemer'
|
|
1121
|
+
key tx : Association to Transactions;
|
|
1122
|
+
|
|
1123
|
+
@title : 'Purpose (key)'
|
|
1124
|
+
@description: 'spend | mint | publish | withdraw | vote | propose'
|
|
1125
|
+
key purpose : String(10);
|
|
1126
|
+
|
|
1127
|
+
@title : 'Redeemer Index (key)'
|
|
1128
|
+
@description: 'Index within its purpose (spend: position of the input in the sorted inputs; mint: of the policy in the sorted policies)'
|
|
1129
|
+
key redeemerIndex : Integer;
|
|
1130
|
+
|
|
1131
|
+
@title : 'Data'
|
|
1132
|
+
@description: 'Redeemer data as PlutusData CBOR hex'
|
|
1133
|
+
data : LargeString;
|
|
1134
|
+
|
|
1135
|
+
@title : 'Memory Units'
|
|
1136
|
+
@description: 'Execution memory units'
|
|
1137
|
+
mem : Integer64;
|
|
1138
|
+
|
|
1139
|
+
@title : 'CPU Steps'
|
|
1140
|
+
@description: 'Execution CPU steps'
|
|
1141
|
+
steps : Integer64;
|
|
1142
|
+
|
|
1143
|
+
@title : 'Redeemed Input Transaction'
|
|
1144
|
+
@description: 'spend: transaction that created the redeemed input'
|
|
1145
|
+
spentTxHash : Blake2b256;
|
|
1146
|
+
|
|
1147
|
+
@title : 'Redeemed Input Index'
|
|
1148
|
+
@description: 'spend: output index of the redeemed input'
|
|
1149
|
+
spentOutputIndex : Integer;
|
|
1150
|
+
|
|
1151
|
+
@title : 'Policy ID'
|
|
1152
|
+
@description: 'mint: the policy the redeemer runs'
|
|
1153
|
+
policyId : Blake2b224;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
654
1156
|
@title : 'Transaction Outputs'
|
|
655
1157
|
@description: 'Projection for Transaction Outputs'
|
|
656
1158
|
@readonly
|
|
657
1159
|
entity TransactionOutputs {
|
|
658
1160
|
|
|
659
|
-
@title : 'Transaction (key)'
|
|
1161
|
+
@title : 'Transaction Sequence Number (key)'
|
|
1162
|
+
@description: 'Transactions.txSeq of the creating transaction'
|
|
1163
|
+
key txSeq : Integer64;
|
|
1164
|
+
|
|
1165
|
+
@title : 'Transaction'
|
|
660
1166
|
@description: 'The associated transaction'
|
|
661
|
-
|
|
1167
|
+
tx : Association to one Transactions on tx.txSeq = txSeq;
|
|
662
1168
|
|
|
663
1169
|
@title : 'Output Index (key)'
|
|
664
1170
|
@description: 'The output index of the output utxo'
|
|
@@ -927,6 +1433,10 @@ entity TransactionBuilds : temporal {
|
|
|
927
1433
|
@description: 'The outputs created in the transaction build'
|
|
928
1434
|
outputs : Composition of many TransactionBuildOutputs
|
|
929
1435
|
on outputs.build = $self;
|
|
1436
|
+
@title : 'Redeemers'
|
|
1437
|
+
@description: 'Redeemers of a script build with the execution units stamped on them'
|
|
1438
|
+
redeemers : Composition of many TransactionBuildRedeemers
|
|
1439
|
+
on redeemers.build = $self;
|
|
930
1440
|
|
|
931
1441
|
@title : 'Associated Submission'
|
|
932
1442
|
@description: 'Association to the transaction submission if submitted'
|
|
@@ -1063,6 +1573,31 @@ entity TransactionBuildOutputs {
|
|
|
1063
1573
|
hasAssets : Boolean;
|
|
1064
1574
|
}
|
|
1065
1575
|
|
|
1576
|
+
@title : 'Transaction Build Redeemers'
|
|
1577
|
+
@description: 'Redeemers of a script build (spend, mint, …) with the execution units stamped on them; compare with maxTxExecutionUnits of the protocol parameters'
|
|
1578
|
+
entity TransactionBuildRedeemers {
|
|
1579
|
+
|
|
1580
|
+
@title : 'Build (key)'
|
|
1581
|
+
@description: 'Association to parent transaction build'
|
|
1582
|
+
key build : Association to TransactionBuilds;
|
|
1583
|
+
|
|
1584
|
+
@title : 'Tag (key)'
|
|
1585
|
+
@description: 'Redeemer purpose: Spend, Mint, Cert, Withdraw, Vote or Propose'
|
|
1586
|
+
key tag : String(10);
|
|
1587
|
+
|
|
1588
|
+
@title : 'Redeemer Index (key)'
|
|
1589
|
+
@description: 'Index within its purpose (spend: position of the input in the sorted inputs)'
|
|
1590
|
+
key redeemerIndex : Integer;
|
|
1591
|
+
|
|
1592
|
+
@title : 'Memory Units'
|
|
1593
|
+
@description: 'Execution memory units stamped on the redeemer'
|
|
1594
|
+
mem : Integer64;
|
|
1595
|
+
|
|
1596
|
+
@title : 'CPU Steps'
|
|
1597
|
+
@description: 'Execution CPU steps stamped on the redeemer'
|
|
1598
|
+
steps : Integer64;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1066
1601
|
@title : 'Transaction Build Output Assets'
|
|
1067
1602
|
@description: 'Entity for storing assets associated with transaction build outputs'
|
|
1068
1603
|
entity TransactionBuildOutputAssets {
|
|
@@ -1430,6 +1965,30 @@ entity CardanoSyncState {
|
|
|
1430
1965
|
@description: 'Opaque process identifier of the single crawler instance currently allowed to write'
|
|
1431
1966
|
leaseOwner : String(128);
|
|
1432
1967
|
|
|
1968
|
+
@title : 'UTxO Set Status'
|
|
1969
|
+
@description: 'Crawler-fed ledger state (crawler.utxoSet): none | importing | active | invalid'
|
|
1970
|
+
utxoSetStatus : String(20) default 'none';
|
|
1971
|
+
|
|
1972
|
+
@title : 'UTxO Set Anchor Slot'
|
|
1973
|
+
@description: 'Absolute slot the imported UTxO set describes; blocks after it are applied to the ledger tables'
|
|
1974
|
+
utxoAnchorSlot : Integer64;
|
|
1975
|
+
|
|
1976
|
+
@title : 'UTxO Set Anchor Hash'
|
|
1977
|
+
@description: 'Block hash of the anchor point'
|
|
1978
|
+
utxoAnchorHash : Blake2b256;
|
|
1979
|
+
|
|
1980
|
+
@title : 'UTxO Set Imported At'
|
|
1981
|
+
@description: 'When the snapshot import completed'
|
|
1982
|
+
utxoSetImportedAt : Timestamp;
|
|
1983
|
+
|
|
1984
|
+
@title : 'UTxO Set Applied Slot'
|
|
1985
|
+
@description: 'Slot of the last block applied to the ledger tables; a cursor ahead of it means blocks were crawled without the set (mode off, invalidated) and the set is stale'
|
|
1986
|
+
utxoAppliedSlot : Integer64;
|
|
1987
|
+
|
|
1988
|
+
@title : 'UTxO Set Error'
|
|
1989
|
+
@description: 'Why the set is invalid (reorg past the anchor, failed import)'
|
|
1990
|
+
utxoSetError : String(500);
|
|
1991
|
+
|
|
1433
1992
|
@title : 'Crawler Lease Expiry'
|
|
1434
1993
|
@description: 'Lease deadline renewed by the active crawler; another instance may take over only after this time'
|
|
1435
1994
|
leaseUntil : Timestamp;
|
|
@@ -1631,3 +2190,108 @@ entity CardanoWalletJobs {
|
|
|
1631
2190
|
@description: 'Timestamp the job reached a terminal state (confirmed | failed | cancelled)'
|
|
1632
2191
|
finishedAt : Timestamp;
|
|
1633
2192
|
}
|
|
2193
|
+
|
|
2194
|
+
/**
|
|
2195
|
+
* Agent grants (v2.0): scoped bearer capabilities an Admin hands to an agent
|
|
2196
|
+
* instead of a full user. The token is a capability, not an identity — it is
|
|
2197
|
+
* stored as SHA-256 only, and a request carrying it runs as the principal
|
|
2198
|
+
* `agent:<ID>` with the role `agent-grant`, never as the operator. Enforcement
|
|
2199
|
+
* (allow list, wallet pinning, daily budget) lives in srv/utils/agent-grants.ts;
|
|
2200
|
+
* the transport lane that admits `x-agent-token` in srv/utils/agent-token-auth.ts.
|
|
2201
|
+
* Admin-only table: creation and revocation happen through CardanoAgentService
|
|
2202
|
+
* actions, a token request may read its own row only.
|
|
2203
|
+
*/
|
|
2204
|
+
@title : 'Agent Grants'
|
|
2205
|
+
@description: 'Scoped, budgeted bearer capabilities for agents (token stored as SHA-256 only)'
|
|
2206
|
+
entity CardanoAgentGrants {
|
|
2207
|
+
|
|
2208
|
+
@title : 'Grant Id (Key)'
|
|
2209
|
+
key ID : UUID;
|
|
2210
|
+
|
|
2211
|
+
@title : 'Operator'
|
|
2212
|
+
@description: 'User id of the Admin that issued the grant (audit; the token never runs as this user)'
|
|
2213
|
+
userId : String(200) not null;
|
|
2214
|
+
|
|
2215
|
+
@title : 'Agent Label'
|
|
2216
|
+
@description: 'Human-readable agent name, informational'
|
|
2217
|
+
agentLabel : String(100);
|
|
2218
|
+
|
|
2219
|
+
@title : 'Token Hash'
|
|
2220
|
+
@description: 'SHA-256 of the bearer token; the token itself is shown once and never stored'
|
|
2221
|
+
tokenHash : String(64) not null;
|
|
2222
|
+
|
|
2223
|
+
@title : 'Allowed Actions'
|
|
2224
|
+
@description: 'JSON array of allow-listed action names (builds, signing-request lifecycle, submits, wallet jobs)'
|
|
2225
|
+
allowedActions : LargeString not null;
|
|
2226
|
+
|
|
2227
|
+
@title : 'Wallet Id'
|
|
2228
|
+
@description: 'Worker wallet this grant is pinned to; required for SubmitWalletJob / CancelJob, injected into those requests'
|
|
2229
|
+
walletId : String(50);
|
|
2230
|
+
|
|
2231
|
+
@title : 'Allowed Job Kinds'
|
|
2232
|
+
@description: 'JSON array of WalletJobKind values the grant may queue; null = every kind'
|
|
2233
|
+
allowedJobKinds : LargeString;
|
|
2234
|
+
|
|
2235
|
+
@title : 'Max Jobs Per Day'
|
|
2236
|
+
@description: 'Daily budget of allow-listed action calls (UTC day); null = unlimited'
|
|
2237
|
+
maxJobsPerDay : Integer;
|
|
2238
|
+
|
|
2239
|
+
@title : 'Jobs Used Today'
|
|
2240
|
+
@description: 'Budget consumed inside budgetWindow'
|
|
2241
|
+
jobsUsedToday : Integer default 0;
|
|
2242
|
+
|
|
2243
|
+
@title : 'Budget Window'
|
|
2244
|
+
@description: 'UTC day YYYY-MM-DD the counter belongs to'
|
|
2245
|
+
budgetWindow : String(10);
|
|
2246
|
+
|
|
2247
|
+
@title : 'Valid Until'
|
|
2248
|
+
@description: 'Expiry; null = no expiry'
|
|
2249
|
+
validUntil : Timestamp;
|
|
2250
|
+
|
|
2251
|
+
@title : 'Is Active'
|
|
2252
|
+
@description: 'False once revoked; a revoked token is an unknown token'
|
|
2253
|
+
isActive : Boolean default true;
|
|
2254
|
+
|
|
2255
|
+
@title : 'Revoked At'
|
|
2256
|
+
revokedAt : Timestamp;
|
|
2257
|
+
|
|
2258
|
+
@title : 'Created At'
|
|
2259
|
+
createdAt : Timestamp;
|
|
2260
|
+
|
|
2261
|
+
@title : 'Last Used At'
|
|
2262
|
+
@description: 'Last request admitted under this token (updated at most once a minute)'
|
|
2263
|
+
lastUsedAt : Timestamp;
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* Daily per-action counters of admitted calls under a grant (feeds
|
|
2268
|
+
* CardanoAgentService.GetGrantUsage). Written by the enforcement hook next to
|
|
2269
|
+
* the daily budget: `calls + 1` when a call is admitted, `refunded + 1` when the
|
|
2270
|
+
* handler then refuses its input. Not exposed as an entity — the function is
|
|
2271
|
+
* the contract. A few dozen rows per grant and day at most; no retention job yet.
|
|
2272
|
+
*/
|
|
2273
|
+
entity CardanoAgentGrantUsage {
|
|
2274
|
+
|
|
2275
|
+
@title : 'Grant'
|
|
2276
|
+
key grant : Association to CardanoAgentGrants;
|
|
2277
|
+
|
|
2278
|
+
@title : 'Day'
|
|
2279
|
+
@description: 'UTC day YYYY-MM-DD the call was admitted on'
|
|
2280
|
+
key day : String(10);
|
|
2281
|
+
|
|
2282
|
+
@title : 'Service'
|
|
2283
|
+
@description: 'CAP service name (CardanoTransactionService, CardanoSignService, ...)'
|
|
2284
|
+
key service : String(60);
|
|
2285
|
+
|
|
2286
|
+
@title : 'Action'
|
|
2287
|
+
@description: 'Action name (BuildSimpleAdaTransaction, SubmitTransaction, ...)'
|
|
2288
|
+
key action : String(100);
|
|
2289
|
+
|
|
2290
|
+
@title : 'Calls'
|
|
2291
|
+
@description: 'Admitted calls (budget charged where the grant has one)'
|
|
2292
|
+
calls : Integer default 0;
|
|
2293
|
+
|
|
2294
|
+
@title : 'Refunded'
|
|
2295
|
+
@description: 'Admitted calls whose handler refused the input (400..428); their unit was given back'
|
|
2296
|
+
refunded : Integer default 0;
|
|
2297
|
+
}
|