Cardano Oracle API

2025WebCompleted

A Node.js service that wraps Cardano blockchain operations behind a simple REST API, so other apps can write signed data on-chain without dealing with wallets or smart contracts.

Node.jsExpressTypeScriptCardanoLucid EvolutionEffectBlockfrostAWS

This was the first piece I built on the platform, and the rest of the system depends on it. It hides the awkward parts of Cardano (wallet handling, smart-contract data encoding, transaction building) behind a small REST API. A mobile app or a dashboard can post plain JSON, and the service signs it, builds the transaction, and submits it.

What it does

It signs farm data, deploys and updates on-chain oracle records (Plutus V3 contracts), mints reference NFTs that tie a farm to its on-chain transaction, anchors batches of verifiable credentials, and exposes routes for a decentralized-identity (DID) wallet integration alongside the oracle and NFT flows.

Design choices

Two wallets, one service. Signing oracle data and minting NFTs use separate wallet identities, held in a small map, so the two roles stay cleanly apart.

Predictable NFT names. Instead of random asset names, I derive them from a SHA-256 of the farm id and the oracle transaction hash. The name is unique, you can recompute and verify it, and it fits inside Cardano's 32-byte limit.

const unique = `${farmId}_${oracleTxHash}`;
const assetName = `SF_${createHash("sha256").update(unique).digest("hex").slice(0, 28)}`;

Batching and safety. Up to 50 credentials anchor in a single transaction to save fees, wallet seeds load from AWS Secrets Manager rather than a file, and the API waits for on-chain confirmation before it returns, so a success response really means the data is final.

Why it mattered

The point of this service is to let the rest of the team treat the blockchain like any other API. Keep the keys and the hard parts in one place, expose something simple, and everything built on top gets easier.