{"openapi":"3.1.0","info":{"title":"Clash NFT Craft API","version":"1.1.0","description":"Preflight and paid relayed NFT burn or craft timer acceleration."},"servers":[{"url":"https://x402.clashofcoins.app/craft"}],"tags":[{"name":"craft","description":"Paid relayed NFT craft actions"}],"components":{"securitySchemes":{"x402PaymentSignature":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"Canonical x402 payment proof header"}}},"paths":{"/x402/config":{"get":{"summary":"Read x402 craft configuration","security":[],"responses":{"200":{"description":"JSON response"}}}},"/x402/quote":{"post":{"summary":"Preflight a craft action before x402 payment","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","user","nfts"],"properties":{"type":{"const":"burn"},"user":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nfts":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["contract","tokenId"],"properties":{"contract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"tokenId":{"type":"string","pattern":"^\\d+$"}}}}}},{"type":"object","additionalProperties":false,"required":["type","user"],"properties":{"type":{"const":"accelerate"},"user":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string","pattern":"^[1-9]\\d*$"}}}]},"examples":{"burn":{"value":{"type":"burn","user":"0x1111111111111111111111111111111111111111","nfts":[{"contract":"0x2222222222222222222222222222222222222222","tokenId":"1"}]}},"accelerate":{"value":{"type":"accelerate","user":"0x1111111111111111111111111111111111111111"}}}}}},"responses":{"200":{"description":"JSON response"},"400":{"description":"JSON response"}}}},"/x402/burn":{"post":{"summary":"Burn 1-20 approved NFTs after a 0.001 USDC x402 payment","security":[{"x402PaymentSignature":[]}],"x-payment-info":{"protocols":[{"x402":{"scheme":"exact","network":"eip155:84532","currency":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","payTo":"0x97b7f63Cb9f40a147775aa425589a334F7091E37"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"authMode":"paid","retryHeader":"PAYMENT-SIGNATURE","retryBodyMode":"reuse_original_json","recommendedClient":"@x402/fetch"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["user","nfts"],"properties":{"user":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nfts":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["contract","tokenId"],"properties":{"contract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"tokenId":{"type":"string","pattern":"^\\d+$"}}}}}},"example":{"user":"0x1111111111111111111111111111111111111111","nfts":[{"contract":"0x2222222222222222222222222222222222222222","tokenId":"1"}]}}}},"responses":{"200":{"description":"JSON response"},"202":{"description":"JSON response"},"402":{"description":"JSON response"},"403":{"description":"JSON response"},"409":{"description":"JSON response"}}}},"/x402/accelerate":{"post":{"summary":"Charge approved OWB after a 0.001 USDC x402 payment","security":[{"x402PaymentSignature":[]}],"x-payment-info":{"protocols":[{"x402":{"scheme":"exact","network":"eip155:84532","currency":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","payTo":"0x97b7f63Cb9f40a147775aa425589a334F7091E37"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"authMode":"paid","retryHeader":"PAYMENT-SIGNATURE","retryBodyMode":"reuse_original_json","recommendedClient":"@x402/fetch"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["user"],"properties":{"user":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string","pattern":"^[1-9]\\d*$"}}},"example":{"user":"0x1111111111111111111111111111111111111111"}}}},"responses":{"200":{"description":"JSON response"},"202":{"description":"JSON response"},"402":{"description":"JSON response"},"403":{"description":"JSON response"},"409":{"description":"JSON response"}}}},"/x402/actions/{paymentTx}":{"get":{"summary":"Read x402 craft action status","security":[],"parameters":[{"name":"paymentTx","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON response"},"202":{"description":"JSON response"},"404":{"description":"JSON response"}}}}}}