examples/burn-bch/burn-bch.js
async function getBCHBalance(addr, verbose) {
  try {
    const result = await Wormhole.Address.details([addr])

    if (verbose) console.log(result)

    const bchBalance = result[0]

    return bchBalance.balance
  } catch (err) {
    console.error(`Error in getBCHBalance: `, err)
    console.log(`addr: ${addr}`)
    throw err
  }
}
async function getBCHBalance(addr, verbose) {
  try {
    const result = await Wormhole.Address.details([addr])

    if (verbose) console.log(result)

    const bchBalance = result[0]

    return bchBalance.balance
  } catch (err) {
    console.error(`Error in getBCHBalance: `, err)
    console.log(`addr: ${addr}`)
    throw err
  }
}
async function getBCHBalance ( addr , verbose ) { try { const result = await Wormhole . Address . details ( [ addr ] ) if ( verbose ) console . log ( result ) const bchBalance = result [ 0 ] return bchBalance . balance } catch ( err ) { console . error ( ` ` , err ) console . log ( ` ${ addr } ` ) throw err } }
Get the balance in BCH of a BCH address.
Get the balance in BCH of a BCH address .