@odatano/core 1.11.0 → 2.0.0-rc.10

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 (133) hide show
  1. package/@cds-models/CardanoAgentService/index.d.ts +255 -0
  2. package/@cds-models/CardanoAgentService/index.js +36 -0
  3. package/@cds-models/CardanoIndexerService/index.d.ts +177 -0
  4. package/@cds-models/CardanoIndexerService/index.js +27 -0
  5. package/@cds-models/CardanoODataService/index.d.ts +693 -2172
  6. package/@cds-models/CardanoODataService/index.js +88 -390
  7. package/@cds-models/CardanoSignService/index.d.ts +448 -1576
  8. package/@cds-models/CardanoSignService/index.js +62 -293
  9. package/@cds-models/CardanoTransactionService/index.d.ts +437 -1494
  10. package/@cds-models/CardanoTransactionService/index.js +60 -271
  11. package/@cds-models/CardanoWorkerService/index.d.ts +224 -0
  12. package/@cds-models/CardanoWorkerService/index.js +32 -0
  13. package/@cds-models/_/index.d.ts +70 -40
  14. package/@cds-models/_/index.js +17 -32
  15. package/@cds-models/cds/outbox/index.d.ts +28 -0
  16. package/@cds-models/index.d.ts +225 -522
  17. package/@cds-models/index.js +35 -218
  18. package/@cds-models/odatano/cardano/index.d.ts +919 -2884
  19. package/@cds-models/odatano/cardano/index.js +115 -536
  20. package/@cds-models/sap/common/index.d.ts +196 -600
  21. package/@cds-models/sap/common/index.js +28 -269
  22. package/README.md +194 -102
  23. package/db/schema.cds +388 -1
  24. package/db/types.cds +48 -0
  25. package/package.json +48 -33
  26. package/src/index.d.ts +7 -1
  27. package/src/index.js +30 -2
  28. package/src/plugin.js +33 -20
  29. package/srv/blockchain/backends/blockfrost-backend.d.ts +21 -2
  30. package/srv/blockchain/backends/blockfrost-backend.js +69 -25
  31. package/srv/blockchain/backends/cardano-backend.d.ts +69 -0
  32. package/srv/blockchain/backends/cardano-backend.js +13 -0
  33. package/srv/blockchain/backends/koios-backend.d.ts +26 -2
  34. package/srv/blockchain/backends/koios-backend.js +148 -25
  35. package/srv/blockchain/backends/ogmios-backend.d.ts +60 -9
  36. package/srv/blockchain/backends/ogmios-backend.js +326 -10
  37. package/srv/blockchain/cardano-client.d.ts +19 -0
  38. package/srv/blockchain/cardano-client.js +36 -0
  39. package/srv/blockchain/cardano-indexer.d.ts +50 -1
  40. package/srv/blockchain/cardano-indexer.js +193 -0
  41. package/srv/blockchain/crawler/crawler.d.ts +176 -0
  42. package/srv/blockchain/crawler/crawler.js +744 -0
  43. package/srv/blockchain/crawler/hooks.d.ts +43 -0
  44. package/srv/blockchain/crawler/hooks.js +62 -0
  45. package/srv/blockchain/crawler/index.d.ts +35 -0
  46. package/srv/blockchain/crawler/index.js +168 -0
  47. package/srv/blockchain/crawler/sync-state.d.ts +106 -0
  48. package/srv/blockchain/crawler/sync-state.js +287 -0
  49. package/srv/blockchain/signing/hsm-signer.d.ts +45 -0
  50. package/srv/blockchain/signing/hsm-signer.js +8 -1
  51. package/srv/blockchain/transaction-building/buildooor-tx.d.ts +20 -0
  52. package/srv/blockchain/transaction-building/buildooor-tx.js +104 -20
  53. package/srv/blockchain/wallet-worker/build-request.d.ts +26 -0
  54. package/srv/blockchain/wallet-worker/build-request.js +370 -0
  55. package/srv/blockchain/wallet-worker/confirmation-tracker.d.ts +117 -0
  56. package/srv/blockchain/wallet-worker/confirmation-tracker.js +290 -0
  57. package/srv/blockchain/wallet-worker/index.d.ts +14 -0
  58. package/srv/blockchain/wallet-worker/index.js +80 -0
  59. package/srv/blockchain/wallet-worker/job-store.d.ts +272 -0
  60. package/srv/blockchain/wallet-worker/job-store.js +597 -0
  61. package/srv/blockchain/wallet-worker/lease-heartbeat.d.ts +43 -0
  62. package/srv/blockchain/wallet-worker/lease-heartbeat.js +99 -0
  63. package/srv/blockchain/wallet-worker/signers.d.ts +57 -0
  64. package/srv/blockchain/wallet-worker/signers.js +131 -0
  65. package/srv/blockchain/wallet-worker/wallet-worker.d.ts +145 -0
  66. package/srv/blockchain/wallet-worker/wallet-worker.js +542 -0
  67. package/srv/cardano-agent-service.cds +150 -0
  68. package/srv/cardano-agent-service.d.ts +2 -0
  69. package/srv/cardano-agent-service.js +16 -0
  70. package/srv/cardano-indexer-service.cds +106 -0
  71. package/srv/cardano-indexer-service.d.ts +2 -0
  72. package/srv/cardano-indexer-service.js +79 -0
  73. package/srv/cardano-service.js +79 -4
  74. package/srv/cardano-sign-service.cds +200 -180
  75. package/srv/cardano-tx-service.cds +32 -26
  76. package/srv/cardano-tx-service.d.ts +1 -11
  77. package/srv/cardano-tx-service.js +107 -200
  78. package/srv/cardano-worker-service.cds +125 -0
  79. package/srv/cardano-worker-service.d.ts +2 -0
  80. package/srv/cardano-worker-service.js +199 -0
  81. package/srv/server.d.ts +34 -2
  82. package/srv/server.js +246 -36
  83. package/srv/utils/agent-grants-config.d.ts +65 -0
  84. package/srv/utils/agent-grants-config.js +148 -0
  85. package/srv/utils/agent-grants.d.ts +314 -0
  86. package/srv/utils/agent-grants.js +821 -0
  87. package/srv/utils/agent-token-auth.d.ts +19 -0
  88. package/srv/utils/agent-token-auth.js +81 -0
  89. package/srv/utils/collections.d.ts +13 -0
  90. package/srv/utils/collections.js +24 -0
  91. package/srv/utils/crypto.d.ts +16 -0
  92. package/srv/utils/crypto.js +75 -0
  93. package/srv/utils/db-sanitize.d.ts +40 -0
  94. package/srv/utils/db-sanitize.js +98 -0
  95. package/srv/utils/error-codes.d.ts +6 -0
  96. package/srv/utils/error-codes.js +6 -0
  97. package/srv/utils/errors.d.ts +12 -0
  98. package/srv/utils/errors.js +45 -0
  99. package/srv/utils/liveness.d.ts +23 -0
  100. package/srv/utils/liveness.js +49 -0
  101. package/srv/utils/mappers.d.ts +27 -0
  102. package/srv/utils/mappers.js +80 -10
  103. package/srv/utils/rate-limiter.d.ts +57 -0
  104. package/srv/utils/rate-limiter.js +126 -0
  105. package/srv/utils/service-events.d.ts +26 -0
  106. package/srv/utils/service-events.js +46 -0
  107. package/srv/utils/tx-request-parsers.d.ts +71 -0
  108. package/srv/utils/tx-request-parsers.js +202 -0
  109. package/srv/utils/tx-utils.d.ts +2 -1
  110. package/srv/utils/tx-utils.js +3 -2
  111. package/srv/utils/types.d.ts +17 -1
  112. package/@cds-models/CardanoODataService/index.d.ts.map +0 -1
  113. package/@cds-models/CardanoODataService/index.js.map +0 -1
  114. package/@cds-models/CardanoODataService/index.ts +0 -776
  115. package/@cds-models/CardanoSignService/index.d.ts.map +0 -1
  116. package/@cds-models/CardanoSignService/index.js.map +0 -1
  117. package/@cds-models/CardanoSignService/index.ts +0 -569
  118. package/@cds-models/CardanoTransactionService/index.d.ts.map +0 -1
  119. package/@cds-models/CardanoTransactionService/index.js.map +0 -1
  120. package/@cds-models/CardanoTransactionService/index.ts +0 -526
  121. package/@cds-models/_/index.d.ts.map +0 -1
  122. package/@cds-models/_/index.js.map +0 -1
  123. package/@cds-models/_/index.ts +0 -96
  124. package/@cds-models/cds/outbox/index.ts +0 -27
  125. package/@cds-models/index.d.ts.map +0 -1
  126. package/@cds-models/index.js.map +0 -1
  127. package/@cds-models/index.ts +0 -245
  128. package/@cds-models/odatano/cardano/index.d.ts.map +0 -1
  129. package/@cds-models/odatano/cardano/index.js.map +0 -1
  130. package/@cds-models/odatano/cardano/index.ts +0 -789
  131. package/@cds-models/sap/common/index.d.ts.map +0 -1
  132. package/@cds-models/sap/common/index.js.map +0 -1
  133. package/@cds-models/sap/common/index.ts +0 -249
