Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Jun 9, 2020
1 parent 4c22cb9 commit 4cd2c49
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Eos.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ecc = require('eosjs-ecc'); //https://github.com/EOSIO/eosjs-ecc
class Eos {
constructor(nodes=[], private_keys=[]){
console.log(`Eos initialize`)
this.nodes = nodes;
this.nodes = Array.isArray(nodes) ? nodes : [nodes];
this.pks = Array.isArray(private_keys) ? private_keys : [private_keys];
this.Serialize = Serialize;
this.RpcError = RpcError;
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# eos
eosjs wrapper that bundles eosjs eosjs-ecc

## Install the dependencies
```bash
yarn add @piecesnbits/eos
```
or

```bash
npm install @piecesnbits/eos
```

```bash
const {Eos} = require("@piecesnbits/eos");
const eos = new Eos([/*rpc nodes*/], [/*optional private keys*/] );
...
eos.api.transact({actions: actions}, {blocksBehind: 3, expireSeconds: 300, broadcast: true});
...
```

0 comments on commit 4cd2c49

Please sign in to comment.