API and SDK
Base URL: https://api.bricsfinance.fun. The full contract is the OpenAPI document.
Read the ledger
curl https://api.bricsfinance.fun/v1/ledger
curl https://api.bricsfinance.fun/v1/policy
curl https://api.bricsfinance.fun/v1/epochs?limit=5
SDK
The SDK lives in sdk/ts in the repository. It is not published to npm yet.
import { Brics } from './sdk/ts/src/index';
const brics = new Brics();
const ledger = await brics.ledger();
const tower = await brics.tower('YourWalletAddress');
const proof = await brics.proof(12, 'YourWalletAddress');
Signing in
POST /v1/auth/noncewith{ chain, address }returns the message to sign.- Sign it with the wallet.
POST /v1/auth/verifywith{ nonce, signature }starts a session. SDK clients sendx-brics-client: sdkto get a bearer token.
Nonces work once and expire after five minutes.
Limits
120 requests per minute per IP and bodies up to 64 KB. Errors look like { "error": "code", "message": "…" }.