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

# Demo

> 22 copy-paste prompts to exercise every capability of the Yanga Wallet.

This page provides ready-to-use prompts you can paste directly into Claude Desktop (or any MCP client) to demonstrate the full system. Each prompt exercises a specific capability — from wallet management to autonomous x402 payments.

<Note>
  **Before you start:** Complete the [Quickstart](/quickstart) to have the MCP server running and at least one funded wallet available.
</Note>

***

## Two-Agent Network Demo

The flagship demonstration: deploy the **Merchant API** on one machine and connect an **AI Buyer** from a separate client. This proves true machine-to-machine commerce over a network.

<Note>
  **Network Requirement:** The Merchant's `localhost:3000` must be reachable by the Buyer. Options:

  * Two machines on the same Wi-Fi
  * A tunneling service like [Cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/)
  * Deploy the Merchant to a cloud provider (Render, Railway, etc.)
</Note>

### Setting Up the Merchant

<Steps>
  <Step title="Clone & Build">
    ```bash theme={null}
    git clone https://github.com/xavierScript/agent-economy-wallet.git
    cd agent-economy-wallet
    pnpm install && pnpm build
    ```
  </Step>

  <Step title="Configure Environment">
    ```env .env theme={null}
    WALLET_PASSPHRASE="your_secure_passphrase"
    MERCHANT_RECEIVER_ADDRESS="Your_Solana_Public_Key_Here"
    ```
  </Step>

  <Step title="Start & Expose">
    ```bash theme={null}
    node packages/mcp-server/dist/index.js
    ```

    If the Buyer is on a different network, expose port 3000:

    ```bash theme={null}
    cloudflared tunnel --url http://localhost:3000
    ```

    Copy the resulting URL — you'll use it in the prompts below.
  </Step>
</Steps>

### Setting Up the AI Buyer

<Steps>
  <Step title="Fund the Agent">
    Ensure the Buyer's wallet has Devnet SOL (for gas) and **Devnet USDC** to pay invoices.
  </Step>

  <Step title="Connect MCP Client">
    Point Claude Desktop at your local build:

    ```json theme={null}
    {
      "mcpServers": {
        "agent-economy-wallet": {
          "command": "node",
          "args": ["/absolute/path/to/packages/mcp-server/dist/index.js"]
        }
      }
    }
    ```
  </Step>

  <Step title="Restart">
    Restart Claude/Cursor to load the wallet and payment tools.
  </Step>
</Steps>

### Two-Agent Prompts

Replace `<MERCHANT_URL>` with your Cloudflared URL or local IP.

**Scenario A — Buy Token Pricing Data:**

> "There is an external data provider running at `<MERCHANT_URL>/api/fetch-price/SOL`. Please send a GET request to that endpoint to securely get the Solana price.
>
> If the API returns a 402 Payment Required response, parse the invoice details from the error response. Use your `pay_x402` tool to fulfill the invoice payment of Devnet USDC to the provided merchant address, and obtain the transaction signature.
>
> Once paid, immediately retry your HTTP request appending the signature in the `x-receipt-signature` header, and tell me the price."

**Scenario B — Buy a Security Rug-Check:**

> "There is an external data provider running at `<MERCHANT_URL>/api/analyze-token/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`. Please send a GET request to that endpoint to perform a security assessment on this token.
>
> If the API returns a 402 Payment Required response, parse the invoice details from the error response. Use your `pay_x402` tool to fulfill the invoice payment of Devnet USDC to the provided merchant address, and obtain the transaction signature.
>
> Once paid, immediately retry your HTTP request appending the signature in the `x-receipt-signature` header, and summarize the security assessment."

***

## Full Capability Demo Prompts

Beyond x402 payments, the system is a fully-featured on-chain infrastructure. Below are 22 prompts that cover every capability.

<Note>
  Replace `[WALLET_ID]`, `[RECIPIENT_ADDRESS]`, and `[MINT_ADDRESS]` with actual values from your agent.
</Note>

### System & Wallet Management

**1. System Health Check**

> Check the current system status of the Agentic Wallet MCP server and report: Which Solana cluster is active, whether a master funding wallet is configured, how many agent wallets are registered, and the full system configuration.

