@odatano/core 2.0.0-rc.18 → 2.0.0-rc.19

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 (35) hide show
  1. package/@cds-models/CardanoIndexerService/index.d.ts +52 -0
  2. package/@cds-models/CardanoIndexerService/index.js +7 -0
  3. package/@cds-models/CardanoODataService/index.d.ts +170 -0
  4. package/@cds-models/CardanoODataService/index.js +21 -0
  5. package/@cds-models/odatano/cardano/index.d.ts +176 -0
  6. package/@cds-models/odatano/cardano/index.js +21 -0
  7. package/README.md +3 -3
  8. package/db/schema.cds +277 -0
  9. package/package.json +179 -179
  10. package/srv/blockchain/backends/cardano-backend.d.ts +16 -0
  11. package/srv/blockchain/backends/cardano-backend.js +4 -0
  12. package/srv/blockchain/backends/koios-backend.d.ts +80 -1
  13. package/srv/blockchain/backends/koios-backend.js +128 -48
  14. package/srv/blockchain/backends/ogmios-backend.d.ts +21 -2
  15. package/srv/blockchain/backends/ogmios-backend.js +120 -16
  16. package/srv/blockchain/cardano-client.d.ts +3 -1
  17. package/srv/blockchain/cardano-client.js +9 -0
  18. package/srv/blockchain/cardano-indexer.d.ts +56 -3
  19. package/srv/blockchain/cardano-indexer.js +124 -3
  20. package/srv/blockchain/crawler/crawler.d.ts +11 -1
  21. package/srv/blockchain/crawler/crawler.js +70 -1
  22. package/srv/blockchain/crawler/sync-state.d.ts +27 -1
  23. package/srv/blockchain/crawler/sync-state.js +83 -1
  24. package/srv/blockchain/crawler/utxo-set-import.d.ts +86 -0
  25. package/srv/blockchain/crawler/utxo-set-import.js +289 -0
  26. package/srv/blockchain/ledger-state.d.ts +89 -0
  27. package/srv/blockchain/ledger-state.js +383 -0
  28. package/srv/cardano-indexer-service.cds +26 -0
  29. package/srv/cardano-indexer-service.js +71 -0
  30. package/srv/cardano-service.cds +35 -0
  31. package/srv/server.js +6 -1
  32. package/srv/utils/db-indexes.js +12 -0
  33. package/srv/utils/mappers.d.ts +43 -3
  34. package/srv/utils/mappers.js +115 -1
  35. package/srv/utils/types.d.ts +38 -0
@@ -25,6 +25,7 @@ export default class {
25
25
  static readonly getLiveness: typeof getLiveness;
26
26
  static readonly pauseCrawler: typeof pauseCrawler;
27
27
  static readonly resumeCrawler: typeof resumeCrawler;
28
+ static readonly importUtxoSet: typeof importUtxoSet;
28
29
  }
29
30
 
30
31
  // entity 'SyncState'
@@ -46,6 +47,12 @@ export declare function _SyncStateAspect<TBase extends new (...args: any[]) => o
46
47
  consecutiveErrors?: number | null
47
48
  desiredRunning?: boolean | null
48
49
  leaseOwner?: string | null
50
+ utxoSetStatus?: string | null
51
+ utxoAnchorSlot?: number | null
52
+ utxoAnchorHash?: _.Blake2b256 | null
53
+ utxoSetImportedAt?: __.CdsTimestamp | null
54
+ utxoAppliedSlot?: number | null
55
+ utxoSetError?: string | null
49
56
  leaseUntil?: __.CdsTimestamp | null
50
57
  } & InstanceType<TBase>
51
58
  readonly kind: 'entity';
@@ -93,6 +100,7 @@ export declare function _CrawlerStatusAspect<TBase extends new (...args: any[])
93
100
  tipHeight?: string | null
94
101
  syncProgress?: string | null
95
102
  consecutiveErrors?: number | null
103
+ utxoSet?: UtxoSetStatus | null
96
104
  } & InstanceType<TBase>
97
105
  readonly kind: 'type';
98
106
  readonly keys: __.KeysOf<CrawlerStatus>;
@@ -102,6 +110,40 @@ export declare function _CrawlerStatusAspect<TBase extends new (...args: any[])
102
110
  export class CrawlerStatus extends _CrawlerStatusAspect(__.Entity) {
103
111
  }
104
112
 
