Skip to main content

Parameters

chainId
string
default:"232"
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_getL2ToL1LogProof"
required
JSON-RPC method name.
params
object
required
Positional parameters for zks_getL2ToL1LogProof:
  • params[0]: The hash of the L2 transaction.
  • params[1]: The index of the L2 to L1 log in the transaction.

Returns

result
object
The JSON-RPC result.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=232 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "zks_getL2ToL1LogProof",
    "params": [
      "0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e",
      0
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "id": 42,
    "proof": [
      "0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1",
      "0xdef456def456def456def456def456def456def456def456def456def456def4"
    ],
    "root": "0xabc123def4567890abc123def4567890abc123def4567890abc123def4567890"
  }
}