Feature complete EOS RPC API for node.
The tests are under the assumption you have followed the initial install from EOS Add a config.js file with your private keys
module.exports = { PRIVATE_KEY_1: 'xx' , PRIVATE_KEY_INITA: 'xx', DEFAULT_WALLET_PRIVATE_KEY: 'xx', }
$ npm test
See the EOS RPC API docs.
let { chain, wallet } = require('eos-rpc')
chain = chain('host', 'chain_port')
wallet = wallet('host', 'wallet_port')
or for local development
let { chain, wallet } = require('eos-rpc')
// Host defaults to 127.0.0.1, chain_port: 8888, wallet_port: 8888
chain = chain()
wallet = wallet()
All calls are Promisified.
chain.push_transaction(expiration, messages, read_scope = [], ref_block_num, ref_block_prefix, scope, signatures)
If the create fails, try putting an extra set of quotes like await wallet.create('"default"')