Utils

arrayAverage

Get the average value of an array.

Parameters

Returns number The average value.

btcNetwork

Get Bitcoin network to be used with bitcoinjs.

Parameters

  • network Network

Returns Bitcoin.Network The BTC network.

validateAddress

Validate the BTC address.

Parameters

  • address Address
  • network Network

Returns boolean true or false.

getPrefix

Get address prefix based on the network.

Parameters

  • network Network

Returns string The address prefix based on the network.*