The agent’s job is one HTTP call. Everything else — gas, on-chain encoding, event scraping for the policyId — happens server-side.Documentation Index
Fetch the complete documentation index at: https://docs.lumina-org.com/llms.txt
Use this file to discover all available pages before exploring further.
Sequence
SDK
curl
Field deep-dive
productId— bytes32 hash. Compute askeccak256(toUtf8Bytes('FLASHBTC24-001')). Pre-computed values are listed in Shields.coverageAmount— string of USDC base units. $50 ="50000000". Always pass as a string to preserve precision.asset— bytes32 of the asset symbol.ethers.encodeBytes32String('USDC')=0x5553444300…0000. The SDK accepts the symbol'USDC'and encodes for you.buyer— the wallet that pays the USDC premium (NOT the relayer). Must hold ≥ premium and have approved the relayer-side spender.
Idempotency
PassIdempotency-Key: <uuidv4> on every retryable purchase. Replays return
the original response without double-spending. The key is scoped per agent;
it’s safe (and good practice) to derive a fresh UUID per logical attempt.
Errors
| HTTP | Code | Retry? |
|---|---|---|
| 400 | validation_error | No |
| 401 | invalid_api_key | No |
| 422 | shield_paused | Maybe later |
| 422 | exceeds_capacity | Maybe later |
| 429 | rate_limit | Yes (backoff) |
| 5xx | server_error | Yes (≤3 attempts) |