113
+ // entity 'UtxoSetStatus'
114
+ export declare function _UtxoSetStatusAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
115
+ new (...args: any[]): {
116
+ enabled?: boolean | null
117
+ status?: string | null
118
+ anchorSlot?: string | null
119
+ anchorHash?: string | null
120
+ importedAt?: __.CdsTimestamp | null
121
+ error?: string | null
122
+ } & InstanceType<TBase>
123
+ readonly kind: 'type';
124
+ readonly keys: __.KeysOf<UtxoSetStatus>;
125
+ readonly elements: __.ElementsOf<UtxoSetStatus>;
126
+ readonly actions: globalThis.Record<never, never>;
127
+ };
128
+ export class UtxoSetStatus extends _UtxoSetStatusAspect(__.Entity) {
129
+ }
130
+
131
+ // entity 'UtxoSetImportResult'
132
+ export declare function _UtxoSetImportResultAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
133
+ new (...args: any[]): {
134
+ accepted?: boolean | null
135
+ anchorSlot?: string | null
136
+ anchorHash?: string | null
137
+ message?: string | null
138
+ } & InstanceType<TBase>
139
+ readonly kind: 'type';
140
+ readonly keys: __.KeysOf<UtxoSetImportResult>;
141
+ readonly elements: __.ElementsOf<UtxoSetImportResult>;
142
+ readonly actions: globalThis.Record<never, never>;
143
+ };
144
+ export class UtxoSetImportResult extends _UtxoSetImportResultAspect(__.Entity) {
145
+ }
146
+
105
147
  // entity 'Liveness'
106
148
  export declare function _LivenessAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