**2. Create a Funded Agent Wallet**

> Create a new agent wallet with the label "demo-agent" and report: The wallet ID and public key, whether it was automatically funded from the master wallet (and amount), the Solana Explorer link, and confirmation that a spending policy was attached.

**3. List All Managed Wallets**

> List all wallets currently managed by this system. For each wallet, display its ID, label, public key, current SOL balance, and creation date.

**4. Inspect a Wallet Balance**

> Retrieve the full balance breakdown for wallet `[WALLET_ID]`. Include the SOL balance and every SPL token the wallet holds, with mint addresses and human-readable amounts.

**5. Inspect Wallet Policy and Usage**

> Read the full details and active spending policy for wallet `[WALLET_ID]` and display: The per-transaction SOL limit, the hourly transaction rate limit, the daily SOL spending cap, and how many of today's allowances have been consumed.

### On-Chain Execution & Guardrails

**6. Send SOL**

> Send 0.01 SOL from wallet `[WALLET_ID]` to address `[RECIPIENT_ADDRESS]`. Return the transaction signature and Solana Explorer link for verification.

**7. Guardrail Enforcement — Blocked by Policy**

> Attempt to send 5 SOL from wallet `[WALLET_ID]` to address `[RECIPIENT_ADDRESS]`. The wallet's policy enforces a 2 SOL per-transaction limit. Demonstrate whether the transaction is blocked before it reaches the network and what error is returned.

**8. Write an On-Chain Memo**

> Write the following memo on-chain using wallet `[WALLET_ID]`: "Agentic Wallet — autonomous on-chain action verified". Return the transaction signature and Solana Explorer link.

**9. Create an SPL Token Mint**

> Using wallet `[WALLET_ID]`, create a new SPL token mint with 9 decimal places. The wallet should be set as the mint authority. Return the mint address.

**10. Mint Tokens**

> Mint 1,000,000 tokens from mint `[MINT_ADDRESS]` into wallet `[WALLET_ID]`. Retrieve the updated balance afterward and confirm the tokens were received.

**11. Transfer SPL Tokens**

> Transfer 100 tokens of mint `[MINT_ADDRESS]` from wallet `[WALLET_ID]` to address `[RECIPIENT_ADDRESS]`, using 9 decimals. Return the transaction signature.

### Discovery & Marketplace

**12. Discover Registered Merchants**

> Query the on-chain agent registry to discover all registered merchants. For each merchant, display its name, manifest URL, wallet address, and registration timestamp.

**13. Read a Merchant Manifest**

> Read the service manifest from a discovered merchant. Display all available services, their pricing, the accepted payment token, and the merchant's description.

**14. Check Merchant Reputation**

> Check the reputation of a merchant at their `/reputation` endpoint. Report their success rate, total transactions, and overall trust score.

### Auditing & Reporting

**15. Global Audit Log**

> Retrieve the 20 most recent entries from the global audit log. For each entry, display the timestamp, action type, wallet ID, and outcome. Highlight any policy violations or blocked transactions.

**16. Per-Wallet Audit History**

> Read the full audit history for wallet `[WALLET_ID]`. List every action it has taken — SOL transfers, policy checks, failed attempts, and the initial auto-funding event.

**17. Security Audit (MCP Prompt)**

> Run a full security audit of this Agentic Wallet deployment using the `security_audit` prompt. Cover policy violations, unusual transaction patterns, blocked transactions, and an overall security posture assessment.

**18. Daily Operations Report (MCP Prompt)**

> Generate a full daily operations report using the `daily_report` prompt. Include total transactions, total SOL moved, blocked policy violations, and any anomalies requiring operator review.

**19. Risk Assessment (MCP Prompt)**

> Run a risk assessment on wallet `[WALLET_ID]` using the `risk_assessment` prompt. Evaluate current balances against active policy limits, calculate remaining daily headroom, and recommend adjustments.

### Data & x402 Payments

**20. Probe an x402 Resource**

> Check whether `http://localhost:3000/api/analyze-token/SOL` requires x402 payment. If a payment is required, report the price, accepted payment token, and target network. Do not submit any payment at this stage.

