Agents & SDK
Read pools, quote, trade, launch and claim from your own product or an AI agent. Everything here reads the same contracts the site uses, on Robinhood Chain.
The skill file
One Markdown file that tells any agent what Captain Hook is, where its contracts are, and how to read a token's rules, quote, buy, sell, launch and claim. Point your agent at it:
It asks agents to confirm every transaction with their user first: trades and launches can't be undone.
The SDK
TypeScript source on viem: readPool reads a token's rules and price, quoteBuy and quoteSell quote with the contracts' own maths (the same as this site's quotes, checked by its tests), and buy, sell, approveRouter, claim and launchV2 build calls for your wallet client. It never signs or sends anything.
import { createPublicClient, http, parseEther } from "viem";
import { buy, deadline, minOut, quoteBuy, readPool, robinhood } from "./captainhook-sdk";
const client = createPublicClient({ chain: robinhood, transport: http() });
const pool = await readPool(client, token); // undefined if not a Captain Hook token
const q = quoteBuy(pool!, 0.05); // what 0.05 ETH buys now
const call = buy({ key: pool!.key, eth: parseEther("0.05"), minOut: minOut(q.out), to: me, deadline: await deadline(client) });
const { request } = await client.simulateContract({ ...call, account: me });
// then your wallet client sends `request`Save these files into a folder in your project (it needs viem 2):
Addresses and ABIs
- Hook · hook-v2.json0x4d4fd5a3c6a81e1f729549b511cae7cd0028a8cc
- Factory · factory-v2.json0x1002eb1195ffc8907ca98a5c559f9666b76ccbcb
- Router · router-v2.json0x8d92ff3ea0251990c4203d562c86b37bea60fea6
- Vault (dev buys and vesting) · vault.json0x4a7e17702009ead048231dbff12b0ab1f04a9498
- Launched tokens · token.json
- v1 hook (older tokens) · hook.json0x50570ee9e8826e04609d7b5e6404efd2634c28cc
- v1 factory · factory.json0x9da7ba9ef891c011227900a0eb6150a86aaa3e3f
- v1 router · router.json0x7814ef43c3ff258ceec3857874b9d31d01d69205
How the contracts behave is on the docs and each block's page.