107
149
  new (...args: any[]): {
@@ -175,4 +217,14 @@ export declare const resumeCrawler: {
175
217
  // metadata (do not use)
176
218
  __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<boolean | null> | boolean | null, __self: never
177
219
  kind: 'action'
220
+ }
221
+
222
+ export declare const importUtxoSet: {
223
+ // positional
224
+ (source: string | null, filePath: string | null, anchorSlot: number | null, anchorHash: string | null): globalThis.Promise<UtxoSetImportResult | null> | UtxoSetImportResult | null
225
+ // named
226
+ ({source, filePath, anchorSlot, anchorHash}: {source?: string | null, filePath?: string | null, anchorSlot?: number | null, anchorHash?: string | null}): globalThis.Promise<UtxoSetImportResult | null> | UtxoSetImportResult | null
227
+ // metadata (do not use)
228
+ __parameters: {source?: string | null, filePath?: string | null, anchorSlot?: number | null, anchorHash?: string | null}, __returns: globalThis.Promise<UtxoSetImportResult | null> | UtxoSetImportResult | null, __self: never
229
+ kind: 'action'
178
230
  }
@@ -13,6 +13,12 @@ module.exports.ReorgLog_ = createEntityProxy(['CardanoIndexerService', 'ReorgLog
13
13
  // CrawlerStatus
14
14
  module.exports.CrawlerStatus = createEntityProxy(['CardanoIndexerService', 'CrawlerStatus'], { target: { is_singular: true } })
15
15
  module.exports.__Array_CrawlerStatus_ = createEntityProxy(['CardanoIndexerService', 'CrawlerStatus'], { target: { is_singular: false }})
16
+ // UtxoSetStatus
17
+ module.exports.UtxoSetStatus = createEntityProxy(['CardanoIndexerService', 'UtxoSetStatus'], { target: { is_singular: true } })
18
+ module.exports.__Array_UtxoSetStatus_ = createEntityProxy(['CardanoIndexerService', 'UtxoSetStatus'], { target: { is_singular: false }})
19
+ // UtxoSetImportResult
20
+ module.exports.UtxoSetImportResult = createEntityProxy(['CardanoIndexerService', 'UtxoSetImportResult'], { target: { is_singular: true } })
21
+ module.exports.__Array_UtxoSetImportResult_ = createEntityProxy(['CardanoIndexerService', 'UtxoSetImportResult'], { target: { is_singular: false }})
16
22
  // Liveness
17
23
  module.exports.Liveness = createEntityProxy(['CardanoIndexerService', 'Liveness'], { target: { is_singular: true } })
18
24
  module.exports.__Array_Liveness_ = createEntityProxy(['CardanoIndexerService', 'Liveness'], { target: { is_singular: false }})
@@ -24,4 +30,5 @@ module.exports.getStatus = 'getStatus'
24
30
  module.exports.getLiveness = 'getLiveness'
25
31
  module.exports.pauseCrawler = 'pauseCrawler'
26
32
  module.exports.resumeCrawler = 'resumeCrawler'
33
+ module.exports.importUtxoSet = 'importUtxoSet'
27
34
  // enums
@@ -308,6 +308,8 @@ export declare function _TransactionAspect<TBase extends new (...args: any[]) =>
308
308
  metadata?: __.Composition.of.many<TransactionMetadata_>
309
309
  inputs?: __.Composition.of.many<TransactionInputs>
310
310
  outputs?: __.Composition.of.many<TransactionOutputs>
311
+ certificates?: __.Composition.of.many<TransactionCertificates>
312
+ withdrawals?: __.Composition.of.many<TransactionWithdrawals>
311
313
  hasMetadata?: boolean | null
312
314
  hasInputs?: boolean | null
313
315
  hasOutputs?: boolean | null
@@ -334,6 +336,8 @@ export declare function _TransactionInputAspect<TBase extends new (...args: any[
334
336
  utxoData_dataHash?: _.Blake2b256 | null
335
337
  utxoData_inlineDatum?: string | null
336
338
  utxoData_referenceScriptHash?: _.Blake2b256 | null
339
+ spentTxHash?: _.Blake2b256 | null
340
+ spentOutputIndex?: number | null
337
341
  isCollateral?: boolean | null
338
342
  isReference?: boolean | null
339
343
  assets?: __.Composition.of.many<TransactionInputAssets>
@@ -425,6 +429,172 @@ export class TransactionOutputAssets extends Array<TransactionOutputAsset> {
425
429
  $count?: number
426
430
  }
427
431
 
432
+ // entity 'TransactionCertificate'
433
+ export declare function _TransactionCertificateAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
434
+ new (...args: any[]): {
435
+ tx?: __.Key<__.Association.to<Transaction>>
436
+ tx_hash?: __.Key<_.Blake2b256>
437
+ certIndex?: __.Key<number>
438
+ kind?: __.Key<string>
439
+ stakeAddress?: _.Bech32 | null
440
+ poolId?: _.Bech32 | null
441
+ drepId?: _.Bech32 | null
442
+ deposit?: _.Lovelace | null
443
+ epoch?: number | null
444
+ } & InstanceType<TBase>
445
+ readonly kind: 'entity';
446
+ readonly keys: __.KeysOf<TransactionCertificate>;
447
+ readonly elements: __.ElementsOf<TransactionCertificate>;
448
+ readonly actions: globalThis.Record<never, never>;
449
+ };
450
+ export class TransactionCertificate extends _TransactionCertificateAspect(__.Entity) {
451
+ }
452
+ export class TransactionCertificates extends Array<TransactionCertificate> {
453
+ $count?: number
454
+ }
455
+
456
+ // entity 'TransactionWithdrawal'
457
+ export declare function _TransactionWithdrawalAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
458
+ new (...args: any[]): {
459
+ tx?: __.Key<__.Association.to<Transaction>>
460
+ tx_hash?: __.Key<_.Blake2b256>
461
+ stakeAddress?: __.Key<_.Bech32>
462
+ lovelace?: _.Lovelace | null
463
+ } & InstanceType<TBase>
464
+ readonly kind: 'entity';
465
+ readonly keys: __.KeysOf<TransactionWithdrawal>;
466
+ readonly elements: __.ElementsOf<TransactionWithdrawal>;
467
+ readonly actions: globalThis.Record<never, never>;
468
+ };
469
+ export class TransactionWithdrawal extends _TransactionWithdrawalAspect(__.Entity) {
470
+ }
471
+ export class TransactionWithdrawals extends Array<TransactionWithdrawal> {
472
+ $count?: number
473
+ }
474
+
475
+ // entity 'LedgerUTxO'
476
+ export declare function _LedgerUTxOAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
477
+ new (...args: any[]): {
478
+ txHash?: __.Key<_.Blake2b256>
479
+ outputIndex?: __.Key<number>
480
+ address?: _.Bech32 | null
481
+ stakeAddress?: _.Bech32 | null
482
+ addressType?: string | null
483
+ isScript?: boolean | null
484
+ lovelace?: _.Lovelace | null
485
+ createdSlot?: number | null
486
+ spentTxHash?: _.Blake2b256 | null
487
+ spentSlot?: number | null
488
+ utxo_dataHash?: _.Blake2b256 | null
489
+ utxo_inlineDatum?: string | null
490
+ utxo_referenceScriptHash?: _.Blake2b256 | null
491
+ hasAssets?: boolean | null
492
+ assets?: __.Composition.of.many<LedgerUTxOAssets>
493
+ } & InstanceType<TBase>
494
+ readonly kind: 'entity';
495
+ readonly keys: __.KeysOf<LedgerUTxO>;
496
+ readonly elements: __.ElementsOf<LedgerUTxO>;
497
+ readonly actions: globalThis.Record<never, never>;
498
+ };
499
+ export class LedgerUTxO extends _LedgerUTxOAspect(__.Entity) {
500
+ }
501
+ export class LedgerUTxOs extends Array<LedgerUTxO> {
502
+ $count?: number
503
+ }
504
+
505
+ // entity 'LedgerUTxOAsset'
506
+ export declare function _LedgerUTxOAssetAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
507
+ new (...args: any[]): {
508
+ utxo?: __.Key<__.Association.to<LedgerUTxO>>
509
+ utxo_txHash?: __.Key<_.Blake2b256>
510
+ utxo_outputIndex?: __.Key<number>
511
+ unit?: __.Key<_.AssetUnit>
512
+ asset_quantity?: _.Lovelace | null
513
+ asset_policyId?: _.Blake2b224 | null
514
+ asset_assetNameHex?: _.HexBytes | null
515
+ asset_assetName?: string | null
516
+ asset_fingerprint?: string | null
517
+ } & InstanceType<TBase>
518
+ readonly kind: 'entity';
519
+ readonly keys: __.KeysOf<LedgerUTxOAsset>;
520
+ readonly elements: __.ElementsOf<LedgerUTxOAsset>;
521
+ readonly actions: globalThis.Record<never, never>;
522
+ };
523
+ export class LedgerUTxOAsset extends _LedgerUTxOAssetAspect(__.Entity) {
524
+ }
525
+ export class LedgerUTxOAssets extends Array<LedgerUTxOAsset> {
526
+ $count?: number
527
+ }
528
+
529
+ // entity 'LedgerAddress'
530
+ export declare function _LedgerAddressAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
531
+ new (...args: any[]): {
532
+ address?: __.Key<_.Bech32>
533
+ stakeAddress?: _.Bech32 | null
534
+ addressType?: string | null
535
+ isScript?: boolean | null
536
+ totalLovelace?: _.Lovelace | null
537
+ utxoCount?: number | null
538
+ firstSeenSlot?: number | null
539
+ lastActiveSlot?: number | null
540
+ assets?: __.Composition.of.many<LedgerAddressAssets>
541
+ utxos?: __.Association.to.many<LedgerUTxOs>
542
+ } & InstanceType<TBase>
543
+ readonly kind: 'entity';
544
+ readonly keys: __.KeysOf<LedgerAddress>;
545
+ readonly elements: __.ElementsOf<LedgerAddress>;
546
+ readonly actions: globalThis.Record<never, never>;
547
+ };
548
+ export class LedgerAddress extends _LedgerAddressAspect(__.Entity) {
549
+ }
550
+ export class LedgerAddresses extends Array<LedgerAddress> {
551
+ $count?: number
552
+ }
553
+
554
+ // entity 'LedgerAddressAsset'
555
+ export declare function _LedgerAddressAssetAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
556
+ new (...args: any[]): {
557
+ address?: __.Key<__.Association.to<LedgerAddress>>
558
+ address_address?: __.Key<_.Bech32>
559
+ unit?: __.Key<_.AssetUnit>
560
+ asset_quantity?: _.Lovelace | null
561
+ asset_policyId?: _.Blake2b224 | null
562
+ asset_assetNameHex?: _.HexBytes | null
563
+ asset_assetName?: string | null
564
+ asset_fingerprint?: string | null
565
+ } & InstanceType<TBase>
566
+ readonly kind: 'entity';
567
+ readonly keys: __.KeysOf<LedgerAddressAsset>;
568
+ readonly elements: __.ElementsOf<LedgerAddressAsset>;
569
+ readonly actions: globalThis.Record<never, never>;
570
+ };
571
+ export class LedgerAddressAsset extends _LedgerAddressAssetAspect(__.Entity) {
572
+ }
573
+ export class LedgerAddressAssets extends Array<LedgerAddressAsset> {
574
+ $count?: number
575
+ }
576
+
577
+ // entity 'LedgerAccount'
578
+ export declare function _LedgerAccountAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
579
+ new (...args: any[]): {
580
+ stakeAddress?: __.Key<_.Bech32>
581
+ controlledAmount?: _.Lovelace | null
582
+ addressCount?: number | null
583
+ utxoCount?: number | null
584
+ lastActiveSlot?: number | null
585
+ addresses?: __.Association.to.many<LedgerAddresses>
586
+ } & InstanceType<TBase>
587
+ readonly kind: 'entity';
588
+ readonly keys: __.KeysOf<LedgerAccount>;
589
+ readonly elements: __.ElementsOf<LedgerAccount>;
590
+ readonly actions: globalThis.Record<never, never>;
591
+ };
592
+ export class LedgerAccount extends _LedgerAccountAspect(__.Entity) {
593
+ }
594
+ export class LedgerAccounts extends Array<LedgerAccount> {
595
+ $count?: number
596
+ }
597
+
428
598
  // entity 'Account'
