{"openapi":"3.1.0","info":{"title":"pq-attest","version":"0.1.0","description":"Attest a confirmed Algorand or Base transaction and verify the ML-DSA-65 proof bundle. The attestation transaction is on Algorand MainNet. POST /attest is paid with Algorand USDC, or with Base USDC when the source is a Base transaction. POST /verify is free."},"servers":[{"url":"/"}],"paths":{"/.well-known/x402":{"get":{"operationId":"wellKnownX402","summary":"x402 discovery document","description":"Paid resource, price, and network for POST /attest. No payment.","responses":{"200":{"description":"x402 discovery document"}}}},"/.well-known/x402.json":{"get":{"operationId":"wellKnownX402Json","summary":"x402 service manifest","description":"Service manifest with OpenAPI, discovery, llms.txt, and MCP links. No payment.","responses":{"200":{"description":"x402 service manifest"}}}},"/.well-known/agent-card.json":{"get":{"operationId":"agentCard","summary":"A2A agent card","description":"Agent card for the pq_attest skill. No payment.","responses":{"200":{"description":"A2A agent card"}}}},"/.well-known/agent.json":{"get":{"operationId":"agentJson","summary":"Agent manifest","description":"Same agent card as /.well-known/agent-card.json. No payment.","responses":{"200":{"description":"Agent manifest"}}}},"/.well-known/ai-plugin.json":{"get":{"operationId":"aiPlugin","summary":"AI plugin manifest","description":"Plugin manifest pointing at this origin's OpenAPI document. No payment.","responses":{"200":{"description":"AI plugin manifest"}}}},"/llms.txt":{"get":{"operationId":"llmsTxt","summary":"LLM index","description":"Plain-text index of the paid attest route and how to pay. No payment.","responses":{"200":{"description":"LLM index"}}}},"/health":{"get":{"operationId":"health","summary":"Process health check","responses":{"200":{"description":"Process is up"}}}},"/ready":{"get":{"operationId":"ready","summary":"MainNet readiness check","responses":{"200":{"description":"Connected to Algorand MainNet"},"503":{"description":"MainNet is not reachable"}}}},"/discovery":{"get":{"operationId":"discovery","summary":"Machine-readable endpoint catalog","responses":{"200":{"description":"Endpoint catalog and x402 terms"}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"OpenAPI contract","responses":{"200":{"description":"This document"}}}},"/verify":{"post":{"operationId":"verify","summary":"Verify an attestation bundle","description":"Checks the ML-DSA-65 signature and the hash preimage. Pass chain=1 to re-fetch the source and attest transactions from MainNet indexer. No payment.","parameters":[{"name":"chain","in":"query","required":false,"schema":{"type":"string","enum":["1","true"]},"description":"Re-fetch the source and attest transactions from MainNet indexer."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofBundle"}}}},"responses":{"200":{"description":"Bundle verified"},"400":{"description":"Bundle rejected"},"404":{"description":"Indexer has no matching transaction"}}}},"/attest":{"post":{"operationId":"attest","summary":"Attest a confirmed MainNet transaction","description":"Fetches a confirmed Algorand or Base transaction, submits a 0 ALGO attestation note from the Falcon attestor, and returns an ML-DSA-65 proof bundle. The attestation is always recorded on Algorand MainNet. The first call returns 402 with PAYMENT-REQUIRED. An Algorand source is paid in Algorand USDC. A Base source can be paid in Base USDC or Algorand USDC when that rail is configured. Sign one advertised option and retry with PAYMENT-SIGNATURE. Success may include PAYMENT-RESPONSE. Each paid call submits a new attestation transaction.","x-x402":{"version":2,"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"YL63PQ3U4SHJXPBXJZJPNWKLUZ2DYQSJZ36OLWXGF7FOHWPYN4BELUOUPM","priceUsdc":"0.001","maxAmountRequired":"1000","facilitatorUrl":"https://facilitator.goplausible.xyz","headers":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"YL63PQ3U4SHJXPBXJZJPNWKLUZ2DYQSJZ36OLWXGF7FOHWPYN4BELUOUPM","maxAmountRequired":"1000","priceUsdc":"0.001","facilitatorUrl":"https://facilitator.goplausible.xyz"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x930c40fd6eb213152d7475460c29cd56d8d122cf","maxAmountRequired":"1000","priceUsdc":"0.001","facilitatorUrl":"https://api.cdp.coinbase.com/platform/v2/x402"}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["txid"],"properties":{"txid":{"type":"string","description":"Confirmed Algorand MainNet transaction id, or a Base transaction hash (0x and 64 hex characters)."},"chain":{"type":"string","enum":["algorand","base"],"description":"Source chain. Inferred from txid when omitted."}}}}}},"responses":{"200":{"description":"ML-DSA-65 proof bundle. May include a PAYMENT-RESPONSE header after settlement.","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"},"description":"Settlement receipt from the facilitator, when present."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofBundle"}}}},"400":{"description":"txid is missing or not a transaction id"},"402":{"description":"Payment required. Read PAYMENT-REQUIRED, pay one advertised USDC option, and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"required":true,"schema":{"type":"string"},"description":"x402 payment requirements for this request."}}},"404":{"description":"Indexer has no transaction with this id"}}}}},"components":{"schemas":{"ProofBundle":{"type":"object","required":["version","network","source","attest","attestor","signature"],"properties":{"version":{"type":"integer","const":1},"network":{"type":"string","const":"algorand-mainnet"},"source":{"type":"object","required":["txnId","hashSha256","txnBytesBase64"],"properties":{"chain":{"type":"string","enum":["algorand","base"]},"txnId":{"type":"string"},"hashSha256":{"type":"string"},"txnBytesBase64":{"type":"string"}}},"attest":{"type":"object","required":["txnId","round","note"],"properties":{"txnId":{"type":"string"},"round":{"type":"integer"},"note":{"type":"string"}}},"attestor":{"type":"object","required":["algorandAddress","pqPublicKey"],"properties":{"algorandAddress":{"type":"string"},"pqPublicKey":{"type":"string"}}},"signature":{"type":"object","required":["alg","sigBase64"],"properties":{"alg":{"type":"string","const":"ML-DSA-65"},"sigBase64":{"type":"string"}}}}}}}}