Create a Webcoin SPV client that connects to a local bitcoind node running in regtest mode.
$ npm install webcoin-regtest
let SPVNode = require('webcoin-regtest')
let bitcoind = require('bitcoind')
let btcd = bitcoind({
regtest: true
})
async function main() {
let node = await SPVNode(btcd)
console.log(node.chain.height())
}
main()