429
599
  export declare function _AccountAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
430
600
  new (...args: any[]): {
@@ -46,6 +46,27 @@ module.exports.TransactionInputAssets = createEntityProxy(['CardanoODataService'
46
46
  // TransactionOutputAssets
47
47
  module.exports.TransactionOutputAsset = createEntityProxy(['CardanoODataService', 'TransactionOutputAssets'], { target: { is_singular: true } })
48
48
  module.exports.TransactionOutputAssets = createEntityProxy(['CardanoODataService', 'TransactionOutputAssets'], { target: { is_singular: false }})
49
+ // TransactionCertificates
50
+ module.exports.TransactionCertificate = createEntityProxy(['CardanoODataService', 'TransactionCertificates'], { target: { is_singular: true } })
51
+ module.exports.TransactionCertificates = createEntityProxy(['CardanoODataService', 'TransactionCertificates'], { target: { is_singular: false }})
52
+ // TransactionWithdrawals
53
+ module.exports.TransactionWithdrawal = createEntityProxy(['CardanoODataService', 'TransactionWithdrawals'], { target: { is_singular: true } })
54
+ module.exports.TransactionWithdrawals = createEntityProxy(['CardanoODataService', 'TransactionWithdrawals'], { target: { is_singular: false }})
55
+ // LedgerUTxOs
56
+ module.exports.LedgerUTxO = createEntityProxy(['CardanoODataService', 'LedgerUTxOs'], { target: { is_singular: true } })
57
+ module.exports.LedgerUTxOs = createEntityProxy(['CardanoODataService', 'LedgerUTxOs'], { target: { is_singular: false }})
58
+ // LedgerUTxOAssets
59
+ module.exports.LedgerUTxOAsset = createEntityProxy(['CardanoODataService', 'LedgerUTxOAssets'], { target: { is_singular: true } })
60
+ module.exports.LedgerUTxOAssets = createEntityProxy(['CardanoODataService', 'LedgerUTxOAssets'], { target: { is_singular: false }})
61
+ // LedgerAddresses
62
+ module.exports.LedgerAddress = createEntityProxy(['CardanoODataService', 'LedgerAddresses'], { target: { is_singular: true } })
63
+ module.exports.LedgerAddresses = createEntityProxy(['CardanoODataService', 'LedgerAddresses'], { target: { is_singular: false }})
64
+ // LedgerAddressAssets
65
+ module.exports.LedgerAddressAsset = createEntityProxy(['CardanoODataService', 'LedgerAddressAssets'], { target: { is_singular: true } })
66
+ module.exports.LedgerAddressAssets = createEntityProxy(['CardanoODataService', 'LedgerAddressAssets'], { target: { is_singular: false }})
67
+ // LedgerAccounts
68
+ module.exports.LedgerAccount = createEntityProxy(['CardanoODataService', 'LedgerAccounts'], { target: { is_singular: true } })
69
+ module.exports.LedgerAccounts = createEntityProxy(['CardanoODataService', 'LedgerAccounts'], { target: { is_singular: false }})
49
70
  // Accounts
50
71
  module.exports.Account = createEntityProxy(['CardanoODataService', 'Accounts'], { target: { is_singular: true } })
51
72
  module.exports.Accounts = createEntityProxy(['CardanoODataService', 'Accounts'], { target: { is_singular: false }})
@@ -398,6 +398,8 @@ export declare function _TransactionAspect<TBase extends new (...args: any[]) =>
398
398
  metadata?: __.Composition.of.many<TransactionMetadata_>
399
399
  inputs?: __.Composition.of.many<TransactionInputs>
400
400
  outputs?: __.Composition.of.many<TransactionOutputs>
401
+ certificates?: __.Composition.of.many<TransactionCertificates>
402
+ withdrawals?: __.Composition.of.many<TransactionWithdrawals>
401
403
  hasMetadata?: boolean | null
402
404
  hasInputs?: boolean | null
403
405
  hasOutputs?: boolean | null
@@ -424,6 +426,8 @@ export declare function _TransactionInputAspect<TBase extends new (...args: any[
424
426
  utxoData_dataHash?: _.Blake2b256 | null
425
427
  utxoData_inlineDatum?: string | null
426
428
  utxoData_referenceScriptHash?: _.Blake2b256 | null
429
+ spentTxHash?: _.Blake2b256 | null
430
+ spentOutputIndex?: number | null
427
431
  isCollateral?: boolean | null
428
432
  isReference?: boolean | null
429
433
  assets?: __.Composition.of.many<TransactionInputAssets>
@@ -465,6 +469,172 @@ export class TransactionInputAssets extends Array<TransactionInputAsset> {
465
469
  $count?: number
466
470
  }
467
471
 
472
+ // entity 'LedgerUTxO'
473
+ export declare function _LedgerUTxOAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
474
+ new (...args: any[]): {
475
+ txHash?: __.Key<_.Blake2b256>
476
+ outputIndex?: __.Key<number>
477
+ address?: _.Bech32 | null
478
+ stakeAddress?: _.Bech32 | null
479
+ addressType?: string | null
480
+ isScript?: boolean | null
481
+ lovelace?: _.Lovelace | null
482
+ createdSlot?: number | null
483
+ spentTxHash?: _.Blake2b256 | null
484
+ spentSlot?: number | null
485
+ utxo_dataHash?: _.Blake2b256 | null
486
+ utxo_inlineDatum?: string | null
487
+ utxo_referenceScriptHash?: _.Blake2b256 | null
488
+ hasAssets?: boolean | null
489
+ assets?: __.Composition.of.many<LedgerUTxOAssets>
490
+ } & InstanceType<TBase>
491
+ readonly kind: 'entity';
492
+ readonly keys: __.KeysOf<LedgerUTxO>;
493
+ readonly elements: __.ElementsOf<LedgerUTxO>;
494
+ readonly actions: globalThis.Record<never, never>;
495
+ };
496
+ export class LedgerUTxO extends _LedgerUTxOAspect(__.Entity) {
497
+ }
498
+ export class LedgerUTxOs extends Array<LedgerUTxO> {
499
+ $count?: number
500
+ }
501
+
502
+ // entity 'LedgerUTxOAsset'
503
+ export declare function _LedgerUTxOAssetAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
504
+ new (...args: any[]): {
505
+ utxo?: __.Key<__.Association.to<LedgerUTxO>>
506
+ utxo_txHash?: __.Key<_.Blake2b256>
507
+ utxo_outputIndex?: __.Key<number>
508
+ unit?: __.Key<_.AssetUnit>
509
+ asset_quantity?: _.Lovelace | null
510
+ asset_policyId?: _.Blake2b224 | null
511
+ asset_assetNameHex?: _.HexBytes | null
512
+ asset_assetName?: string | null
513
+ asset_fingerprint?: string | null
514
+ } & InstanceType<TBase>
515
+ readonly kind: 'entity';
516
+ readonly keys: __.KeysOf<LedgerUTxOAsset>;
517
+ readonly elements: __.ElementsOf<LedgerUTxOAsset>;
518
+ readonly actions: globalThis.Record<never, never>;
519
+ };
520
+ export class LedgerUTxOAsset extends _LedgerUTxOAssetAspect(__.Entity) {
521
+ }
522
+ export class LedgerUTxOAssets extends Array<LedgerUTxOAsset> {
523
+ $count?: number
524
+ }
525
+
526
+ // entity 'LedgerAddress'
527
+ export declare function _LedgerAddressAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
528
+ new (...args: any[]): {
529
+ address?: __.Key<_.Bech32>
530
+ stakeAddress?: _.Bech32 | null
531
+ addressType?: string | null
532
+ isScript?: boolean | null
533
+ totalLovelace?: _.Lovelace | null
534
+ utxoCount?: number | null
535
+ firstSeenSlot?: number | null
536
+ lastActiveSlot?: number | null
537
+ assets?: __.Composition.of.many<LedgerAddressAssets>
538
+ utxos?: __.Association.to.many<LedgerUTxOs>
539
+ } & InstanceType<TBase>
540
+ readonly kind: 'entity';
541
+ readonly keys: __.KeysOf<LedgerAddress>;
542
+ readonly elements: __.ElementsOf<LedgerAddress>;
543
+ readonly actions: globalThis.Record<never, never>;
544
+ };
545
+ export class LedgerAddress extends _LedgerAddressAspect(__.Entity) {
546
+ }
547
+ export class LedgerAddresses extends Array<LedgerAddress> {
548
+ $count?: number
549
+ }
550
+
551
+ // entity 'LedgerAddressAsset'
552
+ export declare function _LedgerAddressAssetAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
553
+ new (...args: any[]): {
554
+ address?: __.Key<__.Association.to<LedgerAddress>>
555
+ address_address?: __.Key<_.Bech32>
556
+ unit?: __.Key<_.AssetUnit>
557
+ asset_quantity?: _.Lovelace | null
558
+ asset_policyId?: _.Blake2b224 | null
559
+ asset_assetNameHex?: _.HexBytes | null
560
+ asset_assetName?: string | null
561
+ asset_fingerprint?: string | null
562
+ } & InstanceType<TBase>
563
+ readonly kind: 'entity';
564
+ readonly keys: __.KeysOf<LedgerAddressAsset>;
565
+ readonly elements: __.ElementsOf<LedgerAddressAsset>;
566
+ readonly actions: globalThis.Record<never, never>;
567
+ };
568
+ export class LedgerAddressAsset extends _LedgerAddressAssetAspect(__.Entity) {
569
+ }
570
+ export class LedgerAddressAssets extends Array<LedgerAddressAsset> {
571
+ $count?: number
572
+ }
573
+
574
+ // entity 'LedgerAccount'
575
+ export declare function _LedgerAccountAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
576
+ new (...args: any[]): {
577
+ stakeAddress?: __.Key<_.Bech32>
578
+ controlledAmount?: _.Lovelace | null
579
+ addressCount?: number | null
580
+ utxoCount?: number | null
581
+ lastActiveSlot?: number | null
582
+ addresses?: __.Association.to.many<LedgerAddresses>
583
+ } & InstanceType<TBase>
584
+ readonly kind: 'entity';
585
+ readonly keys: __.KeysOf<LedgerAccount>;
586
+ readonly elements: __.ElementsOf<LedgerAccount>;
587
+ readonly actions: globalThis.Record<never, never>;
588
+ };
589
+ export class LedgerAccount extends _LedgerAccountAspect(__.Entity) {
590
+ }
591
+ export class LedgerAccounts extends Array<LedgerAccount> {
592
+ $count?: number
593
+ }
594
+
595
+ // entity 'TransactionCertificate'
596
+ export declare function _TransactionCertificateAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
597
+ new (...args: any[]): {
598
+ tx?: __.Key<__.Association.to<Transaction>>
599
+ tx_hash?: __.Key<_.Blake2b256>
600
+ certIndex?: __.Key<number>
601
+ kind?: __.Key<string>
602
+ stakeAddress?: _.Bech32 | null
603
+ poolId?: _.Bech32 | null
604
+ drepId?: _.Bech32 | null
605
+ deposit?: _.Lovelace | null
606
+ epoch?: number | null
607
+ } & InstanceType<TBase>
608
+ readonly kind: 'entity';
609
+ readonly keys: __.KeysOf<TransactionCertificate>;
610
+ readonly elements: __.ElementsOf<TransactionCertificate>;
611
+ readonly actions: globalThis.Record<never, never>;
612
+ };
613
+ export class TransactionCertificate extends _TransactionCertificateAspect(__.Entity) {
614
+ }
615
+ export class TransactionCertificates extends Array<TransactionCertificate> {
616
+ $count?: number
617
+ }
618
+
619
+ // entity 'TransactionWithdrawal'
620
+ export declare function _TransactionWithdrawalAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
621
+ new (...args: any[]): {
622
+ tx?: __.Key<__.Association.to<Transaction>>
623
+ tx_hash?: __.Key<_.Blake2b256>
624
+ stakeAddress?: __.Key<_.Bech32>
625
+ lovelace?: _.Lovelace | null
626
+ } & InstanceType<TBase>
627
+ readonly kind: 'entity';
628
+ readonly keys: __.KeysOf<TransactionWithdrawal>;
629
+ readonly elements: __.ElementsOf<TransactionWithdrawal>;
630
+ readonly actions: globalThis.Record<never, never>;
631
+ };
632
+ export class TransactionWithdrawal extends _TransactionWithdrawalAspect(__.Entity) {
633
+ }
634
+ export class TransactionWithdrawals extends Array<TransactionWithdrawal> {
635
+ $count?: number
636
+ }
637
+
468
638
  // entity 'TransactionOutput'
