Skip to main content

Install

Authenticate

Need a JWK keypair? Install the Bron CLI and run bron config init --name default --workspace <workspaceId> --key-file ~/.config/bron/keys/me.jwk --generate-key — it generates the JWK, stores it at 0600, prints the public half to paste into the Bron UI, and registers the profile. Same key file works directly with the SDK via BRON_API_KEY_FILE.
The SDK generates an ES256 JWT per request from your private JWK and sends it in Authorization: ApiKey <jwt>. No token caching, no revocation flow.

Quickstart

Subscriptions (WebSocket)

A subscription is “GET extended” — the same query you would send to the matching list endpoint, but the connection stays open. The server replays the historical match as the first frame, then keeps pushing live updates as additional frames of the same response shape (a list with one element per change in steady state).
  • First frame = historical match, exactly as GetTransactions(query) would return.
  • Subsequent frames = live updates, each typically a single-element list. Filters apply to both phases.
  • Skip the initial replay — pass Limit: ptr("0") (or SubscribeWithFilter(ctx, map[string]interface{}{"limit": 0, ...}) when the typed *string field doesn’t carry through; the backend wants an integer for limit).
  • Always defer stream.Close() — sends UNSUBSCRIBE and tears down the WebSocket cleanly. The channel closes when the context is cancelled, Close is called, or the connection drops; stream.Err() returns the cause.
  • Proxy is honored automatically via BronClientConfig.Proxy (or HTTP_PROXY / HTTPS_PROXY env vars).
Today only client.Transactions.Subscribe is exposed. Subscriptions for balances, approvals, and intents follow the same pattern and will land in subsequent SDK releases.

Errors

Methods return Go errors mirroring the API envelope. The error implements an interface with Code(), Trace(), Details() so callers can branch without parsing the message:
Branch on Code() (stable identifier) — never on the human message. Quote Trace() in any user-facing report.

Configuration

BronClientConfig accepts:
  • APIKey — private JWK as a JSON string (required).
  • WorkspaceID — workspace ID (required).
  • BaseURL — API base URL (defaults to https://api.bron.org).
  • Proxyhttp://[user:pass@]host:port for outbound requests through a corporate proxy. Standard HTTPS_PROXY / HTTP_PROXY env vars are honored too.

Where to next

API reference

Endpoints, request/response shapes, OpenAPI spec.

CLI overview

bron binary — same auth, same data path, no client code.

Live updates (`tx subscribe`)

Same WebSocket transport, JSONL on stdout — useful for shell pipelines.

Authentication & profiles

Keypair lifecycle, env-var overrides, proxy setup, rotation.