history · retire step stopped 4 Aug 2026
Weekly steward
Give it a standing problem ("rural well may have nitrate contamination"). It was built to run every Friday: buy a bounded work plan, map the tCO2e accounting, settle a small onchain retirement, and file the receipt. The retirement step is stopped, so today the loop would end at the plan and the accounting, and its dry run reads the prices only.
Read the prices (dry run)
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: spends nothing
The plan is not completed work. Nothing is claimed done until proof lands and settles. The retirement was the only onchain ecological action in this recipe; it is stopped, and the receipts of past runs keep their transaction hashes.
weekly-steward.mjs
history · stopped 4 Aug 2026
Retire per inference
Two functions for any AI app: track(tokens) after each model call accumulates an honest CO2e estimate locally; settleIfDue() settled one onchain Klima retirement when your threshold was crossed and stored the tx hash beside the numbers it covered. The estimation basis is stated in the file and overridable. Retirement has been stopped since 4 August 2026: today the retire door refuses before any charge, settleIfDue() gets that refusal, and your accumulated estimate stays untouched. Kept as the mechanism, not as something to schedule.
The mechanism (history)
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 }); // refused today; nothing is charged
The estimate only decided when to pull the trigger; a retirement is claimed only by its verified transaction, and none are being made.
retire-per-inference.mjs
retirement as a service · STOPPED 4 Aug 2026
Retire attach
Stopped since 4 August 2026. This door refuses every payment attempt before it settles and takes no charge: a call today returns 503 retire_lane_stopped, not a retirement. Retrying will not change that. Below is what the call did while the service ran, kept as history.
One paid call retired real carbon onchain under your name. You sent a beneficiary_address; the retirement was attributed to that address in the onchain record, and the response returned the confirmed retire transaction plus your own public Carbonmark retirements page. Your beneficiary was the product: no signing rail, no slippage handling, no retirement plumbing on your side. Default class was Regen City Forest Credits, fractional tonnes, hard-capped per call.
How the call was shaped (history; the dry run only reads the price)
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
expectedRecipient: "0x538aa4800ae2bd8e90556899514376ab96113a8e" }); // the published treasury: any other payee is refused
console.log(out.json.retire_tx, out.json.carbonmark_retirements_url);
While it ran, the claim was exactly the response: one confirmed retire transaction on Base, attributed to your beneficiary address, verifiable on Basescan and Carbonmark. Nothing larger. Past retirements stay verifiable on those sites.
≈ $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 plan 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.12 to the attestation · retire stage stopped 4 Aug 2026
The whole loop
Every live paid endpoint composed into one loop: a problem and a place become a bounded work plan ($0.10), a person or an agent does the work, your proof bundle is checked against the plan before you submit it ($0.01), and the onchain work settlement is independently attested ($0.01). The loop was built with a last stage, a carbon retirement under your name attached to the finished work ($0.25); that stage has been stopped since 4 August 2026. 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 # read only by the stopped retire stage, which still asks for it
node whole-loop.mjs # dry run: prices every stage, spends nothing
DRY_RUN=false node whole-loop.mjs # stage 1: buys the work plan
# …do the work, save the proof the plan 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 (the loop ends here today)
This script never claims work happened. It buys a plan, checks proof you captured, and attests a settlement transaction that must already exist. Its last stage, one confirmed retirement attributed to a beneficiary address, is stopped: carbon retirement has been stopped since 4 August 2026, so that final call returns 503 retire_lane_stopped and takes no charge. Past retirements stay verifiable on Basescan and Carbonmark.
whole-loop.mjs
cents per call · you fund the wallet
Run an agent with its own wallet
An agent that holds its own wallet and runs the whole loop by itself: a place and a problem become a priced plan, and cents of USDC go into work that settles onchain. You fund the wallet yourself, and the agent never hands its key to anyone. An earlier version of this recipe began with a free faucet from a protocol that has since ended, and that part is gone.
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… # a wallet you funded with a little USDC on Base
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 work protocol is a public contract on Base, and the paid endpoints are paid per call. Your agent keeps its own wallet.
whole-loop.mjs