1.0.2 • Published 4 years ago

openethereum-spawn v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

openethereum-spawn

Build Status

(formerly parity-spawn)

Usage

const OpenEthereum = require('openethereum-spawn')

main().catch(console.error)

async function main () {
  const p = new OpenEthereum({
    exec: require('openethereum-binary'),
    ipc: true,
    basePath: './data'
  })

  p.on('log', function (data) {
    console.log('openethereum log:', data)
  })

  process.on('SIGINT', () => p.kill())

  const started = await p.started
  console.log('started and operational?', started)
  const code = await p.stopped
  console.log('stopped with', code)
}

API

Install

npm install openethereum-spawn

License

ISC