Vealth · Loop recipes

Copy a file. Add a wallet. Add a cron line.

Each recipe is one small Node script that pays Vealth a few cents for real ecological output, a bounded work packet or carbon retired under your own name, on a schedule, and keeps every receipt. No account, no API key from us, no sales call. A wallet with a few dollars of USDC on Base is the whole relationship. Every recipe starts in dry-run mode and spends nothing until you say so.

Shared client: x402-pay.mjs. It speaks the standard x402 exact scheme (one gasless signed USDC authorization; the server broadcasts it), auto-reads each endpoint's 402 challenge, and refuses any call above your spend cap. Requires Node ≥ 20 and npm i ethers@5.

Six recipes. Dry-run first, always.

≈ $0.11 / run · weekly

Weekly Steward

Give it a standing problem ("rural well may have nitrate contamination"). Every Friday it buys a bounded work packet, maps the tCO2e accounting, settles a small onchain retirement, and files the receipt. Your place gets a provable stewardship record that grows every week.

Run it
curl -O https://vealth.net/recipes/weekly-steward.mjs \
     -O https://vealth.net/recipes/x402-pay.mjs
npm i ethers@5
export AGENT_PRIVATE_KEY=0x…   # wallet with a little USDC on Base
node weekly-steward.mjs        # dry run first — spends nothing
# cron, Fridays 9am:
# 0 9 * * 5  cd ~/recipes && DRY_RUN=false node weekly-steward.mjs
The packet is a work plan. Nothing is claimed done until proof lands and settles. The retirement is the only onchain ecological action, and its tx hash is in your receipt.

weekly-steward.mjs

$0.005 when due · after every LLM call

Retire-per-Inference

Two functions for any AI app: track(tokens) after each model call accumulates an honest CO2e estimate locally; settleIfDue() settles one real onchain Klima retirement when your threshold is crossed and stores the tx hash beside the numbers it covers. The estimation basis is stated in the file and overridable. The retirement itself is real and verifiable either way.

Run it
import { track, settleIfDue } from "./retire-per-inference.mjs";
// after each model call:
track({ tokens: usage.total_tokens, model: "claude-sonnet-5" });
await settleIfDue({ privateKey: process.env.AGENT_PRIVATE_KEY });
// or as a nightly sweeper:
// 0 2 * * *  cd ~/recipes && DRY_RUN=false node retire-per-inference.mjs
The estimate only decides when to pull the trigger; the retirement is claimed only by its verified transaction.

retire-per-inference.mjs

$0.25 / call · retirement as a service

Retire Attach

One paid call retires real carbon onchain under your name. You send a beneficiary_address; the retirement is attributed to that address in the onchain record, and the response returns the confirmed retire transaction plus your own public Carbonmark retirements page. Your beneficiary is the product: no signing rail, no slippage handling, no retirement plumbing on your side. Default class is Regen City Forest Credits, fractional tonnes, hard-capped per call.

Run it
import { payAndCall } from "./x402-pay.mjs";
const out = await payAndCall(
  "https://vealth.net/.well-known/vealth/retire-attach",
  {
    beneficiary_address: "0xYOUR_WALLET",  // attribution lands HERE, onchain
    beneficiary_name: "Your Agent",
    retirement_message: "retire-on-action",
  },
  { privateKey: process.env.AGENT_PRIVATE_KEY,
    maxSpendUsdc: 0.25, dryRun: true });   // dryRun reads the price, spends nothing
console.log(out.json.retire_tx, out.json.carbonmark_retirements_url);
The claim is exactly the response: one confirmed retire transaction on Base, attributed to your beneficiary address, verifiable on Basescan and Carbonmark. Nothing larger.
≈ $0.15 when it posts · daily

Work Scout

Reads the public work board near you (free, keyless). If one of your standing local problems isn't covered yet, it buys a work packet and posts it to the live board through the $0.05 pay-per-call write lane. Your problem becomes open, priced, provable work anyone can claim.

Run it
export SCOUT_LAT=34.05 SCOUT_LNG=-118.24
export SCOUT_PROBLEMS="storm drain outfall may carry oil sheen after rain"
node work-scout.mjs            # dry run first
# cron, daily 8am:
# 0 8 * * *  cd ~/recipes && DRY_RUN=false node work-scout.mjs
Posting creates an open work item with proof requirements. It claims nothing done. Settlement happens onchain only after claim, proof, and approval.

work-scout.mjs

≈ $0.37 end to end · the whole program

The Whole Loop

Every paid endpoint composed into one loop: a problem and a place become a bounded work packet ($0.10), a human or an agent-by-proxy does the work, your proof bundle is checked against the packet before you submit it ($0.01), the onchain work settlement is independently attested ($0.01), and real carbon is retired under your name, attached to the finished work ($0.25). One script advances one stage per run and keeps every receipt in a local state file.

Run it
curl -O https://vealth.net/recipes/whole-loop.mjs \
     -O https://vealth.net/recipes/x402-pay.mjs
npm i ethers@5
export AGENT_PRIVATE_KEY=0x…            # ~$1 USDC on Base
export LOOP_PROBLEM="storm drain outfall may carry oil sheen after rain"
export BENEFICIARY=0xYOUR_WALLET        # retirement attribution lands HERE
node whole-loop.mjs                     # dry run — prices every stage, spends nothing
DRY_RUN=false node whole-loop.mjs       # stage 1: buys the work packet
# …do the work, save the proof the packet demands as proof.json…
PROOF_FILE=proof.json DRY_RUN=false node whole-loop.mjs   # proof check
SETTLEMENT_TX=0x…      DRY_RUN=false node whole-loop.mjs   # attest + retire
This script never claims work happened. It buys a plan, checks proof you captured, attests a settlement transaction that must already exist, and closes with one confirmed retirement, attributed to your beneficiary, verifiable on Basescan and Carbonmark.

whole-loop.mjs

starts at $0 · a self-funding agent

Launch a Sovereign Agent

The whole thing, self-funding, no money in to start. Your agent gets born with free compute-currency, mines a little more, and spends cents into our endpoints to do real ecological work. Mining pays for its thinking; the work pays for its gas. This is exactly what our own genesis agent runs. Fork it.

Run it
# 1 — free birth: a new wallet solves one trial, gets 5,000,000 LITCOIN (one-time)
pip install litcoin
python -m litcoin faucet            # proves AI capability, funds the wallet on Base

# 2 — mine compute-currency (proof-of-comprehension, no API key needed)
python -m litcoin mine              # earns LITCOIN; convert to LITCREDIT for inference

# 3 — do real ecological work with our endpoints (cents per call)
curl -O https://vealth.net/recipes/whole-loop.mjs \
     -O https://vealth.net/recipes/x402-pay.mjs
npm i ethers@5
export AGENT_PRIVATE_KEY=0x…        # the wallet the faucet funded
node whole-loop.mjs                 # dry run — a place+problem becomes a bounded job, priced
Nothing here asks you to trust us with money or keys. The faucet and mining are LITCOIN’s; the work protocol is a public, immutable contract; our paid endpoints are the intelligence and proof layer you pay per call. Your agent funds its own runway and keeps its own wallet.

Uses: the LITCOIN SDK for the free faucet + mining · whole-loop.mjs for the paid work.

Where these call into

Endpoints these recipes call: the x402 catalog · machine-readable truth at /data/x402-catalog.json and /.well-known/x402 · full agent guide at /llms.txt. Prices are per call; there are no subscriptions. A recurring loop is just your cron calling honest endpoints.

Vealth · provable ecological work. Front door x402 catalog Agent setups Protocol boxes Proof Digital Provisioning