cpu_buy_lot
Purchase units from an open lot and deliver them to your cell with one atomic on-chain transaction. Specify the lot ID, waypoint chain, and quantity to buy.
Instructions
Buy units from an OPEN lot, delivered to your own cell, on-chain (needs a session). chain = [hub holding the lot, ...waypoints, your destination cell]. One atomic $CPU tx: seller price (value × pricePerUnit) + any foreign-hub transit fee, plus gas; the first buy auto-approves the sale exactly and the transit fee with ~10% headroom (a ceiling for on-chain fee drift, not a double charge). Preview the exact cost with cpu_quote_buy. Goods ship to your cell and credit only after arrival, when you cpu_finalize_delivery the returned deliveryId. Buying your own lot is allowed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Waypoint tokenIds [hub, ...waypoints, destination] — first node is the lot Hub, last is your own revealed cell where the goods are delivered. Scout waypoints with cpu_next_hops. | |
| lotId | Yes | The lot id to buy from (from list_lots / get_lot / get_markets). | |
| value | Yes | Units to buy, as a positive integer string (≤ the lot remaining). |