Quick Start
This guide will introduce you to the core concepts for building on the AIN blockchain. By the end of this guide, you'll learn how to build a blockchain app that chats with a bot and earn 100 AIN!
Step 1. Install SDK
npm install @ainblockchain/ain-js@latestStep 2. Connect to blockchain
Public RPC endpoints
Network
RPC Endpoint
Event Handler Endpoint
Chain ID
const Ain = require('@ainblockchain/ain-js').default;
const ain = new Ain('https://testnet-api.ainetwork.ai', 'wss://testnet-event.ainetwork.ai', 0); // testnet
const ain = new Ain('https://mainnet-api.ainetwork.ai', 'wss://mainnet-event.ainetwork.ai', 1); // mainnetStep 3. Create your wallet
Step 4. Get AIN (for free!)
Testnet: Free AIN via Faucet


Mainnet: Native AIN via AIN DAO Bot
Step 1: Import $AIN Tokens into MetaMask
Step 2: Deposit $AIN to AIN DAO Discord
Step 3: Withdraw AIN Credits to Native AIN
Step 5. Create your app
Step 6. Stake AIN to your app
Step 7. Make your app public
Advanced settings ✨
Step 8. Set up event listener
Step 9. Write values
Last updated