Function encodeCashAddressVersionByte
- encode
Cash Address Version Byte(typeBits, length): number Parameters
typeBits: CashAddressAvailableTypeBits
The address type bit of the payload being encoded.
length: 32 | 64 | 20 | 24 | 28 | 40 | 48 | 56
The length of the payload being encoded.
Returns number
Generated using TypeDoc

Encode a CashAddress version byte for the given address type and payload length. See CashAddressVersionByte for more information.
The
typeparameter must be a number between0and15, andbitLengthmust 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.