Documentation
Build on HoodStack
Developer infrastructure for Robinhood Chain. Create a project, mint an API key, and read chain state through the Data API in minutes.
Introduction
HoodStack is the developer infrastructure stack for Robinhood Chain: accounts, execution, gas, assets, connectivity, automation, security, and developer tooling, delivered through SDKs, a REST API, a CLI, and a dashboard.
It is non-custodial by design - HoodStack cannot move user funds - and testnet is the default everywhere. See the product catalog for the full stack.
Installation
Requires Node 20.11+ and pnpm 10+. Install the packages you need:
pnpm add @hoodstack/sdk @hoodstack/network @hoodstack/errorsFour packages are on npm today: @hoodstack/sdk, @hoodstack/cli, @hoodstack/network, and @hoodstack/errors.
Network setup
Two networks are defined. Testnet is the default; selecting mainnet is always explicit, and mainnet writes require a per-project opt-in.
| Network | Chain ID | Gas |
|---|---|---|
| Robinhood Chain | 4663 | ETH |
| Robinhood Chain Testnet | 46630 | ETH |
Testnet ETH is available from the faucet. The @hoodstack/network package provides the definitions and the safety rails around them:
import {
robinhoodTestnet,
assertChainMatches,
assertWriteAllowed,
getExplorerTxUrl,
} from "@hoodstack/network";
// Chain definitions extend viem's Chain - hand them straight to
// createPublicClient, wagmi, or any viem-compatible tooling.
const chain = robinhoodTestnet; // testnet is the default everywhere
// A wallet can switch networks between building and signing.
// Validate the chain immediately before each.
assertChainMatches(await wallet.getChainId(), chain);
// Mainnet writes are disabled by default; enabling them is explicit.
assertWriteAllowed(chain, { allowMainnetWrites: false });
const url = getExplorerTxUrl(chain, txHash);Quickstart
Three steps take you from nothing to a live read against the chain.
- 1Sign in to the dashboard and create a project.
- 2In the project, create a Test API key. Copy it once; it is shown only at creation.
- 3Call the gateway with your key.
curl https://www.hoodstack.io/api/v1/health \
-H "Authorization: Bearer hs_test_your_key"A 200 confirms the key resolves and reports the chain it acts against. Test keys act against Robinhood Chain testnet; live keys against mainnet.
Authentication
Every API request carries a project API key as a bearer token. Keys are stored only as a hash, so a lost key is rotated, never recovered; create a new one and revoke the old.
Authorization: Bearer hs_test_… (or hs_live_… for mainnet)A missing or revoked key returns HS_INVALID_API_KEY; requests are rate limited per key. Keys can also be sent as x-api-key.
Data API
Read chain state over raw RPC. Responses share one envelope: { ok, requestId, data } on success, and { ok: false, error } with a stable HS_ code on failure.
GET /api/v1/data/account?address=balance, nonce, and contract detectionGET /api/v1/data/transaction?hash=a transaction with its receiptGET /api/v1/data/block?number=latesta block header
curl 'https://www.hoodstack.io/api/v1/data/account?address=0xYOUR_ADDRESS' \
-H "Authorization: Bearer hs_test_your_key"{
"ok": true,
"requestId": "b1a7…",
"data": {
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chainId": 46630,
"balanceWei": "1000000000000000000",
"balanceFormatted": "1 ETH",
"nonce": 42,
"isContract": false
}
}For arbitrary read-only JSON-RPC, post to /api/v1/rpc:
curl -X POST https://www.hoodstack.io/api/v1/rpc \
-H "Authorization: Bearer hs_test_your_key" \
-H "content-type: application/json" \
-d '{"method":"eth_blockNumber"}'AI agents
@hoodstack/agent-kit gives an AI agent safe, typed access to Robinhood Chain through a project API key. One small package ships two things: an MCP server for any Model Context Protocol client, and a framework-agnostic toolkit for the Vercel AI SDK, LangChain, or a raw function-calling loop.
Every tool is a read or a simulation, so an agent can plan and verify before anything is signed. There is no signing key in the package, and HoodStack cannot move user funds.
Point an MCP client (Claude Desktop, Claude Code) at it and set your key:
{
"mcpServers": {
"hoodstack": {
"command": "npx",
"args": ["-y", "@hoodstack/agent-kit", "hoodstack-mcp"],
"env": { "HOODSTACK_API_KEY": "hs_test_your_key" }
}
}
}Or import the tools into your own agent:
import { createHoodStackAgent } from "@hoodstack/agent-kit";
const agent = createHoodStackAgent({ apiKey: process.env.HOODSTACK_API_KEY! });
// Every tool is a read or a simulation - nothing is signed or submitted.
const gas = await agent.run("hoodstack_get_gas", {});
const sim = await agent.run("hoodstack_simulate_transaction", {
to: "0x…",
valueWei: "10000000000000000",
});Eight tools, each authenticated by your key and metered through the gateway:
hoodstack_health— Verify the key and report the network and projecthoodstack_get_account— Balance, nonce, and contract detection for an addresshoodstack_get_transaction— A transaction and its receipt, by hashhoodstack_get_block— A block header (latest by default)hoodstack_get_token— ERC-20 metadata and an optional holder balancehoodstack_get_gas— Current gas price, base fee, and transfer costhoodstack_simulate_transaction— Simulate a call and estimate gas, no signinghoodstack_rpc— A read-only JSON-RPC call for anything else
Signed, policy-bounded execution — an agent submitting from a smart account it owns, bounded by server-side spend limits and allowlists, relayed by HoodStack — is on the account-abstraction roadmap. It stays non-custodial: the agent signs, the relayer only relays. Read the overview on the AI Agents page.
Error handling
Every HoodStack error is a HoodStackError with a stable HS_ code you can branch on, a retryable flag, a documentation URL, and a request ID. Details are redacted at construction, so secrets never reach a log or a client.
import { isHoodStackError } from "@hoodstack/errors";
try {
const account = await hoodstack.data.account(address);
} catch (error) {
if (isHoodStackError(error)) {
error.code; // e.g. "HS_INVALID_API_KEY" - branch on this
error.retryable; // whether retrying may help
error.docsUrl; // where to read more
error.requestId; // correlate with server logs
}
}Packages
Published on npm, Apache-2.0.
- @hoodstack/sdknpm ↗
Typed TypeScript client for the API
- @hoodstack/clinpm ↗
The hoodstack terminal client
- @hoodstack/networknpm ↗
Robinhood Chain definitions and read helpers
- @hoodstack/errorsnpm ↗
Normalized HS_ error taxonomy
