BURN ENGINE ACTIVE
·
LUMINA / USDC$0.0364+2.31%
·
BURNED 1,284,402 LUMINA
·
ACTIVE BETS 312
·
BASE L2 OK
·
CHAINLINK OK
Skills · 22 actionable · 5 agent · 3 human · 14 both

What you (or your agent) can do.

Every skill maps to a real contract function or REST endpoint. Click any card to jump to the source on GitHub.

Looking for everything?
View complete API repo on GitHub
org-lumina/lumina-api
AUDIENCE ·
CATEGORY ·
SHOWING 22 of 22
SKILL · 01BOTH
🔍 DISCOVER

Browse the 9 Shields catalog

List all active parametric products available on Base Sepolia: 4 Flash BTC (1h/4h/24h/48h), 3 Flash ETH (1h/24h/48h), Micro Depeg USDT, and Rate Shock. Each shield has its own contract address, trigger condition, and probability.

GET /products
readcatalogpublic
⭐ Easy
📄 View on GitHub
SKILL · 02BOTH
🔍 DISCOVER

Read shield specs

Inspect a specific shield contract: trigger logic, oracle feed, premium formula, payout ratio, and cover bounds. All shield contracts inherit from BaseShield with a shared lifecycle.

BaseShield._minCoverage / _calculateMaxPayout
readonchain
⭐ Easy
📄 View on GitHub
SKILL · 03BOTH
🔍 DISCOVER

Check protocol status

Query global pause state and remaining bond capacity. The protocol auto-pauses when the LUMINA price falls below a floor; capacity caps how much new cover can be issued from the BondVault reserve.

CoverRouterV2.isProtocolAutoPaused / BondVault.availableCapacityUSD
readhealth
⭐ Easy
📄 View on GitHub
SKILL · 04BOTH
💰 QUOTE

Quote a parametric policy

Get a real-time on-chain quote for any shield. Returns the (premium, payout) tuple — premium scales with cover × triggerProbBps × marginBps × payoutRatioBps.

CoverRouterV2.quotePremium(productId, coverageAmount)
readonchainpricing
⭐ Easy
📄 View on GitHub
SKILL · 05AGENT
💰 QUOTE

Quote via REST API

Same quote as the on-chain call, served by the public lumina-api endpoint. Useful for off-chain calculators, agent strategies, and dashboards that should not pay gas to read a price.

GET /products/:productId/quote?cover=&duration=
readapipublic
⭐ Easy
📄 View on GitHub
SKILL · 06HUMAN
🛒 BUY

Buy policy as Human (direct contract)

Pay premium with your wallet and receive a policy bound to msg.sender. Atomic: USDC routes to the TWAPBurner, premium burns LUMINA on Uniswap. If trigger fires, your wallet receives ClaimBonds.

CoverRouterV2.purchasePolicy(productId, coverageAmount, asset)
writewalletonchain
⭐⭐ Medium
📄 View on GitHub
SKILL · 07AGENT
🛒 BUY

Buy policy as Agent (via API)

Relayer pattern: agent sends a signed quote to the API, the relayer pays gas and calls purchasePolicyFor on-chain. Agent only needs an API key + USDC balance — no wallet UI.

POST /api/v1/policies (agent-key)
writeapirelayer
⭐⭐ Medium
📄 View on GitHub
SKILL · 08HUMAN
🛒 BUY

Approve USDC allowance

Standard ERC-20 prerequisite before purchasePolicy: call USDC.approve(CoverRouterV2, premium) so the router can pull the premium atomically. Reuse the allowance across multiple purchases (set to MaxUint to skip future approves).

USDC.approve(spender, amount) — standard ERC-20
writewalleterc20
⭐ Easy
📄 View on GitHub
SKILL · 09BOTH
📊 MONITOR

Track active policies (by owner)

PolicyCreated event indexes productId + policyId but NOT buyer — pull all events with viem getLogs and filter client-side by buyer == owner. Yields the full set of policies a wallet has ever bought.

event PolicyCreated(productId, policyId, buyer, coverage, premium, payout)
readeventsindexing
⭐⭐ Medium
📄 View on GitHub
SKILL · 10BOTH
📊 MONITOR

Watch oracle triggers in real time

PolicyTriggered fires when a Chainlink oracle confirms the trigger condition for a policy. Listen to filter your wallet, then optionally subscribe to BondIssued for the resulting ClaimBond.

event PolicyTriggered(productId, policyId, buyer, bondAmount, reason)
readeventsrealtime
⭐⭐ Medium
📄 View on GitHub
SKILL · 11BOTH
📊 MONITOR

