Encode a locking bytecode as a CashAddress given a network prefix.
If bytecode matches a standard pattern, it is encoded using the proper address type and returned as a valid CashAddress (string).
bytecode
If bytecode cannot be encoded as an address (i.e. because the pattern is not standard), the resulting AddressContents is returned.
the locking bytecode to encode
the network prefix to use, e.g. bitcoincash, bchtest, or bchreg, defaults to bitcoincash
bitcoincash
bchtest
bchreg
an object describing address options, defaults to { tokenSupport: false }
{ tokenSupport: false }
Generated using TypeDoc
Encode a locking bytecode as a CashAddress given a network prefix.
If
bytecode
matches a standard pattern, it is encoded using the proper address type and returned as a valid CashAddress (string).If
bytecode
cannot be encoded as an address (i.e. because the pattern is not standard), the resulting AddressContents is returned.