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

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.
@@ -413,11 +413,11 @@ export class UTxOAssets extends Array<UTxOAsset> {
413
413
 
414
414
  export declare const BuildSimpleAdaTransaction: {
415
415
  // positional
416
- (senderAddress: _.Bech32 | null, recipientAddress: _.Bech32 | null, lovelaceAmount: _.Lovelace | null, changeAddress: _.Bech32 | null, outputDatumJson: string | null, assetsJson: string | null, forceInputsJson: string | null, validatorScript: string | null, scriptParamsJson: string | null, lockOnScript: boolean | null, referenceScriptHex: string | null, validityStartMs: string | null, validityEndMs: string | null): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
416
+ (senderAddress: _.Bech32 | null, recipientAddress: _.Bech32 | null, lovelaceAmount: _.Lovelace | null, changeAddress: _.Bech32 | null, outputDatumJson: string | null, assetsJson: string | null, forceInputsJson: string | null, protectInputsJson: string | null, validatorScript: string | null, scriptParamsJson: string | null, lockOnScript: boolean | null, referenceScriptHex: string | null, validityStartMs: string | null, validityEndMs: string | null): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
417
417
  // named
418
- ({senderAddress, recipientAddress, lovelaceAmount, changeAddress, outputDatumJson, assetsJson, forceInputsJson, validatorScript, scriptParamsJson, lockOnScript, referenceScriptHex, validityStartMs, validityEndMs}: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, changeAddress?: _.Bech32 | null, outputDatumJson?: string | null, assetsJson?: string | null, forceInputsJson?: string | null, validatorScript?: string | null, scriptParamsJson?: string | null, lockOnScript?: boolean | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
418
+ ({senderAddress, recipientAddress, lovelaceAmount, changeAddress, outputDatumJson, assetsJson, forceInputsJson, protectInputsJson, validatorScript, scriptParamsJson, lockOnScript, referenceScriptHex, validityStartMs, validityEndMs}: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, changeAddress?: _.Bech32 | null, outputDatumJson?: string | null, assetsJson?: string | null, forceInputsJson?: string | null, protectInputsJson?: string | null, validatorScript?: string | null, scriptParamsJson?: string | null, lockOnScript?: boolean | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
419
419
  // metadata (do not use)
420
- __parameters: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, changeAddress?: _.Bech32 | null, outputDatumJson?: string | null, assetsJson?: string | null, forceInputsJson?: string | null, validatorScript?: string | null, scriptParamsJson?: string | null, lockOnScript?: boolean | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}, __returns: globalThis.Promise<TransactionBuild | null> | TransactionBuild | null, __self: never
420
+ __parameters: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, changeAddress?: _.Bech32 | null, outputDatumJson?: string | null, assetsJson?: string | null, forceInputsJson?: string | null, protectInputsJson?: string | null, validatorScript?: string | null, scriptParamsJson?: string | null, lockOnScript?: boolean | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}, __returns: globalThis.Promise<TransactionBuild | null> | TransactionBuild | null, __self: never
421
421
  kind: 'action'
422
422
  }
423
423
 
@@ -443,11 +443,11 @@ export declare const BuildMultiAssetTransaction: {
443
443
 
444
444
  export declare const BuildMintTransaction: {
445
445
  // positional
446
- (senderAddress: _.Bech32 | null, recipientAddress: _.Bech32 | null, lovelaceAmount: _.Lovelace | null, mintActionsJson: string | null, mintingPolicyScript: string | null, changeAddress: _.Bech32 | null, requiredSignersJson: string | null, scriptParamsJson: string | null, inlineDatumJson: string | null, mintRedeemerJson: string | null, lockOnScript: boolean | null, forceInputsJson: string | null, referenceInputsJson: string | null, extraOutputsJson: string | null, metadataJson: string | null, referenceScriptHex: string | null, validityStartMs: string | null, validityEndMs: string | null): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
446
+ (senderAddress: _.Bech32 | null, recipientAddress: _.Bech32 | null, lovelaceAmount: _.Lovelace | null, mintActionsJson: string | null, mintingPolicyScript: string | null, changeAddress: _.Bech32 | null, requiredSignersJson: string | null, scriptParamsJson: string | null, inlineDatumJson: string | null, mintRedeemerJson: string | null, lockOnScript: boolean | null, forceInputsJson: string | null, protectInputsJson: string | null, referenceInputsJson: string | null, extraOutputsJson: string | null, metadataJson: string | null, referenceScriptHex: string | null, validityStartMs: string | null, validityEndMs: string | null): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
447
447
  // named
448
- ({senderAddress, recipientAddress, lovelaceAmount, mintActionsJson, mintingPolicyScript, changeAddress, requiredSignersJson, scriptParamsJson, inlineDatumJson, mintRedeemerJson, lockOnScript, forceInputsJson, referenceInputsJson, extraOutputsJson, metadataJson, referenceScriptHex, validityStartMs, validityEndMs}: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, mintActionsJson?: string | null, mintingPolicyScript?: string | null, changeAddress?: _.Bech32 | null, requiredSignersJson?: string | null, scriptParamsJson?: string | null, inlineDatumJson?: string | null, mintRedeemerJson?: string | null, lockOnScript?: boolean | null, forceInputsJson?: string | null, referenceInputsJson?: string | null, extraOutputsJson?: string | null, metadataJson?: string | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
448
+ ({senderAddress, recipientAddress, lovelaceAmount, mintActionsJson, mintingPolicyScript, changeAddress, requiredSignersJson, scriptParamsJson, inlineDatumJson, mintRedeemerJson, lockOnScript, forceInputsJson, protectInputsJson, referenceInputsJson, extraOutputsJson, metadataJson, referenceScriptHex, validityStartMs, validityEndMs}: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, mintActionsJson?: string | null, mintingPolicyScript?: string | null, changeAddress?: _.Bech32 | null, requiredSignersJson?: string | null, scriptParamsJson?: string | null, inlineDatumJson?: string | null, mintRedeemerJson?: string | null, lockOnScript?: boolean | null, forceInputsJson?: string | null, protectInputsJson?: string | null, referenceInputsJson?: string | null, extraOutputsJson?: string | null, metadataJson?: string | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
449
449
  // metadata (do not use)
450
- __parameters: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, mintActionsJson?: string | null, mintingPolicyScript?: string | null, changeAddress?: _.Bech32 | null, requiredSignersJson?: string | null, scriptParamsJson?: string | null, inlineDatumJson?: string | null, mintRedeemerJson?: string | null, lockOnScript?: boolean | null, forceInputsJson?: string | null, referenceInputsJson?: string | null, extraOutputsJson?: string | null, metadataJson?: string | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}, __returns: globalThis.Promise<TransactionBuild | null> | TransactionBuild | null, __self: never
450
+ __parameters: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, mintActionsJson?: string | null, mintingPolicyScript?: string | null, changeAddress?: _.Bech32 | null, requiredSignersJson?: string | null, scriptParamsJson?: string | null, inlineDatumJson?: string | null, mintRedeemerJson?: string | null, lockOnScript?: boolean | null, forceInputsJson?: string | null, protectInputsJson?: string | null, referenceInputsJson?: string | null, extraOutputsJson?: string | null, metadataJson?: string | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}, __returns: globalThis.Promise<TransactionBuild | null> | TransactionBuild | null, __self: never
451
451
  kind: 'action'
452
452
  }
453
453
 
@@ -483,21 +483,21 @@ export declare const SubmitSignedTransaction: {
483
483
 
484
484
  export declare const BuildPlutusSpendTransaction: {
485
485
  // positional
486
- (senderAddress: _.Bech32 | null, recipientAddress: _.Bech32 | null, lovelaceAmount: _.Lovelace | null, validatorScript: string | null, scriptTxHash: string | null, scriptOutputIndex: number | null, redeemerJson: string | null, datumJson: string | null, changeAddress: _.Bech32 | null, requiredSignersJson: string | null, scriptParamsJson: string | null, inlineDatumJson: string | null, lockOnScript: boolean | null, forceInputsJson: string | null, extraOutputsJson: string | null, mintActionsJson: string | null, mintingPolicyScript: string | null, mintRedeemerJson: string | null, referenceInputsJson: string | null, referenceScriptHex: string | null, validityStartMs: string | null, validityEndMs: string | null): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
486
+ (senderAddress: _.Bech32 | null, recipientAddress: _.Bech32 | null, lovelaceAmount: _.Lovelace | null, validatorScript: string | null, scriptTxHash: string | null, scriptOutputIndex: number | null, redeemerJson: string | null, datumJson: string | null, changeAddress: _.Bech32 | null, requiredSignersJson: string | null, scriptParamsJson: string | null, inlineDatumJson: string | null, lockOnScript: boolean | null, forceInputsJson: string | null, protectInputsJson: string | null, extraOutputsJson: string | null, mintActionsJson: string | null, mintingPolicyScript: string | null, mintRedeemerJson: string | null, referenceInputsJson: string | null, referenceScriptHex: string | null, validityStartMs: string | null, validityEndMs: string | null): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
487
487
  // named
488
- ({senderAddress, recipientAddress, lovelaceAmount, validatorScript, scriptTxHash, scriptOutputIndex, redeemerJson, datumJson, changeAddress, requiredSignersJson, scriptParamsJson, inlineDatumJson, lockOnScript, forceInputsJson, extraOutputsJson, mintActionsJson, mintingPolicyScript, mintRedeemerJson, referenceInputsJson, referenceScriptHex, validityStartMs, validityEndMs}: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, validatorScript?: string | null, scriptTxHash?: string | null, scriptOutputIndex?: number | null, redeemerJson?: string | null, datumJson?: string | null, changeAddress?: _.Bech32 | null, requiredSignersJson?: string | null, scriptParamsJson?: string | null, inlineDatumJson?: string | null, lockOnScript?: boolean | null, forceInputsJson?: string | null, extraOutputsJson?: string | null, mintActionsJson?: string | null, mintingPolicyScript?: string | null, mintRedeemerJson?: string | null, referenceInputsJson?: string | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
488
+ ({senderAddress, recipientAddress, lovelaceAmount, validatorScript, scriptTxHash, scriptOutputIndex, redeemerJson, datumJson, changeAddress, requiredSignersJson, scriptParamsJson, inlineDatumJson, lockOnScript, forceInputsJson, protectInputsJson, extraOutputsJson, mintActionsJson, mintingPolicyScript, mintRedeemerJson, referenceInputsJson, referenceScriptHex, validityStartMs, validityEndMs}: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, validatorScript?: string | null, scriptTxHash?: string | null, scriptOutputIndex?: number | null, redeemerJson?: string | null, datumJson?: string | null, changeAddress?: _.Bech32 | null, requiredSignersJson?: string | null, scriptParamsJson?: string | null, inlineDatumJson?: string | null, lockOnScript?: boolean | null, forceInputsJson?: string | null, protectInputsJson?: string | null, extraOutputsJson?: string | null, mintActionsJson?: string | null, mintingPolicyScript?: string | null, mintRedeemerJson?: string | null, referenceInputsJson?: string | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
489
489
  // metadata (do not use)
490
- __parameters: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, validatorScript?: string | null, scriptTxHash?: string | null, scriptOutputIndex?: number | null, redeemerJson?: string | null, datumJson?: string | null, changeAddress?: _.Bech32 | null, requiredSignersJson?: string | null, scriptParamsJson?: string | null, inlineDatumJson?: string | null, lockOnScript?: boolean | null, forceInputsJson?: string | null, extraOutputsJson?: string | null, mintActionsJson?: string | null, mintingPolicyScript?: string | null, mintRedeemerJson?: string | null, referenceInputsJson?: string | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}, __returns: globalThis.Promise<TransactionBuild | null> | TransactionBuild | null, __self: never
490
+ __parameters: {senderAddress?: _.Bech32 | null, recipientAddress?: _.Bech32 | null, lovelaceAmount?: _.Lovelace | null, validatorScript?: string | null, scriptTxHash?: string | null, scriptOutputIndex?: number | null, redeemerJson?: string | null, datumJson?: string | null, changeAddress?: _.Bech32 | null, requiredSignersJson?: string | null, scriptParamsJson?: string | null, inlineDatumJson?: string | null, lockOnScript?: boolean | null, forceInputsJson?: string | null, protectInputsJson?: string | null, extraOutputsJson?: string | null, mintActionsJson?: string | null, mintingPolicyScript?: string | null, mintRedeemerJson?: string | null, referenceInputsJson?: string | null, referenceScriptHex?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}, __returns: globalThis.Promise<TransactionBuild | null> | TransactionBuild | null, __self: never
491
491
  kind: 'action'
492
492
  }
493
493
 
494
494
  export declare const BuildPlutusTransaction: {
495
495
  // positional
496
- (senderAddress: _.Bech32 | null, changeAddress: _.Bech32 | null, scriptInputsJson: string | null, outputsJson: string | null, referenceInputsJson: string | null, forceInputsJson: string | null, requiredSignersJson: string | null, mintActionsJson: string | null, validityStartMs: string | null, validityEndMs: string | null): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
496
+ (senderAddress: _.Bech32 | null, changeAddress: _.Bech32 | null, scriptInputsJson: string | null, outputsJson: string | null, referenceInputsJson: string | null, forceInputsJson: string | null, protectInputsJson: string | null, withdrawalsJson: string | null, certificatesJson: string | null, requiredSignersJson: string | null, mintActionsJson: string | null, validityStartMs: string | null, validityEndMs: string | null): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
497
497
  // named
498
- ({senderAddress, changeAddress, scriptInputsJson, outputsJson, referenceInputsJson, forceInputsJson, requiredSignersJson, mintActionsJson, validityStartMs, validityEndMs}: {senderAddress?: _.Bech32 | null, changeAddress?: _.Bech32 | null, scriptInputsJson?: string | null, outputsJson?: string | null, referenceInputsJson?: string | null, forceInputsJson?: string | null, requiredSignersJson?: string | null, mintActionsJson?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
498
+ ({senderAddress, changeAddress, scriptInputsJson, outputsJson, referenceInputsJson, forceInputsJson, protectInputsJson, withdrawalsJson, certificatesJson, requiredSignersJson, mintActionsJson, validityStartMs, validityEndMs}: {senderAddress?: _.Bech32 | null, changeAddress?: _.Bech32 | null, scriptInputsJson?: string | null, outputsJson?: string | null, referenceInputsJson?: string | null, forceInputsJson?: string | null, protectInputsJson?: string | null, withdrawalsJson?: string | null, certificatesJson?: string | null, requiredSignersJson?: string | null, mintActionsJson?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}): globalThis.Promise<TransactionBuild | null> | TransactionBuild | null
499
499
  // metadata (do not use)
500
- __parameters: {senderAddress?: _.Bech32 | null, changeAddress?: _.Bech32 | null, scriptInputsJson?: string | null, outputsJson?: string | null, referenceInputsJson?: string | null, forceInputsJson?: string | null, requiredSignersJson?: string | null, mintActionsJson?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}, __returns: globalThis.Promise<TransactionBuild | null> | TransactionBuild | null, __self: never
500
+ __parameters: {senderAddress?: _.Bech32 | null, changeAddress?: _.Bech32 | null, scriptInputsJson?: string | null, outputsJson?: string | null, referenceInputsJson?: string | null, forceInputsJson?: string | null, protectInputsJson?: string | null, withdrawalsJson?: string | null, certificatesJson?: string | null, requiredSignersJson?: string | null, mintActionsJson?: string | null, validityStartMs?: string | null, validityEndMs?: string | null}, __returns: globalThis.Promise<TransactionBuild | null> | TransactionBuild | null, __self: never
501
501
  kind: 'action'
502
502
  }
503
503
 
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.27",
4
4
  "description": "SAP CAP plugin for Cardano blockchain OData V4 integration",
5
5
  "imports": {
6
6
  "#cds-models/*": "./@cds-models/*/index.js"
@@ -37,6 +37,11 @@ export declare class CardanoTransactionBuilder {
37
37
  * UTxO (one ledger lookup each), plus the sender's UTxOs, forced and reference inputs.
38
38
  */
39
39
  buildPlutusTransaction(req: TxBuildPlutusRequest, protocolParameters: LedgerProtocolParameter): Promise<TxBuildResult>;
40
+ /**
41
+ * The ledger rejects a withdrawal from an unregistered reward account (also a zero one), so the
42
+ * build fails here with the account named. A provider failure is passed on as it is.
43
+ */
44
+ private _assertRewardAccountsRegistered;
40
45
  /**
41
46
  * Resolve the script UTxO of a Plutus spend from the node's ledger, otherwise from its producing
42
47
  * transaction. Spending an already-consumed script UTxO is the most common replay mistake —
@@ -186,9 +186,16 @@ class CardanoTransactionBuilder {
186
186
  const allUtxos = mergeUtxosUnique(senderUtxos, scriptUtxos);
187
187
  const forcedUtxos = await this._resolveForceInputs(req.forceInputs ?? [], allUtxos);
188
188
  // Reference-script UTxOs always from the ledger: a known sender UTxO may carry only the script hash
189
- const refScriptUtxos = await this._resolveInputRefs(req.scriptInputs.flatMap(s => (s.referenceScript ? [s.referenceScript] : [])), [], 'referenceScript');
189
+ const refScriptUtxos = await this._resolveInputRefs([
190
+ ...req.scriptInputs.flatMap(s => (s.referenceScript ? [s.referenceScript] : [])),
191
+ ...(req.withdrawals ?? []).flatMap(w => (w.referenceScript ? [w.referenceScript] : [])),
192
+ ...(req.certificates ?? []).flatMap(c => (c.referenceScript ? [c.referenceScript] : [])),
193
+ ], [], 'referenceScript');
190
194
  const callerRefUtxos = await this._resolveReferenceInputs(req.referenceInputs ?? [], allUtxos);
191
195
  const referenceInputUtxos = mergeUtxosUnique(callerRefUtxos, refScriptUtxos);
196
+ // A credential this transaction registers is withdrawable in the same transaction
197
+ const registeredHere = new Set((req.certificates ?? []).filter(c => c.type === 'registerStake').map(c => c.stakeAddress.toLowerCase()));
198
+ await this._assertRewardAccountsRegistered(req.withdrawals ?? [], registeredHere);
192
199
  const txContext = {
193
200
  utxos: mergeUtxosUnique(allUtxos, forcedUtxos),
194
201
  protocolParameters,
@@ -200,6 +207,28 @@ class CardanoTransactionBuilder {
200
207
  logger.debug(`Prepared multi-script build context: ${senderUtxos.length} sender + ${scriptUtxos.length} script + ${forcedUtxos.length} forced UTxOs, ${referenceInputUtxos.length} reference inputs`);
201
208
  return builder.buildUnsignedPlutusTransaction(req, txContext);
202
209
  }
210
+ /**
211
+ * The ledger rejects a withdrawal from an unregistered reward account (also a zero one), so the
212
+ * build fails here with the account named. A provider failure is passed on as it is.
213
+ */
214
+ async _assertRewardAccountsRegistered(withdrawals, registeredHere = new Set()) {
215
+ for (const [i, w] of withdrawals.entries()) {
216
+ if (registeredHere.has(w.rewardAddress.toLowerCase()))
217
+ continue;
218
+ let active;
219
+ try {
220
+ active = (await this.client.getAccount(w.rewardAddress)).active;
221
+ }
222
+ catch (err) {
223
+ if (!(err instanceof errors_1.NotFoundError))
224
+ throw err;
225
+ active = false;
226
+ }
227
+ if (!active) {
228
+ throw new errors_1.TransactionValidationError(`withdrawals[${i}] reward account ${w.rewardAddress} is not registered on chain; register the stake credential first`);
229
+ }
230
+ }
231
+ }
203
232
  /**
204
233
  * Resolve the script UTxO of a Plutus spend from the node's ledger, otherwise from its producing
205
234
  * transaction. Spending an already-consumed script UTxO is the most common replay mistake —
@@ -96,6 +96,17 @@ export declare class BuildooorTxBuilder implements CardanoTxBuilder {
96
96
  * refs absent from utxos are ignored (existence is validated upstream).
97
97
  */
98
98
  private _partitionForcedInputs;
99
+ /**
100
+ * Staking script of a withdrawal or certificate: inline (swapped for a reference input that already
101
+ * carries the same hash), by reference, or none (key witness).
102
+ */
103
+ private _resolveStakingScript;
104
+ /**
105
+ * Forced inputs of other key addresses: the owner's payment key hash must be a required signer,
106
+ * and every unit they bring must be spent by the outputs, so none of it lands in the sender's change.
107
+ * Script addresses are refused; those UTxOs are script inputs.
108
+ */
109
+ private _checkForeignForcedInputs;
99
110
  /** Keys (`txhash#index`) of the reference inputs of a build, from the resolved UTxOs and the request refs. */
100
111
  private _referencedKeys;
101
112
  /** Map resolved CIP-31 reference input UTxOs to Buildooor LedgerUTxO; empty when none. */