{"x402Version":2,"apiVersion":"1.3.0","versionedHosts":{"latest":"x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app","current":"v1.x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app","note":"The bare host serves the latest release. Pin v1.x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app to stay on this major across future releases. Prior majors keep answering at their own v<major>.x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app host."},"service":{"name":"Klima Retirement Aggregator","description":"Programmatic carbon-credit retirement via Klima Protocol on Base. Single multiplexed URL exposes 6 actions: discover (list credits), quote (live price), prepare/retire (encode calldata for self-submitted retirement), prepare-auth (build the EIP-712 authorization to sign for a relayed retirement), actions/retire (relay a signed authorization on-chain and return the certificate), certificate (resolve the Carbonmark certificate URL). The read/encode actions are free; actions/retire performs a non-custodial retirement funded by the caller's signed authorization (the service never custodies funds).","operator":"KlimaDAO","homepage":"https://www.klimalabs.com/x402-endpoint","documentation":"https://github.com/KlimaDAO/Klima-Protocol-x402-MCP-documentation/blob/main/README.md","openapi":"https://x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app/openapi.json","changelog":"https://x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app/.well-known/x402-changelog.json","errors":"https://x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app/.well-known/x402-errors.json","docs":"https://x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app/.well-known/x402-docs.json"},"errorEnvelope":{"shape":{"error":"string. the code, see the errors document","message":"string. human-readable, present on most codes","x402FacilitatorVersion":"number"},"document":"https://x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app/.well-known/x402-errors.json"},"endpoints":[{"url":"https://x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app/api","method":"POST","description":"Klima Retirement Aggregator action multiplexer. POST a JSON body with an `action` field.","actions":[{"name":"discover","fee":"0","description":"List retirable supply from both sources, each entry tagged with `source`: `carbonClasses[]` (protocol, AMM-priced, retired by `carbonClass`) and `marketplaceListings[]` (one seller's fixed ask, retired by `listingId`). Filters `source`, `carbonClass`, `creditToken`, `project`, `vintage`, `country`, `category`, `methodology` and `maxUsdcPricePerTonne` are AND-combined across both arrays; a per-credit filter also trims a matched class to its matching credits.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"discover"},"source":{"type":"string","enum":["protocol","marketplace"]},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"project":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}]},"credit":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}]},"vintage":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+$"}]},"country":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}]},"category":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}]},"methodology":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}]},"maxUsdcPricePerTonne":{"type":"string","minLength":1}},"additionalProperties":false,"required":["action"]},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"carbonClasses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","const":"protocol"},"carbonClassId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"methodologies":{"type":"array","items":{}},"isRegistered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"priceUsdcPerTonne":{"anyOf":[{"type":"string"},{"type":"null"}]},"priceUsdcPerTonneFormatted":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"type":"array","items":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"creditsDetailed":{"type":"array","items":{"type":"object","properties":{"tokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenStandard":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenId":{"type":"number"},"registry":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"creditId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectName":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"methodologies":{"type":"array","items":{"type":"string"}},"isExAnte":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"vintage":{"anyOf":[{"type":"number"},{"type":"null"}]},"liquidity":{"type":"string"},"liquidityFormatted":{"type":"string"}},"required":["tokenAddress","tokenStandard","tokenId","registry","projectId","projectKey","creditId","projectName","country","region","category","methodologies","isExAnte","vintage","liquidity","liquidityFormatted"],"additionalProperties":false}},"minRetirementTonnes":{"type":"string"},"minRetirementTonnesFormatted":{"type":"string"},"minRetirementNote":{"type":"string"}},"required":["source","carbonClassId","name","category","country","region","methodologies","isRegistered","priceUsdcPerTonne","priceUsdcPerTonneFormatted","credits","creditsDetailed","minRetirementTonnes","minRetirementTonnesFormatted","minRetirementNote"],"additionalProperties":false}},"marketplaceListings":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","const":"marketplace"},"listingId":{"type":"string"},"seller":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenId":{"type":"number"},"tokenStandard":{"anyOf":[{"type":"string"},{"type":"null"}]},"carbonClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"registry":{"anyOf":[{"type":"string"},{"type":"null"}]},"vintage":{"anyOf":[{"type":"number"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"creditId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectName":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"methodologies":{"type":"array","items":{"type":"string"}},"isExAnte":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"priceUsdcPerTonne":{"anyOf":[{"type":"string"},{"type":"null"}]},"priceUsdcPerTonneFormatted":{"anyOf":[{"type":"string"},{"type":"null"}]},"leftToSell":{"type":"string"},"leftToSellFormatted":{"type":"string"},"minFill":{"type":"string"},"minFillFormatted":{"type":"string"},"expiration":{"type":"string"},"expirationIso":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["source","listingId","seller","creditToken","tokenId","tokenStandard","carbonClassId","registry","vintage","projectId","projectKey","creditId","projectName","country","region","category","methodologies","isExAnte","priceUsdcPerTonne","priceUsdcPerTonneFormatted","leftToSell","leftToSellFormatted","minFill","minFillFormatted","expiration","expirationIso"],"additionalProperties":false}},"filterDiagnostics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"matched":{"type":"number"},"excludedNoMatch":{"type":"number"},"excludedAttributeNull":{"type":"number"}},"required":["matched","excludedNoMatch","excludedAttributeNull"],"additionalProperties":false}},"marketplaceEnabled":{"type":"boolean"},"contracts":{"type":"object","properties":{"retirementAggregator":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"klimaProtocolAAM":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"kVCM":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"USDC":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["retirementAggregator","klimaProtocolAAM","kVCM","USDC"],"additionalProperties":false},"supportedInputTokens":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"decimals":{"type":"number"}},"required":["symbol","address","decimals"],"additionalProperties":false}},"supportedCreditTypes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"standard":{"type":"string"},"bridge":{"type":"string"},"status":{"type":"string"}},"required":["type","standard","bridge"],"additionalProperties":false}},"x402FacilitatorVersion":{"type":"number"},"note":{"type":"string"}},"required":["carbonClasses","marketplaceListings","marketplaceEnabled","contracts","supportedInputTokens","supportedCreditTypes","x402FacilitatorVersion","note"],"additionalProperties":false},"errorCodes":["invalid_json","unknown_action","not_found","document_not_found","schema_validation","internal_error"]},{"name":"quote","fee":"0","description":"Live price quote for a retirement. Address the supply with exactly one of `carbonClass` (protocol, AMM-priced) or `listingId` (a marketplace listing, filled at the seller's fixed `unitPrice`); passing both or neither is a schema error. Free to call. Returns atomic + decimal-formatted price/maxInput plus the on-chain protocol fee (fee/feeFormatted) folded into total — the fee the retirement will incur on-chain, disclosed before you commit. `suggestedMaxInput` carries a slippage buffer on the protocol path and none on a listing, which fills at `unitPrice` or reverts.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"quote"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","minLength":1},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"listingId":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"credit":{"type":"string","pattern":"^[A-Za-z]+-[A-Za-z0-9]+-\\d+$"},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"vintage":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+$"}]},"tokenId":{"type":"string","minLength":1}},"required":["action","chainId","inputToken","amount"]},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tonnes":{"type":"string"},"tonnesFormatted":{"type":"string"},"retirementPrice":{"type":"string"},"retirementPriceFormatted":{"type":"string"},"fee":{"type":"string"},"feeFormatted":{"type":"string"},"total":{"type":"string"},"totalFormatted":{"type":"string"},"suggestedMaxInput":{"type":"string"},"suggestedMaxInputFormatted":{"type":"string"},"pricePerTonne":{"type":"string"},"pricePerTonneFormatted":{"type":"string"},"maxUsdcPricePerTonne":{"type":"string"},"maxUsdcPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"slippageBps":{"type":"number"},"humanSummary":{"type":"string"},"resolvedCredit":{"type":"object","properties":{"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenId":{"type":"number"},"vintage":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["creditToken","tokenId","vintage"],"additionalProperties":false},"alternatives":{"type":"array","items":{"type":"object","properties":{"tokenId":{"type":"number"},"vintage":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tokenId","vintage"],"additionalProperties":false}}},"required":["tonnes","tonnesFormatted","retirementPrice","retirementPriceFormatted","fee","feeFormatted","total","totalFormatted","suggestedMaxInput","suggestedMaxInputFormatted","pricePerTonne","pricePerTonneFormatted","maxUsdcPricePerTonne","maxUsdcPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","slippageBps","humanSummary","resolvedCredit","alternatives"],"additionalProperties":false},"errorCodes":["invalid_json","unknown_action","not_found","document_not_found","schema_validation","internal_error","unsupported_chain_id","unsupported_input_token","no_candidates","credit_not_found","credit_ambiguous","vintage_not_found","insufficient_liquidity","amount_not_whole_tonnes","amount_below_increment","contract_revert","listing_not_found","listing_expired","below_min_fill","insufficient_listing_supply","marketplace_requires_usdc"]},{"name":"prepare/retire","fee":"0","description":"Encode calldata + ERC-20 approval instructions for a single self-submitted retirement (caller signs and broadcasts the tx with their own wallet). Free to call, but the encoded retirement carries an on-chain protocol fee (max($0.01 USDC floor, feeBps% of retirement cost)) that the Settlement Contract collects when the caller broadcasts — disclosed in the response `quote` (fee/feeFormatted/total). Off-chain only — does not broadcast. GET alias: /api/prepare/retire.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"prepare/retire"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","minLength":1},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"listingId":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"credit":{"type":"string","pattern":"^[A-Za-z]+-[A-Za-z0-9]+-\\d+$"},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"vintage":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+$"}]},"tokenId":{"type":"string","minLength":1},"maxInputTokenIn":{"type":"string","minLength":1},"details":{"type":"object","properties":{"retiringAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"retiringEntityString":{"type":"string"},"beneficiaryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"beneficiaryString":{"type":"string"},"retirementMessage":{"type":"string"},"beneficiaryLocation":{"type":"string"},"consumptionCountryCode":{"type":"string"},"consumptionPeriodStart":{"anyOf":[{"type":"string"},{"type":"number"}]},"consumptionPeriodEnd":{"anyOf":[{"type":"string"},{"type":"number"}]}},"additionalProperties":false}},"required":["action","chainId","inputToken","amount"],"additionalProperties":false},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"chain":{"type":"string"},"transactions":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"value":{"type":"string"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]}},"required":["step","to","value","data","chainId"],"additionalProperties":false}},"quote":{"type":"object","properties":{"tonnes":{"type":"string"},"tonnesFormatted":{"type":"string"},"retirementPrice":{"type":"string"},"retirementPriceFormatted":{"type":"string"},"fee":{"type":"string"},"feeFormatted":{"type":"string"},"total":{"type":"string"},"totalFormatted":{"type":"string"},"suggestedMaxInput":{"type":"string"},"suggestedMaxInputFormatted":{"type":"string"},"pricePerTonne":{"type":"string"},"pricePerTonneFormatted":{"type":"string"},"maxUsdcPricePerTonne":{"type":"string"},"maxUsdcPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"slippageBps":{"type":"number"},"humanSummary":{"type":"string"}},"required":["tonnes","tonnesFormatted","retirementPrice","retirementPriceFormatted","fee","feeFormatted","total","totalFormatted","suggestedMaxInput","suggestedMaxInputFormatted","pricePerTonne","pricePerTonneFormatted","maxUsdcPricePerTonne","maxUsdcPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","slippageBps","humanSummary"],"additionalProperties":false},"approvalRequired":{"type":"boolean","const":true},"approvalInstructions":{"type":"object","properties":{"token":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"spender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string"},"amountFormatted":{"type":"string"},"note":{"type":"string"}},"required":["token","spender","amount","amountFormatted","note"],"additionalProperties":false}},"required":["to","data","chainId","chain","transactions","quote","approvalRequired","approvalInstructions"],"additionalProperties":false},"errorCodes":["invalid_json","unknown_action","not_found","document_not_found","schema_validation","internal_error","unsupported_chain_id","unsupported_input_token","no_candidates","credit_not_found","credit_ambiguous","vintage_not_found","insufficient_liquidity","amount_not_whole_tonnes","amount_below_increment","puro_details_required","contract_revert","listing_not_found","listing_expired","below_min_fill","insufficient_listing_supply","marketplace_requires_usdc"]},{"name":"prepare-auth","fee":"0","description":"Build the EIP-712 authorization a caller signs for a relayed retirement: returns typedData (EIP-3009 for USDC, EIP-2612 permit for kVCM) plus a ready-to-send actionsRetireRequest. Address the supply with exactly one of `carbonClass` or `listingId`; marketplace listings settle in USDC only, and their authorizations expire in 5 minutes rather than an hour because the seller can cancel or reprice. Sign typedData, fill authPayload.{v,r,s}, then POST actions/retire. Off-chain only. GET alias: /api/prepare-auth.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"prepare-auth"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","minLength":1},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"listingId":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"credit":{"type":"string","pattern":"^[A-Za-z]+-[A-Za-z0-9]+-\\d+$"},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"vintage":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+$"}]},"tokenId":{"type":"string","minLength":1},"maxInputTokenIn":{"type":"string","minLength":1},"details":{"type":"object","properties":{"retiringAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"retiringEntityString":{"type":"string"},"beneficiaryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"beneficiaryString":{"type":"string"},"retirementMessage":{"type":"string"},"beneficiaryLocation":{"type":"string"},"consumptionCountryCode":{"type":"string"},"consumptionPeriodStart":{"anyOf":[{"type":"string"},{"type":"number"}]},"consumptionPeriodEnd":{"anyOf":[{"type":"string"},{"type":"number"}]}},"additionalProperties":false},"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"timeToLiveSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"beneficiaryIsPayer":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"required":["action","chainId","inputToken","amount","from"],"additionalProperties":false},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scheme":{"type":"string","enum":["eip3009","eip2612"]},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"chain":{"type":"string"},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"spender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"authValue":{"type":"string"},"authValueFormatted":{"type":"string"},"executorGas":{"type":"string"},"executorGasFormatted":{"type":"string"},"quote":{"type":"object","properties":{"tonnes":{"type":"string"},"tonnesFormatted":{"type":"string"},"retirementPrice":{"type":"string"},"retirementPriceFormatted":{"type":"string"},"fee":{"type":"string"},"feeFormatted":{"type":"string"},"total":{"type":"string"},"totalFormatted":{"type":"string"},"suggestedMaxInput":{"type":"string"},"suggestedMaxInputFormatted":{"type":"string"},"pricePerTonne":{"type":"string"},"pricePerTonneFormatted":{"type":"string"},"maxUsdcPricePerTonne":{"type":"string"},"maxUsdcPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"slippageBps":{"type":"number"},"humanSummary":{"type":"string"}},"required":["tonnes","tonnesFormatted","retirementPrice","retirementPriceFormatted","fee","feeFormatted","total","totalFormatted","suggestedMaxInput","suggestedMaxInputFormatted","pricePerTonne","pricePerTonneFormatted","maxUsdcPricePerTonne","maxUsdcPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","slippageBps","humanSummary"],"additionalProperties":false},"resolvedCredit":{"type":"object","properties":{"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenId":{"type":"number"},"vintage":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["creditToken","tokenId","vintage"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}},"primaryType":{"type":"string"},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["domain","types","primaryType","message"],"additionalProperties":false},"actionsRetireRequest":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"onChainDetails":{"type":"object","properties":{"retiringAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"retiringEntityString":{"type":"string"},"beneficiaryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"beneficiaryString":{"type":"string"},"retirementMessage":{"type":"string"},"beneficiaryLocation":{"type":"string"},"consumptionCountryCode":{"type":"string"},"consumptionPeriodStart":{"type":"string"},"consumptionPeriodEnd":{"type":"string"}},"required":["retiringAddress","retiringEntityString","beneficiaryAddress","beneficiaryString","retirementMessage","beneficiaryLocation","consumptionCountryCode","consumptionPeriodStart","consumptionPeriodEnd"],"additionalProperties":false},"note":{"type":"string"},"x402FacilitatorVersion":{"type":"number"}},"required":["scheme","chainId","chain","inputToken","spender","authValue","authValueFormatted","executorGas","executorGasFormatted","quote","resolvedCredit","typedData","actionsRetireRequest","onChainDetails","note","x402FacilitatorVersion"],"additionalProperties":false},"errorCodes":["invalid_json","unknown_action","not_found","document_not_found","schema_validation","internal_error","unsupported_chain_id","unsupported_input_token","no_candidates","credit_not_found","credit_ambiguous","vintage_not_found","insufficient_liquidity","amount_not_whole_tonnes","amount_below_increment","puro_details_required","attribution_required","contract_revert","listing_not_found","listing_expired","below_min_fill","insufficient_listing_supply","marketplace_requires_usdc","gas_estimate_unavailable"]},{"name":"actions/retire","fee":"variable","description":"Relay a caller-signed authorization on-chain (non-custodial: funds go directly to the settlement contract, the service only relays) and return the retirement certificate. Cost is the live retirement price + on-chain protocol fee + executor gas, all funded by the signed authorization. Omit authPayload to receive a 402 challenge (the authorization to sign, same shape as prepare-auth); include the signed authPayload to execute.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"actions/retire"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","minLength":1},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"listingId":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"credit":{"type":"string","pattern":"^[A-Za-z]+-[A-Za-z0-9]+-\\d+$"},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"vintage":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+$"}]},"tokenId":{"type":"string","minLength":1},"maxInputTokenIn":{"type":"string","minLength":1},"details":{"type":"object","properties":{"retiringAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"retiringEntityString":{"type":"string"},"beneficiaryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"beneficiaryString":{"type":"string"},"retirementMessage":{"type":"string"},"beneficiaryLocation":{"type":"string"},"consumptionCountryCode":{"type":"string"},"consumptionPeriodStart":{"anyOf":[{"type":"string"},{"type":"number"}]},"consumptionPeriodEnd":{"anyOf":[{"type":"string"},{"type":"number"}]}},"additionalProperties":false},"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"timeToLiveSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"beneficiaryIsPayer":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"authPayload":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]},"validAfter":{"anyOf":[{"type":"string"},{"type":"number"}]},"validBefore":{"anyOf":[{"type":"string"},{"type":"number"}]},"nonce":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"signature":{"type":"string","pattern":"^0x([a-fA-F0-9]{2}){1,2048}$"},"v":{"type":"integer","minimum":0,"maximum":255},"r":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"s":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}},"required":["from","to","value","validAfter","validBefore","nonce"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"value":{"anyOf":[{"type":"string"},{"type":"number"}]},"deadline":{"anyOf":[{"type":"string"},{"type":"number"}]},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]{130}$"},"v":{"type":"integer","minimum":0,"maximum":255},"r":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"s":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}},"required":["from","to","value","deadline"],"additionalProperties":false}]},"salt":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}},"required":["action","chainId","inputToken","amount","from"],"additionalProperties":false},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["settled","pending_index"]},"transactionHash":{"type":"string"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"chain":{"type":"string"},"quote":{"type":"object","properties":{"tonnes":{"type":"string"},"tonnesFormatted":{"type":"string"},"retirementPrice":{"type":"string"},"retirementPriceFormatted":{"type":"string"},"fee":{"type":"string"},"feeFormatted":{"type":"string"},"total":{"type":"string"},"totalFormatted":{"type":"string"},"suggestedMaxInput":{"type":"string"},"suggestedMaxInputFormatted":{"type":"string"},"pricePerTonne":{"type":"string"},"pricePerTonneFormatted":{"type":"string"},"maxUsdcPricePerTonne":{"type":"string"},"maxUsdcPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"slippageBps":{"type":"number"},"humanSummary":{"type":"string"}},"required":["tonnes","tonnesFormatted","retirementPrice","retirementPriceFormatted","fee","feeFormatted","total","totalFormatted","suggestedMaxInput","suggestedMaxInputFormatted","pricePerTonne","pricePerTonneFormatted","maxUsdcPricePerTonne","maxUsdcPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","slippageBps","humanSummary"],"additionalProperties":false},"retirementCount":{"type":"number"},"retirements":{"type":"array","items":{"type":"object","properties":{"retirementId":{"type":"string"},"retirementIndex":{"type":"number"},"certificateUrl":{"type":"string"},"amountInTonnes":{"type":"string"},"beneficiaryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"beneficiaryName":{"type":"string"},"beneficiaryLocation":{"type":"string"},"message":{"type":"string"},"projectId":{"type":"string"},"creditId":{"type":"string"},"retiringAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"timestamp":{"type":"number"}},"required":["retirementId","retirementIndex","certificateUrl","amountInTonnes","beneficiaryAddress","beneficiaryName","beneficiaryLocation","message","projectId","creditId","retiringAddress","timestamp"],"additionalProperties":false}},"note":{"type":"string"},"x402FacilitatorVersion":{"type":"number"}},"required":["status","transactionHash","chainId","chain","quote","retirementCount","retirements","note","x402FacilitatorVersion"],"additionalProperties":false},"errorCodes":["invalid_json","unknown_action","not_found","document_not_found","schema_validation","internal_error","unsupported_chain_id","unsupported_input_token","invalid_input_token","no_candidates","credit_not_found","credit_ambiguous","vintage_not_found","insufficient_liquidity","amount_not_whole_tonnes","amount_below_increment","puro_details_required","payment_required","attribution_required","invalid_auth_payload","insufficient_authorized_value","params_mismatch","contract_revert","transaction_reverted","listing_not_found","listing_expired","below_min_fill","insufficient_listing_supply","marketplace_requires_usdc","gas_estimate_unavailable","gas_limit_exceeds_cap"]},{"name":"certificate","fee":"0","description":"Resolve the Carbonmark retirement-certificate URL(s) for a broadcast retire transaction. Pass `txHash` (the retirement tx hash); returns one entry per retirement in that tx (a batch retire produces several), each with its `certificateUrl`. Pass the optional `index` to select a single retirement from a batch. GET alias: /api/certificate?txHash=0x...&index=0","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"certificate"},"txHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"retirementIndex":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false,"required":["action"]},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactionHash":{"type":"string"},"retirementCount":{"type":"number"},"retirements":{"type":"array","items":{"type":"object","properties":{"retirementId":{"type":"string"},"retirementIndex":{"type":"number"},"certificateUrl":{"type":"string"},"amountInTonnes":{"type":"string"},"beneficiaryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"beneficiaryName":{"type":"string"},"beneficiaryLocation":{"type":"string"},"message":{"type":"string"},"projectId":{"type":"string"},"creditId":{"type":"string"},"retiringAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"timestamp":{"type":"number"}},"required":["retirementId","retirementIndex","certificateUrl","amountInTonnes","beneficiaryAddress","beneficiaryName","beneficiaryLocation","message","projectId","creditId","retiringAddress","timestamp"],"additionalProperties":false}}},"required":["transactionHash","retirementCount","retirements"],"additionalProperties":false},"errorCodes":["invalid_json","unknown_action","not_found","document_not_found","schema_validation","internal_error","retirement_not_found"]}]},{"url":"https://x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app/api/catalog","method":"GET","description":"Paid snapshot of the most liquid supply (top 3 carbon classes and top 3 marketplace listings) with prices and links to the free retirement flow. Standard x402 v2 `exact` payment in USDC on Base, settled by the Coinbase facilitator.","fee":"0.001"},{"url":"https://x402-retire-git-feat-paid-indexing-gate-and-openapi-carbonmark.vercel.app/api/health","method":"GET","description":"Liveness probe. Always 200, no payment required.","fee":"0"}]}