Skip to main content
The Brickken SDK is the official TypeScript client for the whole platform: the Dapp API (tokenization, STOs, security-token operations), the Agentic API (x402 payments, ERC-8004 identity and reputation, agent-owned tokens), and RAMS mandates (ERC-8226). It runs on Node 20+, in browsers, and on edge runtimes. The core has one runtime dependency.

npm package

Install brickken-sdk from npm.

GitHub repository

View the public source repository.

Why this surface

The SDK is the client to reach for when your own code is driving. Unlike the CLI, it reaches the full Dapp API; unlike the MCP server, it runs in your process rather than behind a hosted agent endpoint.
  • One client, three APIs. Dapp, agentic, and RAMS live behind the same Brickken instance.
  • Illegal combinations fail locally. The SDK derives the credential mode from what you pass and refuses combinations the API rejects, before a request leaves your process.
  • Typed results, typed errors. Every write returns the same WriteResult shape, and every failure is one of fourteen error classes you can branch on.
  • Your private key stays put. It signs x402 payments, client-signed transactions, and RAMS typed data in your process, and is never sent anywhere.

Two credentials, and they are alternatives

Brickken accepts an API key or an x402 payment, never both on one request. When x-api-key is present the API skips the payment path entirely, which means no payment is taken and brickken-relayed execution becomes unavailable. The SDK enforces this locally:
See Authentication for the full matrix.

Every write is prepare → sign → send

Preparing builds unsigned transactions; sending puts them on chain. The SDK defaults to prepare-only, so execute: true is an explicit opt-in.
Payment metadata is always a sibling field on the result. It is never mixed into the response body.

Where to go next

Installation

Runtimes, module formats, and optional peer dependencies.

Quickstart

A first Dapp read and a first agentic write, on sandbox.

Execution modes

Who signs, who broadcasts, and what each mode costs.

Namespaces

Every method, mapped to its backend endpoint.

Prerequisites the API does not expose

Two things fail at request time and are invisible beforehand:
  1. The wallet you pass as signerAddress must be whitelisted by Brickken before any prepare accepts it. Request it together with your API key.
  2. An API key may only act on token symbols whose tokenizer email matches a newTokenization performed under that same key. Anything else raises UnauthorizedTokenSymbolError.
Each Dapp write method also carries its own credit balance, so one method can run out while others still work — that one surfaces as CreditsExhaustedError, carrying .method.