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/registryReturns 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
| Parameter | Type | Description |
|---|---|---|
chainrequired | "sepolia" | "mainnet" | The network to query. Defaults to "sepolia" when omitted. |
Response schema
| Field | Type | Description |
|---|---|---|
pairsrequired | PairResult[] | Array of registered wrapper pair objects. |
totalrequired | number | Number of pairs returned (after blocklist filtering). |
chainrequired | string | Chain name: "sepolia" or "mainnet". |
registryAddressrequired | string | Address of the WrappersRegistry contract queried. |
timestamprequired | number | Unix millisecond timestamp of the response. |
sourcerequired | "on-chain" | "cached-snapshot" | "on-chain" = live data; "cached-snapshot" = RPC fallback. |
warning | string | Present only when source is cached-snapshot. |
PairResult object
| Field | Type | Description |
|---|---|---|
tokenAddressrequired | string | ERC-20 underlying token contract address. |
confidentialTokenAddressrequired | string | ERC-7984 confidential wrapper contract address. |
symbolrequired | string | Normalized underlying symbol, e.g. "USDC" (Mock suffix stripped). |
confidentialSymbolrequired | string | Confidential symbol, e.g. "cUSDC". |
namerequired | string | Human-readable name, e.g. "USD Coin". |
decimalsrequired | number | Underlying token precision (e.g. 6 for USDC, 18 for WETH). |
wrapperDecimalsrequired | number | Always 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
| Header | Value |
|---|---|
Cache-Control | public, s-maxage=60, stale-while-revalidate=300 |
Access-Control-Allow-Origin | * (CORS open) |
