encodeCashAddressVersionByte(typeBits, length): number
Encode a CashAddress version byte for the given address type and payload
length. See CashAddressVersionByte for more information.
The type parameter must be a number between 0 and 15, and bitLength
must be one of the standardized lengths. To use the contents of a variable,
cast it to CashAddressType or
CashAddressSupportedLength respectively,
e.g.:
Encode a CashAddress version byte for the given address type and payload length. See CashAddressVersionByte for more information.
The
type
parameter must be a number between0
and15
, andbitLength
must be one of the standardized lengths. To use the contents of a variable, cast it to CashAddressType or CashAddressSupportedLength respectively, e.g.:For the reverse, see decodeCashAddressVersionByte.