Quick Start

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

Add to your project’s package.json:

{
  "cds": {
    "requires": {
      "[development]": {
        "auth": { "kind": "dummy" }
      },
      "db": {
        "kind": "sqlite",
        "credentials": { "url": "db.sqlite" }
      },
      "odatano-core": {
        "network": "preview",
        "backends": ["blockfrost", "koios"],
        "blockfrostApiKey": "preview_your_api_key",
        "txBuilders": ["buildooor"]
      }
    }
  }
}

All three services are gated by @requires: 'authenticated-user' - the [development] auth dummy block lets local cds watch accept requests without a JWT. Persistent SQLite (db.sqlite) keeps the index cache across restarts.

Get a free Blockfrost key at blockfrost.io. Then:

cds watch

3 services auto-register:

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

Verify:

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

Full key reference: Configuration.

Option B: Standalone

git clone https://github.com/ODATANO/ODATANO
cd ODATANO
npm ci
# set BLOCKFROST_API_KEY, NETWORK, BACKENDS, TX_BUILDERS
cp .env.example .env       
cds deploy --to sqlite
cds watch

Server runs at http://localhost:4004.

First Requests

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