This repo contains all the code examples from the AIN Blockchain Quick Start Guide, helping you build blockchain apps and interact with the AIN blockchain.
- Install Node.js (version >= 16.0.0 required)
- Clone this repo
- Run
npm install
to install the dependencies - Run code examples
node examples/<example_filename>.js
Here is the list of examples in this repo:
- create_account.js: Create a new wallet account
- create_app.js: Create a new blockchain app
- stake_app.js: Stake AIN to a blockchain app
- set_rule.js: Set a rule at a specific path
- set_function.js: Set a function at a specific path
- set_value.js: Set a value at a specific path
- transfer.js: Transfer AIN to another account
For the full context behind this example app, check out the document.