> ## Documentation Index
> Fetch the complete documentation index at: https://algorand-54fd52b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# WIF Quickstart

> Make a chat request with a user-authorized WIF payment on Robinhood Chain.

> **Current Robinhood rail:** WIF payments, owner-funded agent mandates and enabled marketplace APIs are available on Robinhood Chain. Marketplace listings require review; creator payouts use merchant-authorized transfers and on-chain reconciliation. Media and automatic WIF refunds remain unavailable. The remote MCP is keyless; local stdio MCP keeps its session key on the agent machine. A real local MCP task settled 0.821538290698537864 WIF through an owner-funded EIP-1271 mandate on Robinhood Chain on 11 November 2026. Its exact transfer, signed receipt and allowance reduction were independently checked. [Transaction](https://robinhoodchain.blockscout.com/tx/0x879e7e15f7b2cd4cd540f2e725ca3d3ce78ea552389588c6c95f539c35df43f3) · [Signed receipt](https://moltworldd.vercel.app/v1/receipts/req_uPG_4T8Lt9AlG3qS). The contract has not had an independent security audit.

## For users: connect a wallet

Direct wallet calls require WIF for payment and native ETH for a first-use Permit2 approval. WalletConnect requires a configured Reown project ID. For agent payments, use the owner-funded mandate and local stdio MCP described below. The owner key stays in the wallet.

**1. Connect and switch networks**

Open the [Moltworld Playground](https://moltworldd.vercel.app/playground), connect an injected or WalletConnect wallet, and switch to Robinhood Chain mainnet (`eip155:4663`).

**2. Choose a chat model and quote**

Submit a chat body to get a free quote. The quote shows the USD estimate and exact WIF amount derived from the live Robinhood Uniswap v4 pool state and Chainlink ETH/USD feed, with chain freshness and active-liquidity checks.

```bash theme={null}
curl -s https://moltworldd.vercel.app/v1/quote \
  -H 'Content-Type: application/json' \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hi"}],"max_tokens":200}'
```

**3. Review and authorize the call**

Submit the same body to the chat endpoint. The HTTP `402` challenge is authoritative. Review the token, network, recipient, and exact amount before your wallet signs it. Approve the exact WIF amount to Permit2 only when your wallet asks; that approval is a separate transaction.

**4. Receive the response and receipt**

After the signed retry succeeds, the response includes `Moltworld-Request-Id` and a signed `Moltworld-Receipt`. Use the request id with `GET /v1/receipts/{request_id}` to inspect the settlement.

## For developers: implement the x402 flow

Use an x402 EVM client that supports `ExactEvmScheme` and Permit2, or connect an injected EIP-1193 provider in your browser. The server returns a quote before payment and a quote-bound `Payment-Required` challenge for the exact request body.

```ts theme={null}
const body = {
  messages: [{ role: "user", content: "Write a haiku about receipts." }],
  max_tokens: 200,
};

// Free preflight.
const quote = await fetch("https://moltworldd.vercel.app/v1/quote", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ model: "gpt-4o", ...body }),
});
console.log(await quote.json());

// Your x402 EVM client performs this sequence:
// 1. POST the identical body to the chat endpoint.
// 2. Decode the 402 Payment-Required header.
// 3. Ask the injected EIP-1193 wallet to authorize ExactEvmScheme + Permit2.
// 4. Retry the identical body with Payment-Signature.
const res = await x402Client.fetch(
  "https://moltworldd.vercel.app/v1/models/gpt-4o/chat/completions",
  { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) },
);
```

The WIF contract and all payment details come from the 402 challenge and [`GET /health`](https://moltworldd.vercel.app/health); do not hard-code a recipient or amount. Keep the request body byte-for-byte identical between the unpaid 402 request and the paid retry.

## Agent mandates: live settlement

The [owner wizard](https://moltworldd.vercel.app/products/mandates) deploys, funds, arms, reads, revokes and withdraws from a pinned contract. Autonomous payment uses local stdio MCP and a separate session key within the owner-set limits. The remote MCP remains keyless. A real local MCP task settled 0.821538290698537864 WIF through an owner-funded EIP-1271 mandate on Robinhood Chain on 11 November 2026. Its exact transfer, signed receipt and allowance reduction were independently checked. [Transaction](https://robinhoodchain.blockscout.com/tx/0x879e7e15f7b2cd4cd540f2e725ca3d3ce78ea552389588c6c95f539c35df43f3) · [Signed receipt](https://moltworldd.vercel.app/v1/receipts/req_uPG_4T8Lt9AlG3qS). The contract has not had an independent security audit.

## Next

> [card] [Open the Playground](https://moltworldd.vercel.app/playground)
>
> Connect an injected wallet and authorize a chat call.

> [card] [Read machine-readable discovery](https://moltworldd.vercel.app/llms.txt)
>
> See the current network, token, supported surface, and unsupported features.

> [card] [Live WIF mandate setup](https://moltworldd.vercel.app/products/mandates)
>
> Owner-controlled mandates with verified mainnet settlement. Independent audit remains outstanding.

> [card] [WIF marketplace status](https://moltworldd.vercel.app/products/marketplace)
>
> Approved creator APIs support WIF checkout. Creator payouts require merchant-authorized transfers and on-chain verification.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.