@odatano/core 2.0.0-rc.2 → 2.0.0-rc.20
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/CardanoIndexerService/index.d.ts +139 -2
- package/@cds-models/CardanoIndexerService/index.js +18 -0
- package/@cds-models/CardanoODataService/index.d.ts +224 -0
- package/@cds-models/CardanoODataService/index.js +27 -0
- package/@cds-models/CardanoSignService/index.d.ts +5 -2
- package/@cds-models/CardanoTransactionService/index.d.ts +9 -9
- package/@cds-models/odatano/cardano/index.d.ts +316 -0
- package/@cds-models/odatano/cardano/index.js +33 -0
- package/README.md +195 -136
- package/db/schema.cds +2121 -1633
- package/package.json +179 -173
- package/src/index.d.ts +10 -10
- package/src/index.js +24 -14
- package/src/plugin.js +39 -52
- package/srv/blockchain/backends/blockfrost-backend.d.ts +29 -131
- package/srv/blockchain/backends/blockfrost-backend.js +45 -158
- package/srv/blockchain/backends/cardano-backend.d.ts +78 -158
- package/srv/blockchain/backends/cardano-backend.js +14 -5
- package/srv/blockchain/backends/koios-backend.d.ts +126 -60
- package/srv/blockchain/backends/koios-backend.js +292 -202
- package/srv/blockchain/backends/ogmios-backend.d.ts +59 -96
- package/srv/blockchain/backends/ogmios-backend.js +241 -153
- 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 +50 -205
- package/srv/blockchain/cardano-client.js +80 -224
- package/srv/blockchain/cardano-indexer.d.ts +146 -244
- package/srv/blockchain/cardano-indexer.js +442 -285
- package/srv/blockchain/cardano-tx-builder.d.ts +19 -84
- package/srv/blockchain/cardano-tx-builder.js +21 -107
- package/srv/blockchain/crawler/certificate-backfill.d.ts +45 -0
- package/srv/blockchain/crawler/certificate-backfill.js +150 -0
- package/srv/blockchain/crawler/crawler.d.ts +121 -53
- package/srv/blockchain/crawler/crawler.js +402 -82
- 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 +44 -28
- package/srv/blockchain/crawler/sync-state.js +115 -43
- package/srv/blockchain/crawler/utxo-set-import.d.ts +69 -0
- package/srv/blockchain/crawler/utxo-set-import.js +269 -0
- package/srv/blockchain/ledger-state.d.ts +80 -0
- package/srv/blockchain/ledger-state.js +383 -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 -48
- package/srv/blockchain/transaction-building/buildooor-tx.d.ts +71 -160
- package/srv/blockchain/transaction-building/buildooor-tx.js +185 -260
- package/srv/blockchain/transaction-building/cardano-tx.d.ts +8 -34
- package/srv/blockchain/wallet-worker/build-request.d.ts +4 -17
- package/srv/blockchain/wallet-worker/build-request.js +39 -23
- 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 +34 -90
- 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-indexer-service.cds +164 -73
- package/srv/cardano-indexer-service.js +156 -11
- package/srv/cardano-service.cds +45 -0
- package/srv/cardano-service.js +38 -96
- package/srv/cardano-sign-service.cds +200 -180
- package/srv/cardano-sign-service.js +55 -173
- package/srv/cardano-tx-service.cds +32 -26
- package/srv/cardano-tx-service.js +133 -195
- package/srv/cardano-worker-service.js +7 -15
- package/srv/server.d.ts +28 -86
- package/srv/server.js +95 -128
- 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 +914 -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 +19 -68
- package/srv/utils/const.js +20 -69
- 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 +89 -0
- package/srv/utils/db-sanitize.d.ts +27 -0
- package/srv/utils/db-sanitize.js +85 -0
- package/srv/utils/error-codes.d.ts +18 -73
- package/srv/utils/error-codes.js +17 -70
- package/srv/utils/errors.d.ts +34 -178
- package/srv/utils/errors.js +55 -217
- package/srv/utils/liveness.d.ts +16 -0
- package/srv/utils/liveness.js +41 -0
- package/srv/utils/mappers.d.ts +82 -210
- package/srv/utils/mappers.js +272 -293
- package/srv/utils/network-context.js +2 -11
- package/srv/utils/pg-order-nulls.d.ts +14 -0
- package/srv/utils/pg-order-nulls.js +57 -0
- package/srv/utils/plutus-placeholders.d.ts +6 -18
- package/srv/utils/plutus-placeholders.js +6 -20
- 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 +18 -92
- package/srv/utils/tx-build-helper.js +32 -123
- package/srv/utils/tx-request-parsers.d.ts +14 -20
- package/srv/utils/tx-request-parsers.js +33 -20
- package/srv/utils/tx-utils.d.ts +4 -23
- package/srv/utils/tx-utils.js +12 -41
- package/srv/utils/types.d.ts +112 -169
- package/srv/utils/types.js +2 -6
- package/srv/utils/validators.d.ts +19 -89
- package/srv/utils/validators.js +31 -138
|
@@ -110,6 +110,60 @@ export class Pools extends Array<Pool> {
|
|
|
110
110
|
$count?: number
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
// entity 'PoolEpochSnapshot'
|
|
114
|
+
export declare function _PoolEpochSnapshotAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
115
|
+
new (...args: any[]): {
|
|
116
|
+
poolId?: __.Key<_.Bech32>
|
|
117
|
+
epoch?: __.Key<number>
|
|
118
|
+
snapshotSlot?: number | null
|
|
119
|
+
snapshotTime?: number | null
|
|
120
|
+
blocksMinted?: number | null
|
|
121
|
+
blocksEpoch?: number | null
|
|
122
|
+
liveStake?: _.Lovelace | null
|
|
123
|
+
liveSize?: (number | string) | null
|
|
124
|
+
liveSaturation?: (number | string) | null
|
|
125
|
+
liveDelegators?: number | null
|
|
126
|
+
activeStake?: _.Lovelace | null
|
|
127
|
+
activeSize?: (number | string) | null
|
|
128
|
+
pledge?: _.Lovelace | null
|
|
129
|
+
margin?: (number | string) | null
|
|
130
|
+
fixedCost?: _.Lovelace | null
|
|
131
|
+
} & InstanceType<TBase>
|
|
132
|
+
readonly kind: 'entity';
|
|
133
|
+
readonly keys: __.KeysOf<PoolEpochSnapshot>;
|
|
134
|
+
readonly elements: __.ElementsOf<PoolEpochSnapshot>;
|
|
135
|
+
readonly actions: globalThis.Record<never, never>;
|
|
136
|
+
};
|
|
137
|
+
export class PoolEpochSnapshot extends _PoolEpochSnapshotAspect(__.Entity) {
|
|
138
|
+
}
|
|
139
|
+
export class PoolEpochSnapshots extends Array<PoolEpochSnapshot> {
|
|
140
|
+
$count?: number
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// entity 'DrepEpochSnapshot'
|
|
144
|
+
export declare function _DrepEpochSnapshotAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
145
|
+
new (...args: any[]): {
|
|
146
|
+
drepId?: __.Key<_.Bech32>
|
|
147
|
+
epoch?: __.Key<number>
|
|
148
|
+
snapshotSlot?: number | null
|
|
149
|
+
snapshotTime?: number | null
|
|
150
|
+
amount?: _.Lovelace | null
|
|
151
|
+
hasScript?: boolean | null
|
|
152
|
+
lastActiveEpoch?: number | null
|
|
153
|
+
retired?: boolean | null
|
|
154
|
+
expired?: boolean | null
|
|
155
|
+
} & InstanceType<TBase>
|
|
156
|
+
readonly kind: 'entity';
|
|
157
|
+
readonly keys: __.KeysOf<DrepEpochSnapshot>;
|
|
158
|
+
readonly elements: __.ElementsOf<DrepEpochSnapshot>;
|
|
159
|
+
readonly actions: globalThis.Record<never, never>;
|
|
160
|
+
};
|
|
161
|
+
export class DrepEpochSnapshot extends _DrepEpochSnapshotAspect(__.Entity) {
|
|
162
|
+
}
|
|
163
|
+
export class DrepEpochSnapshots extends Array<DrepEpochSnapshot> {
|
|
164
|
+
$count?: number
|
|
165
|
+
}
|
|
166
|
+
|
|
113
167
|
// entity 'Asset'
|
|
114
168
|
export declare function _AssetAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
115
169
|
new (...args: any[]): {
|
|
@@ -344,6 +398,8 @@ export declare function _TransactionAspect<TBase extends new (...args: any[]) =>
|
|
|
344
398
|
metadata?: __.Composition.of.many<TransactionMetadata_>
|
|
345
399
|
inputs?: __.Composition.of.many<TransactionInputs>
|
|
346
400
|
outputs?: __.Composition.of.many<TransactionOutputs>
|
|
401
|
+
certificates?: __.Composition.of.many<TransactionCertificates>
|
|
402
|
+
withdrawals?: __.Composition.of.many<TransactionWithdrawals>
|
|
347
403
|
hasMetadata?: boolean | null
|
|
348
404
|
hasInputs?: boolean | null
|
|
349
405
|
hasOutputs?: boolean | null
|
|
@@ -370,6 +426,8 @@ export declare function _TransactionInputAspect<TBase extends new (...args: any[
|
|
|
370
426
|
utxoData_dataHash?: _.Blake2b256 | null
|
|
371
427
|
utxoData_inlineDatum?: string | null
|
|
372
428
|
utxoData_referenceScriptHash?: _.Blake2b256 | null
|
|
429
|
+
spentTxHash?: _.Blake2b256 | null
|
|
430
|
+
spentOutputIndex?: number | null
|
|
373
431
|
isCollateral?: boolean | null
|
|
374
432
|
isReference?: boolean | null
|
|
375
433
|
assets?: __.Composition.of.many<TransactionInputAssets>
|
|
@@ -411,6 +469,172 @@ export class TransactionInputAssets extends Array<TransactionInputAsset> {
|
|
|
411
469
|
$count?: number
|
|
412
470
|
}
|
|
413
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
|
+
|
|
414
638
|
// entity 'TransactionOutput'
|
|
415
639
|
export declare function _TransactionOutputAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
416
640
|
new (...args: any[]): {
|
|
@@ -859,6 +1083,12 @@ export declare function _CardanoSyncStateAspect<TBase extends new (...args: any[
|
|
|
859
1083
|
consecutiveErrors?: number | null
|
|
860
1084
|
desiredRunning?: boolean | null
|
|
861
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
|
|
862
1092
|
leaseUntil?: __.CdsTimestamp | null
|
|
863
1093
|
} & InstanceType<TBase>
|
|
864
1094
|
readonly kind: 'entity';
|
|
@@ -958,3 +1188,89 @@ export class CardanoWalletJob extends _CardanoWalletJobAspect(__.Entity) {
|
|
|
958
1188
|
export class CardanoWalletJobs extends Array<CardanoWalletJob> {
|
|
959
1189
|
$count?: number
|
|
960
1190
|
}
|
|
1191
|
+
|
|
1192
|
+
// entity 'CardanoAgentGrant'
|
|
1193
|
+
export declare function _CardanoAgentGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
1194
|
+
new (...args: any[]): {
|
|
1195
|
+
ID?: __.Key<string>
|
|
1196
|
+
userId?: string
|
|
1197
|
+
agentLabel?: string | null
|
|
1198
|
+
tokenHash?: string
|
|
1199
|
+
allowedActions?: string
|
|
1200
|
+
walletId?: string | null
|
|
1201
|
+
allowedJobKinds?: string | null
|
|
1202
|
+
maxJobsPerDay?: number | null
|
|
1203
|
+
jobsUsedToday?: number | null
|
|
1204
|
+
budgetWindow?: string | null
|
|
1205
|
+
validUntil?: __.CdsTimestamp | null
|
|
1206
|
+
isActive?: boolean | null
|
|
1207
|
+
revokedAt?: __.CdsTimestamp | null
|
|
1208
|
+
createdAt?: __.CdsTimestamp | null
|
|
1209
|
+
lastUsedAt?: __.CdsTimestamp | null
|
|
1210
|
+
} & InstanceType<TBase>
|
|
1211
|
+
readonly kind: 'entity';
|
|
1212
|
+
readonly keys: __.KeysOf<CardanoAgentGrant>;
|
|
1213
|
+
readonly elements: __.ElementsOf<CardanoAgentGrant>;
|
|
1214
|
+
readonly actions: globalThis.Record<never, never>;
|
|
1215
|
+
};
|
|
1216
|
+
/**
|
|
1217
|
+
* Agent grants (v2.0): scoped bearer capabilities an Admin hands to an agent
|
|
1218
|
+
* instead of a full user. The token is a capability, not an identity — it is
|
|
1219
|
+
* stored as SHA-256 only, and a request carrying it runs as the principal
|
|
1220
|
+
* `agent:<ID>` with the role `agent-grant`, never as the operator. Enforcement
|
|
1221
|
+
* (allow list, wallet pinning, daily budget) lives in srv/utils/agent-grants.ts;
|
|
1222
|
+
* the transport lane that admits `x-agent-token` in srv/utils/agent-token-auth.ts.
|
|
1223
|
+
* Admin-only table: creation and revocation happen through CardanoAgentService
|
|
1224
|
+
* actions, a token request may read its own row only.
|
|
1225
|
+
*/
|
|
1226
|
+
export class CardanoAgentGrant extends _CardanoAgentGrantAspect(__.Entity) {
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Agent grants (v2.0): scoped bearer capabilities an Admin hands to an agent
|
|
1230
|
+
* instead of a full user. The token is a capability, not an identity — it is
|
|
1231
|
+
* stored as SHA-256 only, and a request carrying it runs as the principal
|
|
1232
|
+
* `agent:<ID>` with the role `agent-grant`, never as the operator. Enforcement
|
|
1233
|
+
* (allow list, wallet pinning, daily budget) lives in srv/utils/agent-grants.ts;
|
|
1234
|
+
* the transport lane that admits `x-agent-token` in srv/utils/agent-token-auth.ts.
|
|
1235
|
+
* Admin-only table: creation and revocation happen through CardanoAgentService
|
|
1236
|
+
* actions, a token request may read its own row only.
|
|
1237
|
+
*/
|
|
1238
|
+
export class CardanoAgentGrants extends Array<CardanoAgentGrant> {
|
|
1239
|
+
$count?: number
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
// entity 'CardanoAgentGrantUsage'
|
|
1243
|
+
export declare function _CardanoAgentGrantUsageAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
1244
|
+
new (...args: any[]): {
|
|
1245
|
+
grant?: __.Key<__.Association.to<CardanoAgentGrant>>
|
|
1246
|
+
grant_ID?: __.Key<string>
|
|
1247
|
+
day?: __.Key<string>
|
|
1248
|
+
service?: __.Key<string>
|
|
1249
|
+
action?: __.Key<string>
|
|
1250
|
+
calls?: number | null
|
|
1251
|
+
refunded?: number | null
|
|
1252
|
+
} & InstanceType<TBase>
|
|
1253
|
+
readonly kind: 'entity';
|
|
1254
|
+
readonly keys: __.KeysOf<CardanoAgentGrantUsage>;
|
|
1255
|
+
readonly elements: __.ElementsOf<CardanoAgentGrantUsage>;
|
|
1256
|
+
readonly actions: globalThis.Record<never, never>;
|
|
1257
|
+
};
|
|
1258
|
+
/**
|
|
1259
|
+
* Daily per-action counters of admitted calls under a grant (feeds
|
|
1260
|
+
* CardanoAgentService.GetGrantUsage). Written by the enforcement hook next to
|
|
1261
|
+
* the daily budget: `calls + 1` when a call is admitted, `refunded + 1` when the
|
|
1262
|
+
* handler then refuses its input. Not exposed as an entity — the function is
|
|
1263
|
+
* the contract. A few dozen rows per grant and day at most; no retention job yet.
|
|
1264
|
+
*/
|
|
1265
|
+
export class CardanoAgentGrantUsage extends _CardanoAgentGrantUsageAspect(__.Entity) {
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* Daily per-action counters of admitted calls under a grant (feeds
|
|
1269
|
+
* CardanoAgentService.GetGrantUsage). Written by the enforcement hook next to
|
|
1270
|
+
* the daily budget: `calls + 1` when a call is admitted, `refunded + 1` when the
|
|
1271
|
+
* handler then refuses its input. Not exposed as an entity — the function is
|
|
1272
|
+
* the contract. A few dozen rows per grant and day at most; no retention job yet.
|
|
1273
|
+
*/
|
|
1274
|
+
export class CardanoAgentGrantUsage_ extends Array<CardanoAgentGrantUsage> {
|
|
1275
|
+
$count?: number
|
|
1276
|
+
}
|
|
@@ -12,6 +12,12 @@ module.exports.Epochs = createEntityProxy(['odatano.cardano', 'Epochs'], { targe
|
|
|
12
12
|
// Pools
|
|
13
13
|
module.exports.Pool = createEntityProxy(['odatano.cardano', 'Pools'], { target: { is_singular: true } })
|
|
14
14
|
module.exports.Pools = createEntityProxy(['odatano.cardano', 'Pools'], { target: { is_singular: false }})
|
|
15
|
+
// PoolEpochSnapshots
|
|
16
|
+
module.exports.PoolEpochSnapshot = createEntityProxy(['odatano.cardano', 'PoolEpochSnapshots'], { target: { is_singular: true } })
|
|
17
|
+
module.exports.PoolEpochSnapshots = createEntityProxy(['odatano.cardano', 'PoolEpochSnapshots'], { target: { is_singular: false }})
|
|
18
|
+
// DrepEpochSnapshots
|
|
19
|
+
module.exports.DrepEpochSnapshot = createEntityProxy(['odatano.cardano', 'DrepEpochSnapshots'], { target: { is_singular: true } })
|
|
20
|
+
module.exports.DrepEpochSnapshots = createEntityProxy(['odatano.cardano', 'DrepEpochSnapshots'], { target: { is_singular: false }})
|
|
15
21
|
// Assets
|
|
16
22
|
module.exports.Asset = createEntityProxy(['odatano.cardano', 'Assets'], { target: { is_singular: true } })
|
|
17
23
|
module.exports.Assets = createEntityProxy(['odatano.cardano', 'Assets'], { target: { is_singular: false }})
|
|
@@ -45,6 +51,27 @@ module.exports.TransactionInputs = createEntityProxy(['odatano.cardano', 'Transa
|
|
|
45
51
|
// TransactionInputAssets
|
|
46
52
|
module.exports.TransactionInputAsset = createEntityProxy(['odatano.cardano', 'TransactionInputAssets'], { target: { is_singular: true } })
|
|
47
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 }})
|
|
48
75
|
// TransactionOutputs
|
|
49
76
|
module.exports.TransactionOutput = createEntityProxy(['odatano.cardano', 'TransactionOutputs'], { target: { is_singular: true } })
|
|
50
77
|
module.exports.TransactionOutputs = createEntityProxy(['odatano.cardano', 'TransactionOutputs'], { target: { is_singular: false }})
|
|
@@ -105,6 +132,12 @@ module.exports.CardanoWorkerWallets = createEntityProxy(['odatano.cardano', 'Car
|
|
|
105
132
|
// CardanoWalletJobs
|
|
106
133
|
module.exports.CardanoWalletJob = createEntityProxy(['odatano.cardano', 'CardanoWalletJobs'], { target: { is_singular: true } })
|
|
107
134
|
module.exports.CardanoWalletJobs = createEntityProxy(['odatano.cardano', 'CardanoWalletJobs'], { target: { is_singular: false }})
|
|
135
|
+
// CardanoAgentGrants
|
|
136
|
+
module.exports.CardanoAgentGrant = createEntityProxy(['odatano.cardano', 'CardanoAgentGrants'], { target: { is_singular: true } })
|
|
137
|
+
module.exports.CardanoAgentGrants = createEntityProxy(['odatano.cardano', 'CardanoAgentGrants'], { target: { is_singular: false }})
|
|
138
|
+
// CardanoAgentGrantUsage
|
|
139
|
+
module.exports.CardanoAgentGrantUsage = createEntityProxy(['odatano.cardano', 'CardanoAgentGrantUsage'], { target: { is_singular: true } })
|
|
140
|
+
module.exports.CardanoAgentGrantUsage_ = createEntityProxy(['odatano.cardano', 'CardanoAgentGrantUsage'], { target: { is_singular: false }})
|
|
108
141
|
// events
|
|
109
142
|
// actions
|
|
110
143
|
// enums
|