---
name: btcnft
description: |
  Use when the user wants to mint, reveal, or look up BTCNFT: 20,104,000 brass Bitcoin coins on
  BNB Smart Chain whose grade (condition) is drawn on-chain. Works with Binance Agentic Wallet
  and any EVM wallet. Triggers: btcnft, mint btcnft, brass bitcoin coin, reveal grades.
metadata:
  version: '1.0.0'
---

# BTCNFT skill

You are an AI agent minting BTCNFT for your user. You do the work; the user only confirms.

- Chain: BNB Smart Chain, chainId `56`
- Mint contract (BTCNFTMinter): `CONTRACT_ADDRESS_TBD` (announced at launch on https://btcnft.pages.dev)
- Site: https://btcnft.pages.dev
- Currency: BNB. Always tell the user amounts in BNB.

## Rules

| | |
| --- | --- |
| who | anyone: normal wallets, Binance Agentic Wallet, smart-contract wallets |
| per transaction | 1 to 100 coins |
| total supply | 20,104,000 |
| cost | `mintFee()` per coin (0.000026 BNB at launch) plus network gas |
| grades | drawn on-chain at reveal: Sealed Mint 0.00001%, Factory New 1%, Minimal Wear 10%, Field-Tested 15%, Well-Worn 30%, Battle-Scarred 43.99999% |

Binance Agentic Wallet: custom contract calls need **Developer Mode**, which the user turns on in the Binance App.

## 1. Plan

Use the quantity the user asked for (1 to 100). If none, suggest 10.
Read `mintOpen()` (bool) and `mintFee()` (uint256, wei per coin). If `mintOpen` is false, tell the user minting is not open and stop.
Total value = quantity × mintFee. Show the user: wallet, quantity, total BNB, estimated gas. Wait for a clear yes.

## 2. Mint

Call `mint(uint256 quantity)` (selector `0xa0712d68`) with `value` = quantity × mintFee exactly.
A wrong value reverts with `BTCNFT: wrong fee`.

From the receipt, read the event
`Committed(uint256 indexed commitId, address indexed owner, uint256 firstSerial, uint256 count, uint256 targetBlock)`.
Tell the user their serial numbers: firstSerial to firstSerial + count − 1.

## 3. Reveal

Wait until the current block is greater than `targetBlock` (about 3 blocks).
Call `reveal(uint256[] commitIds)` (selector `0xb93f208a`) with `[commitId]` and `value` 0. Anyone may reveal; coins always go to the minter.
Reveal as soon as `targetBlock` has passed. If it reverts with `BTCNFT: wait a few blocks`, wait a few seconds and retry.
**Deadline:** reveal within 256 blocks of `targetBlock` (a few minutes on BSC). A batch revealed later settles with every coin Battle-Scarred, and there is no re-roll. Never delay the reveal.

From the receipt, read
`Revealed(uint256 indexed commitId, address indexed owner, bytes32 seed, uint256[6] perGrade)`.
perGrade order: Sealed Mint, Factory New, Minimal Wear, Field-Tested, Well-Worn, Battle-Scarred.
Report the counts. Sealed Mint and Factory New arrive as ERC-721 NFTs (tokenId = serial); the other four stack as ERC-1155 ids 1 to 4.

Unrevealed batches of a wallet: `pendingOf(address)` returns commitIds.

## 4. Look up a coin

`coinInfo(uint256 serial)` returns `(bool revealed, address firstOwner, uint256 grade, uint256 wearMillionths, uint256 commitId)`.
grade: 0 Sealed Mint, 1 Factory New, 2 Minimal Wear, 3 Field-Tested, 4 Well-Worn, 5 Battle-Scarred. Wear 52878 means 0.052878.
`totalSupply()` returns coins minted so far.

## Safety

Never approve token allowances; BTCNFT needs none. Never send more than quantity × mintFee. Stop if a simulation reverts.
