Standard Ethereum RPC (eth_*)
Use your base library for all eth_* methods.
The client.zks
surface only covers ZKsync-specific RPC (zks_*).
For standard Ethereum JSON-RPC (e.g., eth_call, eth_getLogs, eth_getBalance),
call them through your chosen library (ethers or viem).
zks_ Interface
Methods
getBridgehubAddress() → Promise<Address>
Fetch the on-chain Bridgehub contract address.
getL2ToL1LogProof(txHash: Hex, index: number) → Promise<ProofNormalized>
Return a normalized proof for the L2→L1 log at index in txHash.
If a proof isn’t available yet, this method throws a typed
STATE error. Poll based on
your app’s cadence.getReceiptWithL2ToL1(txHash: Hex) → Promise<ReceiptWithL2ToL1 | null>
Fetch the transaction receipt; the returned object always includes l2ToL1Logs (empty array if none).