Encode a locking bytecode as a Base58Address for a given network.
If bytecode matches a standard pattern, it is encoded using the proper address type and returned as a valid Base58Address (string).
bytecode
If bytecode cannot be encoded as an address (i.e. because the pattern is not standard), the resulting AddressContents is returned.
For the reverse, see base58AddressToLockingBytecode.
Note, Base58Addresses cannot accept tokens; to accept tokens, use lockingBytecodeToCashAddress with tokenSupport set to true.
tokenSupport
true
the locking bytecode to encode
the network for which to encode the address (mainnet, testnet, or 'copayBCH'), defaults to mainnet
mainnet
testnet
an implementation of sha256 (defaults to the internal WASM implementation)
Generated using TypeDoc
Encode a locking bytecode as a Base58Address for a given network.
If
bytecode
matches a standard pattern, it is encoded using the proper address type and returned as a valid Base58Address (string).If
bytecode
cannot be encoded as an address (i.e. because the pattern is not standard), the resulting AddressContents is returned.For the reverse, see base58AddressToLockingBytecode.
Note, Base58Addresses cannot accept tokens; to accept tokens, use lockingBytecodeToCashAddress with
tokenSupport
set totrue
.