APIs


Overview

Aion nodes only understand JSON RPC, and have no idea what to do with high-level languages like Java, Python, on Solidity. Since JSON RPC can be a bit cumbersome to work with, developers can use the Ethers.js framework to deal with blockchain interactions. Ethers.js was originally created for use on Ethereum-based blockchains. The creator of Ether.js has since expanded the framework to include the Aion network.

/developers/apis/ethers-js/overview/


Overview

Aion nodes only understand JSON RPC, and have no idea what to do with high-level languages like Java, Python, on Solidity. Since JSON RPC can be a bit cumbersome to work with, developers can use the Web3.js framework to deal with blockchain interactions. Web3.js was originally created by the Ethereum Foundation for Ethereum-based blockchains. The Aion Foundation modified the calls that Web3.js makes to the JSON RPC layer so that the framework is able to communicate with the Aion network.

/developers/apis/web3-js/overview/


Install

Follow these instructions to grab the latest version of Ether.js.

/developers/apis/ethers-js/install/


Install

There are two ways to install the Aion version of Web3.js. Using the minified JavaScript file from the Aion Web3.js repository is the fastest and easiest way to get up and running with Web3.js. This method is also the easiest way to link up a website frontend. However, if you want to deal with the blockchain in a more backend-way, then you should look at using the Node JS console section.

/developers/apis/web3-js/install/


Examples

Outlined on this page are some examples on how to use Ethers.js on the Aion network. These examples have been designed to be copy-and-pasteable into your existing code. If you have some suggestion for further examples to include here, click on the GitHub icon at the bottom left of the screen to be take to this page in the AionNetwork/Docs repository.

/developers/apis/ethers-js/examples/


Examples

We've put together a few examples of how you can use Aion Web3.js in your projects. All these examples use the minified JavaScript file instead of the Node JS console. This is so you can copy and paste in the code examples into a boilerplate project.

/developers/apis/web3-js/examples/