{
  "schema": "x402-bazaar-v2",
  "service": {
    "name": "ExergyNet Verified Job Status",
    "description": "Read-only lookup for Base Mainnet transaction hashes and ExergyNet SINK job IDs. Returns on-chain settlement status, settlement contract identity, block confirmation, 7-way USDC split receipts, and proof image ID references. All data is independently derivable from Base Mainnet public state.",
    "version": "2.0.0",
    "provider": "ExergyNet / Ezumba Dynasty Trust",
    "category": "blockchain-data",
    "tags": ["blockchain", "settlement", "proof", "USDC", "Base", "ZK", "ExergyNet"],
    "availability": "24/7",
    "sla": "best-effort",
    "latencyMs": {
      "p50": 400,
      "p95": 1200
    }
  },
  "endpoint": {
    "url": "https://x402.exergynet.org/v1/job",
    "method": "GET",
    "network": "eip155:8453",
    "chain": "base",
    "chainId": 8453,
    "payTo": "0xD266542c0c0db02BbF6Bb2C4D792Ef1a72AD4857",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "assetName": "USDC",
    "pricePerCall": "0.02",
    "priceAtomic": "20000",
    "maxTimeoutSeconds": 60
  },
  "computeEndpoint": {
    "url": "https://x402.exergynet.org/api/v1/compute/request",
    "method": "POST",
    "network": "eip155:8453",
    "chain": "base",
    "chainId": 8453,
    "payTo": "0xD266542c0c0db02BbF6Bb2C4D792Ef1a72AD4857",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "assetName": "USDC",
    "pricePerCall": "2.50",
    "priceAtomic": "2500000",
    "v3EscrowAtomic": "2000000",
    "maxTimeoutSeconds": 60
  },
  "inputSchema": {
    "type": "object",
    "description": "Query parameters — provide exactly one of hash or jobId",
    "properties": {
      "hash": {
        "type": "string",
        "description": "Base Mainnet transaction hash (0x-prefixed, 32 bytes hex)",
        "pattern": "^0x[0-9a-fA-F]{64}$",
        "example": "0xc3cb476d77868437a4a01aed223c0604a71a437f37970fe7f0e7ea880399382c"
      },
      "jobId": {
        "type": "string",
        "description": "ExergyNet SINK job ID as bytes32 (0x-prefixed, 32 bytes hex)",
        "pattern": "^0x[0-9a-fA-F]{64}$",
        "example": "0xa378cab8981100938a4322ba46f007a4e7b27c7de56aa7a52e533e1d4b5959ed"
      }
    },
    "oneOf": [
      { "required": ["hash"] },
      { "required": ["jobId"] }
    ]
  },
  "outputSchema": {
    "type": "object",
    "properties": {
      "service":  { "type": "string" },
      "paidBy":   { "type": "string", "description": "Address that paid for this query" },
      "settlement": {
        "type": "object",
        "properties": {
          "paymentTx":   { "type": "string", "description": "On-chain USDC payment tx hash" },
          "network":     { "type": "string" },
          "amountUSDC":  { "type": "string" },
          "receiver":    { "type": "string" }
        }
      },
      "query":  { "type": "string" },
      "result": {
        "type": "object",
        "properties": {
          "found":               { "type": "boolean" },
          "txHash":              { "type": "string" },
          "status":              { "type": "string", "enum": ["confirmed", "reverted", "pending"] },
          "blockNumber":         { "type": "string" },
          "confirmations":       { "type": "integer" },
          "toSettlementContract":{ "type": "boolean" },
          "settlementContract": {
            "type": "object",
            "properties": {
              "address": { "type": "string" },
              "name":    { "type": "string" },
              "chain":   { "type": "string" },
              "chainId": { "type": "integer" }
            }
          },
          "events": {
            "type": "object",
            "properties": {
              "settlements": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "jobId":     { "type": "string" },
                    "drone":     { "type": "string" },
                    "splitUSDC": { "type": "object" }
                  }
                }
              }
            }
          },
          "statusLabel": { "type": "string", "enum": ["None", "Open", "Settled", "Refunded"] },
          "settled":     { "type": "boolean" },
          "operator":    { "type": "string" },
          "approvedEngineImageId": { "type": "string", "description": "On-chain image ID of the physics engine approved at settlement. Does NOT constitute independent proof re-verification." },
          "approvedEngineKnown":   { "type": "boolean", "description": "true if imageId matches the genesis-qualified engine (BCX-002)" },
          "_proofDisclaimer":      { "type": "string" },
          "_dataSource": { "type": "string" }
        }
      }
    }
  },
  "examples": {
    "byTxHash": {
      "request": {
        "url": "https://x402.exergynet.org/v1/job?hash=0xc3cb476d77868437a4a01aed223c0604a71a437f37970fe7f0e7ea880399382c",
        "headers": { "Payment-Signature": "<base64url-encoded x402 V2 payment payload>" }
      },
      "response": {
        "service": "ExergyNet Verified Job Status",
        "version": "2.0.0",
        "protocol": "x402-v2",
        "settlement": {
          "paymentTx": "0x<usdc-transfer-hash>",
          "network": "eip155:8453",
          "amountUSDC": "0.02",
          "receiver": "<X402_PAYMENT_RECEIVER>"
        },
        "query": "0xc3cb476d77868437a4a01aed223c0604a71a437f37970fe7f0e7ea880399382c",
        "result": {
          "found": true,
          "_queryType": "transactionHash",
          "status": "confirmed",
          "blockNumber": "56268593",
          "toSettlementContract": true,
          "settlementContract": {
            "address": "0x42dfA2Df54D7f7685dC363C64C23Cb6b2be8cabD",
            "name": "LNES16_BiotechMembrane_V3",
            "chain": "base-mainnet",
            "chainId": 8453
          },
          "events": {
            "settlements": [{
              "jobId": "0xa378cab8981100938a4322ba46f007a4e7b27c7de56aa7a52e533e1d4b5959ed",
              "drone": "0xB41025828340b2feF42cE849116350d1a643d7D6",
              "splitUSDC": {
                "drone":      "600000",
                "vaultT1":    "266000",
                "vaultT2":    "266000",
                "vaultT3":    "266000",
                "vaultT4":    "266000",
                "vaultT5":    "266000",
                "rhoReserve": "70000"
              }
            }]
          },
          "_dataSource": "base-mainnet-public-rpc"
        }
      }
    },
    "byJobId": {
      "request": {
        "url": "https://x402.exergynet.org/v1/job?jobId=0xa378cab8981100938a4322ba46f007a4e7b27c7de56aa7a52e533e1d4b5959ed",
        "headers": { "Payment-Signature": "<base64url-encoded x402 V2 payment payload>" }
      },
      "response": {
        "result": {
          "found": true,
          "_queryType": "jobId",
          "statusLabel": "Settled",
          "settled": true,
          "operator": "0x27cC42ee80CA945F96b93999CCdb02520618578B",
          "drone": "0xB41025828340b2feF42cE849116350d1a643d7D6",
          "escrowUSDC": "0",
          "approvedEngineImageId": "0x8be6effa582e9ed205cced2533f6f76e99878893b4fd93e5d4c82ee4210dee01",
          "approvedEngineKnown": true,
          "_proofDisclaimer": "On-chain image ID records the approved engine. This service does not re-verify the ZK proof."
        }
      }
    }
  },
  "errorBehavior": {
    "noPayment":          { "httpStatus": 402, "description": "Missing Payment-Signature header — PAYMENT-REQUIRED header returned with payment requirements" },
    "invalidPayment":     { "httpStatus": 402, "description": "Payment verification failed — invalid signature or insufficient amount" },
    "nonceReused":        { "httpStatus": 400, "description": "ERC-3009 nonce already used — do not replay authorizations" },
    "duplicate":          { "httpStatus": 200, "description": "Payment-Identifier already DELIVERED — cached response returned, _idempotency=DUPLICATE" },
    "notFound":           { "httpStatus": 200, "description": "Query succeeded but hash/jobId not found on-chain — result.found=false" },
    "invalidInput":       { "httpStatus": 400, "description": "Missing or malformed hash/jobId parameter" },
    "chainUnavailable":   { "httpStatus": 500, "description": "Base Mainnet RPC temporarily unavailable" },
    "rateLimited":        { "httpStatus": 429, "description": "60 req/min per IP exceeded" }
  },
  "privacyPolicy": "Returns only publicly derivable on-chain data. No private keys, credentials, or internal operational state are disclosed.",
  "chainInfo": {
    "name":              "Base Mainnet",
    "chainId":           8453,
    "settlementContract": "0x42dfA2Df54D7f7685dC363C64C23Cb6b2be8cabD",
    "contractName":      "LNES16_BiotechMembrane_V3"
  }
}
