@odatano/core 2.0.0-rc.42 → 2.0.0-rc.43

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 (37) hide show
  1. package/@cds-models/CardanoIndexerService/index.d.ts +47 -0
  2. package/@cds-models/CardanoIndexerService/index.js +7 -0
  3. package/@cds-models/CardanoODataService/index.d.ts +35 -0
  4. package/@cds-models/CardanoODataService/index.js +4 -0
  5. package/@cds-models/CardanoSignService/index.d.ts +1 -0
  6. package/@cds-models/CardanoTransactionService/index.d.ts +1 -0
  7. package/@cds-models/index.d.ts +1 -0
  8. package/@cds-models/odatano/cardano/index.d.ts +24 -0
  9. package/@cds-models/odatano/cardano/index.js +3 -0
  10. package/README.md +195 -195
  11. package/db/schema.cds +23 -0
  12. package/db/types.cds +421 -417
  13. package/package.json +1 -1
  14. package/srv/blockchain/backends/ogmios-backend.js +1 -0
  15. package/srv/blockchain/cardano-indexer.js +4 -1
  16. package/srv/blockchain/crawler/credential-backfill.d.ts +37 -0
  17. package/srv/blockchain/crawler/credential-backfill.js +124 -0
  18. package/srv/blockchain/crawler/transaction-backfill.d.ts +3 -2
  19. package/srv/blockchain/crawler/transaction-backfill.js +8 -4
  20. package/srv/blockchain/ledger-state.d.ts +1 -0
  21. package/srv/blockchain/ledger-state.js +1 -0
  22. package/srv/blockchain/stored-chain.js +5 -1
  23. package/srv/blockchain/transaction-rows.d.ts +1 -1
  24. package/srv/blockchain/transaction-rows.js +2 -1
  25. package/srv/cardano-indexer-service.cds +29 -2
  26. package/srv/cardano-indexer-service.js +25 -2
  27. package/srv/cardano-service.cds +344 -332
  28. package/srv/cardano-service.js +9 -0
  29. package/srv/cbor/index.d.ts +1 -0
  30. package/srv/cbor/index.js +4 -1
  31. package/srv/cbor/plutus-data-json.d.ts +24 -0
  32. package/srv/cbor/plutus-data-json.js +32 -0
  33. package/srv/utils/agent-grants.js +1 -1
  34. package/srv/utils/db-indexes.js +5 -0
  35. package/srv/utils/mappers.d.ts +6 -2
  36. package/srv/utils/mappers.js +13 -0
  37. package/srv/utils/types.d.ts +9 -0
@@ -27,6 +27,7 @@ export default class {
27
27
  static readonly importUtxoSet: typeof importUtxoSet;
28
28
  static readonly backfillCertificates: typeof backfillCertificates;
29
29
  static readonly backfillTransactions: typeof backfillTransactions;
30
+ static readonly backfillPaymentCredentials: typeof backfillPaymentCredentials;
30
31
  }
31
32
 
32
33
  // entity 'SyncState'
@@ -104,6 +105,7 @@ export declare function _CrawlerStatusAspect<TBase extends new (...args: any[])
104
105
  utxoSet?: UtxoSetStatus | null
105
106
  certificateBackfill?: CertificateBackfillStatus | null
106
107
  transactionBackfill?: TransactionBackfillStatus | null
108
+ credentialBackfill?: CredentialBackfillStatus | null
107
109
  epochSnapshots?: EpochSnapshotStatus | null
108
110
  } & InstanceType<TBase>
109
111
  readonly kind: 'type';
