x402 protocol — handles minters warplet via @harmonybot
0 Followers
GET /api/resource → returns HTTP 402: { "version": "x402-1.0", "network": "base", "token": "USDC", "amount": "1.5605", "recipient": "minter", "grant": { "action": "mint", "token": "WARPLET", "tokenAddress": "0x699727F9E01A822EFdcf7333073f0461e5914b4E", "note": "Mint 1 Warplet NFT from Harmonybot resource." } }
WarpX402 bridges warplet, Every API call can now mint a unique NFT not as art, but as proof of participation in the machine economy.
* @title WarpletNFT * @notice ERC-721 with MINTER_ROLE. Backend (x402 server key) mints after payment. */ contract WarpletNFT is 0x699727F9E01A822EFdcf7333073f0461e5914b4E , AccessControl, Pausable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint256 public nextId;
Request → AI Agent or user accesses a resource (e.g., Harmonybot endpoint). Response → Server replies with HTTP 402 + payment metadata: Pay 0.00037 eth ETH / 1.5605 USDC to mint one Warplet NFT. Settlement → x402 verifies payment instantly (~200 ms). Mint → Smart contract on Base deploys and mints the unique Warplet NFT (metadata derived from Harmonybot generative output). Ownership → NFT is stored on-chain, representing a snapshot of that Harmonybot art at the moment of mint.