**21. Autonomous x402 Payment**

> Access `http://localhost:3000/api/analyze-token/SOL` using wallet `[WALLET_ID]`. Handle the full x402 payment flow autonomously — discover the price, execute the payment, and return the resource content along with the payment transaction signature.

**22. Fetch Live Token Prices**

> Fetch the current USD prices for SOL, USDC, USDT, BONK, and JUP using the `fetch_prices` tool. Report each token's price and the data source.

### Gasless Kora Integration

<Note>
  The following prompts require a running [Kora node](/infra/kora). If Kora is not configured, these will fall back to standard (gas-paying) transactions.
</Note>

**23. Gasless SOL Transfer via Kora**

> Send 0.005 SOL from wallet `[WALLET_ID]` to address `[RECIPIENT_ADDRESS]`. This transfer should be gasless via the Kora paymaster node. Confirm the transaction landed and report: The signature, whether the agent wallet's SOL balance decreased by exactly 0.005 SOL (proving it did not pay gas), and the audit log entry showing `gasless: true`.

**24. Gasless On-Chain Memo via Kora**

> Write the following memo on-chain using wallet `[WALLET_ID]`: "Gasless memo — Kora paymaster sponsoring network fees". Confirm the transaction was gasless (agent paid no SOL for gas) and return the transaction signature.

**25. Verify Kora Gasless Audit Trail**

> Retrieve the most recent audit log entries for wallet `[WALLET_ID]`. Identify all entries where `gasless` is true and `feePayer` is "kora". Summarize the total SOL moved gaslessly vs self-paid.

***

## Quick Reference

| #  | Capability           |                    MCP Tool / Resource | What it proves                   |
| -- | -------------------- | -------------------------------------: | -------------------------------- |
| 1  | System health        |        `get_status`, `system://status` | Server liveness, resource layer  |
| 2  | Create funded wallet |                        `create_wallet` | Auto-funding, policy-at-creation |
| 3  | List wallets         | `list_wallets`, `wallet://all-wallets` | Multi-wallet management          |
| 4  | Inspect balance      |                          `get_balance` | SOL + SPL multi-asset balances   |
| 5  | Wallet policy        |        `get_policy`, `wallet://policy` | Policy visibility, live counters |
| 6  | Send SOL             |                             `send_sol` | Policy-enforced transfer         |
| 7  | Blocked by guardrail |                  `send_sol` (rejected) | Hard enforcement — no override   |
| 8  | On-chain memo        |                           `write_memo` | SPL Memo, immutable provenance   |
| 9  | Create token mint    |                    `create_token_mint` | Agent-controlled mint authority  |
| 10 | Mint tokens          |                          `mint_tokens` | SPL token supply issuance        |
| 11 | Transfer SPL tokens  |                           `send_token` | SPL transfer, ATA handling       |
| 12 | Discover merchants   |                    `discover_registry` | On-chain registry scan           |
| 13 | Read manifest        |                        `read_manifest` | Service + pricing discovery      |
| 14 | Check reputation     |                     `check_reputation` | Trust evaluation                 |
| 15 | Global audit log     |       `get_audit_logs`, `audit://logs` | Cross-wallet audit trail         |
| 16 | Per-wallet audit     |                  `audit://wallet-logs` | Scoped wallet history            |
| 17 | Security audit       |                `security_audit` prompt | Compliance review                |
| 18 | Daily report         |                  `daily_report` prompt | Operator reporting               |
| 19 | Risk assessment      |               `risk_assessment` prompt | Exposure analysis                |
| 20 | Probe x402           |                           `probe_x402` | Cost discovery without payment   |
| 21 | Pay x402             |                     `pay_x402_invoice` | Autonomous micropayment loop     |
| 22 | Fetch prices         |                         `fetch_prices` | Jupiter Price API                |
| 23 | Gasless SOL transfer |                      `send_sol` + Kora | Kora pays gas                    |
| 24 | Gasless memo         |                    `write_memo` + Kora | Any tx is gasless with Kora      |
| 25 | Gasless audit trail  |                  `audit://wallet-logs` | Forensic gasless vs self-paid    |