@@ -164,6 +166,7 @@ export declare function _TransactionBackfillStatusAspect<TBase extends new (...a
164
166
  transactions?: number | null
165
167
  inputs?: number | null
166
168
  redeemers?: number | null
169
+ datums?: number | null
167
170
  rewritten?: number | null
168
171
  skipped?: number | null
169
172
  startedAt?: __.CdsTimestamp | null
@@ -178,6 +181,40 @@ export declare function _TransactionBackfillStatusAspect<TBase extends new (...a
178
181
  export class TransactionBackfillStatus extends _TransactionBackfillStatusAspect(__.Entity) {
179
182
  }
180
183
 
184
+ // entity 'CredentialBackfillStatus'
185
+ export declare function _CredentialBackfillStatusAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
186
+ new (...args: any[]): {
187
+ status?: string | null
188
+ table?: string | null
189
+ outputs?: number | null
190
+ inputs?: number | null
191
+ ledgerUtxos?: number | null
192
+ startedAt?: __.CdsTimestamp | null
193
+ finishedAt?: __.CdsTimestamp | null
194
+ error?: string | null
195
+ } & InstanceType<TBase>
196
+ readonly kind: 'type';
197
+ readonly keys: __.KeysOf<CredentialBackfillStatus>;
198
+ readonly elements: __.ElementsOf<CredentialBackfillStatus>;
199
+ readonly actions: globalThis.Record<never, never>;
200
+ };
201
+ export class CredentialBackfillStatus extends _CredentialBackfillStatusAspect(__.Entity) {
202
+ }
203
+
204
+ // entity 'BackfillResult'
205
+ export declare function _BackfillResultAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
206
+ new (...args: any[]): {
207
+ accepted?: boolean | null
208
+ message?: string | null
209
+ } & InstanceType<TBase>
210
+ readonly kind: 'type';
211
+ readonly keys: __.KeysOf<BackfillResult>;
212
+ readonly elements: __.ElementsOf<BackfillResult>;
213
+ readonly actions: globalThis.Record<never, never>;
214
+ };
215
+ export class BackfillResult extends _BackfillResultAspect(__.Entity) {
216
+ }
217
+
181
218
  // entity 'CertificateBackfillResult'
182
219
  export declare function _CertificateBackfillResultAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
