npm.io
1.2.2 • Published 3 years ago

powco

Licence
ISC
Version
1.2.2
Deps
3
Size
11 kB
Vulns
0
Weekly
0

powco

npm install --save powco

Stream Boostpow Transactions

import { Job, Proof } from 'boostpow'

import { stream } from 'powco'

stream.on('boostpow.job', (job: Job) => {

  console.log('boostpow.job', job)

})

stream.on('boostpow.proof', (proof: Proof) => {

  console.log('boostpow.proof', proof)

})

Broadcast Transaction

import { broadcast } from 'powco'

const txid = await broadcast(txhex)

Fetch Transaction

import { fetch } from 'powco'

const txhex = await fetch(txid)