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