@@ -0,0 +1,255 @@
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 (see AGENT_GRANTS_DESIGN.md).
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
+ * Names are this repo's PascalCase; semantics mirror NIGHTGATE's agent grants
23
+ * (createAgentGrant / updateAgentGrant / rotateAgentGrantToken / revokeAgentGrant /
24
+ * getGrantUsage), so a gateway drives both products with one code path.
25
+ *
26
+ * A token request never inherits the operator's roles: `@requires: 'Admin'` on the
27
+ * four actions, on PauseWorker / ResumeWorker / pauseCrawler / resumeCrawler and on
28
+ * every other Admin surface therefore refuses it by construction. The allow list,
29
+ * wallet pinning and daily budget are enforced by a before('*') hook on all six
30
+ * ODATANO services (srv/utils/agent-grants.ts). The `x-agent-token` header only
31
+ * reaches the services when cds.requires.odatano-core.agentGrants.enabled is set
32
+ * (srv/utils/agent-token-auth.ts).
33
+ */
34
+ export default class {
35
+ static readonly GetGrantStatus: typeof GetGrantStatus;
36
+ static readonly CreateAgentGrant: typeof CreateAgentGrant;
37
+ static readonly RevokeAgentGrant: typeof RevokeAgentGrant;
38
+ static readonly RotateAgentGrantToken: typeof RotateAgentGrantToken;
39
+ static readonly UpdateAgentGrant: typeof UpdateAgentGrant;
40
+ static readonly GetGrantUsage: typeof GetGrantUsage;
41
+ }
42
+
43
+ // entity 'AgentGrant'
44
+ export declare function _AgentGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
45
+ new (...args: any[]): {
46
+ ID?: __.Key<string>
47
+ userId?: string
48
+ agentLabel?: string | null
49
+ allowedActions?: string
50
+ walletId?: string | null
51
+ allowedJobKinds?: string | null
52
+ maxJobsPerDay?: number | null
53
+ jobsUsedToday?: number | null
54
+ budgetWindow?: string | null
55
+ validUntil?: __.CdsTimestamp | null
56
+ isActive?: boolean | null
57
+ revokedAt?: __.CdsTimestamp | null
58
+ createdAt?: __.CdsTimestamp | null
59
+ lastUsedAt?: __.CdsTimestamp | null
60
+ } & InstanceType<TBase>
61
+ readonly kind: 'entity';
62
+ readonly keys: __.KeysOf<AgentGrant>;
63
+ readonly elements: __.ElementsOf<AgentGrant>;
64
+ readonly actions: globalThis.Record<never, never>;
65
+ };
66
+ /**
67
+ * Agent grants (v2.0): scoped bearer capabilities an Admin hands to an agent
68
+ * instead of a full user. The token is a capability, not an identity — it is
69
+ * stored as SHA-256 only, and a request carrying it runs as the principal
70
+ * `agent:<ID>` with the role `agent-grant`, never as the operator. Enforcement
71
+ * (allow list, wallet pinning, daily budget) lives in srv/utils/agent-grants.ts;
72
+ * the transport lane that admits `x-agent-token` in srv/utils/agent-token-auth.ts.
73
+ * Admin-only table: creation and revocation happen through CardanoAgentService
74
+ * actions, a token request may read its own row only.
75
+ */
76
+ export class AgentGrant extends _AgentGrantAspect(__.Entity) {
77
+ }
78
+ /**
79
+ * Agent grants (v2.0): scoped bearer capabilities an Admin hands to an agent
80
+ * instead of a full user. The token is a capability, not an identity — it is
81
+ * stored as SHA-256 only, and a request carrying it runs as the principal
82
+ * `agent:<ID>` with the role `agent-grant`, never as the operator. Enforcement
83
+ * (allow list, wallet pinning, daily budget) lives in srv/utils/agent-grants.ts;
84
+ * the transport lane that admits `x-agent-token` in srv/utils/agent-token-auth.ts.
85
+ * Admin-only table: creation and revocation happen through CardanoAgentService
86
+ * actions, a token request may read its own row only.
87
+ */
88
+ export class AgentGrants extends Array<AgentGrant> {
89
+ $count?: number
90
+ }
91
+
92
+ // entity 'GrantStatus'
93
+ export declare function _GrantStatusAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
94
+ new (...args: any[]): {
95
+ grantId?: string | null
96
+ agentLabel?: string | null
97
+ allowedActions?: Array<string>
98
+ walletId?: string | null
99
+ allowedJobKinds?: Array<string>
100
+ maxJobsPerDay?: number | null
101
+ jobsUsedToday?: number | null
102
+ budgetWindow?: string | null
103
+ validUntil?: __.CdsTimestamp | null
104
+ isActive?: boolean | null
105
+ } & InstanceType<TBase>
106
+ readonly kind: 'type';
107
+ readonly keys: __.KeysOf<GrantStatus>;
108
+ readonly elements: __.ElementsOf<GrantStatus>;
109
+ readonly actions: globalThis.Record<never, never>;
110
+ };
111
+ export class GrantStatus extends _GrantStatusAspect(__.Entity) {
112
+ }
113
+
114
+ // entity 'IssuedGrant'
115
+ export declare function _IssuedGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
116
+ new (...args: any[]): {
117
+ grantId?: string | null
118
+ token?: string | null
119
+ allowedActions?: Array<string>
120
+ walletId?: string | null
121
+ allowedJobKinds?: Array<string>
122
+ maxJobsPerDay?: number | null
123
+ validUntil?: __.CdsTimestamp | null
124
+ } & InstanceType<TBase>
125
+ readonly kind: 'type';
126
+ readonly keys: __.KeysOf<IssuedGrant>;
127
+ readonly elements: __.ElementsOf<IssuedGrant>;
128
+ readonly actions: globalThis.Record<never, never>;
129
+ };
130
+ export class IssuedGrant extends _IssuedGrantAspect(__.Entity) {
131
+ }
132
+
133
+ // entity 'RotatedGrant'
134
+ export declare function _RotatedGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
135
+ new (...args: any[]): {
136
+ grantId?: string | null
137
+ token?: string | null
138
+ } & InstanceType<TBase>
139
+ readonly kind: 'type';
140
+ readonly keys: __.KeysOf<RotatedGrant>;
141
+ readonly elements: __.ElementsOf<RotatedGrant>;
142
+ readonly actions: globalThis.Record<never, never>;
143
+ };
144
+ export class RotatedGrant extends _RotatedGrantAspect(__.Entity) {
145
+ }
146
+
147
+ // entity 'UpdatedGrant'
148
+ export declare function _UpdatedGrantAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
149
+ new (...args: any[]): {
150
+ grantId?: string | null
151
+ updated?: Array<string>
152
+ } & InstanceType<TBase>
153
+ readonly kind: 'type';
154
+ readonly keys: __.KeysOf<UpdatedGrant>;
155
+ readonly elements: __.ElementsOf<UpdatedGrant>;
156
+ readonly actions: globalThis.Record<never, never>;
157
+ };
158
+ export class UpdatedGrant extends _UpdatedGrantAspect(__.Entity) {
159
+ }
160
+
161
+ // entity 'GrantUsageCall'
162
+ export declare function _GrantUsageCallAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
163
+ new (...args: any[]): {
164
+ service?: string | null
165
+ action?: string | null
166
+ count?: number | null
167
+ refunded?: number | null
168
+ } & InstanceType<TBase>
169
+ readonly kind: 'type';
170
+ readonly keys: __.KeysOf<GrantUsageCall>;
171
+ readonly elements: __.ElementsOf<GrantUsageCall>;
172
+ readonly actions: globalThis.Record<never, never>;
173
+ };
174
+ export class GrantUsageCall extends _GrantUsageCallAspect(__.Entity) {
175
+ }
176
+
177
+ // entity 'GrantUsage'
178
+ export declare function _GrantUsageAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
179
+ new (...args: any[]): {
180
+ grantId?: string | null
181
+ since?: __.CdsTimestamp | null
182
+ until?: __.CdsTimestamp | null
183
+ calls?: Array<GrantUsageCall>
184
+ total?: number | null
185
+ jobsUsedToday?: number | null
186
+ maxJobsPerDay?: number | null
187
+ } & InstanceType<TBase>
188
+ readonly kind: 'type';
189
+ readonly keys: __.KeysOf<GrantUsage>;
190
+ readonly elements: __.ElementsOf<GrantUsage>;
191
+ readonly actions: globalThis.Record<never, never>;
192
+ };
193
+ export class GrantUsage extends _GrantUsageAspect(__.Entity) {
194
+ }
195
+
196
+
197
+ export declare const GetGrantStatus: {
198
+ // positional
199
+ (): globalThis.Promise<GrantStatus | null> | GrantStatus | null
200
+ // named
201
+ ({}: globalThis.Record<never, never>): globalThis.Promise<GrantStatus | null> | GrantStatus | null
202
+ // metadata (do not use)
203
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<GrantStatus | null> | GrantStatus | null, __self: never
204
+ kind: 'function'
205
+ }
206
+
207
+ export declare const CreateAgentGrant: {
208
+ // positional
209
+ (allowedActions: Array<string>, walletId: string | null, allowedJobKinds: Array<string>, maxJobsPerDay: number | null, validUntil: __.CdsTimestamp | null, agentLabel: string | null): globalThis.Promise<IssuedGrant | null> | IssuedGrant | null
210
+ // named
211
+ ({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
212
+ // metadata (do not use)
213
+ __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
214
+ kind: 'action'
215
+ }
216
+
217
+ export declare const RevokeAgentGrant: {
218
+ // positional
219
+ (grantId: string | null): globalThis.Promise<boolean | null> | boolean | null
220
+ // named
221
+ ({grantId}: {grantId?: string | null}): globalThis.Promise<boolean | null> | boolean | null
222
+ // metadata (do not use)
223
+ __parameters: {grantId?: string | null}, __returns: globalThis.Promise<boolean | null> | boolean | null, __self: never
224
+ kind: 'action'
225
+ }
226
+
227
+ export declare const RotateAgentGrantToken: {
228
+ // positional
229
+ (grantId: string | null): globalThis.Promise<RotatedGrant | null> | RotatedGrant | null
230
+ // named
231
+ ({grantId}: {grantId?: string | null}): globalThis.Promise<RotatedGrant | null> | RotatedGrant | null
232
+ // metadata (do not use)
233
+ __parameters: {grantId?: string | null}, __returns: globalThis.Promise<RotatedGrant | null> | RotatedGrant | null, __self: never
234
+ kind: 'action'
235
+ }
236
+
237
+ export declare const UpdateAgentGrant: {
238
+ // positional
239
+ (grantId: string | null, agentLabel: string | null, allowedActions: Array<string>, allowedJobKinds: Array<string>, maxJobsPerDay: number | null, validUntil: __.CdsTimestamp | null): globalThis.Promise<UpdatedGrant | null> | UpdatedGrant | null
240
+ // named
241
+ ({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
242
+ // metadata (do not use)
243
+ __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
244
+ kind: 'action'
245
+ }
246
+
247
+ export declare const GetGrantUsage: {
248
+ // positional
249
+ (grantId: string | null, since: __.CdsTimestamp | null, until: __.CdsTimestamp | null): globalThis.Promise<GrantUsage | null> | GrantUsage | null
250
+ // named
251
+ ({grantId, since, until}: {grantId?: string | null, since?: __.CdsTimestamp | null, until?: __.CdsTimestamp | null}): globalThis.Promise<GrantUsage | null> | GrantUsage | null
252
+ // metadata (do not use)
253
+ __parameters: {grantId?: string | null, since?: __.CdsTimestamp | null, until?: __.CdsTimestamp | null}, __returns: globalThis.Promise<GrantUsage | null> | GrantUsage | null, __self: never
254
+ kind: 'function'
255
+ }
@@ -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,177 @@
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
+ * auth. pause/resume are operational actions — gate behind a dedicated Admin scope.
14
+ * Read-only status and audit data remain available to authenticated users.
15
+ *
16
+ * Deliberately NO service-level @requires: CAP checks a service-level requirement
17
+ * on every request BEFORE the operation's own annotation, so an operation-level
18
+ * `@requires: 'any'` can never open a single function on an otherwise
19
+ * authenticated service (anonymous callers get the 401 challenge first). The
20
+ * requirement therefore sits on each element, and getLiveness() alone is 'any' —
21
+ * the same layout as NIGHTGATE's indexer service.
22
+ */
23
+ export default class {
24
+ static readonly getStatus: typeof getStatus;
25
+ static readonly getLiveness: typeof getLiveness;
26
+ static readonly pauseCrawler: typeof pauseCrawler;
27
+ static readonly resumeCrawler: typeof resumeCrawler;
28
+ }
29
+
30
+ // entity 'SyncState'
31
+ export declare function _SyncStateAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
32
+ new (...args: any[]): {
33
+ ID?: __.Key<string>
34
+ network?: string | null
35
+ startSlot?: number | null
36
+ startBlockHash?: _.Blake2b256 | null
37
+ lastSlot?: number | null
38
+ lastBlockHash?: _.Blake2b256 | null
39
+ lastHeight?: number | null
40
+ lastIndexedAt?: __.CdsTimestamp | null
41
+ tipSlot?: number | null
42
+ tipHeight?: number | null
43
+ syncStatus?: _.CrawlSyncStatus | null
44
+ lastError?: string | null
45
+ lastErrorAt?: __.CdsTimestamp | null
46
+ consecutiveErrors?: number | null
47
+ desiredRunning?: boolean | null
48
+ leaseOwner?: string | null
49
+ leaseUntil?: __.CdsTimestamp | null
50
+ } & InstanceType<TBase>
51
+ readonly kind: 'entity';
52
+ readonly keys: __.KeysOf<SyncState>;
53
+ readonly elements: __.ElementsOf<SyncState>;
54
+ readonly actions: globalThis.Record<never, never>;
55
+ };
56
+ export class SyncState extends _SyncStateAspect(__.Entity) {
57
+ }
58
+ export class SyncState_ extends Array<SyncState> {
59
+ $count?: number
60
+ }
61
+
62
+ // entity 'ReorgLog'
63
+ export declare function _ReorgLogAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
64
+ new (...args: any[]): {
65
+ ID?: __.Key<string>
66
+ detectedAt?: __.CdsTimestamp | null
67
+ forkSlot?: number | null
68
+ forkHeight?: number | null
69
+ oldTipHash?: _.Blake2b256 | null
70
+ newTipHash?: _.Blake2b256 | null
71
+ blocksRolledBack?: number | null
72
+ status?: _.ReorgStatus | null
73
+ } & InstanceType<TBase>
74
+ readonly kind: 'entity';
75
+ readonly keys: __.KeysOf<ReorgLog>;
76
+ readonly elements: __.ElementsOf<ReorgLog>;
77
+ readonly actions: globalThis.Record<never, never>;
78
+ };
79
+ export class ReorgLog extends _ReorgLogAspect(__.Entity) {
80
+ }
81
+ export class ReorgLog_ extends Array<ReorgLog> {
82
+ $count?: number
83
+ }
84
+
85
+ // entity 'CrawlerStatus'
86
+ export declare function _CrawlerStatusAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
87
+ new (...args: any[]): {
88
+ running?: boolean | null
89
+ syncStatus?: string | null
90
+ lastSlot?: string | null
91
+ lastHeight?: string | null
92
+ tipHeight?: string | null
93
+ syncProgress?: string | null
94
+ consecutiveErrors?: number | null
95
+ } & InstanceType<TBase>
96
+ readonly kind: 'type';
97
+ readonly keys: __.KeysOf<CrawlerStatus>;
98
+ readonly elements: __.ElementsOf<CrawlerStatus>;
99
+ readonly actions: globalThis.Record<never, never>;
100
+ };
101
+ export class CrawlerStatus extends _CrawlerStatusAspect(__.Entity) {
102
+ }
103
+
104
+ // entity 'Liveness'
105
+ export declare function _LivenessAspect<TBase extends new (...args: any[]) => object>(Base: TBase): {
106
+ new (...args: any[]): {
107
+ status?: string | null
108
+ timestamp?: __.CdsTimestamp | null
109
+ uptime?: number | null
110
+ version?: string | null
111
+ network?: string | null
112
+ } & InstanceType<TBase>
113
+ readonly kind: 'type';
114
+ readonly keys: __.KeysOf<Liveness>;
115
+ readonly elements: __.ElementsOf<Liveness>;
116
+ readonly actions: globalThis.Record<never, never>;
117
+ };
118
+ export class Liveness extends _LivenessAspect(__.Entity) {
119
+ }
120
+
121
+ // event
122
+ export declare class blockIndexed {
123
+ readonly kind: 'event';
124
+ hash: string | null
125
+ slot: number | null
126
+ height: number | null
127
+ txHashes: Array<string>
128
+ tipSlot: number | null
129
+ tipHeight: number | null
130
+ }
131
+ // event
132
+ export declare class reorg {
133
+ readonly kind: 'event';
134
+ forkSlot: number | null
135
+ forkHeight: number | null
136
+ blocksRolledBack: number | null
137
+ }
138
+
139
+ export declare const getStatus: {
140
+ // positional
141
+ (): globalThis.Promise<CrawlerStatus | null> | CrawlerStatus | null
142
+ // named
143
+ ({}: globalThis.Record<never, never>): globalThis.Promise<CrawlerStatus | null> | CrawlerStatus | null
144
+ // metadata (do not use)
145
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<CrawlerStatus | null> | CrawlerStatus | null, __self: never
146
+ kind: 'function'
147
+ }
148
+
149
+ export declare const getLiveness: {
150
+ // positional
151
+ (): globalThis.Promise<Liveness | null> | Liveness | null
152
+ // named
153
+ ({}: globalThis.Record<never, never>): globalThis.Promise<Liveness | null> | Liveness | null
154
+ // metadata (do not use)
155
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<Liveness | null> | Liveness | null, __self: never
156
+ kind: 'function'
157
+ }
158
+
159
+ export declare const pauseCrawler: {
160
+ // positional
161
+ (): globalThis.Promise<boolean | null> | boolean | null
162
+ // named
163
+ ({}: globalThis.Record<never, never>): globalThis.Promise<boolean | null> | boolean | null
164
+ // metadata (do not use)
165
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<boolean | null> | boolean | null, __self: never
166
+ kind: 'action'
167
+ }
168
+
169
+ export declare const resumeCrawler: {
170
+ // positional
171
+ (): globalThis.Promise<boolean | null> | boolean | null
172
+ // named
173
+ ({}: globalThis.Record<never, never>): globalThis.Promise<boolean | null> | boolean | null
174
+ // metadata (do not use)
175
+ __parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<boolean | null> | boolean | null, __self: never
176
+ kind: 'action'
177
+ }
@@ -0,0 +1,27 @@
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
+ // Liveness
17
+ module.exports.Liveness = createEntityProxy(['CardanoIndexerService', 'Liveness'], { target: { is_singular: true } })
18
+ module.exports.__Array_Liveness_ = createEntityProxy(['CardanoIndexerService', 'Liveness'], { target: { is_singular: false }})
19
+ // events
20
+ module.exports.blockIndexed = 'CardanoIndexerService.blockIndexed'
21
+ module.exports.reorg = 'CardanoIndexerService.reorg'
22
+ // actions
23
+ module.exports.getStatus = 'getStatus'
24
+ module.exports.getLiveness = 'getLiveness'
25
+ module.exports.pauseCrawler = 'pauseCrawler'
26
+ module.exports.resumeCrawler = 'resumeCrawler'
27
+ // enums