Telegram: @PavelWolfDark or https://t.me/PavelWolfDark
npm i --save @darkwolf/localbitcoins
const { LocalBitcoins } = require('@darkwolf/localbitcoins')
const btc = new LocalBitcoins(key, secret)
try {
await btc.sendBtc(address, amount)
} catch (e) {
switch (e.space) {
case 'localbitcoins': {
switch (e.code) {
case 'insufficient-funds': {
...doSmth()
break
}
default: throw e
}
break
}
default: throw e
}
}