Skip to main content

Parameters

chainId
string
default:"2741"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"zks_getL2ToL1MsgProof"
required
JSON-RPC method name.
params
object
required
Positional parameters for zks_getL2ToL1MsgProof:
  • params[0]: The block number in which the message was emitted.
  • params[1]: The address that sent the message.
  • params[2]: The keccak256 hash of the message being proved.
  • params[3]: Optional index in the block of the L1Messenger event log. Defaults to the first message if omitted.

Returns

result
object
The JSON-RPC result.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=2741 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "zks_getL2ToL1MsgProof",
    "params": [
      5187,
      "0x87869cb87c4Fa78ca278dF358E890FF73B42a39E",
      "0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "id": 0,
    "proof": [
      "0xabc123...",
      "0xdef456..."
    ],
    "root": "0xf1adac176fc939313eea4b72055db0622a10bbd9b7a83097286e84e471d2e7df"
  }
}