Skip to Content
API ReferenceAvail node API reference

Avail node API reference

BEFORE WE START

  1. The Avail node supports an extensive list of extrinsics and various other types of calls that you can try out in our explorer.
  2. This API reference currently documents only the most widely used extrinsics, but will be iterated upon to eventually be an exhaustive resource for the Avail node API.

Setting up the dev environment

  1. Make sure Node-js is installed on your system. You can refer to Node-js docs for the same.

  2. Create a new Node-js project by running npm init -y in a directory of your choice, and create a new file named your-file-name.ts

  3. To install the avail-js-sdk run the following command in the terminal:

npm install avail-js-sdk@0.3.0
  1. Make sure to install the ts-node package if you haven’t already:
npm i -g ts-node
  1. Create a tsconfig.json file in the root of your project and populate it:
tsconfig.json
{ "compilerOptions": { "target": "es2016", "module": "commonjs", "outDir": "build", "declaration": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true, "noUnusedParameters": true }, "exclude": ["node_modules", "build"] }
Last updated on