{"openapi":"3.1.0","info":{"title":"anchor-x402","description":"Dual-chain mainnet anchoring as an x402-paid service. Anchor any 32-byte hash to Base + Solana for $0.005.","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/anchor":{"post":{"summary":"Anchor","operationId":"anchor_v1_anchor_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnchorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnchorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/screen":{"get":{"summary":"Screen","operationId":"screen_v1_screen_get","parameters":[{"name":"wallet","in":"query","required":true,"schema":{"type":"string","title":"Wallet"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/attest":{"post":{"summary":"Attest","operationId":"attest_v1_attest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decode/tx":{"post":{"summary":"Decode Tx","operationId":"decode_tx_v1_decode_tx_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TxDecodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TxDecodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/resolve/name":{"get":{"summary":"Resolve Name","operationId":"resolve_name_v1_resolve_name_get","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/price/token":{"get":{"summary":"Token Price","operationId":"token_price_v1_price_token_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}},{"name":"chain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chain"}},{"name":"contract","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPriceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decode/calldata":{"post":{"summary":"Decode Calldata","operationId":"decode_calldata_v1_decode_calldata_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalldataDecodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalldataDecodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/parse/datetime":{"post":{"summary":"Parse Datetime","operationId":"parse_datetime_v1_parse_datetime_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatetimeParseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatetimeParseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/intel/wallet":{"get":{"summary":"Intel Wallet","operationId":"intel_wallet_v1_intel_wallet_get","parameters":[{"name":"wallet","in":"query","required":true,"schema":{"type":"string","title":"Wallet"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntelWalletResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AnchorRequest":{"properties":{"hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hash","description":"Pre-computed 32-byte hex hash (64 chars, no 0x prefix). Mutually exclusive with `data`."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data","description":"Arbitrary JSON to be canonicalized + SHA-256'd by the server. Mutually exclusive with `hash`."},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Note","description":"Optional 200-char note included in the response (not on-chain)."}},"type":"object","title":"AnchorRequest"},"AnchorResponse":{"properties":{"merkle_root":{"type":"string","title":"Merkle Root","description":"The 64-char hex hash that was anchored."},"base":{"$ref":"#/components/schemas/ChainAnchor"},"solana":{"anyOf":[{"$ref":"#/components/schemas/ChainAnchor"},{"type":"null"}],"description":"None if the Solana side failed; Base anchor still proves the hash existed."},"anchored_at":{"type":"integer","title":"Anchored At","description":"Unix epoch seconds when the anchor txs were broadcast."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["merkle_root","base","anchored_at"],"title":"AnchorResponse"},"AttestRequest":{"properties":{"input_hash":{"type":"string","title":"Input Hash","description":"64-char hex SHA-256 of the agent's input."},"output_hash":{"type":"string","title":"Output Hash","description":"64-char hex SHA-256 of the agent's output / decision payload."},"decision":{"type":"string","maxLength":64,"title":"Decision","description":"Free-form short label, e.g. \"APPROVED\", \"REJECTED\", \"CONFIDENCE=0.93\"."},"scheme":{"type":"string","enum":["eip191","ed25519"],"title":"Scheme","description":"Signature scheme: \"eip191\" (EVM personal_sign) or \"ed25519\" (Solana)."},"signature":{"type":"string","title":"Signature","description":"0x-prefixed hex (eip191) or base58 (ed25519)."},"signer_pubkey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Pubkey","description":"Required for ed25519 (Solana base58 pubkey). Ignored for eip191 — address is recovered."}},"type":"object","required":["input_hash","output_hash","decision","scheme","signature"],"title":"AttestRequest"},"AttestResponse":{"properties":{"merkle_root":{"type":"string","title":"Merkle Root","description":"SHA-256 over the domain-separated (input_hash, output_hash, decision) — this is what gets anchored."},"signer_verified":{"type":"boolean","title":"Signer Verified"},"signer":{"type":"string","title":"Signer","description":"Recovered EVM address (eip191) or supplied Solana pubkey (ed25519)."},"base":{"anyOf":[{"$ref":"#/components/schemas/ChainAnchor"},{"type":"null"}]},"solana":{"anyOf":[{"$ref":"#/components/schemas/ChainAnchor"},{"type":"null"}]},"decision":{"type":"string","title":"Decision"},"signed_at":{"type":"integer","title":"Signed At"}},"type":"object","required":["merkle_root","signer_verified","signer","decision","signed_at"],"title":"AttestResponse"},"CalldataDecodeRequest":{"properties":{"chain":{"type":"string","enum":["ethereum","solana"],"title":"Chain","description":"\"ethereum\" supported; \"solana\" returns 400."},"calldata_hex":{"type":"string","minLength":8,"title":"Calldata Hex","description":"Raw EVM calldata (>=4-byte selector), with or without 0x prefix."},"contract_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Address","description":"Optional. Reserved for future on-chain ABI lookups; currently unused."}},"type":"object","required":["chain","calldata_hex"],"title":"CalldataDecodeRequest"},"CalldataDecodeResponse":{"properties":{"function_selector":{"type":"string","title":"Function Selector"},"function_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Function Name"},"function_signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Function Signature"},"params":{"items":{"$ref":"#/components/schemas/DecodedParam"},"type":"array","title":"Params"},"decoded":{"type":"boolean","title":"Decoded"},"candidates":{"items":{"type":"string"},"type":"array","title":"Candidates","description":"Other matching sigs when the 4byte selector is ambiguous."},"source":{"type":"string","title":"Source","default":"openchain.xyz"}},"type":"object","required":["function_selector","decoded"],"title":"CalldataDecodeResponse"},"ChainAnchor":{"properties":{"tx":{"type":"string","title":"Tx"},"explorer_url":{"type":"string","title":"Explorer Url"}},"type":"object","required":["tx","explorer_url"],"title":"ChainAnchor"},"DatetimeComponents":{"properties":{"year":{"type":"integer","title":"Year"},"month":{"type":"integer","title":"Month"},"day":{"type":"integer","title":"Day"},"hour":{"type":"integer","title":"Hour"},"minute":{"type":"integer","title":"Minute"},"second":{"type":"integer","title":"Second"},"weekday":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Weekday"},"day_name":{"type":"string","title":"Day Name"}},"type":"object","required":["year","month","day","hour","minute","second","weekday","day_name"],"title":"DatetimeComponents"},"DatetimeParseRequest":{"properties":{"input":{"type":"string","maxLength":500,"minLength":1,"title":"Input","description":"Freeform datetime string in any format."},"base_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Time","description":"ISO 8601 reference; defaults to now UTC."},"timezone":{"type":"string","title":"Timezone","description":"IANA tz name (e.g. 'America/New_York').","default":"UTC"}},"type":"object","required":["input"],"title":"DatetimeParseRequest"},"DatetimeParseResponse":{"properties":{"iso":{"type":"string","title":"Iso"},"unix":{"type":"integer","title":"Unix"},"timezone":{"type":"string","title":"Timezone"},"components":{"$ref":"#/components/schemas/DatetimeComponents"},"relative_seconds":{"type":"integer","title":"Relative Seconds"},"relative_human":{"type":"string","title":"Relative Human"},"confidence":{"type":"string","enum":["high","medium","low"],"title":"Confidence"},"parsed_input":{"type":"string","title":"Parsed Input"}},"type":"object","required":["iso","unix","timezone","components","relative_seconds","relative_human","confidence","parsed_input"],"title":"DatetimeParseResponse"},"DecodedParam":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","title":"Type"},"value":{"title":"Value"}},"type":"object","required":["type","value"],"title":"DecodedParam"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntelWalletActivity":{"properties":{"base_tx_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Base Tx Count"},"has_history":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has History"}},"type":"object","title":"IntelWalletActivity"},"IntelWalletBalances":{"properties":{"base_eth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Eth"},"eth_eth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eth Eth"},"base_usdc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Usdc"},"sol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sol"},"solana_usdc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Solana Usdc"}},"type":"object","title":"IntelWalletBalances"},"IntelWalletError":{"properties":{"source":{"type":"string","title":"Source"},"message":{"type":"string","title":"Message"}},"type":"object","required":["source","message"],"title":"IntelWalletError"},"IntelWalletIdentity":{"properties":{"ens_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ens Name"},"sns_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sns Name"}},"type":"object","title":"IntelWalletIdentity"},"IntelWalletResponse":{"properties":{"wallet":{"type":"string","title":"Wallet"},"chain_inferred":{"type":"string","title":"Chain Inferred"},"balances":{"$ref":"#/components/schemas/IntelWalletBalances"},"activity":{"$ref":"#/components/schemas/IntelWalletActivity"},"identity":{"$ref":"#/components/schemas/IntelWalletIdentity"},"sanctions":{"anyOf":[{"$ref":"#/components/schemas/ScreenResponse"},{"type":"null"}]},"errors":{"items":{"$ref":"#/components/schemas/IntelWalletError"},"type":"array","title":"Errors"},"fetched_at":{"type":"integer","title":"Fetched At"},"cache_age_seconds":{"type":"integer","title":"Cache Age Seconds"}},"type":"object","required":["wallet","chain_inferred","balances","activity","identity","fetched_at","cache_age_seconds"],"title":"IntelWalletResponse"},"NameAddress":{"properties":{"chain":{"type":"string","title":"Chain","description":"\"ethereum\" | \"solana\""},"address":{"type":"string","title":"Address"},"ttl_hint_seconds":{"type":"integer","title":"Ttl Hint Seconds"}},"type":"object","required":["chain","address","ttl_hint_seconds"],"title":"NameAddress"},"NameResolveResponse":{"properties":{"name":{"type":"string","title":"Name"},"addresses":{"items":{"$ref":"#/components/schemas/NameAddress"},"type":"array","title":"Addresses"},"resolved_at":{"type":"integer","title":"Resolved At"},"registry_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registry Used","description":"\"ENS\" | \"SNS\" | null"},"supported_tlds":{"items":{"type":"string"},"type":"array","title":"Supported Tlds"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","resolved_at","supported_tlds"],"title":"NameResolveResponse"},"ScreenResponse":{"properties":{"wallet":{"type":"string","title":"Wallet"},"chain_inferred":{"type":"string","title":"Chain Inferred","description":"\"ethereum\" | \"solana\" | \"unknown\""},"sanctions_match":{"type":"boolean","title":"Sanctions Match"},"sanctioned_lists":{"items":{"type":"string"},"type":"array","title":"Sanctioned Lists"},"risk_level":{"type":"string","title":"Risk Level","description":"\"low\" | \"medium\" | \"high\""},"notes":{"type":"string","title":"Notes"},"checked_at":{"type":"integer","title":"Checked At"}},"type":"object","required":["wallet","chain_inferred","sanctions_match","risk_level","notes","checked_at"],"title":"ScreenResponse"},"TokenPriceResponse":{"properties":{"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"contract":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract"},"chain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chain"},"usd":{"type":"number","title":"Usd"},"usd_24h_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usd 24H Change Pct"},"market_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Cap Usd"},"source":{"type":"string","title":"Source","default":"coingecko"},"fetched_at":{"type":"integer","title":"Fetched At"},"age_seconds":{"type":"integer","title":"Age Seconds"}},"type":"object","required":["usd","fetched_at","age_seconds"],"title":"TokenPriceResponse"},"TxDecodeRequest":{"properties":{"chain":{"type":"string","enum":["base","ethereum","solana"],"title":"Chain"},"tx_hash":{"type":"string","maxLength":128,"minLength":1,"title":"Tx Hash"}},"type":"object","required":["chain","tx_hash"],"title":"TxDecodeRequest"},"TxDecodeResponse":{"properties":{"chain":{"type":"string","title":"Chain"},"tx_hash":{"type":"string","title":"Tx Hash"},"block_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Block Number"},"timestamp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timestamp"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address"},"to_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Address"},"value_wei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Wei"},"value_eth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Eth"},"gas_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gas Used"},"status":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Status"},"input_calldata_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Calldata Hex"},"native_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Native Currency"},"slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot"},"block_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Block Time"},"fee_lamports":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fee Lamports"},"signers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Signers"},"program_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Program Calls"}},"type":"object","required":["chain","tx_hash"],"title":"TxDecodeResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}