---
title: Overview
source_url:
html: https://docs.nirvanalabs.io/blockchain/rpc-nodes/
md: https://docs.nirvanalabs.io/blockchain/rpc-nodes/index.md
---
## What are RPC Nodes
RPCs (Remote Procedure Call) are a set of protocols and interfaces that allow communication with remote servers to execute programs in a separate location. They provide a way for developers and their applications to retrieve data from blockchains and execute code on remote decentralized servers, known as nodes. When developers create decentralized applications (dApps) that connect to RPCs, these dApps can respond to users' requests for blockchain-related information and perform actions like cryptocurrency transactions.
When users interact with a dApp to carry out transactions, their requests travel through a RPC to connect with the nodes housing blockchain data. This data is then forwarded to the mempool, where it waits to be processed by validator nodes and added to the blockchain.
## RPC Use Cases
Remote Procedure Calls (RPCs) underpin multiple functionalities in the blockchain ecosystem. They are commonly used for:
* **Retrieving Data**: Decentralized applications use RPCs to fetch data from the blockchain network. For instance, a blockchain explorer application can employ RPC to inquire about transaction specifics, verify account balances, or extract information concerning specific blocks. This data retrieval capability remains crucial for building wallets, analytical tools, and other services reliant on blockchain.
* **Executing Transactions**: RPCs allow applications to initiate and carry out transactions on the blockchain network. A decentralized exchange platform, for instance, uses RPCs to dispatch transaction details, encompassing the sender's address, the recipient's address, and the transfer amount. Subsequently, RPCs facilitate the transaction verification and confirmation process, ensuring its integration into the blockchain.
* **Interacting with Smart Contracts**: RPCs play a pivotal role in engaging with smart contracts on the blockchain. Applications can invoke functions within smart contracts through an RPC, supplying the requisite parameters and recovering the resultant data. This empowers developers to construct decentralized applications (dApps) capitalizing on smart contracts' programmable and self-executing capabilities.
* **Monitoring and Managing Blockchains**: RPCs provide a suite of tools for monitoring and managing blockchain nodes. Applications can employ RPC commands to acquire insights into the network, such as the count of connected peers, synchronization status, or mining difficulty. This data is valuable for network analysis, performance oversight, and maintenance objectives.
* **Facilitating Cross-Chain Interactions**: RPCs streamline cross-chain interactions and enhance interoperability. By leveraging RPCs, applications can communicate with nodes across diverse blockchain networks, enabling data exchange or transaction execution spanning multiple chains. This capacity to interface with many blockchains promotes the development of decentralized applications that harness the combined capabilities of various networks.
## Archive vs Full Nodes
There are typically two different types of nodes that one can run for any specific blockchain network, a full node and an archive node.
### Archive Nodes
Archive nodes contain the full block history from genesis to the current state for a specific blockchain ledger. They are used by dApps that need the ability to retrieve data for any time period of the blockchain's history.
### Full Nodes
Full nodes typically have settings enabled that prune away data older than a specific number of blocks to save disk space. These nodes do not store all state data back to the Genesis block but all state data can be retrieved from local storage or a snapshot if needed. Full nodes are used for reading or writing data in a “live” time period.
## Flex vs Dedicated Nodes
### Flex Nodes
We call our global RPC network our “flex nodes” because every API request is geo-load balanced across all our data center locations. This is important because each API request will automatically be routed to the nearest data center location that can provide the lowest latency response, making those calls flexible or “flex.”
This is our most common product offering that anyone and everyone can use. This includes individuals looking to change their wallet RPC to enterprises with millions of daily active users and significant request volume. Our global RPC network provides the lowest latency requests possible while offering near-perfect uptime.
### Dedicated Nodes
Dedicated nodes are an alternative to our flex nodes and are available to all customers. Dedicated nodes are single nodes with dedicated compute resources deployed in a specific data center location for a specific customer’s utilization. This means individual nodes are not load-balanced by default, but we can load-balance multiple dedicated nodes for you.
Dedicated nodes have dedicated compute resources that are customizable to your needs. There are no request limitations on these dedicated nodes. However, there are compute and memory limitations based on your node’s resources. Heavier compute requests such as debug\_traceCall will utilize more compute than an eth\_blocknumber request. If you’re doing a lot of transaction volume or heavy compute requests, increasing the size of your dedicated node is recommended to avoid any degraded performance.
---
title: Account Management
source_url:
html: https://docs.nirvanalabs.io/blockchain/rpc-nodes/account-management/
md: https://docs.nirvanalabs.io/blockchain/rpc-nodes/account-management/index.md
---
## Dashboard
To open the **Dashboard** panel, follow these steps:
1. Sign in to Nirvana Labs with your username and password.
2. Click on **Dashboard** in the top right corner of the homepage to open the corresponding panel.
> 👍 You can now see the API Request and Nodes statistics in your **[Dashboard](https://www.nirvanalabs.io/dashboard/nodes)**.
In the Dashboard, you can monitor and carry out the following functions:
### Create a Node
- Deploys a new node to the blockchain network of your choosing.
### Overview
- Provides a high-level summary of your RPC node analytics, offering a quick snapshot of crucial statistics and node management capabilities.
### API Request Statistics:
| | |
| :--------------- | :------------------------------------------------------------------------------ |
| **Total** | The number of API requests made through an RPC node. |
| **Success Rate** | The rate of successful API requests, indicating the reliability of an RPC node. |
| **Successful** | The count of API requests that were successfully executed. |
| **Failed** | The count of API requests encountering errors or issues. |
| **Unauthorized** | The number of API requests denied due to lack of authorization. |
| **Rate Limited** | The number of API requests subjected to rate limiting |
### Nodes
- Create, manage, and delete RPC nodes. After running a node, it displays detailed information about each node in a tabular format:
| | |
| :------------- | :----------------------------------------------------- |
| **Name** | The user-assigned name for the RPC node. |
| **Blockchain** | The blockchain network associated with the node. |
| **Network** | Specifies the network configuration of the node. |
| **Type** | Indicates the node type, such as "Flex" or "Dedicated" |
| **Status** | Displays whether the node is running or not. |
| **Created On** | The date when the node was initially set up. |
### Reports
| | |
| :------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------- |
| **Request Rate** | measures the number of incoming requests to the RPC node. The sampling interval for this metric is set to 1 second. |
| **Latency and Bandwidth** | provides insights into the latency and bandwidth performance of your RPC nodes, helping you assess the efficiency of your infrastructure. |
| **RPC Log Data** | gives detailed logs and data related to RPC requests made through your nodes, facilitating troubleshooting and analysis of API interactions. |
---
title: How to Manage Your Account
source_url:
html: https://docs.nirvanalabs.io/blockchain/rpc-nodes/account-management/how-to-manage-your-account/
md: https://docs.nirvanalabs.io/blockchain/rpc-nodes/account-management/how-to-manage-your-account/index.md
---
## Billing
You usually start on Nirvans Labs as a Free Plan user and to do so you need to open an account with your email address on [https://www.nirvanalabs.io](https://www.nirvanalabs.io/).
Once you register, you gain access to the Dashboard and the available Plans where you can start with our Free Plan or a paid plan.
You can head to the [pricing](https://www.nirvanalabs.io/dashboard/billing) page and click on [Compare Plans](https://www.nirvanalabs.io/pricing) for a side-by-side comparison of the performance features and rate limits supported depending on the selected plan.
## How to upgrade or downgrade your plan
The managed RPC services come with both Free and Paid service plans but differ significantly in rate throughput, request rates and other performance metrics depending on the plan selected.
You can change the current plan you're on at any time by visiting the [Billing](https://www.nirvanalabs.io/dashboard/billing) tab in your Dashboard.
You then click the 'Select Plan' button of the plan you want to switch to.
## Enabling Overage Requests
If you want to stay on your current plan but continue sending API requests after reaching your monthly limit, you can enable overages.
To do so, click on the sliding button in the top right corner opposite the Overage Requests and it will be activated.
## How to change the billing method
Nirvana Labs supports various billing methods for accessing the paid managed RPC services. You can access them from the [Payment Preferences](https://www.nirvanalabs.io/dashboard/billing#payment-preferences) tab in the Billing section of the Dashboard.
Click on Add Payment Method and fill out the information for your preferred method.
### Billing methods accepted
Nirvana Labs supports crypto and bank transfers for annual subscriptions. We will be adding crypto support for monthly payments soon.
---
title: Security
source_url:
html: https://docs.nirvanalabs.io/blockchain/rpc-nodes/account-management/security/
md: https://docs.nirvanalabs.io/blockchain/rpc-nodes/account-management/security/index.md
---
Nirvana Labs uses a combination of tools and mechanisms to secure network endpoints and users' API keys.
## API Keys
Nirvana Labs uses an API Key in URL (Path Parameter) to authenticate API requests. The API key is directly embedded in the request's URL and point to a specific REST API resource. An example of a URL-based API request is:
```
curl -X POST https://eth-mainnet.g.nirvanalabs.io/v2/demo \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
```
### Share API key access
Team account holders can share access to their Nirvana Labs API keys with other account members.
To share an API key:
1. In the Dashboard, select the API that you want to share.
2. Select the API Key Sharing tab.
3. If you haven't shared the API key yet, select Invite Members.
4. Type one or more user emails, assign the user role, and select Share API Key.
5. Select Confirm.
### Creating a new API key
To create a new API key, go to the Security tab in your Dashboard and click on the Refresh button next to your current API key.
A pop-up window will notify you that you are about to generate a new API key to replace the existing one. Click on Confirm to continue.
The new API key will overwrite the previous one and will be used by Nirvana Labs to authenticate all your API requests.
### User roles
**Administrator**
The Nirvana Labs account owner who created the API key.\*
* Can change roles, and revoke and resend invites.
* Can edit security settings and view API key statistics.
* Can delete the API key.
* View billing details.
*\*Ownership of an API key cannot be changed once created.*
**Developer**
* Has access to the API key name, security settings, and collaborator list.
* Can edit security settings and view API key statistics.
* Can delete the API key.
* View billing details.
#### Accept an invitation
You'll receive an email invitation to access an API key. In the email invitation, select Confirm and accept the invitation.
You can view all keys that you own, and all keys shared with you, by selecting Key Sharing in the Dashboard.
---
title: Team vs Individual Accounts
source_url:
html: https://docs.nirvanalabs.io/blockchain/rpc-nodes/account-management/team-vs-individual-accounts/
md: https://docs.nirvanalabs.io/blockchain/rpc-nodes/account-management/team-vs-individual-accounts/index.md
---
Nirvana Labs' managed RPC services support Team and Individual accounts to cater to the diverse needs of users and companies.
## Individual Account
| | |
| :---------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Sign-Up Requirement** | Users must initially create an individual account to access our services. |
| **API Keys** | Users are assigned a unique API key to interact with Nirvana Labs' RPC nodes and services. That API Key is a token required for interacting with the service and making API requests. |
## Team Account
| | |
| :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------- |
| **Setup** | Once you have an individual account, you can create a Team or be invited to join an existing Team. |
| **API Key Sharing** | Teams operate with a shared API key, which is utilized collectively by all team members for interaction with our RPC nodes and services. |
### Roles within Team Accounts
| | |
| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Developer** | Users with a "Developer" role have general access to the team's resources, such as RPC nodes and related analytics. Developers can manage API keys. |
| **Administrator** | Administrators have enhanced privileges in addition to the developer privileges, enabling them to invite or remove users from the team and manage billing information associated with the team's account. |
This setup ensures a flexible and collaborative user environment, allowing efficient RPC node access management while maintaining the necessary control and security measures via designated roles within Team accounts.
---
title: Authentication
source_url:
html: https://docs.nirvanalabs.io/blockchain/rpc-nodes/authentication/
md: https://docs.nirvanalabs.io/blockchain/rpc-nodes/authentication/index.md
---
After you create a node from the Dashboard and give it a name, the system will generate a unique API key attached to that node. This API is required for interacting with the service and making API requests. It will appear at the top of your Dashboard in the following format:
```
https://polygon.nirvanalabs.xyz/polynode?apikey=0c4d6970326cf823e9d59504b2679f361131
```
where the string of characters following "apikey=" is the API key for the node.
You can create several nodes if needed and the system will generate the endpoint URL. Endpoints are created with the API key and node name which the user specifies on creation. Your requests cannot be processed without the API key, and you will receive a 400 Bad Request error.
The Nirvana CDN authenticates the request through the API key when you copy the endpoint URL from the project Dashboard and paste it into the header of the query params in the API platform of your choice.
Each node has its own methods for interacting with the blockchain network. You can find the methods for the nodes Nirvana Labs supports in the Networks section in the tech docs.
---
title: FAQ
source_url:
html: https://docs.nirvanalabs.io/blockchain/rpc-nodes/faq/
md: https://docs.nirvanalabs.io/blockchain/rpc-nodes/faq/index.md
---
## What are RPC URLs & APIs?
For a software application to interact with a specific blockchain - either by reading blockchain data or sending transactions to the network - it must connect to a blockchain node. For this purpose, most blockchains implement a JSON-RPC specification, so applications can rely on a uniform set of methods regardless of the specific node or client implementation. JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in many various message passing environments. It uses JSON (RFC 4627) as data format.
## What is an API Key?
API keys ensure secure authentication and authorization processes between users and blockchains. They are instrumental in verifying user identity, controlling access to sensitive data, and monitoring API activity.
An API key is a distinctive string of randomly generated characters or a set of unique codes that serve as authentication credentials for clients to access an API. By utilizing API keys to query or access blockchains, you can establish a robust framework that allows only authorized requests to interact with the API, safeguarding sensitive data and mitigating the risk of misuse.
API keys serve as a unique identifier to facilitate the interaction between users and blockchains. They verify the user's identity and grant them access to specific information or privileges to perform designated actions. This mechanism guarantees that only authorized individuals can engage with the blockchain or exchange platform, reinforcing security and integrity.
You can obtain an API key for free to try Nirvana Labs' managed RPC services under certain limitations, and we have several premium plans. Please check out the [rates and plans](https://nirvanalabs.io/pricing).
By following a few [simple steps](/nodes/account-management/), you can easily get an API key and start interacting with the desired network RPC nodes by utilizing the Ethereum RPC endpoint, Polygon RPC endpoint, Arbitrum RPC endpoint and Avalanche RPC endpoint Nirvana Labs supports.
## Which API Does Ethereum Use?
Ethereum operates on the JSON-RPC API standard. The Ethereum JSON-RPC API serves as the fundamental framework for the Ethereum network, facilitating all types of blockchain interactions. This comprehensive suite of APIs empowers users to access many functionalities, including reading block and transaction data, querying chain information, executing smart contracts, and storing data on the blockchain.
## How Does Nirvana Labs's API Work?
The Nirvana Labs API empowers developers and users by allowing them to read and write data on the blockchain.
If you're not familiar with the inner workings of a blockchain, here's a brief overview:
> 📘 Blockchains consist of interconnected blocks of data.
> 📘 These blocks are stored across distributed nodes.
> 📘 Each node fulfils the role of a "mini-server" that enables its operator to interact with and manipulate blocks of data.
Through Nirvana Labs' API, developers access a high-level infrastructure that facilitates seamless interaction with the respective network. With API integration, Nirvana Labs developers can effortlessly send read and write requests to the blockchain.
At Nirvana Labs, we handle the complex underlying processes so that developers can dedicate their attention to building innovative products and applications. We strive to simplify the development experience, allowing our users to focus on realizing their ideas without getting bogged down by technical intricacies.
## What Methods Does Nirvana Labs Support?
Nirvana Labs supports the full list of JSON-RPC API methods as listed in the [JSON-RPC specification](https://github.com/ethereum/execution-apis).
## What is an API Endpoint?
When making an API call, you need to specify the endpoint, which is a URL consisting of the address and name of the node, along with the specific path for the desired endpoint.
The base URL format is as follows:
```
https://[blockchain name].nirvanalabs.xyz/[node name]?apikey=[xxxxxx]
```
where
* The node-name corresponds to the name you've given to the node you've created for the specific blockchain.
* The API key is the private API key generated by Nirvana Labs that gives you access to the node.
You then use the custom URL generated for that node to access and query the blockchain via an additional layer of CDN and an API gateway.
---
title: RPC Requests
source_url:
html: https://docs.nirvanalabs.io/blockchain/rpc-nodes/rpc-requests/
md: https://docs.nirvanalabs.io/blockchain/rpc-nodes/rpc-requests/index.md
---
Nirvana Labs Nodes support various open-source libraries for sending and receiving Ethereum data. We believe in supporting and contributing towards these open-source libraries to build transparency within web3 and eliminate a single point of reliance on one library.
Nirvana Labs operates RPC endpoints that can be accessed using cURL, JavaScript, Python, Ruby, and any relevant Web3 SDKs. Nirvana Labs supports a wide range of Ethereum APIs, including:
### EthersJS
The ethers.js library aims to be a complete and compact library for interacting with the Ethereum Blockchain and its ecosystem. It was initially designed for use with ethers.io and has since expanded into a more general-purpose library.
To use it, you can install it by running:
```
npm install --save ethers
```
[EthersJS Documentation](https://docs.ethers.io/v5/)
### Web3.Py
Web3.py is a Python library for interacting with Ethereum. It's commonly found in decentralized apps (dapps) to help with sending transactions, interacting with smart contracts, reading block data, and various other use cases. The original API was derived from the Web3.js Javascript API, but has since evolved toward the needs and creature comforts of Python developers.
You can install the Python library for interacting with Ethereum by running:
```
pip install web3
```
[Web3.Py Documentation](https://web3py.readthedocs.io/en/v5/)
### Eth.Rb
A straightforward library to build, sign, and broadcast Ethereum transactions. It allows the separation of key and node management. Sign transactions and handle keys anywhere you can run Ruby and broadcast transactions through any local or remote node. Sign messages and recover signatures for authentication.
Install it by running:
```
gem install eth
```
[Eth.Rb Documentation](https://github.com/q9f/eth.rb)
### cURL
Most \*nix based systems support cURL - a command line tool and library for transferring data with URLs. Check if you have it by running the following command:
```
curl -h
```
[cURL Documentation](https://curl.se/docs/manpage.html)
### WebSocket cat (wscat)
WebSocket cat (wscat) is a convenient tool for connecting to WebSocket APIs in your terminal. Install it using the following command:
```
npm install -g wscat
```
You can connect to the Ethereum node with wscat using two options. Run:
```
wscat -c 'wss://eth.getblock.io/mainnet/' --header 'x-api-key: '
```
or
```
wscat -c 'wss://eth.getblock.io/mainnet/?api_key='
```
When the command is performed, you will get a response that the connection is successfully enabled inside the terminal.
[Wscat Documentation](https://github.com/websockets/wscat)