Avail node API reference
BEFORE WE START
- The Avail node supports an extensive list of extrinsics and various other types of calls that you can try out in our explorer .
- 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
avail-js
-
Make sure
Node-jsis installed on your system. You can refer to Node-js docs for the same. -
Create a new Node-js project by running
npm init -yin a directory of your choice, and create a new file namedyour-file-name.ts -
To install the
avail-js-sdkrun the following command in the terminal:
npm install avail-js-sdk@0.3.0- Make sure to install the
ts-nodepackage if you haven’t already:
npm i -g ts-node- Create a
tsconfig.jsonfile 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