Utils
bchNetwork
Get BCH network to be used with bitcore-lib.
Parameters
network
Network
getPrefix
BCH new addresses strategy has no any prefixes. Any possible prefixes at the TX addresses will be stripped out with parseTransaction *
stripPrefix
Strips bchtest or bitcoincash prefix from address
Parameters
address
Address
Returns Address The address with prefix removed
toLegacyAddress
Convert to Legacy Address.
Parameters
address
Address
Returns Address Legacy address.
toCashAddress
Convert to Cash Address.
Parameters
address
Address
Returns Address Cash address.
isCashAddress
Checks whether address is Cash Address
Parameters
address
Address
Returns boolean Is cash address.
parseTransaction
Parse transaction.
Parameters
tx
Transaction
Returns Tx Parsed transaction.*
toBCHAddressNetwork
Converts Network
to bchaddr.Network
Parameters
network
Network
Returns string bchaddr network
validateAddress
Validate the BCH address.
Parameters
address
stringnetwork
Network
Returns boolean true
or false
.