diff --git a/README.md b/README.md index bf1997e..c86b45f 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,13 @@ AI Network Client Library for Node.js + ## Installation ``` yarn add @ainblockchain/ain-js ``` + ## Examples ``` const Ain = require('./lib/ain').default; @@ -30,6 +32,26 @@ const accounts = ain.db.ref('/accounts').getValue().then(result => { }); ``` +## Test How-To +1. Clone AIN Blockchain and install +``` +git clone git@github.com:ainblockchain/ain-blockchain.git +yarn install +``` + +2. Start blockchain locally +``` +bash start_local_blockchain.sh +``` + * Note that the node 2 of the blockchain needs to be started with ENABLE_EVENT_HANDLER=true env variable for the event manager test cases. + +3. Run tests +``` +yarn run test +yarn run test_snapshot # update test snapshot files +``` + + ## API ### Ain @@ -288,25 +310,6 @@ eventCallback?: BlockchainEventCallback, errorCallback?: (error: any) => void): `unsubscribe(filterId: string, callback: ErrorFirstCallback)` - Unsubscribe from a previously subscribed event. -## Test How-To -1. Clone AIN Blockchain and install -``` -git clone git@github.com:ainblockchain/ain-blockchain.git -yarn install -``` - -2. Start blockchain locally -``` -bash start_local_blockchain.sh -``` - * Note that the node 2 of the blockchain needs to be started with ENABLE_EVENT_HANDLER=true env variable for the event manager test cases. - -3. Run tests -``` -yarn run test -yarn run test_snapshot # update test snapshot files -``` - ## LICENSE