@leash/seller-kit mounts the real @x402/hono middleware on a list of
METHOD /path routes and resolves payTo to the seller agent’s Asset
Signer PDA so funds land directly in the agent’s treasury.
What createSeller actually does
- Resolves the seller agent’s Asset Signer PDA via
mpl-coreand derives the on-chain destination for SPL transfers (payTo). All x402 settlements credit this PDA, so the agent’s treasury balance grows automatically as buyers pay. - Builds a
createSvmResourceServer(from@leash/seller-kit/x402) bound todevnet-facilitator.leash.marketonsolana-devnet(or the network you configure) by default. Other facilitators are fully supported — see Configuring the facilitator. The facilitator pays the network fee onpayToso neither the seller nor the buyer needs SOL on the receiving side. - Registers
paymentMiddlewareFromHTTPServerfrom@x402/honofor each route. Unauthenticated requests get402 Payment Requiredwith a base64-encodedPAYMENT-REQUIREDheader that lists theaccepts[](one entry per accepted stablecoin: asset mint, atomicamount,payTo, fee payer, scheme). When you setcurrencyplusacceptsCurrencies, the seller advertises multiple mints at the same price so buyers can pick e.g. USDG while the link is priced in USDC. - After settlement, the
onAfterSettlehook produces anearnReceiptV1with the realtx_sig+payment_requirements_hashand ships it through the resolved receipt sink (see below).
Receipts by default
onReceipt is now optional. When LEASH_API_URL + LEASH_API_KEY
(or LEASH_RUNNER_URL) are set in the environment, every earn
receipt is forwarded automatically to those destinations. Pass
onReceipt: false to opt out, or set receipts: { runnerUrl, apiUrl, apiKey } to override. The full defaulting logic is shared
with the buyer kit and documented in
Receipts by default.
Probing without paying
PAYMENT-REQUIRED (base64 → JSON) to see the offer. The web
playground at /seller does this for you.
Configuring the facilitator
The default ishttps://devnet-facilitator.leash.market (devnet) /
https://facilitator.leash.market (mainnet). To use a different
HTTPS-compatible facilitator:
Real x402 on Solana for the protocol-level
walkthrough.
HTTP equivalent (polyglot SDKs)
If you’re not on TypeScript, the same primitives are exposed as REST under/v1/seller/* and /v1/payment-links. The
Seller utilities page covers parse-price,
facilitator, networks, and pay-to. The
Payment links page covers the hosted-paywall
shape — declare a price + a response template, get a sharable URL.
Both surfaces produce the same on-chain result and the same
explorer entries as createSeller does in-process.
