Skip to content
Color theme
Documentation menu

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.

Status. The full read, simulate, configure, and audit surface is live across the stack, with a typed SDK and CLI on npm; signed execution and automation ship continuously. HoodStack is in early access and not yet audited; keep production-critical flows on testnet until a mainnet readiness review is announced.

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:

terminal
pnpm add @hoodstack/sdk @hoodstack/network @hoodstack/errors

Four 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.

NetworkChain IDGas
Robinhood Chain4663ETH
Robinhood Chain Testnet46630ETH

Testnet ETH is available from the faucet. The @hoodstack/network package provides the definitions and the safety rails around them:

network.ts
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.

  1. 1Sign in to the dashboard and create a project.
  2. 2In the project, create a Test API key. Copy it once; it is shown only at creation.
  3. 3Call the gateway with your key.
verify 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.

header
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 detection
  • GET /api/v1/data/transaction?hash= a transaction with its receipt
  • GET /api/v1/data/block?number=latest a block header
account read
curl 'https://www.hoodstack.io/api/v1/data/account?address=0xYOUR_ADDRESS' \
  -H "Authorization: Bearer hs_test_your_key"
response
{
  "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:

raw 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:

claude_desktop_config.json
{
  "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:

agent.ts
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_healthVerify the key and report the network and project
  • hoodstack_get_accountBalance, nonce, and contract detection for an address
  • hoodstack_get_transactionA transaction and its receipt, by hash
  • hoodstack_get_blockA block header (latest by default)
  • hoodstack_get_tokenERC-20 metadata and an optional holder balance
  • hoodstack_get_gasCurrent gas price, base fee, and transfer cost
  • hoodstack_simulate_transactionSimulate a call and estimate gas, no signing
  • hoodstack_rpcA 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.

errors.ts
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.

Documentation - HoodStack