@odatano/core 2.0.0-rc.3 → 2.0.0-rc.31

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 (162) hide show
  1. package/@cds-models/CardanoAgentService/index.d.ts +251 -0
  2. package/@cds-models/CardanoAgentService/index.js +36 -0
  3. package/@cds-models/CardanoBackendService/index.d.ts +357 -0
  4. package/@cds-models/CardanoBackendService/index.js +40 -0
  5. package/@cds-models/CardanoIndexerService/index.d.ts +194 -2
  6. package/@cds-models/CardanoIndexerService/index.js +25 -0
  7. package/@cds-models/CardanoODataService/index.d.ts +294 -7
  8. package/@cds-models/CardanoODataService/index.js +33 -0
  9. package/@cds-models/CardanoSignService/index.d.ts +28 -3
  10. package/@cds-models/CardanoSignService/index.js +3 -0
  11. package/@cds-models/CardanoTransactionService/index.d.ts +52 -19
  12. package/@cds-models/CardanoTransactionService/index.js +4 -0
  13. package/@cds-models/index.d.ts +18 -0
  14. package/@cds-models/index.js +3 -0
  15. package/@cds-models/odatano/cardano/index.d.ts +408 -7
  16. package/@cds-models/odatano/cardano/index.js +42 -0
  17. package/README.md +64 -5
  18. package/db/schema.cds +677 -13
  19. package/db/types.cds +27 -0
  20. package/package.json +182 -173
  21. package/scripts/migrate-slot-leader.mjs +104 -0
  22. package/scripts/migrate-txseq.mjs +147 -0
  23. package/src/index.d.ts +11 -10
  24. package/src/index.js +28 -14
  25. package/src/plugin.js +39 -52
  26. package/srv/blockchain/backends/blockfrost-backend.d.ts +29 -131
  27. package/srv/blockchain/backends/blockfrost-backend.js +49 -160
  28. package/srv/blockchain/backends/cardano-backend.d.ts +104 -158
  29. package/srv/blockchain/backends/cardano-backend.js +19 -5
  30. package/srv/blockchain/backends/koios-backend.d.ts +126 -60
  31. package/srv/blockchain/backends/koios-backend.js +356 -217
  32. package/srv/blockchain/backends/odatano-backend.d.ts +64 -0
  33. package/srv/blockchain/backends/odatano-backend.js +170 -0
  34. package/srv/blockchain/backends/ogmios-backend.d.ts +162 -94
  35. package/srv/blockchain/backends/ogmios-backend.js +548 -197
  36. package/srv/blockchain/backends/ogmios-frame-guard.d.ts +32 -0
  37. package/srv/blockchain/backends/ogmios-frame-guard.js +142 -0
  38. package/srv/blockchain/cardano-client.d.ts +78 -205
  39. package/srv/blockchain/cardano-client.js +186 -242
  40. package/srv/blockchain/cardano-indexer.d.ts +302 -242
  41. package/srv/blockchain/cardano-indexer.js +1193 -362
  42. package/srv/blockchain/cardano-tx-builder.d.ts +43 -81
  43. package/srv/blockchain/cardano-tx-builder.js +177 -132
  44. package/srv/blockchain/crawler/certificate-backfill.d.ts +67 -0
  45. package/srv/blockchain/crawler/certificate-backfill.js +169 -0
  46. package/srv/blockchain/crawler/crawler.d.ts +139 -54
  47. package/srv/blockchain/crawler/crawler.js +478 -96
  48. package/srv/blockchain/crawler/hooks.d.ts +3 -14
  49. package/srv/blockchain/crawler/index.d.ts +5 -0
  50. package/srv/blockchain/crawler/index.js +35 -7
  51. package/srv/blockchain/crawler/sync-state.d.ts +46 -28
  52. package/srv/blockchain/crawler/sync-state.js +128 -43
  53. package/srv/blockchain/crawler/transaction-backfill.d.ts +52 -0
  54. package/srv/blockchain/crawler/transaction-backfill.js +283 -0
  55. package/srv/blockchain/crawler/utxo-set-import.d.ts +78 -0
  56. package/srv/blockchain/crawler/utxo-set-import.js +363 -0
  57. package/srv/blockchain/ledger-state.d.ts +101 -0
  58. package/srv/blockchain/ledger-state.js +432 -0
  59. package/srv/blockchain/pending-spends.d.ts +28 -0
  60. package/srv/blockchain/pending-spends.js +89 -0
  61. package/srv/blockchain/signing/cose-verifier.d.ts +5 -12
  62. package/srv/blockchain/signing/cose-verifier.js +6 -12
  63. package/srv/blockchain/signing/external-signer.d.ts +16 -113
  64. package/srv/blockchain/signing/external-signer.js +19 -122
  65. package/srv/blockchain/signing/hsm-signer.d.ts +13 -45
  66. package/srv/blockchain/signing/hsm-signer.js +23 -63
  67. package/srv/blockchain/signing/signature-verifier.d.ts +8 -44
  68. package/srv/blockchain/signing/signature-verifier.js +13 -54
  69. package/srv/blockchain/signing/submission-finalizer.d.ts +9 -36
  70. package/srv/blockchain/signing/submission-finalizer.js +16 -49
  71. package/srv/blockchain/stored-chain.d.ts +33 -0
  72. package/srv/blockchain/stored-chain.js +234 -0
  73. package/srv/blockchain/transaction-building/buildooor-tx.d.ts +115 -160
  74. package/srv/blockchain/transaction-building/buildooor-tx.js +651 -287
  75. package/srv/blockchain/transaction-building/caller-datums.d.ts +29 -0
  76. package/srv/blockchain/transaction-building/caller-datums.js +139 -0
  77. package/srv/blockchain/transaction-building/cardano-tx.d.ts +10 -35
  78. package/srv/blockchain/transaction-rows.d.ts +12 -0
  79. package/srv/blockchain/transaction-rows.js +43 -0
  80. package/srv/blockchain/wallet-worker/build-request.d.ts +4 -17
  81. package/srv/blockchain/wallet-worker/build-request.js +48 -24
  82. package/srv/blockchain/wallet-worker/confirmation-tracker.d.ts +25 -17
  83. package/srv/blockchain/wallet-worker/confirmation-tracker.js +87 -41
  84. package/srv/blockchain/wallet-worker/index.js +2 -8
  85. package/srv/blockchain/wallet-worker/job-store.d.ts +36 -103
  86. package/srv/blockchain/wallet-worker/job-store.js +0 -0
  87. package/srv/blockchain/wallet-worker/lease-heartbeat.d.ts +4 -20
  88. package/srv/blockchain/wallet-worker/lease-heartbeat.js +4 -20
  89. package/srv/blockchain/wallet-worker/signers.d.ts +6 -19
  90. package/srv/blockchain/wallet-worker/signers.js +3 -8
  91. package/srv/blockchain/wallet-worker/wallet-worker.d.ts +15 -71
  92. package/srv/blockchain/wallet-worker/wallet-worker.js +40 -91
  93. package/srv/cardano-agent-service.cds +146 -0
  94. package/srv/cardano-agent-service.d.ts +2 -0
  95. package/srv/cardano-agent-service.js +12 -0
  96. package/srv/cardano-backend-service.cds +52 -0
  97. package/srv/cardano-backend-service.d.ts +2 -0
  98. package/srv/cardano-backend-service.js +244 -0
  99. package/srv/cardano-indexer-service.cds +201 -73
  100. package/srv/cardano-indexer-service.js +280 -11
  101. package/srv/cardano-service.cds +56 -1
  102. package/srv/cardano-service.js +52 -113
  103. package/srv/cardano-sign-service.cds +200 -180
  104. package/srv/cardano-sign-service.js +55 -173
  105. package/srv/cardano-tx-service.cds +439 -364
  106. package/srv/cardano-tx-service.js +305 -209
  107. package/srv/cardano-ui.cds +16 -16
  108. package/srv/cardano-worker-service.js +7 -15
  109. package/srv/cbor/parse.js +13 -1
  110. package/srv/server.d.ts +28 -86
  111. package/srv/server.js +130 -135
  112. package/srv/utils/agent-grants-config.d.ts +37 -0
  113. package/srv/utils/agent-grants-config.js +138 -0
  114. package/srv/utils/agent-grants.d.ts +262 -0
  115. package/srv/utils/agent-grants.js +922 -0
  116. package/srv/utils/agent-token-auth.d.ts +16 -0
  117. package/srv/utils/agent-token-auth.js +78 -0
  118. package/srv/utils/backend-request-handler.d.ts +2 -16
  119. package/srv/utils/backend-request-handler.js +3 -18
  120. package/srv/utils/collections.d.ts +4 -8
  121. package/srv/utils/collections.js +4 -8
  122. package/srv/utils/const.d.ts +30 -67
  123. package/srv/utils/const.js +32 -72
  124. package/srv/utils/crypto.d.ts +3 -12
  125. package/srv/utils/crypto.js +5 -18
  126. package/srv/utils/db-indexes.d.ts +25 -0
  127. package/srv/utils/db-indexes.js +94 -0
  128. package/srv/utils/db-sanitize.d.ts +27 -0
  129. package/srv/utils/db-sanitize.js +85 -0
  130. package/srv/utils/epoch-slots.d.ts +13 -0
  131. package/srv/utils/epoch-slots.js +25 -0
  132. package/srv/utils/error-codes.d.ts +20 -73
  133. package/srv/utils/error-codes.js +19 -70
  134. package/srv/utils/errors.d.ts +50 -177
  135. package/srv/utils/errors.js +94 -218
  136. package/srv/utils/liveness.d.ts +16 -0
  137. package/srv/utils/liveness.js +40 -0
  138. package/srv/utils/mappers.d.ts +128 -214
  139. package/srv/utils/mappers.js +354 -299
  140. package/srv/utils/network-context.js +2 -11
  141. package/srv/utils/pg-inline-json.d.ts +8 -0
  142. package/srv/utils/pg-inline-json.js +62 -0
  143. package/srv/utils/pg-order-nulls.d.ts +14 -0
  144. package/srv/utils/pg-order-nulls.js +56 -0
  145. package/srv/utils/plutus-placeholders.d.ts +23 -16
  146. package/srv/utils/plutus-placeholders.js +63 -27
  147. package/srv/utils/rate-limiter.d.ts +46 -0
  148. package/srv/utils/rate-limiter.js +116 -0
  149. package/srv/utils/service-events.d.ts +2 -22
  150. package/srv/utils/service-events.js +3 -23
  151. package/srv/utils/signing-helper.d.ts +3 -18
  152. package/srv/utils/signing-helper.js +10 -32
  153. package/srv/utils/tx-build-helper.d.ts +26 -92
  154. package/srv/utils/tx-build-helper.js +68 -123
  155. package/srv/utils/tx-request-parsers.d.ts +107 -21
  156. package/srv/utils/tx-request-parsers.js +433 -34
  157. package/srv/utils/tx-utils.d.ts +4 -23
  158. package/srv/utils/tx-utils.js +12 -41
  159. package/srv/utils/types.d.ts +238 -169
  160. package/srv/utils/types.js +2 -6
  161. package/srv/utils/validators.d.ts +24 -90
  162. package/srv/utils/validators.js +50 -147
