Function decodeCashAddress

  • Decode and validate a CashAddress, strictly checking the version byte according to the CashAddress specification. This is important for error detection in CashAddresses.

    To decode CashAddresses with non-standard types, see decodeCashAddressNonStandard.

    For other address-like standards that closely follow the CashAddress specification (but have alternative version byte requirements), use decodeCashAddressFormat.

    Note, this method requires that CashAddresses include a network prefix. To decode an address with an unknown prefix, try decodeCashAddressFormatWithoutPrefix.


    • address: string

      the CashAddress to decode

    Returns string | {
        payload: Uint8Array;
        prefix: string;
        type: CashAddressType;

Generated using TypeDoc