Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #135

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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