{"openapi":"3.1.0","info":{"title":"TRDG Token Exit & Evidence Workbench API","version":"2.7.1","description":"Read-only EVM token exit analysis, amount-level reserve math, failed-transaction diagnostics, public task discovery, and signed evidence exports. No wallet connection, signature request, approval, transaction construction, swap execution, custody, or investment recommendation."},"servers":[{"url":"https://trdgtoken.com"}],"tags":[{"name":"System","description":"Health, chain metadata, and evidence verification keys."},{"name":"Token analysis","description":"Read-only token evidence and history."},{"name":"Workbench","description":"Universal investigation, exit-value, and failed-transaction tools."},{"name":"Evidence","description":"Tamper-evident Ed25519 evidence packs and artifact downloads."}],"paths":{"/api/v1/health":{"get":{"tags":["System"],"summary":"Service health","operationId":"getHealth","responses":{"200":{"description":"Service is available."}}}},"/api/v1/tasks":{"get":{"tags":["System","Workbench"],"summary":"List public investigation tasks and trust boundaries","operationId":"listPublicTasks","responses":{"200":{"description":"Canonical task definitions, inputs, outputs, public URLs, and safety boundaries for the workbench."}}}},"/api/v1/chains":{"get":{"tags":["System"],"summary":"Supported chains","operationId":"listChains","responses":{"200":{"description":"Supported EVM chains and direct-simulation coverage.","content":{"application/json":{"example":{"ok":true,"data":[{"id":1,"slug":"ethereum","name":"Ethereum","shortName":"ETH","nativeCurrency":"ETH","wrappedNativeAddress":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","explorerUrl":"https://etherscan.io","geckoNetwork":"eth","dexScreenerChain":"ethereum","honeypotSupported":true},{"id":56,"slug":"bsc","name":"BNB Smart Chain","shortName":"BSC","nativeCurrency":"BNB","wrappedNativeAddress":"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c","explorerUrl":"https://bscscan.com","geckoNetwork":"bsc","dexScreenerChain":"bsc","honeypotSupported":true},{"id":8453,"slug":"base","name":"Base","shortName":"BASE","nativeCurrency":"ETH","wrappedNativeAddress":"0x4200000000000000000000000000000000000006","explorerUrl":"https://basescan.org","geckoNetwork":"base","dexScreenerChain":"base","honeypotSupported":true},{"id":42161,"slug":"arbitrum","name":"Arbitrum One","shortName":"ARB","nativeCurrency":"ETH","wrappedNativeAddress":"0x82af49447d8a07e3bd95bd0d56f35241523fbab1","explorerUrl":"https://arbiscan.io","geckoNetwork":"arbitrum","dexScreenerChain":"arbitrum","honeypotSupported":false},{"id":137,"slug":"polygon","name":"Polygon","shortName":"POL","nativeCurrency":"POL","wrappedNativeAddress":"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270","explorerUrl":"https://polygonscan.com","geckoNetwork":"polygon_pos","dexScreenerChain":"polygon","honeypotSupported":false},{"id":10,"slug":"optimism","name":"Optimism","shortName":"OP","nativeCurrency":"ETH","wrappedNativeAddress":"0x4200000000000000000000000000000000000006","explorerUrl":"https://optimistic.etherscan.io","geckoNetwork":"optimism","dexScreenerChain":"optimism","honeypotSupported":false},{"id":43114,"slug":"avalanche","name":"Avalanche C-Chain","shortName":"AVAX","nativeCurrency":"AVAX","wrappedNativeAddress":"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7","explorerUrl":"https://snowtrace.io","geckoNetwork":"avax","dexScreenerChain":"avalanche","honeypotSupported":false}],"requestId":"example-request-id"}}}}}}},"/api/v1/evidence-keys/current":{"get":{"tags":["System","Evidence"],"summary":"Current evidence-signing public key","operationId":"getCurrentEvidenceKey","responses":{"200":{"description":"Ed25519 SPKI public key, key ID, and SHA-256 fingerprint."},"503":{"description":"Evidence verification key is unavailable."}}}},"/api/v1/investigations":{"post":{"tags":["Workbench"],"summary":"Classify a contract, transaction hash, or public wallet","operationId":"investigatePublicChainInput","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"chain":{"type":"string","enum":["ethereum","bsc","base","arbitrum","polygon","optimism","avalanche"]},"input":{"oneOf":[{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{40}|[a-fA-F0-9]{64})$"},{"type":"string","format":"uri","maxLength":2048}],"description":"A public EVM address, transaction hash, or supported explorer URL. A recognized explorer URL detects its chain and overrides the selected chain."}},"required":["chain","input"]}}}},"responses":{"200":{"description":"Input classification and the next read-only investigation route."},"400":{"description":"Unsupported chain or malformed input."},"429":{"description":"Anonymous investigation limit exceeded."}}}},"/api/v1/scan":{"get":{"tags":["Token analysis"],"summary":"Analyze a token contract","operationId":"scanToken","parameters":[{"name":"chain","in":"query","required":true,"schema":{"oneOf":[{"type":"string","enum":["ethereum","bsc","base","arbitrum","polygon","optimism","avalanche"]},{"type":"integer"}]},"description":"Supported chain slug or chain ID."},{"name":"address","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Request a refresh; a minimum cooldown still applies."}],"responses":{"200":{"description":"Analysis report or explicitly stale fallback report."},"400":{"description":"Unsupported chain or invalid contract address."},"429":{"description":"Anonymous scan limit exceeded."},"503":{"description":"No current or acceptable stale evidence was available."}}}},"/api/v1/exit-simulations":{"post":{"tags":["Workbench"],"summary":"Estimate amount-level exit value from a V2-compatible pool","operationId":"createExitValueScenario","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"chain":{"type":"string","enum":["ethereum","bsc","base","arbitrum","polygon","optimism","avalanche"]},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"mode":{"type":"string","enum":["token_amount","paper_value_usd"]},"amount":{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$","description":"Token amount or displayed USD paper value, according to mode."},"refresh":{"type":"boolean","default":false}},"required":["chain","address","mode","amount"]}}}},"responses":{"200":{"description":"1%, 10%, 25%, 50%, and 100% exit ladder with assumptions."},"400":{"description":"Invalid chain, contract, mode, or amount."},"422":{"description":"Required token price or readable V2-compatible reserves were unavailable."},"429":{"description":"Anonymous investigation limit exceeded."}}}},"/api/v1/exit-simulations/{scenarioId}":{"get":{"tags":["Workbench"],"summary":"Get a saved exit-value scenario","operationId":"getExitValueScenario","parameters":[{"name":"scenarioId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Saved timestamped exit-value scenario."},"404":{"description":"Scenario was not found."}}}},"/api/v1/transaction-diagnostics":{"post":{"tags":["Workbench"],"summary":"Decode and replay a failed EVM transaction read-only","operationId":"diagnoseFailedTransaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"chain":{"type":"string","enum":["ethereum","bsc","base","arbitrum","polygon","optimism","avalanche"]},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}},"required":["chain","transactionHash"]}}}},"responses":{"200":{"description":"Receipt, decoded router call, replay, route comparison, and evidence-ranked causes."},"400":{"description":"Invalid chain or transaction hash."},"429":{"description":"Anonymous investigation limit exceeded."}}}},"/api/v1/transaction-diagnostics/{diagnosticId}":{"get":{"tags":["Workbench"],"summary":"Get a saved transaction diagnostic","operationId":"getTransactionDiagnostic","parameters":[{"name":"diagnosticId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Saved transaction diagnostic."},"404":{"description":"Diagnostic was not found."}}}},"/api/v1/evidence-packs":{"post":{"tags":["Evidence"],"summary":"Create a signed evidence pack","operationId":"createSignedEvidencePack","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"sourceType":{"type":"string","enum":["token_scan","exit_scenario","transaction_diagnostic"]},"sourceId":{"type":"string","minLength":8,"maxLength":160}},"required":["sourceType","sourceId"]}}}},"responses":{"201":{"description":"Manifest and Worker-mediated JSON, signature, PDF, ZIP, and verification URLs."},"404":{"description":"Evidence source was not found."},"503":{"description":"Signing or artifact storage is unavailable."}}}},"/api/v1/evidence-packs/{packId}":{"get":{"tags":["Evidence"],"summary":"Get an evidence-pack manifest","operationId":"getEvidencePackManifest","parameters":[{"name":"packId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Evidence manifest."},"404":{"description":"Pack was not found."}}}},"/api/v1/evidence-packs/{packId}/verify":{"get":{"tags":["Evidence"],"summary":"Verify stored canonical JSON and detached Ed25519 signature","operationId":"verifyEvidencePack","parameters":[{"name":"packId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Signature and SHA-256 integrity result."},"404":{"description":"Pack or artifact was not found."}}}},"/api/v1/evidence-packs/{packId}/{artifact}":{"get":{"tags":["Evidence"],"summary":"Download a private evidence artifact through the Worker","operationId":"downloadEvidenceArtifact","parameters":[{"name":"packId","in":"path","required":true,"schema":{"type":"string"}},{"name":"artifact","in":"path","required":true,"schema":{"type":"string","enum":["json","signature","pdf","zip"]}}],"responses":{"200":{"description":"Requested artifact with attachment metadata."},"404":{"description":"Artifact was not found."}}}},"/api/v1/token/{chain}/{address}":{"get":{"tags":["Token analysis"],"summary":"Get or refresh a token report","operationId":"getTokenReport","parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","enum":["ethereum","bsc","base","arbitrum","polygon","optimism","avalanche"]}},{"name":"address","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}],"responses":{"200":{"description":"Timestamped token analysis report."},"400":{"description":"Invalid token identifier."}}}},"/api/v1/token/{chain}/{address}/history":{"get":{"tags":["Token analysis"],"summary":"Get historical report points","operationId":"getTokenHistory","parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","enum":["ethereum","bsc","base","arbitrum","polygon","optimism","avalanche"]}},{"name":"address","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90,"default":30}}],"responses":{"200":{"description":"Newest-first history points."}}}},"/api/v1/trdg":{"get":{"tags":["Token analysis"],"summary":"Get the current BSC TRDG report","operationId":"getTrdgReport","responses":{"200":{"description":"Independent report for the legacy TRDG BSC contract.","content":{"application/json":{"example":{"request":{"chain":"bsc","address":"0x92a42db88ed0f02c71d439e55962ca7cab0168b5"}}}}}}}}}}