a valid prefix indicating the network for which to encode the address (usually a CashAddressNetworkPrefix) – must be only lowercase letters
the type bit to encode in the version byte – must be a
number between 0
and 15
the payload to encode (for P2PKH, the public key hash; for P2SH, the redeem bytecode hash)
Generated using TypeDoc
Encode a payload as a CashAddress. This function is similar to encodeCashAddress but supports non-standard
prefix
es andtype
s.Note: this function cannot prevent all implementation errors via types. The function will throw if
payload
is not a valid CashAddressSupportedLength. Confirm the length of untrusted inputs before providing them to this function.For other address standards that closely follow the CashAddress specification (but have alternative version byte requirements), use encodeCashAddressFormat.