Decode L1 transaction data
Decodes raw L1 transaction data to extract swap execution parameters. This endpoint queries the key-value storage contract to retrieve and decode transaction information, extracting details such as minimum L1 amount, promised L1 amount, recipient addresses, and optional fallback recipient. The decoded data is used to understand swap execution requirements and validate transaction parameters. Returns null if the transaction data cannot be decoded or does not exist in storage.
Query Parameters
The raw L1 transaction data to decode. This is typically the transaction hex string or encoded transaction data from the Layer 1 blockchain (e.g., Bitcoin, Ethereum) that contains swap execution parameters.
The key-value storage contract address. This is the L2 contract address where the decoded transaction data is stored or can be retrieved from. Used to query the contract's storage for transaction decoding information.
Optional first part of the key-value storage key. Used to construct the storage key for querying decoded transaction data. If not provided, a default key structure may be used.
Backend URL. Default is https://api-cloud.coinweb.io/wallet. This URL is used to query the contract's key-value storage.
uriResponse Body
curl -X GET "https://cwap-api.coinhq.store/pactswap_cm/getDecodedL1TxData?l1TxData=string&kvStorageAddress=0x6f20d1802288c90d2a044d3f7afae73fda261b27d85c0e01fdaaf3199b2c0e85&kvStorageFirstPart=string&backendUrl=https%3A%2F%2Fapi-cloud.coinweb.io%2Fwallet"{
"minL1Amount": "40000000",
"promisedL1Amount": "50000000",
"l1Recipient": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"fallbackRecipient": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
}Was this documentation helpful? Any suggestions?