Function decodeBase58Address

  • Decode and validate a Base58Address, strictly checking the version and payload length.

    For other address-like standards that closely follow the Base58Address format (but have alternative version byte requirements), use decodeBase58AddressFormat.


    Because the Wallet Import Format (WIF) private key serialization format uses the Base58Address format, some libraries allow WIF key decoding via the same method as base58 address decoding. This method strictly accepts only Base58Address types, but WIF keys can be decoded with decodePrivateKeyWif.


    • 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.


            • input: Uint8Array

              a Uint8Array to be hashed using sha256

            Returns Uint8Array

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

Generated using TypeDoc