Skip to main content

lumina.policies.list({ wallet? })

Defaults to the calling wallet (server-side filter from the API key). Passing an explicit wallet is supported but ignored unless the API key owns that wallet — cross-wallet listing returns 403.

lumina.policies.get(productId, policyId)

Public — no API key required.

lumina.policies.purchase({ productName, buyer, coverageAmount })

The SDK auto-resolves both the productId keccak hash AND the per-shield asset literal from productName. Pass productName whenever you can:
productName must be one of the 6 V5.3 catalog entries:
  • FLASHBTC1H-001
  • FLASHBTC24-001
  • FLASHBTC48-001
  • FLASHETH1H-001
  • FLASHETH24-001
  • FLASHETH48-001
Any other product name will throw Unknown product at the SDK boundary before any network call is made. Or pass productId explicitly — the SDK still auto-resolves the asset by reverse-lookup against the canonical registry:
Returns:

Premium reference (per $1k coverage)

Quotes can be re-fetched live via lumina.products.quote(productId, coverageAmount) and are the authoritative source if you’re displaying a price to a user.

Asset encoding

The asset field is optional when productName or a registered productId is supplied. To override, pass a symbol ('BTC' | 'ETH' | 'USDC' | 'USDT') or a 32-byte hex string:
See Products and assets for the full per-shield table and a list of InvalidAsset failure modes.

Idempotency

Always pass idempotencyKey on retryable purchases. The header value is forwarded as Idempotency-Key. Replays return the original response; no double-charge.