Skip to main content

Repository

API modules

A refill, end to end

  1. market.ts polls prices and market status from the RWA Data API.
  2. scheduler.ts reads the card’s USD1 balance from the chain and the agent wallet’s holdings.
  3. forecast.ts and refill.ts decide; the decision is logged.
  4. In live mode, packages/agent checks the session and Developer Mode, then baw market-order swap sells the stock (via USDT for Ondo) and baw wallet send sends USD1 to the card.
  5. The transaction hashes are saved on the decision.

Choices

  • No contracts of our own. Custody, the send limit, swaps and gasless payments are all Binance’s, BNB Chain’s or the issuer’s.
  • No smart account. The card is a plain EOA; B402 makes it gasless.
  • One agent, one card. baw is a CLI with one session per wallet and no HTTP API, so the hosted agent serves one card.