183
220
  new (...args: any[]): {
@@ -331,4 +368,14 @@ export declare const backfillTransactions: {
331
368
  // metadata (do not use)
332
369
  __parameters: {fromSlot?: number | null, toSlot?: number | null}, __returns: globalThis.Promise<CertificateBackfillResult | null> | CertificateBackfillResult | null, __self: never
333
370
  kind: 'action'
371
+ }
372
+
373
+ export declare const backfillPaymentCredentials: {
374
+ // positional
375
+ (): globalThis.Promise<BackfillResult | null> | BackfillResult | null
376
+ // named
377
+ ({}: globalThis.Record<never, never>): globalThis.Promise<BackfillResult | null> | BackfillResult | null
378
+ // metadata (do not use)
379
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<BackfillResult | null> | BackfillResult | null, __self: never
380
+ kind: 'action'
334
381
  }
@@ -22,6 +22,12 @@ module.exports.__Array_CertificateBackfillStatus_ = createEntityProxy(['CardanoI
22
22
  // TransactionBackfillStatus
23
23
  module.exports.TransactionBackfillStatus = createEntityProxy(['CardanoIndexerService', 'TransactionBackfillStatus'], { target: { is_singular: true } })
24
24
  module.exports.__Array_TransactionBackfillStatus_ = createEntityProxy(['CardanoIndexerService', 'TransactionBackfillStatus'], { target: { is_singular: false }})
25
+ // CredentialBackfillStatus
26
+ module.exports.CredentialBackfillStatus = createEntityProxy(['CardanoIndexerService', 'CredentialBackfillStatus'], { target: { is_singular: true } })
27
+ module.exports.__Array_CredentialBackfillStatus_ = createEntityProxy(['CardanoIndexerService', 'CredentialBackfillStatus'], { target: { is_singular: false }})
28
+ // BackfillResult
29
+ module.exports.BackfillResult = createEntityProxy(['CardanoIndexerService', 'BackfillResult'], { target: { is_singular: true } })
30
+ module.exports.__Array_BackfillResult_ = createEntityProxy(['CardanoIndexerService', 'BackfillResult'], { target: { is_singular: false }})
25
31
  // CertificateBackfillResult
26
32
  module.exports.CertificateBackfillResult = createEntityProxy(['CardanoIndexerService', 'CertificateBackfillResult'], { target: { is_singular: true } })
27
33
  module.exports.__Array_CertificateBackfillResult_ = createEntityProxy(['CardanoIndexerService', 'CertificateBackfillResult'], { target: { is_singular: false }})
@@ -45,4 +51,5 @@ module.exports.resumeCrawler = 'resumeCrawler'
45
51
  module.exports.importUtxoSet = 'importUtxoSet'
46
52
  module.exports.backfillCertificates = 'backfillCertificates'
47
53
  module.exports.backfillTransactions = 'backfillTransactions'
54
+ module.exports.backfillPaymentCredentials = 'backfillPaymentCredentials'
48
55
  // enums
@@ -52,6 +52,7 @@ export default class {
52
52
  static readonly GetLatestEpoch: typeof GetLatestEpoch;
53
53
  static readonly GetLedgerProtocolParameters: typeof GetLedgerProtocolParameters;
54
54
  static readonly ParseTransactionCbor: typeof ParseTransactionCbor;
55
+ static readonly DecodePlutusData: typeof DecodePlutusData;
55
56
  }
56
57
 
57
58
  // entity 'NetworkInformation'
@@ -348,6 +349,7 @@ export declare function _TransactionAspect<TBase extends new (...args: any[]) =>
348
349
  outputs?: __.Composition.of.many<TransactionOutputs>
349
350
  certificates?: __.Composition.of.many<TransactionCertificates>
350
351
  withdrawals?: __.Composition.of.many<TransactionWithdrawals>
352
+ datums?: __.Composition.of.many<TransactionDatums>
351
353
  hasMetadata?: boolean | null
352
354
  hasInputs?: boolean | null
353
355
  hasOutputs?: boolean | null
@@ -376,6 +378,7 @@ export declare function _TransactionInputAspect<TBase extends new (...args: any[
376
378
  utxoData_referenceScriptHash?: _.Blake2b256 | null
377
379
  utxoData_referenceScriptSize?: number | null
378
380
  utxoData_referenceScriptType?: string | null
381
+ utxoData_paymentCredential?: string | null
379
382
  spentTxHash?: _.Blake2b256 | null
380
383
  spentOutputIndex?: number | null
381
384
  isCollateral?: boolean | null
@@ -408,6 +411,7 @@ export declare function _TransactionOutputAspect<TBase extends new (...args: any
408
411
  utxo_referenceScriptHash?: _.Blake2b256 | null
409
412
  utxo_referenceScriptSize?: number | null
410
413
  utxo_referenceScriptType?: string | null
414
+ utxo_paymentCredential?: string | null
411
415
  assets?: __.Composition.of.many<TransactionOutputAssets>
412
416
  hasAddresses?: boolean | null
413
417
  hasAssets?: boolean | null
@@ -539,6 +543,25 @@ export class TransactionRedeemers extends Array<TransactionRedeemer> {
539
543
  $count?: number
540
544
  }
541
545
 
546
+ // entity 'TransactionDatum'
547
+ export declare function _TransactionDatumAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
548
+ new (...args: any[]): {
549
+ tx?: __.Key<__.Association.to<Transaction>>
550
+ tx_hash?: __.Key<_.Blake2b256>
551
+ dataHash?: __.Key<_.Blake2b256>
552
+ datum?: string | null
553
+ } & InstanceType<TBase>
554
+ readonly kind: 'entity';
555
+ readonly keys: __.KeysOf<TransactionDatum>;
556
+ readonly elements: __.ElementsOf<TransactionDatum>;
557
+ readonly actions: globalThis.Record<never, never>;
558
+ };
559
+ export class TransactionDatum extends _TransactionDatumAspect(__.Entity) {
560
+ }
561
+ export class TransactionDatums extends Array<TransactionDatum> {
562
+ $count?: number
563
+ }
564
+
542
565
  // entity 'LedgerUTxO'
543
566
  export declare function _LedgerUTxOAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
544
567
  new (...args: any[]): {
@@ -557,6 +580,7 @@ export declare function _LedgerUTxOAspect<TBase extends new (...args: any[]) =>
557
580
  utxo_referenceScriptHash?: _.Blake2b256 | null
558
581
  utxo_referenceScriptSize?: number | null
559
582
  utxo_referenceScriptType?: string | null
583
+ utxo_paymentCredential?: string | null
560
584
  hasAssets?: boolean | null
561
585
  assets?: __.Composition.of.many<LedgerUTxOAssets>
562
586
  } & InstanceType<TBase>
@@ -766,6 +790,7 @@ export declare function _AddressUTxOAspect<TBase extends new (...args: any[]) =>
766
790
  utxodata_referenceScriptHash?: _.Blake2b256 | null
767
791
  utxodata_referenceScriptSize?: number | null
768
792
  utxodata_referenceScriptType?: string | null
793
+ utxodata_paymentCredential?: string | null
769
794
  lovelace?: _.Lovelace | null
770
795
  assets?: __.Composition.of.many<UTxOAssets>
771
796
  hasAssets?: boolean | null
@@ -1101,4 +1126,14 @@ export declare const ParseTransactionCbor: {
1101
1126
  // metadata (do not use)
1102
1127
  __parameters: {cbor?: string | null}, __returns: globalThis.Promise<_.ParsedTransaction | null> | _.ParsedTransaction | null, __self: never
1103
1128
  kind: 'action'
1129
+ }
1130
+
1131
+ export declare const DecodePlutusData: {
1132
+ // positional
1133
+ (cbor: string | null): globalThis.Promise<string | null> | string | null
1134
+ // named
1135
+ ({cbor}: {cbor?: string | null}): globalThis.Promise<string | null> | string | null
1136
+ // metadata (do not use)
1137
+ __parameters: {cbor?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
1138
+ kind: 'action'
1104
1139
  }
@@ -58,6 +58,9 @@ module.exports.TransactionWithdrawals = createEntityProxy(['CardanoODataService'
58
58
  // TransactionRedeemers
59
59
  module.exports.TransactionRedeemer = createEntityProxy(['CardanoODataService', 'TransactionRedeemers'], { target: { is_singular: true } })
60
60
  module.exports.TransactionRedeemers = createEntityProxy(['CardanoODataService', 'TransactionRedeemers'], { target: { is_singular: false }})
61
+ // TransactionDatums
62
+ module.exports.TransactionDatum = createEntityProxy(['CardanoODataService', 'TransactionDatums'], { target: { is_singular: true } })
63
+ module.exports.TransactionDatums = createEntityProxy(['CardanoODataService', 'TransactionDatums'], { target: { is_singular: false }})
61
64
  // LedgerUTxOs
62
65
  module.exports.LedgerUTxO = createEntityProxy(['CardanoODataService', 'LedgerUTxOs'], { target: { is_singular: true } })
63
66
  module.exports.LedgerUTxOs = createEntityProxy(['CardanoODataService', 'LedgerUTxOs'], { target: { is_singular: false }})
@@ -119,4 +122,5 @@ module.exports.GetLatestBlock = 'GetLatestBlock'
119
122
  module.exports.GetLatestEpoch = 'GetLatestEpoch'
120
123
  module.exports.GetLedgerProtocolParameters = 'GetLedgerProtocolParameters'
121
124
  module.exports.ParseTransactionCbor = 'ParseTransactionCbor'
125
+ module.exports.DecodePlutusData = 'DecodePlutusData'
122
126
  // enums
@@ -363,6 +363,7 @@ export declare function _AddressUTxOAspect<TBase extends new (...args: any[]) =>
363
363
  utxodata_referenceScriptHash?: _.Blake2b256 | null
364
364
  utxodata_referenceScriptSize?: number | null
365
365
  utxodata_referenceScriptType?: string | null
366
+ utxodata_paymentCredential?: string | null
366
367
  lovelace?: _.Lovelace | null
367
368
  assets?: __.Composition.of.many<UTxOAssets>
368
369
  hasAssets?: boolean | null
@@ -370,6 +370,7 @@ export declare function _AddressUTxOAspect<TBase extends new (...args: any[]) =>
370
370
  utxodata_referenceScriptHash?: _.Blake2b256 | null
371
371
  utxodata_referenceScriptSize?: number | null
372
372
  utxodata_referenceScriptType?: string | null
373
+ utxodata_paymentCredential?: string | null
373
374
  lovelace?: _.Lovelace | null
374
375
  assets?: __.Composition.of.many<UTxOAssets>
375
376
  hasAssets?: boolean | null
@@ -221,6 +221,7 @@ export declare function _UTxODataSliceAspect<TBase extends new (...args: any[])
221
221
  referenceScriptHash?: Blake2b256 | null
222
222
  referenceScriptSize?: number | null
223
223
  referenceScriptType?: string | null
224
+ paymentCredential?: string | null
224
225
  } & InstanceType<TBase>
225
226
  readonly kind: 'type';
226
227
  readonly keys: __.KeysOf<UTxODataSlice>;
@@ -347,6 +347,7 @@ export declare function _AddressUTxOAspect<TBase extends new (...args: any[]) =>
347
347
  utxodata_referenceScriptHash?: _.Blake2b256 | null
348
348
  utxodata_referenceScriptSize?: number | null
349
349
  utxodata_referenceScriptType?: string | null
350
+ utxodata_paymentCredential?: string | null
350
351
  lovelace?: _.Lovelace | null
351
352
  assets?: __.Composition.of.many<UTxOAssets>
352
353
  hasAssets?: boolean | null
@@ -439,6 +440,7 @@ export declare function _TransactionAspect<TBase extends new (...args: any[]) =>
439
440
  outputs?: __.Composition.of.many<TransactionOutputs>
440
441
  certificates?: __.Composition.of.many<TransactionCertificates>
441
442
  withdrawals?: __.Composition.of.many<TransactionWithdrawals>
443
+ datums?: __.Composition.of.many<TransactionDatums>
442
444
  hasMetadata?: boolean | null
443
445
  hasInputs?: boolean | null
444
446
  hasOutputs?: boolean | null
@@ -467,6 +469,7 @@ export declare function _TransactionInputAspect<TBase extends new (...args: any[
467
469
  utxoData_referenceScriptHash?: _.Blake2b256 | null
468
470
  utxoData_referenceScriptSize?: number | null
469
471
  utxoData_referenceScriptType?: string | null
472
+ utxoData_paymentCredential?: string | null
470
473
  spentTxHash?: _.Blake2b256 | null
471
474
  spentOutputIndex?: number | null
472
475
  isCollateral?: boolean | null
@@ -528,6 +531,7 @@ export declare function _LedgerUTxOAspect<TBase extends new (...args: any[]) =>
528
531
  utxo_referenceScriptHash?: _.Blake2b256 | null
529
532
  utxo_referenceScriptSize?: number | null
530
533
  utxo_referenceScriptType?: string | null
534
+ utxo_paymentCredential?: string | null
531
535
  hasAssets?: boolean | null
532
536
  assets?: __.Composition.of.many<LedgerUTxOAssets>
533
537
  } & InstanceType<TBase>
@@ -704,6 +708,25 @@ export class TransactionRedeemers extends Array<TransactionRedeemer> {
704
708
  $count?: number
705
709
  }
706
710
 
711
+ // entity 'TransactionDatum'
712
+ export declare function _TransactionDatumAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
713
+ new (...args: any[]): {
714
+ tx?: __.Key<__.Association.to<Transaction>>
715
+ tx_hash?: __.Key<_.Blake2b256>
716
+ dataHash?: __.Key<_.Blake2b256>
717
+ datum?: string | null
718
+ } & InstanceType<TBase>
719
+ readonly kind: 'entity';
720
+ readonly keys: __.KeysOf<TransactionDatum>;
721
+ readonly elements: __.ElementsOf<TransactionDatum>;
722
+ readonly actions: globalThis.Record<never, never>;
723
+ };
724
+ export class TransactionDatum extends _TransactionDatumAspect(__.Entity) {
725
+ }
726
+ export class TransactionDatums extends Array<TransactionDatum> {
727
+ $count?: number
728
+ }
729
+
707
730
  // entity 'TransactionOutput'
708
731
  export declare function _TransactionOutputAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
709
732
  new (...args: any[]): {
@@ -717,6 +740,7 @@ export declare function _TransactionOutputAspect<TBase extends new (...args: any
717
740
  utxo_referenceScriptHash?: _.Blake2b256 | null
718
741
  utxo_referenceScriptSize?: number | null
719
742
  utxo_referenceScriptType?: string | null
743
+ utxo_paymentCredential?: string | null
720
744
  assets?: __.Composition.of.many<TransactionOutputAssets>
721
745
  hasAddresses?: boolean | null
722
746
  hasAssets?: boolean | null
@@ -78,6 +78,9 @@ module.exports.TransactionWithdrawals = createEntityProxy(['odatano.cardano', 'T
78
78
  // TransactionRedeemers
79
79
  module.exports.TransactionRedeemer = createEntityProxy(['odatano.cardano', 'TransactionRedeemers'], { target: { is_singular: true } })
80
80
  module.exports.TransactionRedeemers = createEntityProxy(['odatano.cardano', 'TransactionRedeemers'], { target: { is_singular: false }})
81
+ // TransactionDatums
82
+ module.exports.TransactionDatum = createEntityProxy(['odatano.cardano', 'TransactionDatums'], { target: { is_singular: true } })
83
+ module.exports.TransactionDatums = createEntityProxy(['odatano.cardano', 'TransactionDatums'], { target: { is_singular: false }})
81
84
  // TransactionOutputs
82
85
  module.exports.TransactionOutput = createEntityProxy(['odatano.cardano', 'TransactionOutputs'], { target: { is_singular: true } })
83
86
  module.exports.TransactionOutputs = createEntityProxy(['odatano.cardano', 'TransactionOutputs'], { target: { is_singular: false }})