@odatano/core 2.0.0-rc.6 → 2.0.0-rc.8

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.
@@ -10,8 +10,15 @@ import * as __ from './../_';
10
10
  * - status function + pause/resume actions delegating to the crawler singleton
11
11
  *
12
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.
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.
15
22
  */
16
23
  export default class {
17
24
  static readonly getStatus: typeof getStatus;
@@ -12,8 +12,11 @@ import * as _odatano_cardano from './../odatano/cardano';
12
12
  * - Submitting verified transactions to the blockchain and tracking submission status
13
13
  * - Providing actions for signing with a Hardware Security Module (HSM) and retrieving HSM status
14
14
  *
15
- * Security note: see CardanoODataService (cardano-service.cds) for the rationale
16
- * on service-level auth without per-resource ownership enforcement.
15
+ * Security note: see CardanoODataService (cardano-service.cds) for the rationale on auth
16
+ * without per-resource ownership enforcement. Deliberately NO service-level @requires:
17
+ * CAP checks it on every request BEFORE the operation annotation, which silenced the
18
+ * `any` on VerifyDataSignature (anonymous callers got the 401 challenge first). The
19
+ * requirement therefore sits on each element; VerifyDataSignature alone is public.
17
20
  */
18
21
  export default class {
19
22
  static readonly VerifySignature: typeof VerifySignature;
package/README.md CHANGED
@@ -1,186 +1,187 @@
1
- ![alt text](docs/assets/odatano_logo/logo_odatano_white.png)
2
-
3
- # Enterprise OData Services for the Cardano Blockchain
4
-
5
- Funded by [Cardano Catalyst Fund 14](https://projectcatalyst.io/funds/14/sponsored-by-leftovers/sap-cardano-odata-v4-api-with-cap-and-sap-cardano-sdk) all four milestones completed and approved (April 2026).
6
-
7
- **ODATANO** is an SAP CAP–based service that exposes the Cardano blockchain via a standardized **OData V4** interface, enabling enterprise-grade read and write access with native transaction building.
8
-
9
- [![Tests](https://github.com/ODATANO/ODATANO/actions/workflows/test.yaml/badge.svg)](https://github.com/ODATANO/ODATANO/actions/workflows/test.yaml)
10
- [![Coverage](https://codecov.io/gh/ODATANO/ODATANO/branch/main/graph/badge.svg)](https://codecov.io/gh/ODATANO/ODATANO)
11
- [![npm version](https://img.shields.io/npm/v/@odatano/core?logo=npm)](https://www.npmjs.com/package/@odatano/core)
12
- [![npm downloads](https://img.shields.io/npm/dt/@odatano/core?logo=npm&label=downloads&color=blue)](https://www.npmjs.com/package/@odatano/core)
13
- [![License](https://img.shields.io/badge/license-Apache%202.0-yellow)](LICENSE)
14
-
15
-
16
- ## Quick Start
17
-
18
- ### As CAP Plugin (recommended)
19
-
20
- Add ODATANO to any existing SAP CAP project:
21
-
22
- ```bash
23
- npm install @odatano/core @cap-js/sqlite
24
- ```
25
-
26
- ```json
27
- {
28
- "cds": {
29
- "requires": {
30
- "db": { "kind": "sqlite" },
31
- "odatano-core": {
32
- "network": "preview",
33
- "backends": ["blockfrost"]
34
- }
35
- }
36
- }
37
- }
38
- ```
39
-
40
- Put your API key in a `.env` file in the project root (loaded automatically by `cds serve` / `cds watch`) — don't commit it to `package.json`:
41
-
42
- ```bash
43
- # .env
44
- BLOCKFROST_API_KEY=preview_your_api_key_here
45
- ```
46
-
47
- ```bash
48
- cds deploy --to sqlite
49
- cds serve
50
- ```
51
-
52
- > Config in `cds.requires.odatano-core` takes precedence over environment
53
- > variables; a `blockfrostApiKey` set there would override the `.env` value.
54
-
55
- > **Self-hosted Blockfrost-compatible node?** (Dolos MiniBF, Demeter Self-Hosted)
56
- > Set `blockfrostCustomBackend` to the node's base URL (e.g. `http://localhost:3010/api/v0`).
57
- > When set, `blockfrostApiKey` becomes optional. See the [Backend Configuration Guide](docs/guides/BACKEND_CONFIGURATION.md#self-hosted-blockfrost-compatible-backends).
58
-
59
- ### Standalone
60
-
61
- Run ODATANO as a self-contained service (no host CAP project needed):
62
-
63
- ```bash
64
- git clone https://github.com/ODATANO/ODATANO && cd ODATANO
65
- npm ci
66
- cp .env.example .env # set BLOCKFROST_API_KEY, NETWORK, BACKENDS
67
- cds deploy --to sqlite
68
- cds serve
69
- ```
70
-
71
- Or with Docker — this brings up a local **cardano-node + Ogmios + ODATANO** stack
72
- (Preview), with the service pre-wired to the local Ogmios backend:
73
-
74
- ```bash
75
- docker compose up -d # full stack
76
- docker compose up -d cardano-node ogmios # just the chain backend (pre-sync)
77
- docker compose logs -f ogmios # watch sync (/health: 202 syncing, 200 near tip)
78
- ```
79
-
80
- > First sync from genesis takes hours; the node DB persists in a Docker volume so
81
- > restarts resume. Until Ogmios catches up, historical queries fall back to
82
- > Blockfrost (set `BLOCKFROST_API_KEY`).
83
-
84
- Service available at `http://localhost:4004`. See the [Quick Start Guide](docs/QUICK_START.md#local-ogmios--cardano-node-docker) for the local Ogmios stack and full details.
85
-
86
- ## Dev Mode: Mocked Authentication
87
-
88
- > **Heads-up.** `cds serve` uses CAP's mocked auth: `@requires: 'authenticated-user'` accepts any Basic-Auth header against a mock user (`alice`, `bob`, …) — passwords are not checked. Anonymous requests get 401, but anyone reaching the port can authenticate.
89
- >
90
- > Production needs the `[production]` profile (`NODE_ENV=production`), which switches to `auth: xsuaa`. Don't expose a dev-mode instance. See the [Security Guide](docs/guides/SECURITY_GUIDE.md#authentication-xsuaa).
91
-
92
- ## Services
93
-
94
- | Service | Path | Purpose |
95
- |---|---|---|
96
- | CardanoODataService | `/odata/v4/cardano-odata/` | Read blockchain data (20 entities, 19 actions) |
97
- | CardanoTransactionService | `/odata/v4/cardano-transaction/` | Build & submit transactions (13 actions) |
98
- | CardanoSignService | `/odata/v4/cardano-sign/` | External signing + HSM (9 actions) |
99
- | CardanoIndexerService | `/odata/v4/cardano-indexer/` | Chain crawler / pre-sync control (v2.0, off by default) |
100
- | CardanoWorkerService | `/odata/v4/cardano-worker/` | Asynchronous wallet jobs (v2.0, off by default) |
101
- | CardanoAgentService | `/odata/v4/cardano-agent/` | Agent grants: scoped bearer tokens for agents (v2.0, off by default) |
102
-
103
- Both v2.0 services also publish **CAP events**, so a consumer can subscribe instead of polling —
104
- in-process, no broker required:
105
-
106
- ```js
107
- (await cds.connect.to('CardanoWorkerService')).on('jobConfirmed', ({ data }) => …)
108
- (await cds.connect.to('CardanoIndexerService')).on('blockIndexed', ({ data }) => …)
109
- ```
110
-
111
- ## Agent grants (v2.0, off by default)
112
-
113
- Hand an agent a **scoped, budgeted token** instead of a user. Design and rationale:
114
- [AGENT_GRANTS_DESIGN.md](AGENT_GRANTS_DESIGN.md).
115
-
116
- ```bash
117
- AGENT_GRANTS_ENABLED=true # or cds.requires.odatano-core.agentGrants.enabled
118
- AGENT_GRANTS_DELEGATE=mocked # CAP auth kind that keeps authenticating non-token requests (default: configured kind)
119
- AGENT_GRANT_ADMIN_RATE_LIMIT=10 # grant administration calls per principal per hour (or agentGrants.adminRateLimit)
120
- ```
121
-
122
- 1. An **Admin** issues a grant (`POST /odata/v4/cardano-agent/CreateAgentGrant`): an allow list of
123
- actions, optionally a worker `walletId` (required for `SubmitWalletJob`/`CancelJob`), allowed job
124
- kinds, a daily budget and an expiry. The response carries the token `odat_…` **once**; the
125
- server stores only its SHA-256.
126
- 2. The agent sends `x-agent-token: odat_…` on any of the six service paths. It runs as the principal
127
- `agent:<grantId>` with the single role `agent-grant`, never as the operator: every
128
- `@requires: 'Admin'` surface (pause/resume, HSM signing, grant administration) refuses it by
129
- construction. Reads and compute-only actions are always allowed; allow-listed actions each cost
130
- one budget unit per UTC day (a build is the service an agent buys); everything else is 403.
131
- Wallet jobs are pinned to the grant's wallet and visible only to the grant that queued them.
132
- 3. `GET /odata/v4/cardano-agent/GetGrantStatus()` tells the agent what it may do and how much budget
133
- is left; `RevokeAgentGrant` turns the token into an unknown token immediately.
134
- 4. Lifecycle (Admin, same semantics as NIGHTGATE's agent grants so a gateway drives both with one
135
- code path): `UpdateAgentGrant` changes label, allow list, job kinds, daily budget or expiry
136
- (absent = untouched, explicit `null` = cleared; the wallet binding is immutable, 409
137
- `GRANT_REVOKED` on a revoked grant); `RotateAgentGrantToken` returns a fresh token once, the old
138
- one is unknown from the next request; `GetGrantUsage(grantId, since, until)` lists admitted calls
139
- per service and action over up to 366 days (an Admin for any grant, a token for its own). All
140
- administration calls share the per-principal hourly rate limit above.
141
-
142
- Grantable: `Build*`, `SetCollateral`, `CreateSigningRequest`, `VerifySignature`, `Submit*`,
143
- `CheckSubmissionStatus`, `SubmitWalletJob`, `CancelJob`. Never: `SignWithHsm*`, `Pause*`/`Resume*`,
144
- `pauseCrawler`/`resumeCrawler`, grant administration.
145
-
146
- Programmatic seams for other packages (`@odatano/x402` sells grants against a 402 payment):
147
- `issueAgentGrant()`, `updateAgentGrant()`, `rotateAgentGrantToken()`, `revokeAgentGrantById()`,
148
- `getGrantUsage()`, `registerTransportLane()` from `@odatano/core`.
149
-
150
- ## Liveness probe
151
-
152
- `GET /odata/v4/cardano-indexer/getLiveness()` answers `200 { status: "alive", timestamp, uptime,
153
- version, network }` **without credentials** (`@requires: 'any'`) as long as the process runs — no
154
- backend or DB probe, no secrets. The Docker `HEALTHCHECK`, compose and upstream probes use it
155
- instead of the service document, so a wrong operator password no longer reads as "ODATANO down".
156
- Readiness (crawler, worker, backends) stays authenticated: `getStatus()`, `GetWorkerStatus()`,
157
- `GetNetworkInformation`.
158
-
159
- ## Requirements
160
-
161
- - **Node.js >= 22.5** and **@sap/cds >= 10** (peer dependency). CAP 9 hosts cannot load `@odatano/core@2`.
162
- - Upgrading a consumer from 1.x: run **`cds deploy`**. 2.0 adds six tables (`CardanoSyncState`,
163
- `CardanoReorgLog`, `CardanoWorkerWallets`, `CardanoWalletJobs`, `CardanoAgentGrants`,
164
- `CardanoAgentGrantUsage`) plus a `dedupKey` column; without the redeploy the new services answer
165
- `no such table` while the old ones keep working.
166
-
167
- ## Documentation
168
-
169
- | Guide | Description |
170
- |-------|-------------|
171
- | [Quick Start](docs/QUICK_START.md) | Get running in 5 minutes |
172
- | [User Guide](docs/guides/USER_GUIDE.md) | API usage, entities, and examples |
173
- | [Developer Guide](docs/guides/DEVELOPER_GUIDE.md) | Architecture and development |
174
- | [Transaction Workflow](docs/guides/TRANSACTION_WORKFLOW.md) | Build → Sign → Submit flow |
175
- | [Security Guide](docs/guides/SECURITY_GUIDE.md) | Authentication, signing security, HSM |
176
- | [Docker Deployment](docs/guides/DOCKER_DEPLOYMENT.md) | Container deployment |
177
-
178
- ## License
179
-
180
- Apache License 2.0 - see [LICENSE](LICENSE)
181
-
182
- ## Support
183
-
184
- - **Issues**: [GitHub Issues](https://github.com/ODATANO/ODATANO/issues)
185
- - **Project Lead**: Max Weber
186
- - **Contact**: info@odatano.dev
1
+ ![alt text](docs/assets/odatano_logo/logo_odatano_white.png)
2
+
3
+ # Enterprise OData Services for the Cardano Blockchain
4
+
5
+ Funded by [Cardano Catalyst Fund 14](https://projectcatalyst.io/funds/14/sponsored-by-leftovers/sap-cardano-odata-v4-api-with-cap-and-sap-cardano-sdk) all four milestones completed and approved (April 2026).
6
+
7
+ **ODATANO** is an SAP CAP–based service that exposes the Cardano blockchain via a standardized **OData V4** interface, enabling enterprise-grade read and write access with native transaction building.
8
+
9
+ [![Tests](https://github.com/ODATANO/ODATANO/actions/workflows/test.yaml/badge.svg)](https://github.com/ODATANO/ODATANO/actions/workflows/test.yaml)
10
+ [![Coverage](https://codecov.io/gh/ODATANO/ODATANO/branch/main/graph/badge.svg)](https://codecov.io/gh/ODATANO/ODATANO)
11
+ [![npm version](https://img.shields.io/npm/v/@odatano/core?logo=npm)](https://www.npmjs.com/package/@odatano/core)
12
+ [![npm downloads](https://img.shields.io/npm/dt/@odatano/core?logo=npm&label=downloads&color=blue)](https://www.npmjs.com/package/@odatano/core)
13
+ [![License](https://img.shields.io/badge/license-Apache%202.0-yellow)](LICENSE)
14
+
15
+
16
+ ## Quick Start
17
+
18
+ ### As CAP Plugin (recommended)
19
+
20
+ Add ODATANO to any existing SAP CAP project:
21
+
22
+ ```bash
23
+ npm install @odatano/core @cap-js/sqlite
24
+ ```
25
+
26
+ ```json
27
+ {
28
+ "cds": {
29
+ "requires": {
30
+ "db": { "kind": "sqlite" },
31
+ "odatano-core": {
32
+ "network": "preview",
33
+ "backends": ["blockfrost"]
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ Put your API key in a `.env` file in the project root (loaded automatically by `cds serve` / `cds watch`) — don't commit it to `package.json`:
41
+
42
+ ```bash
43
+ # .env
44
+ BLOCKFROST_API_KEY=preview_your_api_key_here
45
+ ```
46
+
47
+ ```bash
48
+ cds deploy --to sqlite
49
+ cds serve
50
+ ```
51
+
52
+ > Config in `cds.requires.odatano-core` takes precedence over environment
53
+ > variables; a `blockfrostApiKey` set there would override the `.env` value.
54
+
55
+ > **Self-hosted Blockfrost-compatible node?** (Dolos MiniBF, Demeter Self-Hosted)
56
+ > Set `blockfrostCustomBackend` to the node's base URL (e.g. `http://localhost:3010/api/v0`).
57
+ > When set, `blockfrostApiKey` becomes optional. See the [Backend Configuration Guide](docs/guides/BACKEND_CONFIGURATION.md#self-hosted-blockfrost-compatible-backends).
58
+
59
+ ### Standalone
60
+
61
+ Run ODATANO as a self-contained service (no host CAP project needed):
62
+
63
+ ```bash
64
+ git clone https://github.com/ODATANO/ODATANO && cd ODATANO
65
+ npm ci
66
+ cp .env.example .env # set BLOCKFROST_API_KEY, NETWORK, BACKENDS
67
+ cds deploy --to sqlite
68
+ cds serve
69
+ ```
70
+
71
+ Or with Docker — this brings up a local **cardano-node + Ogmios + ODATANO** stack
72
+ (Preview), with the service pre-wired to the local Ogmios backend:
73
+
74
+ ```bash
75
+ docker compose up -d # full stack
76
+ docker compose up -d cardano-node ogmios # just the chain backend (pre-sync)
77
+ docker compose logs -f ogmios # watch sync (/health: 202 syncing, 200 near tip)
78
+ ```
79
+
80
+ > First sync from genesis takes hours; the node DB persists in a Docker volume so
81
+ > restarts resume. Until Ogmios catches up, historical queries fall back to
82
+ > Blockfrost (set `BLOCKFROST_API_KEY`).
83
+
84
+ Service available at `http://localhost:4004`. See the [Quick Start Guide](docs/QUICK_START.md#local-ogmios--cardano-node-docker) for the local Ogmios stack and full details.
85
+
86
+ ## Dev Mode: Mocked Authentication
87
+
88
+ > **Heads-up.** `cds serve` uses CAP's mocked auth: `@requires: 'authenticated-user'` accepts any Basic-Auth header against a mock user (`alice`, `bob`, …) — passwords are not checked. Anonymous requests get 401, but anyone reaching the port can authenticate.
89
+ >
90
+ > Production needs the `[production]` profile (`NODE_ENV=production`), which switches to `auth: xsuaa`. Don't expose a dev-mode instance. See the [Security Guide](docs/guides/SECURITY_GUIDE.md#authentication-xsuaa).
91
+ >
92
+ > The Docker image runs `NODE_ENV=production` with HTTP basic auth via `@odatano/cap-auth` (`ODATANO_HTTP_PASSWORD` required, user `ODATANO_HTTP_USER` default `odatano`, roles `ODATANO_HTTP_ROLES` default `Admin`; 20 failed attempts per 15 min per client address and user, then 429). `ODATANO_AUTH=dummy` disables authentication for local testing only. `getLiveness()` and `VerifyDataSignature` stay anonymous.
93
+
94
+ ## Services
95
+
96
+ | Service | Path | Purpose |
97
+ |---|---|---|
98
+ | CardanoODataService | `/odata/v4/cardano-odata/` | Read blockchain data (20 entities, 19 actions) |
99
+ | CardanoTransactionService | `/odata/v4/cardano-transaction/` | Build & submit transactions (13 actions) |
100
+ | CardanoSignService | `/odata/v4/cardano-sign/` | External signing + HSM (9 actions) |
101
+ | CardanoIndexerService | `/odata/v4/cardano-indexer/` | Chain crawler / pre-sync control (v2.0, off by default) |
102
+ | CardanoWorkerService | `/odata/v4/cardano-worker/` | Asynchronous wallet jobs (v2.0, off by default) |
103
+ | CardanoAgentService | `/odata/v4/cardano-agent/` | Agent grants: scoped bearer tokens for agents (v2.0, off by default) |
104
+
105
+ Both v2.0 services also publish **CAP events**, so a consumer can subscribe instead of polling —
106
+ in-process, no broker required:
107
+
108
+ ```js
109
+ (await cds.connect.to('CardanoWorkerService')).on('jobConfirmed', ({ data }) => …)
110
+ (await cds.connect.to('CardanoIndexerService')).on('blockIndexed', ({ data }) => …)
111
+ ```
112
+
113
+ ## Agent grants (v2.0, off by default)
114
+
115
+ Hand an agent a **scoped, budgeted token** instead of a user.
116
+
117
+ ```bash
118
+ AGENT_GRANTS_ENABLED=true # or cds.requires.odatano-core.agentGrants.enabled
119
+ AGENT_GRANTS_DELEGATE=mocked # CAP auth kind that keeps authenticating non-token requests (default: configured kind)
120
+ AGENT_GRANT_ADMIN_RATE_LIMIT=10 # grant administration calls per principal per hour (or agentGrants.adminRateLimit)
121
+ ```
122
+
123
+ 1. An **Admin** issues a grant (`POST /odata/v4/cardano-agent/CreateAgentGrant`): an allow list of
124
+ actions, optionally a worker `walletId` (required for `SubmitWalletJob`/`CancelJob`), allowed job
125
+ kinds, a daily budget and an expiry. The response carries the token `odat_…` **once**; the
126
+ server stores only its SHA-256.
127
+ 2. The agent sends `x-agent-token: odat_…` on any of the six service paths. It runs as the principal
128
+ `agent:<grantId>` with the single role `agent-grant`, never as the operator: every
129
+ `@requires: 'Admin'` surface (pause/resume, HSM signing, grant administration) refuses it by
130
+ construction. Reads and compute-only actions are always allowed; allow-listed actions each cost
131
+ one budget unit per UTC day (a build is the service an agent buys); everything else is 403.
132
+ Wallet jobs are pinned to the grant's wallet and visible only to the grant that queued them.
133
+ 3. `GET /odata/v4/cardano-agent/GetGrantStatus()` tells the agent what it may do and how much budget
134
+ is left; `RevokeAgentGrant` turns the token into an unknown token immediately.
135
+ 4. Lifecycle (Admin, same semantics as NIGHTGATE's agent grants so a gateway drives both with one
136
+ code path): `UpdateAgentGrant` changes label, allow list, job kinds, daily budget or expiry
137
+ (absent = untouched, explicit `null` = cleared; the wallet binding is immutable, 409
138
+ `GRANT_REVOKED` on a revoked grant); `RotateAgentGrantToken` returns a fresh token once, the old
139
+ one is unknown from the next request; `GetGrantUsage(grantId, since, until)` lists admitted calls
140
+ per service and action over up to 366 days (an Admin for any grant, a token for its own). All
141
+ administration calls share the per-principal hourly rate limit above.
142
+
143
+ Grantable: `Build*`, `SetCollateral`, `CreateSigningRequest`, `VerifySignature`, `Submit*`,
144
+ `CheckSubmissionStatus`, `SubmitWalletJob`, `CancelJob`. Never: `SignWithHsm*`, `Pause*`/`Resume*`,
145
+ `pauseCrawler`/`resumeCrawler`, grant administration.
146
+
147
+ Programmatic seams for other packages (`@odatano/x402` sells grants against a 402 payment):
148
+ `issueAgentGrant()`, `updateAgentGrant()`, `rotateAgentGrantToken()`, `revokeAgentGrantById()`,
149
+ `getGrantUsage()`, `registerTransportLane()` from `@odatano/core`.
150
+
151
+ ## Liveness probe
152
+
153
+ `GET /odata/v4/cardano-indexer/getLiveness()` answers `200 { status: "alive", timestamp, uptime,
154
+ version, network }` **without credentials** (`@requires: 'any'`) as long as the process runs — no
155
+ backend or DB probe, no secrets. The Docker `HEALTHCHECK`, compose and upstream probes use it
156
+ instead of the service document, so a wrong operator password no longer reads as "ODATANO down".
157
+ Readiness (crawler, worker, backends) stays authenticated: `getStatus()`, `GetWorkerStatus()`,
158
+ `GetNetworkInformation`.
159
+
160
+ ## Requirements
161
+
162
+ - **Node.js >= 22.5** and **@sap/cds >= 10** (peer dependency). CAP 9 hosts cannot load `@odatano/core@2`.
163
+ - Upgrading a consumer from 1.x: run **`cds deploy`**. 2.0 adds six tables (`CardanoSyncState`,
164
+ `CardanoReorgLog`, `CardanoWorkerWallets`, `CardanoWalletJobs`, `CardanoAgentGrants`,
165
+ `CardanoAgentGrantUsage`) plus a `dedupKey` column; without the redeploy the new services answer
166
+ `no such table` while the old ones keep working.
167
+
168
+ ## Documentation
169
+
170
+ | Guide | Description |
171
+ |-------|-------------|
172
+ | [Quick Start](docs/QUICK_START.md) | Get running in 5 minutes |
173
+ | [User Guide](docs/guides/USER_GUIDE.md) | API usage, entities, and examples |
174
+ | [Developer Guide](docs/guides/DEVELOPER_GUIDE.md) | Architecture and development |
175
+ | [Transaction Workflow](docs/guides/TRANSACTION_WORKFLOW.md) | Build → Sign → Submit flow |
176
+ | [Security Guide](docs/guides/SECURITY_GUIDE.md) | Authentication, signing security, HSM |
177
+ | [Docker Deployment](docs/guides/DOCKER_DEPLOYMENT.md) | Container deployment |
178
+
179
+ ## License
180
+
181
+ Apache License 2.0 - see [LICENSE](LICENSE)
182
+
183
+ ## Support
184
+
185
+ - **Issues**: [GitHub Issues](https://github.com/ODATANO/ODATANO/issues)
186
+ - **Project Lead**: Max Weber
187
+ - **Contact**: info@odatano.dev
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odatano/core",
3
- "version": "2.0.0-rc.6",
3
+ "version": "2.0.0-rc.8",
4
4
  "description": "SAP CAP plugin for Cardano blockchain OData V4 integration",
5
5
  "imports": {
6
6
  "#cds-models/*": "./@cds-models/*/index.js"
@@ -33,6 +33,7 @@
33
33
  "@harmoniclabs/cbor": "^2.0.1",
34
34
  "@harmoniclabs/crypto": "^0.3.0",
35
35
  "@harmoniclabs/uint8array-utils": "^1.0.4",
36
+ "@odatano/cap-auth": "^0.1.0",
36
37
  "@sap/xssec": "^4",
37
38
  "axios": "^1.18.0",
38
39
  "bech32": "^2.0.0",
@@ -95,6 +96,9 @@
95
96
  "kind": "sqlite",
96
97
  "credentials": {
97
98
  "url": "db.sqlite"
99
+ },
100
+ "client": {
101
+ "timeout": 5000
98
102
  }
99
103
  },
100
104
  "[production]": {
package/src/index.d.ts CHANGED
@@ -6,8 +6,8 @@ export { getAppContext, getCardanoIndexer, getCardanoClient, getCardanoTxBuilder
6
6
  export { getHsmSigner } from '../srv/blockchain/signing/hsm-signer';
7
7
  export { issueAgentGrant, updateAgentGrant, rotateAgentGrantToken, revokeAgentGrantById, getGrantUsage, resolveUsageWindow, hashAgentToken, AGENT_TOKEN_HEADER, AGENT_TOKEN_PREFIX, AGENT_ROLE, AGENT_ALLOWLISTABLE_ACTIONS, AGENT_ALWAYS_ALLOWED_EVENTS, } from '../srv/utils/agent-grants';
8
8
  export type { IssueAgentGrantInput, IssuedAgentGrant, AgentGrantStatus, UpdateAgentGrantInput, UpdateAgentGrantResult, RotatedAgentGrant, AgentGrantUsage, GrantUsageCall, UsageWindow, } from '../srv/utils/agent-grants';
9
- export { registerTransportLane } from '../srv/utils/agent-token-auth';
10
- export type { TransportLane, LaneOutcome } from '../srv/utils/agent-token-auth';
9
+ export { registerTransportLane } from '@odatano/cap-auth';
10
+ export type { TransportLane, LaneOutcome } from '@odatano/cap-auth';
11
11
  export { loadAgentGrantsConfig } from '../srv/utils/agent-grants-config';
12
12
  export type { AgentGrantsConfig } from '../srv/utils/agent-grants-config';
13
13
  export type { HsmConfig, HsmSignResult } from '../srv/utils/types';
package/src/index.js CHANGED
@@ -81,8 +81,8 @@ Object.defineProperty(exports, "AGENT_TOKEN_PREFIX", { enumerable: true, get: fu
81
81
  Object.defineProperty(exports, "AGENT_ROLE", { enumerable: true, get: function () { return agent_grants_1.AGENT_ROLE; } });
82
82
  Object.defineProperty(exports, "AGENT_ALLOWLISTABLE_ACTIONS", { enumerable: true, get: function () { return agent_grants_1.AGENT_ALLOWLISTABLE_ACTIONS; } });
83
83
  Object.defineProperty(exports, "AGENT_ALWAYS_ALLOWED_EVENTS", { enumerable: true, get: function () { return agent_grants_1.AGENT_ALWAYS_ALLOWED_EVENTS; } });
84
- var agent_token_auth_1 = require("../srv/utils/agent-token-auth");
85
- Object.defineProperty(exports, "registerTransportLane", { enumerable: true, get: function () { return agent_token_auth_1.registerTransportLane; } });
84
+ var cap_auth_1 = require("@odatano/cap-auth");
85
+ Object.defineProperty(exports, "registerTransportLane", { enumerable: true, get: function () { return cap_auth_1.registerTransportLane; } });
86
86
  var agent_grants_config_1 = require("../srv/utils/agent-grants-config");
87
87
  Object.defineProperty(exports, "loadAgentGrantsConfig", { enumerable: true, get: function () { return agent_grants_config_1.loadAgentGrantsConfig; } });
88
88
  // Re-export pure CBOR utilities (no CAP round-trip needed)