Skip to content

Commit

Permalink
Merge pull request #162 from rsksmart/improve-devtools-pages
Browse files Browse the repository at this point in the history
Improved the devtools pages
  • Loading branch information
owans authored Dec 6, 2024
2 parents 3eb9033 + c8d7656 commit 5e71048
Show file tree
Hide file tree
Showing 8 changed files with 447 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/01-concepts/rif-suite/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Open source tools and technologies that make it faster, easier and more rewardin

| Product | Description |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [RIF Token](https://rif.technology/rif-token/) | RIF is the native token of RIF ecosystem. It is a utility asset, used to consume RIF products and services. The RIF Token is also the governance token for the [Rootstock Collective](https://rootstockcollective.xyz/) - stRIF, a token created by [staking RIF tokens](https://rif.technology/rif-token/). stRIF tokens represent voting power within the DAO, enabling token holders to participate in governance decisions like grant allocations and changes to the system. |
| [RIF Token](https://rif.technology/rif-token/) | The RIF (Rootstock Infrastructure Framework) token makes it easier, faster and more rewarding to build on Bitcoin. It also enables governance on [RootstockCollective DAO](https://rootstockcollective.xyz/). By staking RIF, users can mint stRIF; the governance token of the RootstockCollective used for voting, proposal creation, and rewards allocation. For more information, read the [Rootstock Collective Whitepaper](https://wiki.rootstockcollective.xyz/). |
| [RBTC Flyover](/developers/integrate/flyover/) | RBTC Flyover is a fast and secure way for users to transfer BTC in and out of the Rootstock Ecosystem where it can be used to interact with a range of applications to send, save and spend money. |
| RNS | RNS (RIF Name Service) replaces complicated cryptocurrency addresses with easy-to-remember nicknames, simplifying digital asset transactions. It also facilitates the integration of a Self Sovereign Identity protocol into your products, which enhances user security and flexibility. .|
| Wallet | Bring Bitcoin DeFi to your users with RIF Wallet, an open source Bitcoin wallet with smart contract capabilities. Open-source, fully programmable and customizable.|
Expand Down
4 changes: 2 additions & 2 deletions docs/01-concepts/rif-suite/token/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
sidebar_label: RIF Token
sidebar_position: 400
title: "RIF Token: Empowering Decentralized Applications"
title: "RIF Token: Bringing Utility to Bitcoin"
tags: [rif, token, erc677]
description: "Information about the RIF token, where to obtain it, how to transfer it, and technical details on its token standard"
---

The Rootstock Infrastructure Framework (RIF) Token allows any token holder to consume the services that are compatible with [RIF Products and Services](/concepts/rif-suite/). It is also the governance token of the [Rootstock Collective](https://rootstockcollective.xyz/) - stRIF, a token created by [staking RIF tokens](#strif-rif-token-in-dao). stRIF tokens represent voting power within the DAO, enabling token holders to participate in governance decisions like grant allocations and changes to the system. For more information, read the [Rootstock Collective Whitepaper](https://wiki.rootstockcollective.xyz/2c6e3b87b49f4c1e9225b713e1b49538?v=819168fca4964319896c19e8299a8ea0).
The RIF (Rootstock Infrastructure Framework) token makes it easier, faster and more rewarding to build on Bitcoin. It also enables governance on [RootstockCollective DAO](https://rootstockcollective.xyz/). By staking RIF, users can mint stRIF; the governance token of the RootstockCollective used for voting, proposal creation, and rewards allocation. For more information, read the [Rootstock Collective Whitepaper](https://wiki.rootstockcollective.xyz/).

## RIF (RIF Token in Mainnet)

Expand Down
9 changes: 4 additions & 5 deletions docs/04-resources/03-faqs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Here are some frequently asked questions about the Rootstock and RIF Platforms.
<Accordion.Body>
Rootstock's primary purpose is to enable Bitcoin users to create and execute smart contracts, thereby extending the functionality and use cases of the Bitcoin network. Rootstock achieves this by using a 2 way peg system that allows users to send Bitcoin directly to the Rootstock chain, where they become convertible to Rootstock's native cryptocurrency, RBTC. This RBTC can then be used within the Rootstock network to interact with smart contracts and dApps.
- In addition to smart contract functionality, Rootstock also focuses on providing solutions for faster transactions and higher scalability, two of the main challenges in the Bitcoin network. It also supports merged mining, allowing Bitcoin miners to mine both Bitcoin and RBTC simultaneously without additional computational resources.
- Furthermore, Rootstock is also home to the RIF (Rootstock Infrastructure Framework), which provides a range of open and decentralized infrastructure services, including payments, storage, and communications, that enable faster, easier, and scalable development of distributed applications (dApps).
- Furthermore, Rootstock is also home to the RIF (Rootstock Infrastructure Framework) which makes it easier, faster and more rewarding to build on Bitcoin. It also enables governance on [RootstockCollective DAO](https://rootstockcollective.xyz/).
- Finally, the purpose of Rootstock is to enhance the Bitcoin ecosystem by adding smart contract functionality and more without compromising the features that make Bitcoin unique such as security and decentralization.
</Accordion.Body>
</Accordion.Item>
Expand Down Expand Up @@ -135,8 +135,7 @@ Here are some frequently asked questions about the Rootstock and RIF Platforms.
<Accordion.Item eventKey="2">
<Accordion.Header as="h3">What is the RIF token, and what is its purpose?</Accordion.Header>
<Accordion.Body>
- The RIF token is a utility token that powers the Rootstock Infrastructure Framework (RIF), a set of open-source, decentralized tools and technologies that make it easy to build accessible DeFi products and services on the blockchain. It is designed to enable and facilitate the wide range of decentralized services available on the RIF platform. The RIF token is the means of access for all RIF protocols, such as RIF Wallet, RNS, and third-party-developed infrastructure services. Also, any other apps that might be deployed on RIF’s framework that agree to accept RIF Tokens as a means of accessing/consuming the service or app, such as RIF on Chain, the stablecoin protocol underpinning USDRIF. See the [RIF Whitepaper](https://rif.technology/static/add903ce229a6f45a606cd78b028cf9e/RIF-whitepaper-V2.pdf) for more details.
- The RIF Token is also the governance token for the Rootstock Collective - stRIF, a token created by [staking RIF tokens](https://rif.technology/rif-token/). stRIF tokens represent voting power within the DAO, enabling token holders to participate in governance decisions like grant allocations and changes to the system. [RBTC, native Rootstock token](https://rootstock.io/rbtc/#get-rbtc), is used as a gas token.
- The RIF (Rootstock Infrastructure Framework) token makes it easier, faster and more rewarding to build on Bitcoin. It also enables governance on [RootstockCollective DAO](https://rootstockcollective.xyz/). By staking RIF, users can mint stRIF; the governance token of the RootstockCollective used for voting, proposal creation, and rewards allocation. For more information, read the [Rootstock Collective Whitepaper](https://wiki.rootstockcollective.xyz/).
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="3">
Expand Down Expand Up @@ -252,14 +251,14 @@ Here are some frequently asked questions about the Rootstock and RIF Platforms.
<Accordion.Body>
- [Rootstock Infrastructure Framework](/concepts/rif-suite/) (RIF) is a suite of open and decentralized infrastructure protocols that enable faster, easier, and more scalable distributed application development (dApps) within a unified environment. RIF is built on the Rootstock smart contract network, the first general-purpose smart contract secured by the Bitcoin network. RIF includes support for decentralized, third-party, off-chain payment networks; and easy-to-use interfaces for developers.
- RIF aims to bridge the gap between blockchain technologies and their mass-market adoption by providing developers and users access to various services across multiple crypto-economies.
- The RIF Token is the governance token for the Rootstock Collective - stRIF, a token created by [staking RIF tokens](https://rif.technology/rif-token/). stRIF tokens represent voting power within the DAO, enabling token holders to participate in governance decisions like grant allocations and changes to the system. [RBTC, native Rootstock token](https://rootstock.io/rbtc/#get-rbtc), is used as a gas token.
- The RIF (Rootstock Infrastructure Framework) token makes it easier, faster and more rewarding to build on Bitcoin. It also enables governance on [RootstockCollective DAO](https://rootstockcollective.xyz/). By staking RIF, users can mint stRIF; the governance token of the RootstockCollective used for voting, proposal creation, and rewards allocation. For more information, read the [Rootstock Collective Whitepaper](https://wiki.rootstockcollective.xyz/).
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="2">
<Accordion.Header as="h3">What exactly is the value proposition of RIF?</Accordion.Header>
<Accordion.Body>
- RIF is a service layer built on the Rootstock blockchain, offering open, decentralized tools and technologies. With RIF, developers can create scalable DeFi products quickly and easily.
- RIF token is the native token of the RIF ecosystem and also the governance token (stRIF) for the Rootstock Collective (DAO). It is a utility asset used to interact with RIF products and services. Read the [RIF Whitepaper](https://rif.technology/static/add903ce229a6f45a606cd78b028cf9e/RIF-whitepaper-V2.pdf).
- The RIF (Rootstock Infrastructure Framework) token makes it easier, faster and more rewarding to build on Bitcoin. It also enables governance on [RootstockCollective DAO](https://rootstockcollective.xyz/). By staking RIF, users can mint stRIF; the governance token of the RootstockCollective used for voting, proposal creation, and rewards allocation. For more information, read the [Rootstock Collective Whitepaper](https://wiki.rootstockcollective.xyz/).
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="3">
Expand Down
55 changes: 55 additions & 0 deletions docs/05-dev-tools/node-rpc/alchemy.md
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>

:::
133 changes: 133 additions & 0 deletions docs/05-dev-tools/node-rpc/dRPC.md
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
```
99 changes: 99 additions & 0 deletions docs/05-dev-tools/node-rpc/getBlock.md
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
}
```
Loading

0 comments on commit 5e71048

Please sign in to comment.