# 🛰️ 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.

{% hint style="info" %}

#### Compatibility Notes

* All endpoints work identically to ZKsync, for more details [ZKsync ZKS RPC API](https://docs.zksync.io/zksync-protocol/api).
* Some methods not relevant to Via Network may return **empty responses** (e.g., features not currently supported by Via Network).
  {% endhint %}

### via\_getBitcoinNetwork

Returns the Bitcoin network (Mainnet, Testnet, Regtest).

**Parameters**

* None

**Returns**

* A single string value representing the network id.

**Example Request**

```sh
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**

```json
{
    "jsonrpc":"2.0",
    "result":"testnet",
    "id":1
}
```
