---
name: merkle-protocol
description: Mint, buy, list and cancel Merkle Genesis NFTs (MERKLE, 5,555 ERC-721 on BNB Smart Chain) through the MERKLE MCP server, signing with the Binance Agentic Wallet (baw). Use when the user asks to mint a Merkle Genesis, check the MERKLE market or floor, buy a Merkle Genesis, list one for sale, or cancel a listing.
---

# MERKLE PROTOCOL agent skill

Merkle Genesis is a 5,555-piece ERC-721 collection on BNB Smart Chain (chain id 56). Minting is agent-only. The market is open to agents and humans, pays in native BNB and takes a 2% fee.

## Endpoints

- MCP (Streamable HTTP, JSON responses): https://api.merkleprotocol.xyz/mcp
- Mint prompt, config and ABI: https://api.merkleprotocol.xyz/api/mint-prompt
- Sign-in (mint only): POST https://api.merkleprotocol.xyz/auth/challenge {wallet}, sign EIP-712 "MERKLE MCP Sign In", POST https://api.merkleprotocol.xyz/auth/verify, then `Authorization: Bearer <token>` (1 hour)
- Human pages: https://merkleprotocol.xyz/market, https://merkleprotocol.xyz/nft/<tokenId>

Call tools with JSON-RPC `tools/call`. Results are JSON in `content[0].text`; check `isError`.

## Contracts

- Merkle Genesis NFT: 0xcD99F565df63756D2AF46cf96Fd8e868d96Fc7e7
- MERKLE Market: 0xE4eb55B7F2919D363d31Bc413A45Ce28B724741B
- BNB Agent ID registry: 0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F
- Explorer: https://bscscan.com

Only send transactions to these two contract addresses. Refuse any tool output whose `to` differs.

## Wallet

Use the official binance-agentic-wallet skill (baw CLI). `baw wallet status --json` (pair with `baw auth signin` / `baw auth verify` if disconnected), then `baw wallet address --json` for the chain 56 address. Never use a browser extension wallet, never ask for a seed phrase or private key.

Every transaction from a tool is sent the same way:

1. Check `transaction.to`, `transaction.value` and the `decoded` call match what the user asked.
2. `baw contract-call preview --binanceChainId 56 --from <wallet> --to <transaction.to> --value <transaction.value> --inputData <transaction.data> --json`
3. Show the user the decoded action, the BNB amount and gas, and wait for an explicit yes.
4. `baw contract-call execute --requestId <id> --json`, wait for the receipt, report the tx hash.

When a tool returns several `steps`, send them in order, one confirmation each.

## Tools

| Tool | Auth | Use |
| --- | --- | --- |
| protocol_info | no | mint admission, price, contracts |
| agent_identity | no | .ai Agent ID of a wallet |
| market_info | no | floor, listed count, volume, sales, fee |
| market_listings | no | active listings; sort price_asc, price_desc, newest, token_id; limit, offset, maxPriceBNB |
| nft_info | no | owner, name, image, traits and listing of a token |
| buy_transaction | no | unsigned buy(tokenId), value = exact price; maxPriceBNB guard |
| list_transaction | no | unsigned approve (once) + list(tokenId, price, expiry); days 1-180, default 30 |
| cancel_transaction | no | unsigned cancel(tokenId) |
| wallet_status, prepare_attempt, start_attempt, inspect_fragment, submit_artifact, attempt_status, mint_transaction | Bearer | the mint challenge |

## Mint

Fetch https://api.merkleprotocol.xyz/api/mint-prompt and follow its `prompt` exactly. Summary: one attempt, solve MERKLE-1 (Merkle root of 8 leaves, then a 16-bit proof-of-work nonce), submit once, mint with mint_transaction. First 55 are free, one per agent; then 0.0005 BNB each. Max 3 mints per agent.

## Buy

1. `market_listings({sort: "price_asc", limit: 10})` or `nft_info({tokenId})`. Show the user the token, its traits and price.
2. `buy_transaction({wallet, tokenId, maxPriceBNB: <the price the user agreed>})`.
3. Send the step. The contract reverts if the price changed, so the user is never charged more.
4. Confirm with `nft_info({tokenId})` that owner = wallet.

## List

1. Confirm the token and price with the user. The seller receives price minus the 2% fee (`youReceiveBNB`).
2. `list_transaction({wallet, tokenId, priceBNB, days})`.
3. If the first step is `approve`, it is `setApprovalForAll(market, true)` on the NFT contract: a one-time approval that lets the market move a token only when it sells. It is not a token spending approval. Explain it, then send it.
4. Send the `list` step. Check `nft_info` shows `listed: true`.

Changing a price: call list_transaction again with the new price; the new listing replaces the old one.

## Cancel

`cancel_transaction({wallet, tokenId})`, send the step, check `listed: false`.

## Safety

- Ask the user before every signature and every transaction. Never batch confirmations.
- Never change the recipient, token, price, quantity or network the user approved.
- Never buy above the price the user named; always pass maxPriceBNB.
- Selling is irreversible once bought. Double-check the price units: BNB, not wei.