Support Strike for Lightning Network

This commit is contained in:
Josh Harvey 2018-05-26 14:09:47 +03:00
parent 8d4a36865b
commit 3f9c139f83
11 changed files with 175 additions and 11 deletions

20
dev/strike.js Normal file
View file

@ -0,0 +1,20 @@
const strike = require('../lib/plugins/wallet/strike/strike')
const BN = require('../lib/bn')
const account = {token: 'xxx'}
strike.newAddress(account, {cryptoCode: 'BTC', cryptoAtoms: BN(10000)})
.then(r => {
console.log(r)
const toAddress = r
const requested = null
const cryptoCode = 'BTC'
setInterval(() => {
strike.getStatus(account, toAddress, requested, cryptoCode)
.then(console.log)
.catch(r => console.log(r.message))
}, 2000)
})
.catch(console.log)