Get bonds owned (by holder)

BondsMinted indexes both `epochId` and `to` — filter by `to: ownerAddress` for direct discovery. ClaimBond is ERC-1155 with 1 token = $1, so balanceOf returns the integer-dollar face value.

event BondsMinted(epochId, to, usdAmount) + balanceOf(holder, epochId)
readeventserc1155
⭐⭐ Medium
📄 View on GitHub
SKILL · 12BOTH
📊 MONITOR

Check policy detail by id

Public REST endpoint that returns a single policy snapshot (cover, premium, payout, status, expiry). No auth — useful for agent scripts that only need a pull-and-confirm pattern.

GET /policies/:productId/:policyId
readapipublic
⭐ Easy
📄 View on GitHub
SKILL · 13BOTH
🎁 CLAIM

Receive ClaimBond on trigger

When a trigger fires, BondVault.issueBond mints ERC-1155 ClaimBond tokens to the buyer. 1 token = $1 face value, all bonds maturing in the same month share an epochId, fungible.

BondVault.issueBond(to, usdPayout) — called by PolicyManager
writesystemauto
⭐ Easy
📄 View on GitHub
SKILL · 14BOTH
🎁 CLAIM

Redeem matured bond for LUMINA

After the 24-month maturity, call BondVault.redeemBond(epochId, usdAmount) to burn N bond tokens and receive $N worth of LUMINA at the current oracle price. Partial redemptions allowed.

BondVault.redeemBond(epochId, usdAmount)
writewalletonchain
⭐⭐ Medium
📄 View on GitHub
SKILL · 15BOTH
🔄 MARKETPLACE

List bond for sale

Pre-maturity, sell your ClaimBonds at a discount on the secondary marketplace. You set the price in USDC; buyers see the implied yield based on days-to-maturity.

LuminaBondMarketplace.list(epochId, amount, priceUSDC)
writewalletonchain
⭐⭐ Medium
📄 View on GitHub
SKILL · 16BOTH
🔄 MARKETPLACE

Buy bond from marketplace

Buy a discounted ClaimBond. Pay USDC, receive the ERC-1155 transfer. Marketplace takes 3% (1.5% from each side); 100% of fees route to the TWAPBurner and burn LUMINA forever.

LuminaBondMarketplace.executeBuy(listingId)
writewalletonchain
⭐⭐ Medium
📄 View on GitHub
SKILL · 17BOTH
🔄 MARKETPLACE

Cancel an open listing

Pull your listing off the marketplace at any time before someone buys it. The bond returns to your wallet; no fees charged.

LuminaBondMarketplace.cancel(listingId)
writewallet
⭐ Easy
📄 View on GitHub
SKILL · 18HUMAN
🔧 INTEGRATION

Connect wallet via RainbowKit

The frontend bundles RainbowKit + wagmi for MetaMask, Coinbase, WalletConnect, and Rainbow. Auto-prompts to switch network if not on Base Sepolia (chain 84532).

wagmi createConfig + RainbowKit connectorsForWallets
uiwallet
⭐ Easy
📄 View on GitHub
SKILL · 19AGENT
🔧 INTEGRATION

Configure API client (env vars + auth)

Production base URL: https://lumina-api-production-ac85.up.railway.app. Authenticated endpoints require an X-API-Key header. Rate limits enforced per agent identity (not per IP).

Header: X-API-Key
apiauth
⭐ Easy
📄 View on GitHub
SKILL · 20AGENT
🔧 INTEGRATION

Generate an agent API key

Self-service key issuance is admin-only on V5.1 testnet — request via labs@lumina-org.com with your wallet address. Max 3 active keys per wallet, plaintext shown once.

POST /api/v1/keys/generate (admin-only)
apiauthadmin
⭐⭐ Medium
📄 View on GitHub
SKILL · 21AGENT
🔧 INTEGRATION

Redeem matured bonds via API (Agent)

Agent-side equivalent of redeemBond: POST a redeem request signed with your API key and the relayer dispatches the on-chain call. Returns LUMINA to the agent wallet.

POST /api/v1/redeem (agent-key)
writeapirelayer
⭐⭐ Medium
📄 View on GitHub
SKILL · 22BOTH
🔧 INTEGRATION

Health check + status pings

Public health endpoint for monitors and uptime probes. Returns service status and the RPC chain id the API is connected to. No auth required.

GET /health
readapipublicops
⭐ Easy
📄 View on GitHub
Read API documentationBrowse contract source codeSKILL-V4.1.md (canonical spec)