@odatano/core 1.10.0 → 2.0.0-rc.1
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/CardanoIndexerService/index.d.ts +142 -0
- package/@cds-models/CardanoIndexerService/index.js +23 -0
- package/@cds-models/CardanoODataService/index.d.ts +693 -2172
- package/@cds-models/CardanoODataService/index.js +88 -390
- package/@cds-models/CardanoSignService/index.d.ts +443 -1574
- package/@cds-models/CardanoSignService/index.js +62 -293
- package/@cds-models/CardanoTransactionService/index.d.ts +431 -1488
- package/@cds-models/CardanoTransactionService/index.js +60 -271
- package/@cds-models/CardanoWorkerService/index.d.ts +224 -0
- package/@cds-models/CardanoWorkerService/index.js +32 -0
- package/@cds-models/_/index.d.ts +70 -40
- package/@cds-models/_/index.js +17 -32
- package/@cds-models/cds/outbox/index.d.ts +28 -0
- package/@cds-models/index.d.ts +225 -522
- package/@cds-models/index.js +35 -218
- package/@cds-models/odatano/cardano/index.d.ts +896 -2947
- package/@cds-models/odatano/cardano/index.js +109 -536
- package/@cds-models/sap/common/index.d.ts +196 -600
- package/@cds-models/sap/common/index.js +28 -269
- package/README.md +136 -102
- package/db/schema.cds +283 -1
- package/db/types.cds +48 -0
- package/package.json +43 -34
- package/src/index.d.ts +1 -1
- package/src/index.js +10 -2
- package/src/plugin.js +12 -2
- package/srv/blockchain/backends/blockfrost-backend.d.ts +21 -2
- package/srv/blockchain/backends/blockfrost-backend.js +68 -15
- package/srv/blockchain/backends/cardano-backend.d.ts +69 -0
- package/srv/blockchain/backends/cardano-backend.js +13 -0
- package/srv/blockchain/backends/koios-backend.d.ts +26 -2
- package/srv/blockchain/backends/koios-backend.js +147 -15
- package/srv/blockchain/backends/ogmios-backend.d.ts +37 -6
- package/srv/blockchain/backends/ogmios-backend.js +254 -5
- package/srv/blockchain/cardano-client.d.ts +19 -0
- package/srv/blockchain/cardano-client.js +36 -0
- package/srv/blockchain/cardano-indexer.d.ts +50 -1
- package/srv/blockchain/cardano-indexer.js +191 -0
- package/srv/blockchain/crawler/crawler.d.ts +151 -0
- package/srv/blockchain/crawler/crawler.js +677 -0
- package/srv/blockchain/crawler/hooks.d.ts +43 -0
- package/srv/blockchain/crawler/hooks.js +62 -0
- package/srv/blockchain/crawler/index.d.ts +26 -0
- package/srv/blockchain/crawler/index.js +135 -0
- package/srv/blockchain/crawler/sync-state.d.ts +94 -0
- package/srv/blockchain/crawler/sync-state.js +265 -0
- package/srv/blockchain/signing/hsm-signer.d.ts +45 -0
- package/srv/blockchain/signing/hsm-signer.js +8 -1
- package/srv/blockchain/signing/signature-verifier.js +4 -5
- package/srv/blockchain/transaction-building/buildooor-tx.d.ts +7 -10
- package/srv/blockchain/transaction-building/buildooor-tx.js +12 -15
- package/srv/blockchain/wallet-worker/build-request.d.ts +26 -0
- package/srv/blockchain/wallet-worker/build-request.js +341 -0
- package/srv/blockchain/wallet-worker/confirmation-tracker.d.ts +86 -0
- package/srv/blockchain/wallet-worker/confirmation-tracker.js +228 -0
- package/srv/blockchain/wallet-worker/index.d.ts +14 -0
- package/srv/blockchain/wallet-worker/index.js +80 -0
- package/srv/blockchain/wallet-worker/job-store.d.ts +261 -0
- package/srv/blockchain/wallet-worker/job-store.js +564 -0
- package/srv/blockchain/wallet-worker/lease-heartbeat.d.ts +43 -0
- package/srv/blockchain/wallet-worker/lease-heartbeat.js +99 -0
- package/srv/blockchain/wallet-worker/signers.d.ts +57 -0
- package/srv/blockchain/wallet-worker/signers.js +131 -0
- package/srv/blockchain/wallet-worker/wallet-worker.d.ts +145 -0
- package/srv/blockchain/wallet-worker/wallet-worker.js +542 -0
- package/srv/cardano-indexer-service.cds +73 -0
- package/srv/cardano-indexer-service.d.ts +2 -0
- package/srv/cardano-indexer-service.js +76 -0
- package/srv/cardano-service.js +22 -1
- package/srv/cardano-tx-service.d.ts +1 -11
- package/srv/cardano-tx-service.js +11 -162
- package/srv/cardano-worker-service.cds +125 -0
- package/srv/cardano-worker-service.d.ts +2 -0
- package/srv/cardano-worker-service.js +199 -0
- package/srv/server.d.ts +32 -1
- package/srv/server.js +228 -2
- package/srv/utils/collections.d.ts +13 -0
- package/srv/utils/collections.js +24 -0
- package/srv/utils/crypto.d.ts +16 -0
- package/srv/utils/crypto.js +75 -0
- package/srv/utils/error-codes.d.ts +6 -0
- package/srv/utils/error-codes.js +6 -0
- package/srv/utils/errors.d.ts +12 -0
- package/srv/utils/errors.js +45 -0
- package/srv/utils/mappers.js +13 -3
- package/srv/utils/service-events.d.ts +26 -0
- package/srv/utils/service-events.js +46 -0
- package/srv/utils/tx-build-helper.d.ts +1 -2
- package/srv/utils/tx-build-helper.js +3 -5
- package/srv/utils/tx-request-parsers.d.ts +58 -0
- package/srv/utils/tx-request-parsers.js +170 -0
- package/srv/utils/tx-utils.d.ts +2 -1
- package/srv/utils/tx-utils.js +3 -2
- package/srv/utils/types.d.ts +2 -1
- package/@cds-models/CardanoODataService/index.d.ts.map +0 -1
- package/@cds-models/CardanoODataService/index.js.map +0 -1
- package/@cds-models/CardanoODataService/index.ts +0 -776
- package/@cds-models/CardanoSignService/index.d.ts.map +0 -1
- package/@cds-models/CardanoSignService/index.js.map +0 -1
- package/@cds-models/CardanoSignService/index.ts +0 -569
- package/@cds-models/CardanoTransactionService/index.d.ts.map +0 -1
- package/@cds-models/CardanoTransactionService/index.js.map +0 -1
- package/@cds-models/CardanoTransactionService/index.ts +0 -526
- package/@cds-models/_/index.d.ts.map +0 -1
- package/@cds-models/_/index.js.map +0 -1
- package/@cds-models/_/index.ts +0 -96
- package/@cds-models/cds/outbox/index.ts +0 -27
- package/@cds-models/index.d.ts.map +0 -1
- package/@cds-models/index.js.map +0 -1
- package/@cds-models/index.ts +0 -245
- package/@cds-models/odatano/cardano/index.d.ts.map +0 -1
- package/@cds-models/odatano/cardano/index.js.map +0 -1
- package/@cds-models/odatano/cardano/index.ts +0 -789
- package/@cds-models/sap/common/index.d.ts.map +0 -1
- package/@cds-models/sap/common/index.js.map +0 -1
- package/@cds-models/sap/common/index.ts +0 -249
- package/srv/blockchain/transaction-building/keep-relevant.d.ts +0 -29
- package/srv/blockchain/transaction-building/keep-relevant.js +0 -116
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// This is an automatically generated file. Please do not change its contents manually!
|
|
2
|
+
import * as _ from './..';
|
|
3
|
+
import * as __ from './../_';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Cardano Indexer Service (v2.0)
|
|
7
|
+
*
|
|
8
|
+
* Control + observability surface for the chain crawler / pre-sync engine:
|
|
9
|
+
* - read-only projections of the sync cursor and reorg audit log
|
|
10
|
+
* - status function + pause/resume actions delegating to the crawler singleton
|
|
11
|
+
*
|
|
12
|
+
* Security note: see CardanoODataService (cardano-service.cds) for the rationale on
|
|
13
|
+
* service-level auth. pause/resume are operational actions — gate behind a dedicated
|
|
14
|
+
* Admin scope. Read-only status and audit data remain available to authenticated users.
|
|
15
|
+
*/
|
|
16
|
+
export default class {
|
|
17
|
+
static readonly getStatus: typeof getStatus;
|
|
18
|
+
static readonly pauseCrawler: typeof pauseCrawler;
|
|
19
|
+
static readonly resumeCrawler: typeof resumeCrawler;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// entity 'SyncState'
|
|
23
|
+
export declare function _SyncStateAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
24
|
+
new (...args: any[]): {
|
|
25
|
+
ID?: __.Key<string>
|
|
26
|
+
network?: string | null
|
|
27
|
+
startSlot?: number | null
|
|
28
|
+
startBlockHash?: _.Blake2b256 | null
|
|
29
|
+
lastSlot?: number | null
|
|
30
|
+
lastBlockHash?: _.Blake2b256 | null
|
|
31
|
+
lastHeight?: number | null
|
|
32
|
+
lastIndexedAt?: __.CdsTimestamp | null
|
|
33
|
+
tipSlot?: number | null
|
|
34
|
+
tipHeight?: number | null
|
|
35
|
+
syncStatus?: _.CrawlSyncStatus | null
|
|
36
|
+
lastError?: string | null
|
|
37
|
+
lastErrorAt?: __.CdsTimestamp | null
|
|
38
|
+
consecutiveErrors?: number | null
|
|
39
|
+
desiredRunning?: boolean | null
|
|
40
|
+
leaseOwner?: string | null
|
|
41
|
+
leaseUntil?: __.CdsTimestamp | null
|
|
42
|
+
} & InstanceType<TBase>
|
|
43
|
+
readonly kind: 'entity';
|
|
44
|
+
readonly keys: __.KeysOf<SyncState>;
|
|
45
|
+
readonly elements: __.ElementsOf<SyncState>;
|
|
46
|
+
readonly actions: globalThis.Record<never, never>;
|
|
47
|
+
};
|
|
48
|
+
export class SyncState extends _SyncStateAspect(__.Entity) {
|
|
49
|
+
}
|
|
50
|
+
export class SyncState_ extends Array<SyncState> {
|
|
51
|
+
$count?: number
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// entity 'ReorgLog'
|
|
55
|
+
export declare function _ReorgLogAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
56
|
+
new (...args: any[]): {
|
|
57
|
+
ID?: __.Key<string>
|
|
58
|
+
detectedAt?: __.CdsTimestamp | null
|
|
59
|
+
forkSlot?: number | null
|
|
60
|
+
forkHeight?: number | null
|
|
61
|
+
oldTipHash?: _.Blake2b256 | null
|
|
62
|
+
newTipHash?: _.Blake2b256 | null
|
|
63
|
+
blocksRolledBack?: number | null
|
|
64
|
+
status?: _.ReorgStatus | null
|
|
65
|
+
} & InstanceType<TBase>
|
|
66
|
+
readonly kind: 'entity';
|
|
67
|
+
readonly keys: __.KeysOf<ReorgLog>;
|
|
68
|
+
readonly elements: __.ElementsOf<ReorgLog>;
|
|
69
|
+
readonly actions: globalThis.Record<never, never>;
|
|
70
|
+
};
|
|
71
|
+
export class ReorgLog extends _ReorgLogAspect(__.Entity) {
|
|
72
|
+
}
|
|
73
|
+
export class ReorgLog_ extends Array<ReorgLog> {
|
|
74
|
+
$count?: number
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// entity 'CrawlerStatus'
|
|
78
|
+
export declare function _CrawlerStatusAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
|
|
79
|
+
new (...args: any[]): {
|
|
80
|
+
running?: boolean | null
|
|
81
|
+
syncStatus?: string | null
|
|
82
|
+
lastSlot?: string | null
|
|
83
|
+
lastHeight?: string | null
|
|
84
|
+
tipHeight?: string | null
|
|
85
|
+
syncProgress?: string | null
|
|
86
|
+
consecutiveErrors?: number | null
|
|
87
|
+
} & InstanceType<TBase>
|
|
88
|
+
readonly kind: 'type';
|
|
89
|
+
readonly keys: __.KeysOf<CrawlerStatus>;
|
|
90
|
+
readonly elements: __.ElementsOf<CrawlerStatus>;
|
|
91
|
+
readonly actions: globalThis.Record<never, never>;
|
|
92
|
+
};
|
|
93
|
+
export class CrawlerStatus extends _CrawlerStatusAspect(__.Entity) {
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// event
|
|
97
|
+
export declare class blockIndexed {
|
|
98
|
+
readonly kind: 'event';
|
|
99
|
+
hash: string | null
|
|
100
|
+
slot: number | null
|
|
101
|
+
height: number | null
|
|
102
|
+
txHashes: Array<string>
|
|
103
|
+
tipSlot: number | null
|
|
104
|
+
tipHeight: number | null
|
|
105
|
+
}
|
|
106
|
+
// event
|
|
107
|
+
export declare class reorg {
|
|
108
|
+
readonly kind: 'event';
|
|
109
|
+
forkSlot: number | null
|
|
110
|
+
forkHeight: number | null
|
|
111
|
+
blocksRolledBack: number | null
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export declare const getStatus: {
|
|
115
|
+
// positional
|
|
116
|
+
(): globalThis.Promise<CrawlerStatus | null> | CrawlerStatus | null
|
|
117
|
+
// named
|
|
118
|
+
({}: globalThis.Record<never, never>): globalThis.Promise<CrawlerStatus | null> | CrawlerStatus | null
|
|
119
|
+
// metadata (do not use)
|
|
120
|
+
__parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<CrawlerStatus | null> | CrawlerStatus | null, __self: never
|
|
121
|
+
kind: 'function'
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export declare const pauseCrawler: {
|
|
125
|
+
// positional
|
|
126
|
+
(): globalThis.Promise<boolean | null> | boolean | null
|
|
127
|
+
// named
|
|
128
|
+
({}: globalThis.Record<never, never>): globalThis.Promise<boolean | null> | boolean | null
|
|
129
|
+
// metadata (do not use)
|
|
130
|
+
__parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<boolean | null> | boolean | null, __self: never
|
|
131
|
+
kind: 'action'
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare const resumeCrawler: {
|
|
135
|
+
// positional
|
|
136
|
+
(): globalThis.Promise<boolean | null> | boolean | null
|
|
137
|
+
// named
|
|
138
|
+
({}: globalThis.Record<never, never>): globalThis.Promise<boolean | null> | boolean | null
|
|
139
|
+
// metadata (do not use)
|
|
140
|
+
__parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<boolean | null> | boolean | null, __self: never
|
|
141
|
+
kind: 'action'
|
|
142
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This is an automatically generated file. Please do not change its contents manually!
|
|
2
|
+
const { createEntityProxy } = require('./../_')
|
|
3
|
+
// service
|
|
4
|
+
const CardanoIndexerService = { name: 'CardanoIndexerService' }
|
|
5
|
+
module.exports = CardanoIndexerService
|
|
6
|
+
module.exports.CardanoIndexerService = CardanoIndexerService
|
|
7
|
+
// SyncState
|
|
8
|
+
module.exports.SyncState = createEntityProxy(['CardanoIndexerService', 'SyncState'], { target: { is_singular: true } })
|
|
9
|
+
module.exports.SyncState_ = createEntityProxy(['CardanoIndexerService', 'SyncState'], { target: { is_singular: false }})
|
|
10
|
+
// ReorgLog
|
|
11
|
+
module.exports.ReorgLog = createEntityProxy(['CardanoIndexerService', 'ReorgLog'], { target: { is_singular: true } })
|
|
12
|
+
module.exports.ReorgLog_ = createEntityProxy(['CardanoIndexerService', 'ReorgLog'], { target: { is_singular: false }})
|
|
13
|
+
// CrawlerStatus
|
|
14
|
+
module.exports.CrawlerStatus = createEntityProxy(['CardanoIndexerService', 'CrawlerStatus'], { target: { is_singular: true } })
|
|
15
|
+
module.exports.__Array_CrawlerStatus_ = createEntityProxy(['CardanoIndexerService', 'CrawlerStatus'], { target: { is_singular: false }})
|
|
16
|
+
// events
|
|
17
|
+
module.exports.blockIndexed = 'CardanoIndexerService.blockIndexed'
|
|
18
|
+
module.exports.reorg = 'CardanoIndexerService.reorg'
|
|
19
|
+
// actions
|
|
20
|
+
module.exports.getStatus = 'getStatus'
|
|
21
|
+
module.exports.pauseCrawler = 'pauseCrawler'
|
|
22
|
+
module.exports.resumeCrawler = 'resumeCrawler'
|
|
23
|
+
// enums
|