Quickstart
FIVE MINUTES.
- Create an API key on the Build page. It is shown once. You can skip this for light use.
- Store it on your server as BOB_API_KEY.
- Verify a wallet.
const res = await fetch(
"https://bobinthehood.xyz/api/v1/verify/0x...",
{ headers: { Authorization: `Bearer ${process.env.BOB_API_KEY}` } }
);
const body = await res.json();
if (!res.ok) throw new Error(body.error.code);
if (body.data.verified) console.log("Welcome to the hood.", body.data.bobs);A 503 with VERIFICATION_UNAVAILABLE means the chain could not be read. Retry. Do not treat it as a no.
With the SDK
import { Bob } from "@bobinthehood/sdk";
const bob = new Bob({ apiKey: process.env.BOB_API_KEY });
const holder = await bob.wallet.isHolder("0x...");
if (holder) console.log("Welcome to the hood.");isHolder throws BobApiError when the check cannot run. Catch it and check the code.