diff --git a/docs/01-concepts/rif-suite/index.md b/docs/01-concepts/rif-suite/index.md index bede7e6a..8d64905d 100644 --- a/docs/01-concepts/rif-suite/index.md +++ b/docs/01-concepts/rif-suite/index.md @@ -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.| diff --git a/docs/01-concepts/rif-suite/token/index.md b/docs/01-concepts/rif-suite/token/index.md index c44bf316..21815e41 100644 --- a/docs/01-concepts/rif-suite/token/index.md +++ b/docs/01-concepts/rif-suite/token/index.md @@ -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) diff --git a/docs/04-resources/03-faqs/index.md b/docs/04-resources/03-faqs/index.md index 3248b9a6..9c2273a8 100644 --- a/docs/04-resources/03-faqs/index.md +++ b/docs/04-resources/03-faqs/index.md @@ -28,7 +28,7 @@ Here are some frequently asked questions about the Rootstock and RIF Platforms. 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. @@ -135,8 +135,7 @@ Here are some frequently asked questions about the Rootstock and RIF Platforms. What is the RIF token, and what is its purpose? - - 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/). @@ -252,14 +251,14 @@ Here are some frequently asked questions about the Rootstock and RIF Platforms. - [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/). What exactly is the value proposition of RIF? - 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/). diff --git a/docs/05-dev-tools/node-rpc/alchemy.md b/docs/05-dev-tools/node-rpc/alchemy.md new file mode 100644 index 00000000..4493f0d4 --- /dev/null +++ b/docs/05-dev-tools/node-rpc/alchemy.md @@ -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: + + + +::: \ No newline at end of file diff --git a/docs/05-dev-tools/node-rpc/dRPC.md b/docs/05-dev-tools/node-rpc/dRPC.md new file mode 100644 index 00000000..4f4fba3a --- /dev/null +++ b/docs/05-dev-tools/node-rpc/dRPC.md @@ -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** + + + + - Create an account at [dRPC.io](https://www.drpc.io). + - Generate your API key from the dashboard. + + + + 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 + ``` + + + Here’s a sample request to fetch the latest block number on Ethereum: +```json +{ + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 +} +``` + + + + +## **Make Your First Call** + + + + This will enable you test your API + + + ```bash + https://eth-mainnet.drpc.io/YOUR_API_KEY + ``` + + + ```json + { + "jsonrpc": "2.0", + "method": "eth_getBalance", + "params": ["0xYourEthereumAddress", "latest"], + "id": 1 + } + ``` + + + ```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: + + + +::: + + + + + +## **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 +``` \ No newline at end of file diff --git a/docs/05-dev-tools/node-rpc/getBlock.md b/docs/05-dev-tools/node-rpc/getBlock.md new file mode 100644 index 00000000..b2372e25 --- /dev/null +++ b/docs/05-dev-tools/node-rpc/getBlock.md @@ -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// + ``` +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: + + + +::: + +## **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 +} +``` \ No newline at end of file diff --git a/docs/05-dev-tools/node-rpc/nownodes.md b/docs/05-dev-tools/node-rpc/nownodes.md new file mode 100644 index 00000000..6daa59bb --- /dev/null +++ b/docs/05-dev-tools/node-rpc/nownodes.md @@ -0,0 +1,100 @@ +--- +sidebar_position: 4 +title: NowNodes +sidebar_label: NowNodes +tags: [rsk, rootstock, resources, tutorials, setup, dApps, BaaS, API, Nodes, NowNodes] +description: " +NowNodes is a Blockchain-as-a-Service (BaaS) platform offering API access to over 50 blockchain networks. It allows developers to connect to full nodes and explore blockchains with minimal setup. " +--- + +NowNodes is a Blockchain-as-a-Service (BaaS) platform offering API access to over 50 blockchain networks. It allows developers to connect to full nodes and explore blockchains with minimal setup. + +## Why Choose NowNodes? +- **Wide Blockchain Support:** Access popular blockchains like Bitcoin, Ethereum, Binance Smart Chain, and more. +- **Free Tier Available:** Start for free with limited API requests. +- **Reliable Infrastructure:** High uptime and fast response times. + + +## Supported Blockchains +NowNodes supports over 50 blockchains, including: +- **Bitcoin (BTC)** +- **Ethereum (ETH)** +- **Binance Smart Chain (BSC)** +- **Polygon (MATIC)** +- **Dogecoin (DOGE)** + +## Supported Protocols +- **JSON-RPC**: For comprehensive blockchain interaction. +- **REST**: Simplified HTTP-based requests. +- **WebSocket**: For real-time blockchain event subscriptions. + + + +## **Getting Started with NowNodes API** + +### 1. Sign Up and Get an API Key +- Register at [NowNodes.io](https://nownodes.io). +- Select the plan that fits your needs +- Generate an API key. + +### 2. Configure Your Endpoint +Use the following base URLs for API requests: +- **Bitcoin Mainnet:** + ``` + https://btc.nownodes.io/YOUR_API_KEY + ``` +- **Ethereum Mainnet:** + ``` + https://eth.nownodes.io/YOUR_API_KEY + ``` + +### 3. Example API Calls +#### JSON-RPC: Fetch the latest block number on Ethereum +```json +{ + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 +} +``` + +:::note[Info] + + To learn more about the NowNodes connection with Rootstock click the button below: + + + +::: + +#### REST: Retrieve account balance on Bitcoin +``` +GET https://btc.nownodes.io/v1/balance/your-address?api_key=YOUR_API_KEY +``` + + + +## **Make Your First Call** + +### Step-by-Step Guide +1. Open a terminal or API client (e.g., Postman, curl). +2. Use the Bitcoin Mainnet endpoint as an example: + ```bash + https://btc.nownodes.io/v1/YOUR_API_KEY + ``` +3. Send a request to fetch the latest block hash: + ```json + { + "jsonrpc": "1.0", + "method": "getbestblockhash", + "params": [], + "id": "1" + } + ``` +4. You’ll receive a response like this: + ```json + { + "result": "0000000000000000000b1c5e6b6e7bcd9fa47b6d13a20b6eac03c76a66b4f3ad", + "id": "1" + } + ``` \ No newline at end of file diff --git a/docs/05-dev-tools/node-rpc/rpc-api.md b/docs/05-dev-tools/node-rpc/rpc-api.md new file mode 100644 index 00000000..9e6aac4e --- /dev/null +++ b/docs/05-dev-tools/node-rpc/rpc-api.md @@ -0,0 +1,53 @@ +--- +sidebar_position: 5 +title: RPC API +sidebar_label: RPC API +tags: [rsk, rootstock, resources, tutorials, setup, dApps, protocol, RPC, API, ] +description: "Remote Procedure Call (RPC) is a protocol that allows a program to execute procedures (functions) on a remote server as if they were local calls." +--- + +Remote Procedure Call (RPC) is a protocol that allows a program to execute procedures (functions) on a remote server as if they were local calls. This eliminates the need for developers to handle low-level network communication. + +### How Our API Works +Rootstock RPC API uses the JSON-RPC protocol, a lightweight, text-based standard for defining procedures and their parameters. This makes it easy to communicate with the API using JSON-formatted requests and receive structured responses. + +### Use Cases +- Building integrations for your product or service. +- Automating workflows with server-side commands. +- Extending your application’s capabilities with remote functions. + + +## **JSON-RPC Overview** + +### What is JSON-RPC? +JSON-RPC is a remote procedure call protocol encoded in JSON. It’s simple, stateless, and transport-agnostic, making it perfect for APIs. + +### Supported Features +- **Version:** JSON-RPC 2.0 +- **Methods:** Flexible method definitions for various tasks. +- **Error Handling:** Clear error messages and structured codes. + +:::note[Info] + + To learn more about the Rootstock RPC API, including how to use it, features, click the button below: + + + +::: + +### Key Data Structures +- **Request:** +``` +{ "jsonrpc": "2.0", "method": "method_name", "params": {}, "id": 1 } +``` +- **Response:** +``` +{ "jsonrpc": "2.0", "result": {}, "id": 1 } +``` +- **Error:** +``` +{ "jsonrpc": "2.0", "error": { "code": -32601, "message": "Method not found" }, "id": 1 } +``` + + +