@@ -0,0 +1,251 @@
1
+ // This is an automatically generated file. Please do not change its contents manually!
2
+ import * as __ from './../_';
3
+
4
+ /**
5
+ * Cardano Agent Service (v2.0)
6
+ *
7
+ * Agent grants: scoped, budgeted bearer capabilities an Admin hands to an agent
8
+ * instead of a full user.
9
+ *
10
+ * - CreateAgentGrant / UpdateAgentGrant / RotateAgentGrantToken / RevokeAgentGrant:
11
+ * Admin-only administration, rate limited per principal per hour
12
+ * (AGENT_GRANT_ADMIN_RATE_LIMIT, default 10). The token is returned ONCE from
13
+ * CreateAgentGrant and RotateAgentGrantToken and stored as SHA-256 only.
14
+ * - AgentGrants: Admin-only projection (no token hash). A request carrying a token
15
+ * runs as the principal `agent:<grantId>` with the role `agent-grant` and sees
16
+ * exactly its own row through the row-level restriction below.
17
+ * - GetGrantStatus: token self-service — what am I allowed to do, how much budget
18
+ * is left, when do I expire. What an MCP tool needs to describe itself honestly.
19
+ * - GetGrantUsage: admitted calls per service and action over a window — an Admin
20
+ * for any grant, a token for its own (a partner usage view, ledger reconciliation).
21
+ *
22
+ * A token request never inherits the operator's roles: `@requires: 'Admin'` on the
23
+ * four actions, on PauseWorker / ResumeWorker / pauseCrawler / resumeCrawler and on
24
+ * every other Admin surface therefore refuses it by construction. The allow list,
25
+ * wallet pinning and daily budget are enforced by a before('*') hook on all six
26
+ * ODATANO services (srv/utils/agent-grants.ts). The `x-agent-token` header only
27
+ * reaches the services when cds.requires.odatano-core.agentGrants.enabled is set
28
+ * (srv/utils/agent-token-auth.ts).
29
+ */
30
+ export default class {
31
+ static readonly GetGrantStatus: typeof GetGrantStatus;
32
+ static readonly CreateAgentGrant: typeof CreateAgentGrant;
33
+ static readonly RevokeAgentGrant: typeof RevokeAgentGrant;
34
+ static readonly RotateAgentGrantToken: typeof RotateAgentGrantToken;
35
+ static readonly UpdateAgentGrant: typeof UpdateAgentGrant;
36
+ static readonly GetGrantUsage: typeof GetGrantUsage;
37
+ }
38
+
39
+ // entity 'AgentGrant'
40
+ export declare function _AgentGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
41
+ new (...args: any[]): {
42
+ ID?: __.Key<string>
43
+ userId?: string
44
+ agentLabel?: string | null
45
+ allowedActions?: string
46
+ walletId?: string | null
47
+ allowedJobKinds?: string | null
48
+ maxJobsPerDay?: number | null
49
+ jobsUsedToday?: number | null
50
+ budgetWindow?: string | null
51
+ validUntil?: __.CdsTimestamp | null
52
+ isActive?: boolean | null
53
+ revokedAt?: __.CdsTimestamp | null
54
+ createdAt?: __.CdsTimestamp | null
55
+ lastUsedAt?: __.CdsTimestamp | null
56
+ } & InstanceType<TBase>
57
+ readonly kind: 'entity';
58
+ readonly keys: __.KeysOf<AgentGrant>;
59
+ readonly elements: __.ElementsOf<AgentGrant>;
60
+ readonly actions: globalThis.Record<never, never>;
61
+ };
62
+ /**
63
+ * Agent grants (v2.0): scoped bearer capabilities an Admin hands to an agent
64
+ * instead of a full user. The token is a capability, not an identity — it is
65
+ * stored as SHA-256 only, and a request carrying it runs as the principal
66
+ * `agent:<ID>` with the role `agent-grant`, never as the operator. Enforcement
67
+ * (allow list, wallet pinning, daily budget) lives in srv/utils/agent-grants.ts;
68
+ * the transport lane that admits `x-agent-token` in srv/utils/agent-token-auth.ts.
69
+ * Admin-only table: creation and revocation happen through CardanoAgentService
70
+ * actions, a token request may read its own row only.
71
+ */
72
+ export class AgentGrant extends _AgentGrantAspect(__.Entity) {
73
+ }
74
+ /**
75
+ * Agent grants (v2.0): scoped bearer capabilities an Admin hands to an agent
76
+ * instead of a full user. The token is a capability, not an identity — it is
77
+ * stored as SHA-256 only, and a request carrying it runs as the principal
78
+ * `agent:<ID>` with the role `agent-grant`, never as the operator. Enforcement
79
+ * (allow list, wallet pinning, daily budget) lives in srv/utils/agent-grants.ts;
80
+ * the transport lane that admits `x-agent-token` in srv/utils/agent-token-auth.ts.
81
+ * Admin-only table: creation and revocation happen through CardanoAgentService
82
+ * actions, a token request may read its own row only.
83
+ */
84
+ export class AgentGrants extends Array<AgentGrant> {
85
+ $count?: number
86
+ }
87
+
88
+ // entity 'GrantStatus'
89
+ export declare function _GrantStatusAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
90
+ new (...args: any[]): {
91
+ grantId?: string | null
92
+ agentLabel?: string | null
93
+ allowedActions?: Array<string>
94
+ walletId?: string | null
95
+ allowedJobKinds?: Array<string>
96
+ maxJobsPerDay?: number | null
97
+ jobsUsedToday?: number | null
98
+ budgetWindow?: string | null
99
+ validUntil?: __.CdsTimestamp | null
100
+ isActive?: boolean | null
101
+ } & InstanceType<TBase>
102
+ readonly kind: 'type';
103
+ readonly keys: __.KeysOf<GrantStatus>;
104
+ readonly elements: __.ElementsOf<GrantStatus>;
105
+ readonly actions: globalThis.Record<never, never>;
106
+ };
107
+ export class GrantStatus extends _GrantStatusAspect(__.Entity) {
108
+ }
109
+
110
+ // entity 'IssuedGrant'
111
+ export declare function _IssuedGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
112
+ new (...args: any[]): {
113
+ grantId?: string | null
114
+ token?: string | null
115
+ allowedActions?: Array<string>
116
+ walletId?: string | null
117
+ allowedJobKinds?: Array<string>
118
+ maxJobsPerDay?: number | null
119
+ validUntil?: __.CdsTimestamp | null
120
+ } & InstanceType<TBase>
121
+ readonly kind: 'type';
122
+ readonly keys: __.KeysOf<IssuedGrant>;
123
+ readonly elements: __.ElementsOf<IssuedGrant>;
124
+ readonly actions: globalThis.Record<never, never>;
125
+ };
126
+ export class IssuedGrant extends _IssuedGrantAspect(__.Entity) {
127
+ }
128
+
129
+ // entity 'RotatedGrant'
130
+ export declare function _RotatedGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
131
+ new (...args: any[]): {
132
+ grantId?: string | null
133
+ token?: string | null
134
+ } & InstanceType<TBase>
135
+ readonly kind: 'type';
136
+ readonly keys: __.KeysOf<RotatedGrant>;
137
+ readonly elements: __.ElementsOf<RotatedGrant>;
138
+ readonly actions: globalThis.Record<never, never>;
139
+ };
140
+ export class RotatedGrant extends _RotatedGrantAspect(__.Entity) {
141
+ }
142
+
143
+ // entity 'UpdatedGrant'
144
+ export declare function _UpdatedGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
145
+ new (...args: any[]): {
146
+ grantId?: string | null
147
+ updated?: Array<string>
148
+ } & InstanceType<TBase>
149
+ readonly kind: 'type';
150
+ readonly keys: __.KeysOf<UpdatedGrant>;
151
+ readonly elements: __.ElementsOf<UpdatedGrant>;
152
+ readonly actions: globalThis.Record<never, never>;
153
+ };
154
+ export class UpdatedGrant extends _UpdatedGrantAspect(__.Entity) {
155
+ }
156
+
157
+ // entity 'GrantUsageCall'
158
+ export declare function _GrantUsageCallAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
159
+ new (...args: any[]): {
160
+ service?: string | null
161
+ action?: string | null
162
+ count?: number | null
163
+ refunded?: number | null
164
+ } & InstanceType<TBase>
165
+ readonly kind: 'type';
166
+ readonly keys: __.KeysOf<GrantUsageCall>;
167
+ readonly elements: __.ElementsOf<GrantUsageCall>;
168
+ readonly actions: globalThis.Record<never, never>;
169
+ };
170
+ export class GrantUsageCall extends _GrantUsageCallAspect(__.Entity) {
171
+ }
172
+
173
+ // entity 'GrantUsage'
174
+ export declare function _GrantUsageAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
175
+ new (...args: any[]): {
176
+ grantId?: string | null
177
+ since?: __.CdsTimestamp | null
178
+ until?: __.CdsTimestamp | null
179
+ calls?: Array<GrantUsageCall>
180
+ total?: number | null
181
+ jobsUsedToday?: number | null
182
+ maxJobsPerDay?: number | null
183
+ } & InstanceType<TBase>
184
+ readonly kind: 'type';
185
+ readonly keys: __.KeysOf<GrantUsage>;
186
+ readonly elements: __.ElementsOf<GrantUsage>;
187
+ readonly actions: globalThis.Record<never, never>;
188
+ };
189
+ export class GrantUsage extends _GrantUsageAspect(__.Entity) {
190
+ }
191
+
192
+
193
+ export declare const GetGrantStatus: {
194
+ // positional
195
+ (): globalThis.Promise<GrantStatus | null> | GrantStatus | null
196
+ // named
197
+ ({}: globalThis.Record<never, never>): globalThis.Promise<GrantStatus | null> | GrantStatus | null
198
+ // metadata (do not use)
199
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<GrantStatus | null> | GrantStatus | null, __self: never
200
+ kind: 'function'
201
+ }
202
+
203
+ export declare const CreateAgentGrant: {
204
+ // positional
205
+ (allowedActions: Array<string>, walletId: string | null, allowedJobKinds: Array<string>, maxJobsPerDay: number | null, validUntil: __.CdsTimestamp | null, agentLabel: string | null): globalThis.Promise<IssuedGrant | null> | IssuedGrant | null
206
+ // named
207
+ ({allowedActions, walletId, allowedJobKinds, maxJobsPerDay, validUntil, agentLabel}: {allowedActions?: Array<string>, walletId?: string | null, allowedJobKinds?: Array<string>, maxJobsPerDay?: number | null, validUntil?: __.CdsTimestamp | null, agentLabel?: string | null}): globalThis.Promise<IssuedGrant | null> | IssuedGrant | null
208
+ // metadata (do not use)
209
+ __parameters: {allowedActions?: Array<string>, walletId?: string | null, allowedJobKinds?: Array<string>, maxJobsPerDay?: number | null, validUntil?: __.CdsTimestamp | null, agentLabel?: string | null}, __returns: globalThis.Promise<IssuedGrant | null> | IssuedGrant | null, __self: never
210
+ kind: 'action'
211
+ }
212
+
213
+ export declare const RevokeAgentGrant: {
214
+ // positional
215
+ (grantId: string | null): globalThis.Promise<boolean | null> | boolean | null
216
+ // named
217
+ ({grantId}: {grantId?: string | null}): globalThis.Promise<boolean | null> | boolean | null
218
+ // metadata (do not use)
219
+ __parameters: {grantId?: string | null}, __returns: globalThis.Promise<boolean | null> | boolean | null, __self: never
220
+ kind: 'action'
221
+ }
222
+
223
+ export declare const RotateAgentGrantToken: {
224
+ // positional
225
+ (grantId: string | null): globalThis.Promise<RotatedGrant | null> | RotatedGrant | null
226
+ // named
227
+ ({grantId}: {grantId?: string | null}): globalThis.Promise<RotatedGrant | null> | RotatedGrant | null
228
+ // metadata (do not use)
229
+ __parameters: {grantId?: string | null}, __returns: globalThis.Promise<RotatedGrant | null> | RotatedGrant | null, __self: never
230
+ kind: 'action'
231
+ }
232
+
233
+ export declare const UpdateAgentGrant: {
234
+ // positional
235
+ (grantId: string | null, agentLabel: string | null, allowedActions: Array<string>, allowedJobKinds: Array<string>, maxJobsPerDay: number | null, validUntil: __.CdsTimestamp | null): globalThis.Promise<UpdatedGrant | null> | UpdatedGrant | null
236
+ // named
237
+ ({grantId, agentLabel, allowedActions, allowedJobKinds, maxJobsPerDay, validUntil}: {grantId?: string | null, agentLabel?: string | null, allowedActions?: Array<string>, allowedJobKinds?: Array<string>, maxJobsPerDay?: number | null, validUntil?: __.CdsTimestamp | null}): globalThis.Promise<UpdatedGrant | null> | UpdatedGrant | null
238
+ // metadata (do not use)
239
+ __parameters: {grantId?: string | null, agentLabel?: string | null, allowedActions?: Array<string>, allowedJobKinds?: Array<string>, maxJobsPerDay?: number | null, validUntil?: __.CdsTimestamp | null}, __returns: globalThis.Promise<UpdatedGrant | null> | UpdatedGrant | null, __self: never
240
+ kind: 'action'
241
+ }
242
+
243
+ export declare const GetGrantUsage: {
244
+ // positional
245
+ (grantId: string | null, since: __.CdsTimestamp | null, until: __.CdsTimestamp | null): globalThis.Promise<GrantUsage | null> | GrantUsage | null
246
+ // named
247
+ ({grantId, since, until}: {grantId?: string | null, since?: __.CdsTimestamp | null, until?: __.CdsTimestamp | null}): globalThis.Promise<GrantUsage | null> | GrantUsage | null
248
+ // metadata (do not use)
249
+ __parameters: {grantId?: string | null, since?: __.CdsTimestamp | null, until?: __.CdsTimestamp | null}, __returns: globalThis.Promise<GrantUsage | null> | GrantUsage | null, __self: never
250
+ kind: 'function'
251
+ }
@@ -0,0 +1,36 @@
1
+ // This is an automatically generated file. Please do not change its contents manually!
2
+ const { createEntityProxy } = require('./../_')
3
+ // service
4
+ const CardanoAgentService = { name: 'CardanoAgentService' }
5
+ module.exports = CardanoAgentService
6
+ module.exports.CardanoAgentService = CardanoAgentService
7
+ // AgentGrants
8
+ module.exports.AgentGrant = createEntityProxy(['CardanoAgentService', 'AgentGrants'], { target: { is_singular: true } })
9
+ module.exports.AgentGrants = createEntityProxy(['CardanoAgentService', 'AgentGrants'], { target: { is_singular: false }})
10
+ // GrantStatus
11
+ module.exports.GrantStatus = createEntityProxy(['CardanoAgentService', 'GrantStatus'], { target: { is_singular: true } })
12
+ module.exports.__Array_GrantStatus_ = createEntityProxy(['CardanoAgentService', 'GrantStatus'], { target: { is_singular: false }})
13
+ // IssuedGrant
14
+ module.exports.IssuedGrant = createEntityProxy(['CardanoAgentService', 'IssuedGrant'], { target: { is_singular: true } })
15
+ module.exports.__Array_IssuedGrant_ = createEntityProxy(['CardanoAgentService', 'IssuedGrant'], { target: { is_singular: false }})
16
+ // RotatedGrant
17
+ module.exports.RotatedGrant = createEntityProxy(['CardanoAgentService', 'RotatedGrant'], { target: { is_singular: true } })
18
+ module.exports.__Array_RotatedGrant_ = createEntityProxy(['CardanoAgentService', 'RotatedGrant'], { target: { is_singular: false }})
19
+ // UpdatedGrant
20
+ module.exports.UpdatedGrant = createEntityProxy(['CardanoAgentService', 'UpdatedGrant'], { target: { is_singular: true } })
21
+ module.exports.__Array_UpdatedGrant_ = createEntityProxy(['CardanoAgentService', 'UpdatedGrant'], { target: { is_singular: false }})
22
+ // GrantUsageCall
23
+ module.exports.GrantUsageCall = createEntityProxy(['CardanoAgentService', 'GrantUsageCall'], { target: { is_singular: true } })
24
+ module.exports.__Array_GrantUsageCall_ = createEntityProxy(['CardanoAgentService', 'GrantUsageCall'], { target: { is_singular: false }})
25
+ // GrantUsage
26
+ module.exports.GrantUsage = createEntityProxy(['CardanoAgentService', 'GrantUsage'], { target: { is_singular: true } })
27
+ module.exports.__Array_GrantUsage_ = createEntityProxy(['CardanoAgentService', 'GrantUsage'], { target: { is_singular: false }})
28
+ // events
29
+ // actions
30
+ module.exports.GetGrantStatus = 'GetGrantStatus'
31
+ module.exports.CreateAgentGrant = 'CreateAgentGrant'
32
+ module.exports.RevokeAgentGrant = 'RevokeAgentGrant'
33
+ module.exports.RotateAgentGrantToken = 'RotateAgentGrantToken'
34
+ module.exports.UpdateAgentGrant = 'UpdateAgentGrant'
35
+ module.exports.GetGrantUsage = 'GetGrantUsage'
36
+ // enums
@@ -0,0 +1,357 @@
1
+ // This is an automatically generated file. Please do not change its contents manually!
2
+ import * as __ from './../_';
3
+
4
+ /**
5
+ * Cardano Backend Service
6
+ *
7
+ * The data a CardanoBackend needs, for another ODATANO instance that uses this one as its
8
+ * backend (`backends: ["odatano"]`). Every operation answers the provider shape as a JSON
9
+ * string (`value`), so the caller maps it exactly like a Koios or Blockfrost answer.
10
+ * Stored blocks and transactions come from this instance's index; everything else goes
11
+ * through its own backends and crawled data, as the read service does. Nothing is persisted
12
+ * for the caller.
13
+ */
14
+ export default class {
15
+ static readonly GetTransaction: typeof GetTransaction;
16
+ static readonly GetTransactionsBatch: typeof GetTransactionsBatch;
17
+ static readonly GetTransactionMetadata: typeof GetTransactionMetadata;
18
+ static readonly GetBlock: typeof GetBlock;
19
+ static readonly GetBlockByHeight: typeof GetBlockByHeight;
20
+ static readonly GetNextBlocks: typeof GetNextBlocks;
21
+ static readonly GetBlockTransactions: typeof GetBlockTransactions;
22
+ static readonly GetLatestBlock: typeof GetLatestBlock;
23
+ static readonly GetCurrentSlot: typeof GetCurrentSlot;
24
+ static readonly GetEpoch: typeof GetEpoch;
25
+ static readonly GetLatestEpoch: typeof GetLatestEpoch;
26
+ static readonly GetAddress: typeof GetAddress;
27
+ static readonly GetAddressUtxos: typeof GetAddressUtxos;
28
+ static readonly GetAddressTransactions: typeof GetAddressTransactions;
29
+ static readonly GetAddressTransactionHashes: typeof GetAddressTransactionHashes;
30
+ static readonly GetCredentialUtxos: typeof GetCredentialUtxos;
31
+ static readonly IsUtxoUnspent: typeof IsUtxoUnspent;
32
+ static readonly GetUnspentOutputs: typeof GetUnspentOutputs;
33
+ static readonly GetAccount: typeof GetAccount;
34
+ static readonly GetPool: typeof GetPool;
35
+ static readonly GetPoolIds: typeof GetPoolIds;
36
+ static readonly GetPools: typeof GetPools;
37
+ static readonly GetDrep: typeof GetDrep;
38
+ static readonly GetDrepIds: typeof GetDrepIds;
39
+ static readonly GetDreps: typeof GetDreps;
40
+ static readonly GetAssetInfo: typeof GetAssetInfo;
41
+ static readonly GetAssetHistory: typeof GetAssetHistory;
42
+ static readonly GetNetworkInformation: typeof GetNetworkInformation;
43
+ static readonly GetProtocolParameters: typeof GetProtocolParameters;
44
+ static readonly EvaluateTransaction: typeof EvaluateTransaction;
45
+ static readonly SubmitTransaction: typeof SubmitTransaction;
46
+ }
47
+
48
+
49
+ export declare const GetTransaction: {
50
+ // positional
51
+ (hash: string | null): globalThis.Promise<string | null> | string | null
52
+ // named
53
+ ({hash}: {hash?: string | null}): globalThis.Promise<string | null> | string | null
54
+ // metadata (do not use)
55
+ __parameters: {hash?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
56
+ kind: 'action'
57
+ }
58
+
59
+ export declare const GetTransactionsBatch: {
60
+ // positional
61
+ (hashes: string | null): globalThis.Promise<string | null> | string | null
62
+ // named
63
+ ({hashes}: {hashes?: string | null}): globalThis.Promise<string | null> | string | null
64
+ // metadata (do not use)
65
+ __parameters: {hashes?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
66
+ kind: 'action'
67
+ }
68
+
69
+ export declare const GetTransactionMetadata: {
70
+ // positional
71
+ (hash: string | null): globalThis.Promise<string | null> | string | null
72
+ // named
73
+ ({hash}: {hash?: string | null}): globalThis.Promise<string | null> | string | null
74
+ // metadata (do not use)
75
+ __parameters: {hash?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
76
+ kind: 'action'
77
+ }
78
+
79
+ export declare const GetBlock: {
80
+ // positional
81
+ (hash: string | null): globalThis.Promise<string | null> | string | null
82
+ // named
83
+ ({hash}: {hash?: string | null}): globalThis.Promise<string | null> | string | null
84
+ // metadata (do not use)
85
+ __parameters: {hash?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
86
+ kind: 'action'
87
+ }
88
+
89
+ export declare const GetBlockByHeight: {
90
+ // positional
91
+ (height: number | null): globalThis.Promise<string | null> | string | null
92
+ // named
93
+ ({height}: {height?: number | null}): globalThis.Promise<string | null> | string | null
94
+ // metadata (do not use)
95
+ __parameters: {height?: number | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
96
+ kind: 'action'
97
+ }
98
+
99
+ export declare const GetNextBlocks: {
100
+ // positional
101
+ (afterHash: string | null, count: number | null, afterHeight: number | null): globalThis.Promise<string | null> | string | null
102
+ // named
103
+ ({afterHash, count, afterHeight}: {afterHash?: string | null, count?: number | null, afterHeight?: number | null}): globalThis.Promise<string | null> | string | null
104
+ // metadata (do not use)
105
+ __parameters: {afterHash?: string | null, count?: number | null, afterHeight?: number | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
106
+ kind: 'action'
107
+ }
108
+
109
+ export declare const GetBlockTransactions: {
110
+ // positional
111
+ (blockHash: string | null): globalThis.Promise<string | null> | string | null
112
+ // named
113
+ ({blockHash}: {blockHash?: string | null}): globalThis.Promise<string | null> | string | null
114
+ // metadata (do not use)
115
+ __parameters: {blockHash?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
116
+ kind: 'action'
117
+ }
118
+
119
+ export declare const GetLatestBlock: {
120
+ // positional
121
+ (): globalThis.Promise<string | null> | string | null
122
+ // named
123
+ ({}: globalThis.Record<never, never>): globalThis.Promise<string | null> | string | null
124
+ // metadata (do not use)
125
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<string | null> | string | null, __self: never
126
+ kind: 'action'
127
+ }
128
+
129
+ export declare const GetCurrentSlot: {
130
+ // positional
131
+ (): globalThis.Promise<string | null> | string | null
132
+ // named
133
+ ({}: globalThis.Record<never, never>): globalThis.Promise<string | null> | string | null
134
+ // metadata (do not use)
135
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<string | null> | string | null, __self: never
136
+ kind: 'action'
137
+ }
138
+
139
+ export declare const GetEpoch: {
140
+ // positional
141
+ (epoch: number | null): globalThis.Promise<string | null> | string | null
142
+ // named
143
+ ({epoch}: {epoch?: number | null}): globalThis.Promise<string | null> | string | null
144
+ // metadata (do not use)
145
+ __parameters: {epoch?: number | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
146
+ kind: 'action'
147
+ }
148
+
149
+ export declare const GetLatestEpoch: {
150
+ // positional
151
+ (): globalThis.Promise<string | null> | string | null
152
+ // named
153
+ ({}: globalThis.Record<never, never>): globalThis.Promise<string | null> | string | null
154
+ // metadata (do not use)
155
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<string | null> | string | null, __self: never
156
+ kind: 'action'
157
+ }
158
+
159
+ export declare const GetAddress: {
160
+ // positional
161
+ (address: string | null): globalThis.Promise<string | null> | string | null
162
+ // named
163
+ ({address}: {address?: string | null}): globalThis.Promise<string | null> | string | null
164
+ // metadata (do not use)
165
+ __parameters: {address?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
166
+ kind: 'action'
167
+ }
168
+
169
+ export declare const GetAddressUtxos: {
170
+ // positional
171
+ (address: string | null): globalThis.Promise<string | null> | string | null
172
+ // named
173
+ ({address}: {address?: string | null}): globalThis.Promise<string | null> | string | null
174
+ // metadata (do not use)
175
+ __parameters: {address?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
176
+ kind: 'action'
177
+ }
178
+
179
+ export declare const GetAddressTransactions: {
180
+ // positional
181
+ (address: string | null, limit: number | null): globalThis.Promise<string | null> | string | null
182
+ // named
183
+ ({address, limit}: {address?: string | null, limit?: number | null}): globalThis.Promise<string | null> | string | null
184
+ // metadata (do not use)
185
+ __parameters: {address?: string | null, limit?: number | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
186
+ kind: 'action'
187
+ }
188
+
189
+ export declare const GetAddressTransactionHashes: {
190
+ // positional
191
+ (address: string | null, limit: number | null): globalThis.Promise<string | null> | string | null
192
+ // named
193
+ ({address, limit}: {address?: string | null, limit?: number | null}): globalThis.Promise<string | null> | string | null
194
+ // metadata (do not use)
195
+ __parameters: {address?: string | null, limit?: number | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
196
+ kind: 'action'
197
+ }
198
+
199
+ export declare const GetCredentialUtxos: {
200
+ // positional
201
+ (credential: string | null): globalThis.Promise<string | null> | string | null
202
+ // named
203
+ ({credential}: {credential?: string | null}): globalThis.Promise<string | null> | string | null
204
+ // metadata (do not use)
205
+ __parameters: {credential?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
206
+ kind: 'action'
207
+ }
208
+
209
+ export declare const IsUtxoUnspent: {
210
+ // positional
211
+ (txHash: string | null, outputIndex: number | null): globalThis.Promise<string | null> | string | null
212
+ // named
213
+ ({txHash, outputIndex}: {txHash?: string | null, outputIndex?: number | null}): globalThis.Promise<string | null> | string | null
214
+ // metadata (do not use)
215
+ __parameters: {txHash?: string | null, outputIndex?: number | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
216
+ kind: 'action'
217
+ }
218
+
219
+ export declare const GetUnspentOutputs: {
220
+ // positional
221
+ (refs: string | null): globalThis.Promise<string | null> | string | null
222
+ // named
223
+ ({refs}: {refs?: string | null}): globalThis.Promise<string | null> | string | null
224
+ // metadata (do not use)
225
+ __parameters: {refs?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
226
+ kind: 'action'
227
+ }
228
+
229
+ export declare const GetAccount: {
230
+ // positional
231
+ (stakeAddress: string | null): globalThis.Promise<string | null> | string | null
232
+ // named
233
+ ({stakeAddress}: {stakeAddress?: string | null}): globalThis.Promise<string | null> | string | null
234
+ // metadata (do not use)
235
+ __parameters: {stakeAddress?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
236
+ kind: 'action'
237
+ }
238
+
239
+ export declare const GetPool: {
240
+ // positional
241
+ (poolId: string | null): globalThis.Promise<string | null> | string | null
242
+ // named
243
+ ({poolId}: {poolId?: string | null}): globalThis.Promise<string | null> | string | null
244
+ // metadata (do not use)
245
+ __parameters: {poolId?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
246
+ kind: 'action'
247
+ }
248
+
249
+ export declare const GetPoolIds: {
250
+ // positional
251
+ (): globalThis.Promise<string | null> | string | null
252
+ // named
253
+ ({}: globalThis.Record<never, never>): globalThis.Promise<string | null> | string | null
254
+ // metadata (do not use)
255
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<string | null> | string | null, __self: never
256
+ kind: 'action'
257
+ }
258
+
259
+ export declare const GetPools: {
260
+ // positional
261
+ (ids: string | null): globalThis.Promise<string | null> | string | null
262
+ // named
263
+ ({ids}: {ids?: string | null}): globalThis.Promise<string | null> | string | null
264
+ // metadata (do not use)
265
+ __parameters: {ids?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
266
+ kind: 'action'
267
+ }
268
+
269
+ export declare const GetDrep: {
270
+ // positional
271
+ (drepId: string | null): globalThis.Promise<string | null> | string | null
272
+ // named
273
+ ({drepId}: {drepId?: string | null}): globalThis.Promise<string | null> | string | null
274
+ // metadata (do not use)
275
+ __parameters: {drepId?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
276
+ kind: 'action'
277
+ }
278
+
279
+ export declare const GetDrepIds: {
280
+ // positional
281
+ (): globalThis.Promise<string | null> | string | null
282
+ // named
283
+ ({}: globalThis.Record<never, never>): globalThis.Promise<string | null> | string | null
284
+ // metadata (do not use)
285
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<string | null> | string | null, __self: never
286
+ kind: 'action'
287
+ }
288
+
289
+ export declare const GetDreps: {
290
+ // positional
291
+ (ids: string | null): globalThis.Promise<string | null> | string | null
292
+ // named
293
+ ({ids}: {ids?: string | null}): globalThis.Promise<string | null> | string | null
294
+ // metadata (do not use)
295
+ __parameters: {ids?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
296
+ kind: 'action'
297
+ }
298
+
299
+ export declare const GetAssetInfo: {
300
+ // positional
301
+ (unit: string | null): globalThis.Promise<string | null> | string | null
302
+ // named
303
+ ({unit}: {unit?: string | null}): globalThis.Promise<string | null> | string | null
304
+ // metadata (do not use)
305
+ __parameters: {unit?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
306
+ kind: 'action'
307
+ }
308
+
309
+ export declare const GetAssetHistory: {
310
+ // positional
311
+ (unit: string | null, limit: number | null): globalThis.Promise<string | null> | string | null
312
+ // named
313
+ ({unit, limit}: {unit?: string | null, limit?: number | null}): globalThis.Promise<string | null> | string | null
314
+ // metadata (do not use)
315
+ __parameters: {unit?: string | null, limit?: number | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
316
+ kind: 'action'
317
+ }
318
+
319
+ export declare const GetNetworkInformation: {
320
+ // positional
321
+ (): globalThis.Promise<string | null> | string | null
322
+ // named
323
+ ({}: globalThis.Record<never, never>): globalThis.Promise<string | null> | string | null
324
+ // metadata (do not use)
325
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<string | null> | string | null, __self: never
326
+ kind: 'action'
327
+ }
328
+
329
+ export declare const GetProtocolParameters: {
330
+ // positional
331
+ (): globalThis.Promise<string | null> | string | null
332
+ // named
333
+ ({}: globalThis.Record<never, never>): globalThis.Promise<string | null> | string | null
334
+ // metadata (do not use)
335
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<string | null> | string | null, __self: never
336
+ kind: 'action'
337
+ }
338
+
339
+ export declare const EvaluateTransaction: {
340
+ // positional
341
+ (cbor: string | null): globalThis.Promise<string | null> | string | null
342
+ // named
343
+ ({cbor}: {cbor?: string | null}): globalThis.Promise<string | null> | string | null
344
+ // metadata (do not use)
345
+ __parameters: {cbor?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
346
+ kind: 'action'
347
+ }
348
+
349
+ export declare const SubmitTransaction: {
350
+ // positional
351
+ (cbor: string | null): globalThis.Promise<string | null> | string | null
352
+ // named
353
+ ({cbor}: {cbor?: string | null}): globalThis.Promise<string | null> | string | null
354
+ // metadata (do not use)
355
+ __parameters: {cbor?: string | null}, __returns: globalThis.Promise<string | null> | string | null, __self: never
356
+ kind: 'action'
357
+ }