Developers

REST API

A public, wallet-free GET endpoint that returns every registered wrapper pair as JSON.

ShadowLine exposes a public REST API for querying the on-chain registry. No SDK, no wallet, no authentication — just a fetch().

GET /api/registry

GET/api/registry

Returns all registered ERC-20 ↔ ERC-7984 wrapper pairs for the specified chain. Data is read directly from the on-chain WrappersRegistry and cached for 60 seconds (stale-while-revalidate 300s).

Query parameters

ParameterTypeDescription
chainrequired"sepolia" | "mainnet"The network to query. Defaults to "sepolia" when omitted.

Response schema

FieldTypeDescription
pairsrequiredPairResult[]Array of registered wrapper pair objects.
totalrequirednumberNumber of pairs returned (after blocklist filtering).
chainrequiredstringChain name: "sepolia" or "mainnet".
registryAddressrequiredstringAddress of the WrappersRegistry contract queried.
timestamprequirednumberUnix millisecond timestamp of the response.
sourcerequired"on-chain" | "cached-snapshot""on-chain" = live data; "cached-snapshot" = RPC fallback.
warningstringPresent only when source is cached-snapshot.

PairResult object

FieldTypeDescription
tokenAddressrequiredstringERC-20 underlying token contract address.
confidentialTokenAddressrequiredstringERC-7984 confidential wrapper contract address.
symbolrequiredstringNormalized underlying symbol, e.g. "USDC" (Mock suffix stripped).
confidentialSymbolrequiredstringConfidential symbol, e.g. "cUSDC".
namerequiredstringHuman-readable name, e.g. "USD Coin".
decimalsrequirednumberUnderlying token precision (e.g. 6 for USDC, 18 for WETH).
wrapperDecimalsrequirednumberAlways 6 — the FHE euint64 constraint.

Examples

curl
# Fetch all Sepolia pairs
curl "https://YOUR_DEPLOYMENT_URL/api/registry?chain=sepolia"

# Fetch Mainnet pairs
curl "https://YOUR_DEPLOYMENT_URL/api/registry?chain=mainnet"
fetch (JavaScript)
const res = await fetch('https://YOUR_DEPLOYMENT_URL/api/registry?chain=sepolia');
const data = await res.json();

console.log(`${data.total} pairs on ${data.chain} (source: ${data.source})`);
for (const pair of data.pairs) {
  console.log(`${pair.symbol} → c${pair.symbol}`);
  console.log(`  ERC-20:   ${pair.tokenAddress}`);
  console.log(`  ERC-7984: ${pair.confidentialTokenAddress}`);
}
Python
import requests

resp = requests.get("https://YOUR_DEPLOYMENT_URL/api/registry", params={"chain": "sepolia"})
data = resp.json()

for pair in data["pairs"]:
    print(f"{pair['symbol']:8} -> c{pair['symbol']:8} | decimals: {pair['decimals']}/{pair['wrapperDecimals']}")

HTTP headers

HeaderValue
Cache-Controlpublic, s-maxage=60, stale-while-revalidate=300
Access-Control-Allow-Origin* (CORS open)