469
639
  export declare function _TransactionOutputAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
470
640
  new (...args: any[]): {
@@ -913,6 +1083,12 @@ export declare function _CardanoSyncStateAspect<TBase extends new (...args: any[
913
1083
  consecutiveErrors?: number | null
914
1084
  desiredRunning?: boolean | null
915
1085
  leaseOwner?: string | null
1086
+ utxoSetStatus?: string | null
1087
+ utxoAnchorSlot?: number | null
1088
+ utxoAnchorHash?: _.Blake2b256 | null
1089
+ utxoSetImportedAt?: __.CdsTimestamp | null
1090
+ utxoAppliedSlot?: number | null
1091
+ utxoSetError?: string | null
916
1092
  leaseUntil?: __.CdsTimestamp | null
917
1093
  } & InstanceType<TBase>
918
1094
  readonly kind: 'entity';
@@ -51,6 +51,27 @@ module.exports.TransactionInputs = createEntityProxy(['odatano.cardano', 'Transa
51
51
  // TransactionInputAssets
52
52
  module.exports.TransactionInputAsset = createEntityProxy(['odatano.cardano', 'TransactionInputAssets'], { target: { is_singular: true } })
53
53
  module.exports.TransactionInputAssets = createEntityProxy(['odatano.cardano', 'TransactionInputAssets'], { target: { is_singular: false }})
54
+ // LedgerUTxOs
55
+ module.exports.LedgerUTxO = createEntityProxy(['odatano.cardano', 'LedgerUTxOs'], { target: { is_singular: true } })
56
+ module.exports.LedgerUTxOs = createEntityProxy(['odatano.cardano', 'LedgerUTxOs'], { target: { is_singular: false }})
57
+ // LedgerUTxOAssets
58
+ module.exports.LedgerUTxOAsset = createEntityProxy(['odatano.cardano', 'LedgerUTxOAssets'], { target: { is_singular: true } })
59
+ module.exports.LedgerUTxOAssets = createEntityProxy(['odatano.cardano', 'LedgerUTxOAssets'], { target: { is_singular: false }})
60
+ // LedgerAddresses
61
+ module.exports.LedgerAddress = createEntityProxy(['odatano.cardano', 'LedgerAddresses'], { target: { is_singular: true } })
62
+ module.exports.LedgerAddresses = createEntityProxy(['odatano.cardano', 'LedgerAddresses'], { target: { is_singular: false }})
63
+ // LedgerAddressAssets
64
+ module.exports.LedgerAddressAsset = createEntityProxy(['odatano.cardano', 'LedgerAddressAssets'], { target: { is_singular: true } })
65
+ module.exports.LedgerAddressAssets = createEntityProxy(['odatano.cardano', 'LedgerAddressAssets'], { target: { is_singular: false }})
66
+ // LedgerAccounts
67
+ module.exports.LedgerAccount = createEntityProxy(['odatano.cardano', 'LedgerAccounts'], { target: { is_singular: true } })
68
+ module.exports.LedgerAccounts = createEntityProxy(['odatano.cardano', 'LedgerAccounts'], { target: { is_singular: false }})
69
+ // TransactionCertificates
70
+ module.exports.TransactionCertificate = createEntityProxy(['odatano.cardano', 'TransactionCertificates'], { target: { is_singular: true } })
71
+ module.exports.TransactionCertificates = createEntityProxy(['odatano.cardano', 'TransactionCertificates'], { target: { is_singular: false }})
72
+ // TransactionWithdrawals
73
+ module.exports.TransactionWithdrawal = createEntityProxy(['odatano.cardano', 'TransactionWithdrawals'], { target: { is_singular: true } })
74
+ module.exports.TransactionWithdrawals = createEntityProxy(['odatano.cardano', 'TransactionWithdrawals'], { target: { is_singular: false }})
54
75
  // TransactionOutputs
55
76
  module.exports.TransactionOutput = createEntityProxy(['odatano.cardano', 'TransactionOutputs'], { target: { is_singular: true } })
56
77
  module.exports.TransactionOutputs = createEntityProxy(['odatano.cardano', 'TransactionOutputs'], { target: { is_singular: false }})
package/README.md CHANGED
@@ -102,7 +102,7 @@ Service available at `http://localhost:4004`. See the [Quick Start Guide](docs/Q
102
102
 
103
103
  | Service | Path | Purpose |
104
104
  |---|---|---|
105
- | CardanoODataService | `/odata/v4/cardano-odata/` | Read blockchain data (20 entities, 19 actions) |
105
+ | CardanoODataService | `/odata/v4/cardano-odata/` | Read blockchain data (29 entities, 19 actions) |
106
106
  | CardanoTransactionService | `/odata/v4/cardano-transaction/` | Build & submit transactions (13 actions) |
107
107
  | CardanoSignService | `/odata/v4/cardano-sign/` | External signing + HSM (9 actions) |
108
108
  | CardanoIndexerService | `/odata/v4/cardano-indexer/` | Chain crawler / pre-sync control (v2.0, off by default) |
@@ -140,8 +140,8 @@ AGENT_TOKEN_CACHE_MS=10000 # a resolved token is reused this long befo
140
140
  Wallet jobs are pinned to the grant's wallet and visible only to the grant that queued them.
141
141
  3. `GET /odata/v4/cardano-agent/GetGrantStatus()` tells the agent what it may do and how much budget
142
142
  is left; `RevokeAgentGrant` turns the token into an unknown token immediately.
143
- 4. Lifecycle (Admin, same semantics as NIGHTGATE's agent grants so a gateway drives both with one
144
- code path): `UpdateAgentGrant` changes label, allow list, job kinds, daily budget or expiry
143
+ 4. Lifecycle (Admin; the same semantics as the gateway's peer services, so one client drives
144
+ them all): `UpdateAgentGrant` changes label, allow list, job kinds, daily budget or expiry
145
145
  (absent = untouched, explicit `null` = cleared; the wallet binding is immutable, 409
146
146
  `GRANT_REVOKED` on a revoked grant); `RotateAgentGrantToken` returns a fresh token once, the old
147
147
  one is unknown from the next request; `GetGrantUsage(grantId, since, until)` lists admitted calls