Developer Docs
🛰️ RPC Documentation
Overview of the JSON-RPC API methods specific to Via Network
🛰️ RPC Documentation
Via JSON-RPC API
Via Network is a ZK Stack based blockchain implementation, providing EVM-compatible rollup features with additional multi-network support, including Bitcoin integration. This document outlines the RPC namespaces and methods available on Via Network.
Compatibility Notes
- All endpoints work identically to ZKsync, for more details ZKsync ZKS RPC API.
- Some methods not relevant to Via Network may return empty responses (e.g., features not currently supported by Via Network).
via_getBitcoinNetwork
Returns the Bitcoin network (Mainnet, Testnet, Regtest).
Parameters
- None
Returns
- A single string value representing the network id.
Example Request
curl -X POST https://testnet.via.onvia.org \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"via_getBitcoinNetwork","params":[],"id":1}'Example Response
{
"jsonrpc":"2.0",
"result":"testnet",
"id":1
}