CCC Docs
    Preparing search index...

    Function hashTypeFromBytes

    • Converts a byte-like value to a HashType.

      Parameters

      • bytes: BytesLike

        The byte-like value to convert.

      Returns HashType

      The corresponding HashType.

      Will throw an error if the input bytes do not correspond to a valid hash type.

      const hashType = hashTypeFromBytes(new Uint8Array([0])); // Outputs "type"