{"uid":"cap_Jb9NdNxXWf4qDGD1HdeKn","slug":"validity-transaction-builder-ca9d5f9d","name":"Validity Transaction Builder","description":"Make any signed Base transaction conditional (Cobalt validity tx): Base includes it only while your conditions hold. We validate the predicates and return the base_sendRawTransactionValidity request; we never touch funds or keys. Every request carries the deadline Base requires (at most 60 s out; set for you if omitted). Optional conditions: fromBlock, flashblockIndex (1-10), minNativeBalanceWei, or a storage predicate for price.","url":"https://402.com.tr/api/x402/validity-build?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object"},"queryParams":{"type":"object","required":[],"properties":{"signedTx":{"type":"string","description":"Your signed serialized tx (optional)"},"fromBlock":{"type":"string","description":"Earliest block (optional)"},"storageOp":{"type":"string","description":"Advanced: operator (< <= = != > >=)"},"beforeBlock":{"type":"string","description":"Deadline block (optional; at most 60 s out, set for you if omitted)"},"storageMask":{"type":"string","description":"Advanced: mask (hex, optional)"},"storageSlot":{"type":"string","description":"Advanced: storage slot (hex)"},"storageValue":{"type":"string","description":"Advanced: compare value (hex)"},"balanceAddress":{"type":"string","description":"Account for the balance floor (optional)"},"storageAddress":{"type":"string","description":"Advanced: pool/token for a storage condition"},"flashblockIndex":{"type":"string","description":"Flashblock index 1-10 (optional)"},"flashblockIndexOp":{"type":"string","description":"Flashblock operator (optional, default =)"},"minNativeBalanceWei":{"type":"string","description":"Min ETH balance floor, wei (optional)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ddDoNLlH7M3OdFcsllBg-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Wraps a signed Base transaction in a Cobalt validity envelope so Base holds it dormant until specified on-chain conditions are met, then returns the base_sendRawTransactionValidity payload ready to broadcast.","exampleAgentPrompt":"Wrap my signed Base transaction (0x02f8...) in a validity envelope that expires before block 22500000 and only executes if my wallet has at least 0.05 ETH — give me back the base_sendRawTransactionValidity payload ready to broadcast.","exampleUseCases":[{"title":"Deadline-gated token transfer","prompt":"I have a signed Base ETH transfer I want to send, but only if it gets included before block 22600000 — wrap it in a validity transaction with that deadline and return the payload I can broadcast."},{"title":"Balance-floor conditional approve","prompt":"Wrap my signed ERC-20 approve transaction so it only executes if my wallet still holds at least 500000000000000000 wei (0.5 ETH) — I don't want it going through if I've already spent down my balance."},{"title":"Storage-price-gated contract call","prompt":"I have a signed swap call and I only want it to execute when the price storage slot 0x0 on the Uniswap pool 0xAbC... reads less than 0x1BC16D674EC80000 — build me the validity transaction with that storage predicate."}],"resultDescription":"Returns the constructed base_sendRawTransactionValidity JSON-RPC request object ready to submit to a Base node or bundler. The response includes the validity-wrapped transaction with all validated predicates (block range, balance floor, flashblock index, storage condition) encoded. No keys or funds are touched — the service only builds and validates the envelope.","failureModes":["No condition provided — at least one predicate (beforeBlock, fromBlock, flashblockIndex, minNativeBalanceWei, or storage slot) is required","Invalid or malformed signedTx hex — returns error if transaction cannot be deserialized","Storage predicate fields incomplete — storageAddress and storageSlot required when using storage conditions","Invalid operator value for storageOp or flashblockIndexOp — must be one of < <= = != > >=","Block numbers provided as non-numeric strings — causes predicate validation failure","Payment not fulfilled — $0.01 USDC x402 payment must accompany the request"],"whenToPreferThis":"Choose this endpoint when you need to attach expiry, block-range, balance-floor, flashblock, or on-chain storage conditions to an already-signed Base transaction without deploying a limit-order smart contract or handing funds/keys to a third party. It is the right tool for good-till-block orders, conditional transfers, and price-gated approvals on Base L2 using the native Cobalt validity mechanism rather than a wrapper contract.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T18:52:41.629Z","isFirstParty":false,"canonicalSlug":"validity-transaction-builder-ca9d5f9d"}