Function decodeBase58AddressFormat

  • Attempt to decode a Base58Address-formatted string. This is more lenient than decodeCashAddress, which also validates the address version.

    Returns the contents of the address or an error message as a string.

    Parameters

    • address: string

      the string to decode as a base58 address

    • sha256: {
          hash: ((input: Uint8Array) => Uint8Array);
      } = internalSha256

      an implementation of sha256 (defaults to the internal WASM implementation)

      • hash: ((input: Uint8Array) => Uint8Array)
          • (input: Uint8Array): Uint8Array
          • Returns the sha256 hash of the provided input.

            To incrementally construct a sha256 hash (e.g. for streaming), use init, update, and final.

            Parameters

            • input: Uint8Array

              a Uint8Array to be hashed using sha256

            Returns Uint8Array

    Returns unknownCharacter | tooShort | invalidChecksum | {
        payload: Uint8Array;
        version: number;
    }

Generated using TypeDoc