@odatano/core 2.0.0-rc.25 → 2.0.0-rc.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,195 +1,195 @@
1
- <p align="center">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/npm/@odatano/brand@1/logos/odatano-core-logo-on-dark.svg">
4
- <img src="https://cdn.jsdelivr.net/npm/@odatano/brand@1/logos/odatano-core-logo.svg" alt="ODATANO CORE" height="84">
5
- </picture>
6
- </p>
7
-
8
- # Enterprise OData Services for the Cardano Blockchain
9
-
10
- 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).
11
-
12
- **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.
13
-
14
- [![Tests](https://github.com/ODATANO/ODATANO/actions/workflows/test.yaml/badge.svg)](https://github.com/ODATANO/ODATANO/actions/workflows/test.yaml)
15
- [![Coverage](https://codecov.io/gh/ODATANO/ODATANO/branch/main/graph/badge.svg)](https://codecov.io/gh/ODATANO/ODATANO)
16
- [![npm version](https://img.shields.io/npm/v/@odatano/core?logo=npm)](https://www.npmjs.com/package/@odatano/core)
17
- [![npm downloads](https://img.shields.io/npm/dt/@odatano/core?logo=npm&label=downloads&color=blue)](https://www.npmjs.com/package/@odatano/core)
18
- [![License](https://img.shields.io/badge/license-Apache%202.0-yellow)](LICENSE)
19
-
20
-
21
- ## Quick Start
22
-
23
- ### As CAP Plugin (recommended)
24
-
25
- Add ODATANO to any existing SAP CAP project:
26
-
27
- ```bash
28
- npm install @odatano/core @cap-js/sqlite
29
- ```
30
-
31
- ```json
32
- {
33
- "cds": {
34
- "requires": {
35
- "db": { "kind": "sqlite" },
36
- "odatano-core": {
37
- "network": "preview",
38
- "backends": ["blockfrost"]
39
- }
40
- }
41
- }
42
- }
43
- ```
44
-
45
- 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`:
46
-
47
- ```bash
48
- # .env
49
- BLOCKFROST_API_KEY=preview_your_api_key_here
50
- ```
51
-
52
- ```bash
53
- cds deploy --to sqlite
54
- cds serve
55
- ```
56
-
57
- > Config in `cds.requires.odatano-core` takes precedence over environment
58
- > variables; a `blockfrostApiKey` set there would override the `.env` value.
59
-
60
- > **Self-hosted Blockfrost-compatible node?** (Dolos MiniBF, Demeter Self-Hosted)
61
- > Set `blockfrostCustomBackend` to the node's base URL (e.g. `http://localhost:3010/api/v0`).
62
- > When set, `blockfrostApiKey` becomes optional. See the [Backend Configuration Guide](docs/guides/BACKEND_CONFIGURATION.md#self-hosted-blockfrost-compatible-backends).
63
-
64
- ### Standalone
65
-
66
- Run ODATANO as a self-contained service (no host CAP project needed):
67
-
68
- ```bash
69
- git clone https://github.com/ODATANO/ODATANO && cd ODATANO
70
- npm ci
71
- cp .env.example .env # set BLOCKFROST_API_KEY, NETWORK, BACKENDS
72
- cds deploy --to sqlite
73
- cds serve
74
- ```
75
-
76
- Or with Docker — this brings up a local **cardano-node + Ogmios + ODATANO** stack
77
- (Preview), with the service pre-wired to the local Ogmios backend:
78
-
79
- ```bash
80
- docker compose up -d # full stack
81
- docker compose up -d cardano-node ogmios # just the chain backend (pre-sync)
82
- docker compose logs -f ogmios # watch sync (/health: 202 syncing, 200 near tip)
83
- ```
84
-
85
- > First sync from genesis takes hours; the node DB persists in a Docker volume so
86
- > restarts resume. Until Ogmios catches up, historical queries fall back to
87
- > Blockfrost (set `BLOCKFROST_API_KEY`).
88
-
89
- 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.
90
-
91
- ## Dev Mode: Mocked Authentication
92
-
93
- > **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.
94
- >
95
- > 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).
96
- >
97
- > 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.
98
- >
99
- > Database of the image: `ODATANO_DB_URL=postgres://user:pw@host:5432/db` selects PostgreSQL (schema deployed on every boot); otherwise SQLite at `ODATANO_DB_PATH` (default `/data/db.sqlite`). `docker compose run --rm --no-deps odatano migrate --from /data/db.sqlite` copies an existing SQLite file into a freshly deployed PostgreSQL.
100
-
101
- ## Services
102
-
103
- | Service | Path | Purpose |
104
- |---|---|---|
105
- | CardanoODataService | `/odata/v4/cardano-odata/` | Read blockchain data (29 entities, 19 actions) |
106
- | CardanoTransactionService | `/odata/v4/cardano-transaction/` | Build & submit transactions (13 actions) |
107
- | CardanoSignService | `/odata/v4/cardano-sign/` | External signing + HSM (9 actions) |
108
- | CardanoIndexerService | `/odata/v4/cardano-indexer/` | Chain crawler / pre-sync control (v2.0, off by default) |
109
- | CardanoWorkerService | `/odata/v4/cardano-worker/` | Asynchronous wallet jobs (v2.0, off by default) |
110
- | CardanoAgentService | `/odata/v4/cardano-agent/` | Agent grants: scoped bearer tokens for agents (v2.0, off by default) |
111
-
112
- Both v2.0 services also publish **CAP events**, so a consumer can subscribe instead of polling —
113
- in-process, no broker required:
114
-
115
- ```js
116
- (await cds.connect.to('CardanoWorkerService')).on('jobConfirmed', ({ data }) => …)
117
- (await cds.connect.to('CardanoIndexerService')).on('blockIndexed', ({ data }) => …)
118
- ```
119
-
120
- ## Agent grants (v2.0, off by default)
121
-
122
- Hand an agent a **scoped, budgeted token** instead of a user.
123
-
124
- ```bash
125
- AGENT_GRANTS_ENABLED=true # or cds.requires.odatano-core.agentGrants.enabled
126
- AGENT_GRANTS_DELEGATE=mocked # CAP auth kind that keeps authenticating non-token requests (default: configured kind)
127
- AGENT_GRANT_ADMIN_RATE_LIMIT=10 # grant administration calls per principal per hour (or agentGrants.adminRateLimit)
128
- AGENT_TOKEN_CACHE_MS=10000 # a resolved token is reused this long before the row is read again; 0 = off (or agentGrants.tokenCacheMs)
129
- ```
130
-
131
- 1. An **Admin** issues a grant (`POST /odata/v4/cardano-agent/CreateAgentGrant`): an allow list of
132
- actions, optionally a worker `walletId` (required for `SubmitWalletJob`/`CancelJob`), allowed job
133
- kinds, a daily budget and an expiry. The response carries the token `odat_…` **once**; the
134
- server stores only its SHA-256.
135
- 2. The agent sends `x-agent-token: odat_…` on any of the six service paths. It runs as the principal
136
- `agent:<grantId>` with the single role `agent-grant`, never as the operator: every
137
- `@requires: 'Admin'` surface (pause/resume, HSM signing, grant administration) refuses it by
138
- construction. Reads and compute-only actions are always allowed; allow-listed actions each cost
139
- one budget unit per UTC day (a build is the service an agent buys); everything else is 403.
140
- Wallet jobs are pinned to the grant's wallet and visible only to the grant that queued them.
141
- 3. `GET /odata/v4/cardano-agent/GetGrantStatus()` tells the agent what it may do and how much budget
142
- is left; `RevokeAgentGrant` turns the token into an unknown token immediately.
143
- 4. Lifecycle (Admin; the same semantics as the gateway's peer services, so one client drives
144
- them all): `UpdateAgentGrant` changes label, allow list, job kinds, daily budget or expiry
145
- (absent = untouched, explicit `null` = cleared; the wallet binding is immutable, 409
146
- `GRANT_REVOKED` on a revoked grant); `RotateAgentGrantToken` returns a fresh token once, the old
147
- one is unknown from the next request; `GetGrantUsage(grantId, since, until)` lists admitted calls
148
- per service and action over up to 366 days (an Admin for any grant, a token for its own). All
149
- administration calls share the per-principal hourly rate limit above.
150
-
151
- Grantable: `Build*`, `SetCollateral`, `CreateSigningRequest`, `VerifySignature`, `Submit*`,
152
- `CheckSubmissionStatus`, `SubmitWalletJob`, `CancelJob`. Never: `SignWithHsm*`, `Pause*`/`Resume*`,
153
- `pauseCrawler`/`resumeCrawler`, grant administration.
154
-
155
- Programmatic seams for other packages (`@odatano/x402` sells grants against a 402 payment):
156
- `issueAgentGrant()`, `updateAgentGrant()`, `rotateAgentGrantToken()`, `revokeAgentGrantById()`,
157
- `getGrantUsage()`, `registerTransportLane()` from `@odatano/core`.
158
-
159
- ## Liveness probe
160
-
161
- `GET /odata/v4/cardano-indexer/getLiveness()` answers `200 { status: "alive", timestamp, uptime,
162
- version, network }` **without credentials** (`@requires: 'any'`) as long as the process runs — no
163
- backend or DB probe, no secrets. The Docker `HEALTHCHECK`, compose and upstream probes use it
164
- instead of the service document, so a wrong operator password no longer reads as "ODATANO down".
165
- Readiness (crawler, worker, backends) stays authenticated: `getStatus()`, `GetWorkerStatus()`,
166
- `GetNetworkInformation`.
167
-
168
- ## Requirements
169
-
170
- - **Node.js >= 22.5** and **@sap/cds >= 10** (peer dependency). CAP 9 hosts cannot load `@odatano/core@2`.
171
- - Upgrading a consumer from 1.x: run **`cds deploy`**. 2.0 adds six tables (`CardanoSyncState`,
172
- `CardanoReorgLog`, `CardanoWorkerWallets`, `CardanoWalletJobs`, `CardanoAgentGrants`,
173
- `CardanoAgentGrantUsage`) plus a `dedupKey` column; without the redeploy the new services answer
174
- `no such table` while the old ones keep working.
175
-
176
- ## Documentation
177
-
178
- | Guide | Description |
179
- |-------|-------------|
180
- | [Quick Start](docs/QUICK_START.md) | Get running in 5 minutes |
181
- | [User Guide](docs/guides/USER_GUIDE.md) | API usage, entities, and examples |
182
- | [Developer Guide](docs/guides/DEVELOPER_GUIDE.md) | Architecture and development |
183
- | [Transaction Workflow](docs/guides/TRANSACTION_WORKFLOW.md) | Build → Sign → Submit flow |
184
- | [Security Guide](docs/guides/SECURITY_GUIDE.md) | Authentication, signing security, HSM |
185
- | [Docker Deployment](docs/guides/DOCKER_DEPLOYMENT.md) | Container deployment |
186
-
187
- ## License
188
-
189
- Apache License 2.0 - see [LICENSE](LICENSE)
190
-
191
- ## Support
192
-
193
- - **Issues**: [GitHub Issues](https://github.com/ODATANO/ODATANO/issues)
194
- - **Project Lead**: Max Weber
195
- - **Contact**: info@odatano.dev
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/npm/@odatano/brand@1/logos/odatano-core-logo-on-dark.svg">
4
+ <img src="https://cdn.jsdelivr.net/npm/@odatano/brand@1/logos/odatano-core-logo.svg" alt="ODATANO CORE" height="84">
5
+ </picture>
6
+ </p>
7
+
8
+ # Enterprise OData Services for the Cardano Blockchain
9
+
10
+ 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).
11
+
12
+ **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.
13
+
14
+ [![Tests](https://github.com/ODATANO/ODATANO/actions/workflows/test.yaml/badge.svg)](https://github.com/ODATANO/ODATANO/actions/workflows/test.yaml)
15
+ [![Coverage](https://codecov.io/gh/ODATANO/ODATANO/branch/main/graph/badge.svg)](https://codecov.io/gh/ODATANO/ODATANO)
16
+ [![npm version](https://img.shields.io/npm/v/@odatano/core?logo=npm)](https://www.npmjs.com/package/@odatano/core)
17
+ [![npm downloads](https://img.shields.io/npm/dt/@odatano/core?logo=npm&label=downloads&color=blue)](https://www.npmjs.com/package/@odatano/core)
18
+ [![License](https://img.shields.io/badge/license-Apache%202.0-yellow)](LICENSE)
19
+
20
+
21
+ ## Quick Start
22
+
23
+ ### As CAP Plugin (recommended)
24
+
25
+ Add ODATANO to any existing SAP CAP project:
26
+
27
+ ```bash
28
+ npm install @odatano/core @cap-js/sqlite
29
+ ```
30
+
31
+ ```json
32
+ {
33
+ "cds": {
34
+ "requires": {
35
+ "db": { "kind": "sqlite" },
36
+ "odatano-core": {
37
+ "network": "preview",
38
+ "backends": ["blockfrost"]
39
+ }
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ 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`:
46
+
47
+ ```bash
48
+ # .env
49
+ BLOCKFROST_API_KEY=preview_your_api_key_here
50
+ ```
51
+
52
+ ```bash
53
+ cds deploy --to sqlite
54
+ cds serve
55
+ ```
56
+
57
+ > Config in `cds.requires.odatano-core` takes precedence over environment
58
+ > variables; a `blockfrostApiKey` set there would override the `.env` value.
59
+
60
+ > **Self-hosted Blockfrost-compatible node?** (Dolos MiniBF, Demeter Self-Hosted)
61
+ > Set `blockfrostCustomBackend` to the node's base URL (e.g. `http://localhost:3010/api/v0`).
62
+ > When set, `blockfrostApiKey` becomes optional. See the [Backend Configuration Guide](docs/guides/BACKEND_CONFIGURATION.md#self-hosted-blockfrost-compatible-backends).
63
+
64
+ ### Standalone
65
+
66
+ Run ODATANO as a self-contained service (no host CAP project needed):
67
+
68
+ ```bash
69
+ git clone https://github.com/ODATANO/ODATANO && cd ODATANO
70
+ npm ci
71
+ cp .env.example .env # set BLOCKFROST_API_KEY, NETWORK, BACKENDS
72
+ cds deploy --to sqlite
73
+ cds serve
74
+ ```
75
+
76
+ Or with Docker — this brings up a local **cardano-node + Ogmios + ODATANO** stack
77
+ (Preview), with the service pre-wired to the local Ogmios backend:
78
+
79
+ ```bash
80
+ docker compose up -d # full stack
81
+ docker compose up -d cardano-node ogmios # just the chain backend (pre-sync)
82
+ docker compose logs -f ogmios # watch sync (/health: 202 syncing, 200 near tip)
83
+ ```
84
+
85
+ > First sync from genesis takes hours; the node DB persists in a Docker volume so
86
+ > restarts resume. Until Ogmios catches up, historical queries fall back to
87
+ > Blockfrost (set `BLOCKFROST_API_KEY`).
88
+
89
+ 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.
90
+
91
+ ## Dev Mode: Mocked Authentication
92
+
93
+ > **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.
94
+ >
95
+ > 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).
96
+ >
97
+ > 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.
98
+ >
99
+ > Database of the image: `ODATANO_DB_URL=postgres://user:pw@host:5432/db` selects PostgreSQL (schema deployed on every boot); otherwise SQLite at `ODATANO_DB_PATH` (default `/data/db.sqlite`). `docker compose run --rm --no-deps odatano migrate --from /data/db.sqlite` copies an existing SQLite file into a freshly deployed PostgreSQL.
100
+
101
+ ## Services
102
+
103
+ | Service | Path | Purpose |
104
+ |---|---|---|
105
+ | CardanoODataService | `/odata/v4/cardano-odata/` | Read blockchain data (29 entities, 19 actions) |
106
+ | CardanoTransactionService | `/odata/v4/cardano-transaction/` | Build & submit transactions (13 actions) |
107
+ | CardanoSignService | `/odata/v4/cardano-sign/` | External signing + HSM (9 actions) |
108
+ | CardanoIndexerService | `/odata/v4/cardano-indexer/` | Chain crawler / pre-sync control (v2.0, off by default) |
109
+ | CardanoWorkerService | `/odata/v4/cardano-worker/` | Asynchronous wallet jobs (v2.0, off by default) |
110
+ | CardanoAgentService | `/odata/v4/cardano-agent/` | Agent grants: scoped bearer tokens for agents (v2.0, off by default) |
111
+
112
+ Both v2.0 services also publish **CAP events**, so a consumer can subscribe instead of polling —
113
+ in-process, no broker required:
114
+
115
+ ```js
116
+ (await cds.connect.to('CardanoWorkerService')).on('jobConfirmed', ({ data }) => …)
117
+ (await cds.connect.to('CardanoIndexerService')).on('blockIndexed', ({ data }) => …)
118
+ ```
119
+
120
+ ## Agent grants (v2.0, off by default)
121
+
122
+ Hand an agent a **scoped, budgeted token** instead of a user.
123
+
124
+ ```bash
125
+ AGENT_GRANTS_ENABLED=true # or cds.requires.odatano-core.agentGrants.enabled
126
+ AGENT_GRANTS_DELEGATE=mocked # CAP auth kind that keeps authenticating non-token requests (default: configured kind)
127
+ AGENT_GRANT_ADMIN_RATE_LIMIT=10 # grant administration calls per principal per hour (or agentGrants.adminRateLimit)
128
+ AGENT_TOKEN_CACHE_MS=10000 # a resolved token is reused this long before the row is read again; 0 = off (or agentGrants.tokenCacheMs)
129
+ ```
130
+
131
+ 1. An **Admin** issues a grant (`POST /odata/v4/cardano-agent/CreateAgentGrant`): an allow list of
132
+ actions, optionally a worker `walletId` (required for `SubmitWalletJob`/`CancelJob`), allowed job
133
+ kinds, a daily budget and an expiry. The response carries the token `odat_…` **once**; the
134
+ server stores only its SHA-256.
135
+ 2. The agent sends `x-agent-token: odat_…` on any of the six service paths. It runs as the principal
136
+ `agent:<grantId>` with the single role `agent-grant`, never as the operator: every
137
+ `@requires: 'Admin'` surface (pause/resume, HSM signing, grant administration) refuses it by
138
+ construction. Reads and compute-only actions are always allowed; allow-listed actions each cost
139
+ one budget unit per UTC day (a build is the service an agent buys); everything else is 403.
140
+ Wallet jobs are pinned to the grant's wallet and visible only to the grant that queued them.
141
+ 3. `GET /odata/v4/cardano-agent/GetGrantStatus()` tells the agent what it may do and how much budget
142
+ is left; `RevokeAgentGrant` turns the token into an unknown token immediately.
143
+ 4. Lifecycle (Admin; the same semantics as the gateway's peer services, so one client drives
144
+ them all): `UpdateAgentGrant` changes label, allow list, job kinds, daily budget or expiry
145
+ (absent = untouched, explicit `null` = cleared; the wallet binding is immutable, 409
146
+ `GRANT_REVOKED` on a revoked grant); `RotateAgentGrantToken` returns a fresh token once, the old
147
+ one is unknown from the next request; `GetGrantUsage(grantId, since, until)` lists admitted calls
148
+ per service and action over up to 366 days (an Admin for any grant, a token for its own). All
149
+ administration calls share the per-principal hourly rate limit above.
150
+
151
+ Grantable: `Build*`, `SetCollateral`, `CreateSigningRequest`, `VerifySignature`, `Submit*`,
152
+ `CheckSubmissionStatus`, `SubmitWalletJob`, `CancelJob`. Never: `SignWithHsm*`, `Pause*`/`Resume*`,
153
+ `pauseCrawler`/`resumeCrawler`, grant administration.
154
+
155
+ Programmatic seams for other packages (`@odatano/x402` sells grants against a 402 payment):
156
+ `issueAgentGrant()`, `updateAgentGrant()`, `rotateAgentGrantToken()`, `revokeAgentGrantById()`,
157
+ `getGrantUsage()`, `registerTransportLane()` from `@odatano/core`.
158
+
159
+ ## Liveness probe
160
+
161
+ `GET /odata/v4/cardano-indexer/getLiveness()` answers `200 { status: "alive", timestamp, uptime,
162
+ version, network }` **without credentials** (`@requires: 'any'`) as long as the process runs — no
163
+ backend or DB probe, no secrets. The Docker `HEALTHCHECK`, compose and upstream probes use it
164
+ instead of the service document, so a wrong operator password no longer reads as "ODATANO down".
165
+ Readiness (crawler, worker, backends) stays authenticated: `getStatus()`, `GetWorkerStatus()`,
166
+ `GetNetworkInformation`.
167
+
168
+ ## Requirements
169
+
170
+ - **Node.js >= 22.5** and **@sap/cds >= 10** (peer dependency). CAP 9 hosts cannot load `@odatano/core@2`.
171
+ - Upgrading a consumer from 1.x: run **`cds deploy`**. 2.0 adds six tables (`CardanoSyncState`,
172
+ `CardanoReorgLog`, `CardanoWorkerWallets`, `CardanoWalletJobs`, `CardanoAgentGrants`,
173
+ `CardanoAgentGrantUsage`) plus a `dedupKey` column; without the redeploy the new services answer
174
+ `no such table` while the old ones keep working.
175
+
176
+ ## Documentation
177
+
178
+ | Guide | Description |
179
+ |-------|-------------|
180
+ | [Quick Start](docs/QUICK_START.md) | Get running in 5 minutes |
181
+ | [User Guide](docs/guides/USER_GUIDE.md) | API usage, entities, and examples |
182
+ | [Developer Guide](docs/guides/DEVELOPER_GUIDE.md) | Architecture and development |
183
+ | [Transaction Workflow](docs/guides/TRANSACTION_WORKFLOW.md) | Build → Sign → Submit flow |
184
+ | [Security Guide](docs/guides/SECURITY_GUIDE.md) | Authentication, signing security, HSM |
185
+ | [Docker Deployment](docs/guides/DOCKER_DEPLOYMENT.md) | Container deployment |
186
+
187
+ ## License
188
+
189
+ Apache License 2.0 - see [LICENSE](LICENSE)
190
+
191
+ ## Support
192
+
193
+ - **Issues**: [GitHub Issues](https://github.com/ODATANO/ODATANO/issues)
194
+ - **Project Lead**: Max Weber
195
+ - **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.25",
3
+ "version": "2.0.0-rc.26",
4
4
  "description": "SAP CAP plugin for Cardano blockchain OData V4 integration",
5
5
  "imports": {
6
6
  "#cds-models/*": "./@cds-models/*/index.js"
@@ -16,7 +16,7 @@ const TEMPORAL_WINDOW_SLACK_MS = 60 * 60 * 1000;
16
16
  /**
17
17
  * Let this request see the temporal slices it writes during index-on-miss: CAP's temporal
18
18
  * filter (`validFrom < $valid.to`) defaults to a `now`..`now+1ms` window fixed at transaction
19
- * start, so a slice stamped after the backend fetch would be invisible to the `req.query`
19
+ * start, so a slice stamped after the backend fetch would be invisible to the handler's
20
20
  * re-read. Only the upper bound moves; explicit `sap-valid-*` options are left alone.
21
21
  * Must run before the handler's first DB statement.
22
22
  */
@@ -189,6 +189,7 @@ module.exports = (srv) => {
189
189
  if (!(0, validators_1.isValidBech32Address)(address))
190
190
  (0, errors_1.rejectInvalid)(req, 'GetAssetsByAddress', 'Invalid bech32 address format', 'address');
191
191
  return (0, backend_request_handler_1.handleRequest)(req, async (db) => {
192
+ widenTemporalWindow(req); // before the first DB statement
192
193
  const existing = await db.run(SELECT.one.from(Addresses).where({ address }));
193
194
  if (!existing)
194
195
  await indexer().indexAddress(db, address);
@@ -211,6 +212,7 @@ module.exports = (srv) => {
211
212
  if (!(0, validators_1.isValidBech32Address)(address))
212
213
  (0, errors_1.rejectInvalid)(req, 'GetUTxOsByAddress', 'Invalid bech32 address format', 'address');
213
214
  return (0, backend_request_handler_1.handleRequest)(req, async (db) => {
215
+ widenTemporalWindow(req); // before the first DB statement
214
216
  const existing = await db.run(SELECT.from(AddressUTxOs).where({ address_address: address }));
215
217
  if (!existing || existing.length === 0) {
216
218
  // Prefer the full address index; when no configured backend supports getAddress