January 18, 2024
Does Rootstock have an API?
Yes, Rootstock does have an API. Instead of using Rootstock's public API, consider using the Mesh API, which has built integrations with 300+ digital asset exchanges and wallets. Check out Mesh's documentation and integration list for more information.
About Rootstock
Rootstock, a smart contracts platform, is designed to be compatible with the Ethereum Virtual Machine (EVM) and secured by the Bitcoin network. Its mission is to create a more decentralized, fair, and free world. Rootstock offers a range of features, including high scalability, interoperability, and fast transactions, all while being secured by Bitcoin's proof of work. The platform enables the development of decentralized finance (DeFi) applications on the Bitcoin network and provides resources for developers to join the ecosystem. Rootstock also boasts a diverse global community, encouraging collaboration, building, and learning.
Rate Limits
Rootstock API rate limits are:
- Rate Limits Range:
- An account can still perform any transaction, even the most expensive transactions (128KB in size), after about 32 minutes of inactivity.
Authentication
This is how you authenticate your Rootstock API:
- Install the authentication library in your backend.
- Add the backend URL to rLogin.
- Choose between the open flavor (authenticates users by their account) or the data vault flavor (integrates SSI and RIF Data Vault).
- For the open flavor, configure the backend URL in rLogin and initialize rLogin with the backend URL.
- For the data vault flavor, initialize rLogin with the RIF Data Vault package and the service URL.
Errors
Here are the most common API errors for Rootstock API:
- KB000: This error code is related to the RNS JS Library. To troubleshoot, refer to the error message and description provided in the knowledge base.
- KB001: This error code is also related to the RNS JS Library. To troubleshoot, refer to the error message and description provided in the knowledge base.
- KB002: This error code is related to the RNS JS Library as well. To troubleshoot, refer to the error message and description provided in the knowledge base.
Recent changes
Here are the most recent changes in Rootstock API:
- Version 0.1: This version was based on the Gas Station Network (GSN) and aimed to be compatible with existing and future smart contracts without requiring modifications. If you encounter issues with this version, ensure your smart contracts are compatible with GSN and check for any updates or patches.
- Version 0.2: This version is a redesign of GSN and introduces several improvements. If you experience problems with this version, verify that your smart contracts are compatible with the new architecture and that you've implemented the necessary optimizations for gas costs and off-chain paymaster verifications.
- Version 1: This version introduces a revenue-sharing mechanism to the RIF Relay service without increasing user costs. If you face issues with this version, ensure that you've correctly implemented the feesReceiver attribute and the MultiSig contract and that the payment flow is properly configured.
An alternative to the Rootstock API
While Rootstock offers a powerful smart contract platform, developers and businesses looking to offer a more streamlined and integrated experience for managing digital assets to their end users should consider using the Mesh API. Mesh provides a range of benefits that make it a better option than accessing Rootstock's API directly.
Here are some of the standout features of the Mesh API:
- Integrated User Experience: Mesh API seamlessly embeds digital asset management functionalities into your app, enabling a smooth user journey.
- Broad Connectivity: With a single integration, the Mesh API offers connectivity to over 300 brokerages, exchanges, and wallets, providing extensive flexibility and choice.
- Simplified Asset Management: The Mesh API eases the process of depositing assets, allowing transfers from various external sources all directly within your app for enhanced user convenience.
Start with Mesh today and experience the ease and efficiency of their cutting-edge API in your digital asset endeavors.