-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from rsksmart/improve-devtools-pages
Improved the devtools pages
- Loading branch information
Showing
8 changed files
with
447 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
sidebar_position: 1 | ||
title: Alchemy | ||
sidebar_label: Alchemy | ||
tags: [rsk, rootstock, resources, tutorials, Blockchains, JSON-RPC, WebSockets, Alchemy, RPC, API, RPC API] | ||
description: "Alchemy is a leading blockchain developer platform that simplifies the process of building Web3 applications. It provides robust APIs for interacting with blockchains like Ethereum, Polygon, and more." | ||
--- | ||
|
||
Alchemy is a leading blockchain developer platform that simplifies the process of building Web3 applications. It provides robust APIs for interacting with blockchains like Ethereum, Polygon, and more. | ||
|
||
## Why Use Alchemy? | ||
- **Scalable infrastructure:** Handle millions of API calls effortlessly. | ||
- **Reliable and fast:** Built for high performance and minimal downtime. | ||
- **Comprehensive features:** From querying blockchain data to managing NFTs, Alchemy has it all. | ||
|
||
|
||
## Supported Blockchains | ||
Alchemy supports multiple blockchains, including Rootstock: | ||
- Arbitrum | ||
|
||
## API Features | ||
- **JSON-RPC Support:** Compatible with standard Ethereum JSON-RPC methods. | ||
- **Enhanced APIs:** Custom endpoints for performance insights, NFT data, and more. | ||
- **WebSockets:** For real-time updates and event subscriptions. | ||
|
||
## Core API Methods | ||
1. Get Account Balance | ||
``` | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_getBalance", | ||
"params": ["0xAddress", "latest"], | ||
"id": 1 | ||
} | ||
``` | ||
|
||
2. Send Transaction | ||
``` | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_sendRawTransaction", | ||
"params": ["0xSignedTransactionData"], | ||
"id": 1 | ||
} | ||
``` | ||
|
||
:::note[Info] | ||
|
||
To learn more about how to interact with Rootstock network with the Alchemy RPC Provider including the setup and a step by step guide, | ||
|
||
click the button below: | ||
|
||
<Button href="https://dev.rootstock.io/developers/rpc-api/rootstock/" align="left">Rootstock getBlock Website</Button> | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
--- | ||
sidebar_position: 2 | ||
title: dRPC | ||
sidebar_label: dRPC | ||
tags: [rsk, rootstock, resources, tutorials, setup, dRPC, dApps, BaaS, RPC, API] | ||
description: "dRPC is a next-generation RPC platform that simplifies and optimizes communication with blockchain nodes. Built for Web3, dRPC provides low-latency, high-reliability access to blockchain data and operations." | ||
--- | ||
|
||
dRPC is a next-generation RPC platform that simplifies and optimizes communication with blockchain nodes. Built for Web3, dRPC provides low-latency, high-reliability access to blockchain data and operations. | ||
|
||
### Why Choose dRPC? | ||
- **High Performance:** Optimized for speed and low latency. | ||
- **Decentralized:** Built for scalability and resilience. | ||
- **Cross-Blockchain Support:** Interact with multiple blockchain ecosystems. | ||
|
||
|
||
## Supported Blockchains | ||
dRPC supports various blockchain networks, including: | ||
- Ethereum | ||
- Binance Smart Chain | ||
- Polygon | ||
- Solana | ||
- Avalanche | ||
|
||
## Protocols | ||
- **JSON-RPC** | ||
- **REST** | ||
- **WebSocket** | ||
|
||
|
||
## **Getting Started with dRPC API** | ||
|
||
<Steps> | ||
<Step title="Sign Up and Get an API Key"> | ||
- Create an account at [dRPC.io](https://www.drpc.io). | ||
- Generate your API key from the dashboard. | ||
|
||
</Step> | ||
<Step title="Configure Your Endpoint"> | ||
Use the base URL for the desired blockchain network: | ||
- **Ethereum Mainnet:** | ||
``` | ||
https://eth-mainnet.drpc.io/YOUR_API_KEY | ||
``` | ||
- **Binance Smart Chain Testnet:** | ||
``` | ||
https://bsc-testnet.drpc.io/YOUR_API_KEY | ||
``` | ||
</Step> | ||
<Step title="Example API Call"> | ||
Here’s a sample request to fetch the latest block number on Ethereum: | ||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_blockNumber", | ||
"params": [], | ||
"id": 1 | ||
} | ||
``` | ||
</Step> | ||
</Steps> | ||
|
||
|
||
## **Make Your First Call** | ||
|
||
<Steps> | ||
<Step title="Open an API client like Postman or curl"> | ||
This will enable you test your API | ||
</Step> | ||
<Step title="Use the Ethereum Mainnet endpoint as an example: "> | ||
```bash | ||
https://eth-mainnet.drpc.io/YOUR_API_KEY | ||
``` | ||
</Step> | ||
<Step title="Send the following JSON-RPC request:"> | ||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_getBalance", | ||
"params": ["0xYourEthereumAddress", "latest"], | ||
"id": 1 | ||
} | ||
``` | ||
</Step> | ||
<Step title="You’ll receive a response like this:"> | ||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"result": "0x0234c8a3397aab58", | ||
"id": 1 | ||
} | ||
``` | ||
The `result` field contains the balance in Wei (smallest Ether unit). | ||
:::note[Info] | ||
To learn more about the dRPC connection with Rootstock, including code snippets, RPC endpoints, and a step-by-step guide on adding Rootstock Mainnet to MetaMask using dRPC, click the button below: | ||
<Button href="https://drpc.org/chainlist/rootstock?utm_source=docs&utm_medium=rootstock" align="left">Rootstock dRPC Website</Button> | ||
::: | ||
</Step> | ||
</Steps> | ||
## **Advanced Features** | ||
### Batch Requests | ||
Efficiently send multiple queries in a single request: | ||
```json | ||
[ | ||
{ "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1 }, | ||
{ "jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xYourAddress", "latest"], "id": 2 } | ||
] | ||
``` | ||
|
||
### WebSocket Subscriptions | ||
Subscribe to live events like new blocks or logs: | ||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_subscribe", | ||
"params": ["newHeads"], | ||
"id": 1 | ||
} | ||
``` | ||
|
||
### REST Endpoints | ||
For developers preferring REST over JSON-RPC, dRPC offers RESTful APIs for common operations: | ||
``` | ||
GET https://eth-mainnet.drpc.io/v1/account/0xYourEthereumAddress/balance | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
sidebar_position: 3 | ||
title: GetBlock | ||
sidebar_label: getBlock | ||
tags: [rsk, rootstock, resources, tutorials, setup, BaaS, API, getBlock] | ||
description: "GetBlock is a Blockchain-as-a-Service platform providing API access to full blockchain nodes. It allows developers to interact with blockchains using JSON-RPC, REST, and WebSocket protocols. " | ||
--- | ||
|
||
GetBlock is a Blockchain-as-a-Service platform providing API access to full blockchain nodes. It allows developers to interact with blockchains using JSON-RPC, REST, and WebSocket protocols. | ||
|
||
## Why Choose GetBlock? | ||
- **Broad Blockchain Support:** Access Ethereum, Bitcoin, Binance Smart Chain, Solana, and more. | ||
- **High Availability:** Enterprise-grade reliability with 99.95% uptime. | ||
- **Scalable Solutions:** Pay-as-you-go plans tailored to your project size. | ||
|
||
|
||
## Supported Protocols | ||
GetBlock supports these protocols for interacting with blockchain nodes: | ||
- **JSON-RPC** | ||
- **REST** | ||
- **WebSocket** | ||
|
||
## Key Blockchain Networks | ||
- **Ethereum** (`eth-mainnet`, `eth-goerli`) | ||
- **Bitcoin** (`btc-mainnet`, `btc-testnet`) | ||
- **Binance Smart Chain** (`bsc-mainnet`, `bsc-testnet`) | ||
- **Polygon** (`matic-mainnet`, `matic-testnet`) | ||
|
||
|
||
## **Getting Started with GetBlock API** | ||
|
||
### 1. Sign Up and Get an access Token | ||
- Create an account at [GetBlock.io](https://getblock.io). | ||
- Generate an [access token](https://getblock.io/docs/get-started/auth-with-access-token/) from your dashboard. | ||
|
||
### 2. Configure Your Endpoint | ||
- Base URL: | ||
``` | ||
https://{blockchain}.getblock.io/mainnet/YOUR_API_KEY/ | ||
``` | ||
Replace `{blockchain}` with the desired blockchain name (e.g., `eth`). | ||
|
||
|
||
## **Make Your First Call** | ||
|
||
1. Use a tool like Postman. | ||
2. Use the Ethereum endpoint as an example: | ||
```bash | ||
https://go.getblock.io/<ACCESS_TOKEN>/ | ||
``` | ||
3. Send the following JSON request to fetch the current block number: | ||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_blockNumber", | ||
"params": [], | ||
"id": 1 | ||
} | ||
``` | ||
4. You’ll receive a response like: | ||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_blockNumber", | ||
"params": [], | ||
"id": 1 | ||
} | ||
``` | ||
> The `result` field contains the current block number in hexadecimal format. | ||
:::note[Info] | ||
|
||
To learn more about the getBlock connection with Rootstock, including code snippets, RPC endpoints, click the button below: | ||
|
||
<Button href="https://getblock.io/nodes/rsk/" align="left">Rootstock getBlock Website</Button> | ||
|
||
::: | ||
|
||
## **Advanced Features** | ||
|
||
### Batch Requests | ||
Send multiple requests in a single API call for efficiency: | ||
```json | ||
[ | ||
{ "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1 }, | ||
{ "jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xAddress", "latest"], "id": 2 } | ||
] | ||
``` | ||
|
||
### Real-Time Updates with WebSocket | ||
Subscribe to Ethereum new block events: | ||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_subscribe", | ||
"params": ["newHeads"], | ||
"id": 1 | ||
} | ||
``` |
Oops, something went wrong.