bucket foundation — inverse omegabucket.foundation
§ Build

build on the bucket rail.

Three paths. Pick one. Every path ships today on mainnet-adjacent infrastructure; every path terminates in a citeable envelope.

Path I

Use the research API

One HTTP call, zero SDK. Returns either a cited envelope (200) or an x402 challenge your agent can pay (402).

request
bash
curl -s "https://www.bucket.foundation/api/research?q=mitochondrial+atp+synthesis&tier=insight" \  -H "accept: application/json"
response (payment challenge)
http
HTTP/1.1 402 Payment Requiredcontent-type: application/jsonx-bucket-proxy: v1 {  "data": null,  "receipt": {    "tier":      "insight",    "status":    "payment_required",    "price_usd": 0.005,    "asset":     "USDC",    "network":   "base-sepolia",    "pay_to":    "0xa91115B1AB8412f380Fd62446F523559F668b96B",    "challenge": "eyJ4NDAyVmVyc2lvbiI6Miwi...",    "demo":      true  },  "error": {    "code": "payment_required",    "message": "Pay the x402 challenge from receipt.challenge to unlock."  }}
$0.005 · insight · feed402/0.2→ full playbook
Path II

Run a paying agent

Decode the 402 challenge, sign the EIP-712 payment, retry with X-PAYMENT. Full helper in the feed402 ref agent.

agent.ts
ts
// Node 20+ · npm i viemimport { createWalletClient, http, parseUnits } from "viem";import { privateKeyToAccount } from "viem/accounts";import { baseSepolia } from "viem/chains"; const account = privateKeyToAccount(process.env.WALLET_PK as `0x${string}`);const client  = createWalletClient({ account, chain: baseSepolia, transport: http() }); // 1. naive call — expect 402 back with an x402 challengeconst naive = await fetch(  "https://www.bucket.foundation/api/research?q=" +    encodeURIComponent("circadian disease") + "&tier=insight");const env = await naive.json(); if (naive.status === 402) {  // 2. decode challenge, sign EIP-712 payment intent, retry with X-PAYMENT header  const challenge = JSON.parse(atob(env.receipt.challenge));  const accepts   = challenge.accepts[0];  const payment   = await signX402Payment(client, accepts); // see feed402 ref agent  const paid = await fetch(naive.url, { headers: { "X-PAYMENT": payment } });  const cited = await paid.json();   console.log(cited.data);     // the answer  console.log(cited.citation); // doi · canonical_url · license  console.log(cited.receipt);  // tier · price · on-chain tx hash}
agent.py
py
# python 3.11+ · pip install requests web3 eth-accountimport base64, json, os, requestsfrom eth_account import Accountfrom eth_account.messages import encode_typed_data acct = Account.from_key(os.environ["WALLET_PK"]) # 1. naive call — expect 402r = requests.get(    "https://www.bucket.foundation/api/research",    params={"q": "mitochondrial disease", "tier": "insight"},)env = r.json() if r.status_code == 402:    # 2. decode x402 challenge, sign, retry    challenge = json.loads(base64.b64decode(env["receipt"]["challenge"]))    payment   = sign_x402_payment(acct, challenge["accepts"][0])  # see feed402 ref    paid      = requests.get(r.url, headers={"X-PAYMENT": payment})    cited     = paid.json()    print(cited["data"])       # the answer    print(cited["citation"])   # doi · canonical_url · license    print(cited["receipt"])    # tier · price · tx_hash
Path III

Become a data merchant

You own a corpus. You want citation revenue. Publish a feed402 manifest and register your wallet. No gatekeeper.

/.well-known/feed402.json
json
{  "name":    "your-data-provider",  "version": "1.0.0",  "spec":    "feed402/0.2",  "chain":   "base-sepolia",  "wallet":  "0xYOUR_BASE_WALLET_ADDRESS",   "tiers": {    "raw":     { "path": "/raw",     "price_usd": 0.05,  "unit": "row"  },    "query":   { "path": "/query",   "price_usd": 0.01,  "unit": "call" },    "insight": { "path": "/insight", "price_usd": 0.002, "unit": "call" }  },   "citation_policy": "CC-BY-4.0",  "citation_types":  ["source"],  "contact":         "ops@your-domain.com"}
  1. 01Clone feed402: git clone https://github.com/gianyrox/feed402
  2. 02Serve GET /.well-known/feed402.json with your tiers + Base wallet
  3. 03Wrap your data endpoint with x402 middleware (USDC on Base)
  4. 04Return the feed402 envelope { data, citation, receipt } on every paid call
  5. 05Post your manifest URL to ops@bucket.foundation — we index it
build the past · build history · bucket is the new renaissance