{"uid":"cap_6oW_JylqmlNU_KBVjJTJJ","slug":"delx-hex-canonicalize-52ca6e59","name":"Delx Hex Canonicalize","description":"Canonicalize and validate even-length hex strings with optional 0x prefix — call when normalizing even-length hex for chain tooling. Use for chain input hygiene without live RPC—adjacent to OneSource-class small chain reads, but static/local only so rights and margin stay clear. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no claim of live chain tip, w…","url":"https://api.delx.ai/api/v1/x402/hex-canonicalize","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"hex":{"type":"string","description":"Hex string with or without 0x; must be even-length for valid=true."},"prefer_0x":{"type":"boolean","description":"When true, canonicalize with a 0x prefix."}}},"responseSchema":{"type":"json","example":{"valid":true,"schema":"delx/util-hex-canonicalize/v1","canonical":"0xabcd","byte_length":2,"input_length":6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VV5g0k7X89cYugayZBqLC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates and canonicalizes even-length hex strings, normalizing 0x prefix presence and confirming validity — stateless, local, no live chain RPC.","exampleAgentPrompt":"Canonicalize this hex string '0xabcdef1234' for me — make sure it's valid and even-length, and keep the 0x prefix.","exampleUseCases":[{"title":"Pre-flight calldata hex hygiene","prompt":"Before I send this calldata hex '4a7b3c9d2e' to my EVM contract, can you validate and canonicalize it with a 0x prefix so I know it's properly formatted?"},{"title":"Normalize user-submitted hex input","prompt":"A user pasted this hex value 'abcd12' into my dapp form — can you validate it and return the canonical form without the 0x prefix?"},{"title":"ABI encoding pipeline sanity check","prompt":"I'm building an encoding pipeline and need to make sure this hex string '0xdeadbeef' is even-length and valid before I pass it to the ABI encoder — can you confirm and canonicalize it?"}],"resultDescription":"Returns a deterministic JSON object indicating whether the hex string is valid (even-length, proper hex characters), the canonicalized hex string with or without 0x prefix per the caller's preference, and any normalization details.","failureModes":["Odd-length hex strings return valid=false with an error explanation","Non-hex characters in the input trigger a validation failure","Malformed input (non-string type) may return a 400 error","Empty string input results in valid=false"],"whenToPreferThis":"Use this endpoint when you need lightweight, stateless, local hex validation and normalization without any live RPC call or chain state — ideal for input hygiene in EVM pipelines, ABI encoding prep, or any step where you want to confirm and standardize hex format cheaply before committing to an on-chain operation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:14:45.103Z","isFirstParty":false}