Quick Start

Get the OData V4 Cardano service running in minutes — either as a plugin in your existing CAP project or as a standalone application.

The fastest way to add Cardano blockchain access to any SAP CAP project.

1. Install

npm install @odatano/core @cap-js/sqlite

2. Configure

Add the odatano-core section to your project’s package.json:

{
  "cds": {
    "requires": {
      "db": { "kind": "sqlite" },
      "odatano-core": {
        "network": "preview",
        "backends": ["blockfrost"],
        "blockfrostApiKey": "preview_YOUR_BLOCKFROST_KEY"
      }
    }
  }
}

Get a free Blockfrost API key at blockfrost.io.

Configuration Reference

KeyDefaultDescription
networkpreviewmainnet, preview, or preprod
backends["koios"]blockfrost, koios, ogmios (array — failover order)
blockfrostApiKeyRequired if using blockfrost backend
koiosApiKeyOptional for Koios authenticated tier
ogmiosUrlRequired if using ogmios (e.g. ws://localhost:1337)
txBuilders["csl"]csl or buildooor
primaryTimeoutMs30000Timeout for primary backend
fallbackTimeoutMs60000Timeout for fallback backends
indexTtlMs3600000Lazy index cache TTL (1 hour)

3. Run

cds watch

Three services auto-register:

ServicePath
CardanoODataService/odata/v4/cardano-odata/
CardanoTransactionService/odata/v4/cardano-transaction/
CardanoSignService/odata/v4/cardano-sign/

4. Verify

curl http://localhost:4004/odata/v4/cardano-odata/NetworkInformation

Option B: Standalone Development

Clone and run ODATANO as a full standalone application.

1. Clone & Install

git clone https://github.com/ODATANO/ODATANO
cd ODATANO
npm ci

2. Configure Environment

cp .env.example .env

Open .env and set your Blockfrost key:

NETWORK=preview
BLOCKFROST_KEY=your_api_key_here
BACKENDS=koios
LOG_LEVEL=info

3. Initialize Database

cds deploy --to sqlite

4. Start Server

npm run cds:watch

Server runs at http://localhost:4004.


First Requests

# Latest block
curl "http://localhost:4004/odata/v4/cardano-odata/Blocks?$orderby=height desc&$top=1"

# Address UTxOs
curl -X POST http://localhost:4004/odata/v4/cardano-odata/GetUTxOsByAddress \
  -H "Content-Type: application/json" \
  -d '{"address":"addr_test1..."}'

# Build a transaction
curl -X POST http://localhost:4004/odata/v4/cardano-transaction/BuildSimpleAdaTransaction \
  -H "Content-Type: application/json" \
  -d '{
    "senderAddress": "addr_test1...",
    "recipientAddress": "addr_test1...",
    "lovelaceAmount": 10000000
  }'

Next Steps

  • TRACE Example App — Full SAP Fiori app with Plutus smart contracts
  • API Reference — All 3 services, entities, and actions
  • GitHub — Source code, issues, and Postman collections