Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
- Tweak README.md arrangement
  • Loading branch information
platfowner authored Sep 1, 2023
1 parent 4cd6c32 commit a9ed4e7
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

AI Network Client Library for Node.js


## Installation
```
yarn add @ainblockchain/ain-js
```


## Examples
```
const Ain = require('./lib/ain').default;
Expand All @@ -30,6 +32,26 @@ const accounts = ain.db.ref('/accounts').getValue().then(result => {
});
```

## Test How-To
1. Clone AIN Blockchain and install
```
git clone [email protected]: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
Expand Down Expand Up @@ -288,25 +310,6 @@ eventCallback?: BlockchainEventCallback, errorCallback?: (error: any) => void):
`unsubscribe(filterId: string, callback: ErrorFirstCallback<EventFilter>)`
- Unsubscribe from a previously subscribed event.

## Test How-To
1. Clone AIN Blockchain and install
```
git clone [email protected]: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

Expand Down

0 comments on commit a9ed4e7

Please sign in to comment.