EVM
RLP-encode hex byte structures API
RLP-encode a 0x-hex byte string or an arbitrarily nested array of them (the encoding EVM uses for txs, account state, and proofs), via viem's toRlp. Answers 'What is the RLP of [0x01,0x02]?','How do I encode this list for an EVM tx?'.
Price$0.01per request
MethodPOST
Route/v1/evm/rlp-encode
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
evmrlpencodeserializebytestransactionhex
API URL
Integration docshttps://x402.hexl.dev/v1/evm/rlp-encodeExample request
{
"data": [
"0x01",
"0x02",
"0x03"
]
}Example response
{
"input": [
"0x01",
"0x02",
"0x03"
],
"encoded": "0xc3010203"
}Input schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"description": "A 0x-hex string or a (possibly nested) array of 0x-hex strings.",
"examples": [
[
"0x01",
"0x02",
"0x03"
],
"0xdead"
]
}
},
"examples": [
{
"data": [
"0x01",
"0x02",
"0x03"
]
}
]
}Output schema
{
"type": "object",
"additionalProperties": true
}