Skip to content

v0.1.2

Latest

Choose a tag to compare

@mdlog mdlog released this 02 Jul 13:33

Published to npm as @mdlog/agentgate@0.1.2.

Changes

  • New command: agentgate buy <id> — the buyer side in one command. Runs the full x402 exchange: fetch the 402 invoice, pay it with a native CSPR transfer carrying the invoice nonce as transfer_id, retry with the X-PAYMENT proof. Response body goes to stdout (pipeable); the payment receipt (price, deploy hash, explorer link, settlement) goes to stderr.
  • --max <cspr> budget cap — refuses any invoice priced above it (PRICE_EXCEEDED), checked against both the on-chain price (before any HTTP) and the 402 invoice (before paying). Unknown (SERVICE_NOT_FOUND) and paused (SERVICE_INACTIVE) services fail fast before a single mote moves; non-JSON --body is rejected up front.
  • Buyer signer per mode: MOCK_BUYER_ACCOUNT (mock), --pem / BUYER_SIGNER_PEM_PATH (live) — for buy, --pem means the buyer key.
  • @agentgate/client is now inlined into the published bundle, keeping npx self-contained.
  • Docs: full buy reference on the docs site, buyer-guide one-liner, docs/BUY-QUICKSTART.md.
  • No contract change — payment is a plain native transfer; the deployed registry is untouched.

Install

npx @mdlog/agentgate@latest buy 1 --pem ./buyer.pem --max 5