- Add GETTING_STARTED.md with quick start guide and development modes - Add INSTALL.sh automated installation script - Add INSTALLATION_CHECKLIST.md, INSTALLATION_SUCCESS.md, and INSTALLATION_SUMMARY.md - Add QUICK_REFERENCE.md for common commands - Add SETUP_GUIDE.md with detailed setup instructions - Update README.md with improved project overview - Add did-wallet app dependencies and node_modules
38 lines
1.9 KiB
TypeScript
38 lines
1.9 KiB
TypeScript
/**
|
|
* Class that performs hashing operations using the multihash format.
|
|
*/
|
|
export default class Multihash {
|
|
/**
|
|
* Multihashes the content using the hashing algorithm specified.
|
|
* @param hashAlgorithmInMultihashCode The hashing algorithm to use.
|
|
* @returns A multihash of the content.
|
|
*/
|
|
static hash(content: Uint8Array, hashAlgorithmInMultihashCode: number): Promise<Uint8Array>;
|
|
/**
|
|
* Hashes the content using the hashing algorithm specified as a generic (non-multihash) hash.
|
|
* @param hashAlgorithmInMultihashCode The hashing algorithm to use.
|
|
* @returns A multihash bytes.
|
|
*/
|
|
static hashAsNonMultihashBytes(content: Uint8Array, hashAlgorithmInMultihashCode: number): Promise<Uint8Array>;
|
|
/**
|
|
* Canonicalize the given content, then double hashes the result using the latest supported hash algorithm, then encodes the multihash.
|
|
* Mainly used for testing purposes.
|
|
*/
|
|
static canonicalizeThenHashThenEncode(content: object, hashAlgorithmInMultihashCode: number): Promise<string>;
|
|
/**
|
|
* Canonicalize the given content, then double hashes the result using the latest supported hash algorithm, then encodes the multihash.
|
|
* Mainly used for testing purposes.
|
|
*/
|
|
static canonicalizeThenDoubleHashThenEncode(content: object, hashAlgorithmInMultihashCode: number): Promise<string>;
|
|
/**
|
|
* Hashes the content using the hashing algorithm specified then encodes the multihash bytes as string.
|
|
* @param hashAlgorithmInMultihashCode The hashing algorithm to use.
|
|
*/
|
|
static hashThenEncode(content: Uint8Array, hashAlgorithmInMultihashCode: number): Promise<string>;
|
|
/**
|
|
* Checks if the given encoded hash is a multihash computed using the configured hashing algorithm.
|
|
*/
|
|
static validateEncodedHashComputedUsingSupportedHashAlgorithm(encodedMultihash: string, // didSuffix
|
|
inputContextForErrorLogging: string): void;
|
|
}
|
|
//# sourceMappingURL=Multihash.d.ts.map
|