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"}'

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