Skip to content

Commit

Permalink
Merge pull request #31 from michaeldistel/master
Browse files Browse the repository at this point in the history
Update README.md with simple example
  • Loading branch information
freddiecoleman committed Jun 10, 2021
2 parents 38a4107 + 7668788 commit b6a256d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@

TypeScript client for communicating with [Chia](https://www.chia.net/) RPC interfaces. All API calls return promises.

### Install and Setup
```
npm install chia-client
```

### Full Node

```
import { FullNode } from 'chia-client';
const fullNode = new FullNode({
protocol: 'http',
protocol: 'https',
hostname: 'localhost',
port: 8555
});
const blockchain = await fullNode.getBlockchainState();
const blockchain = fullNode.getBlockchainState();
console.log(await blockChainState.blockchain_state.space);
```

### Wallet
Expand All @@ -22,7 +29,7 @@ const blockchain = await fullNode.getBlockchainState();
import { Wallet } from 'chia-client';
const wallet = new Wallet({
protocol: 'http',
protocol: 'https',
hostname: 'localhost',
port: 8555
});
Expand Down

0 comments on commit b6a256d

Please sign in to comment.