UNPKG

861 BTypeScriptView Raw
1/// <reference types="node" />
2export declare function ripemd160(buffer: Buffer): Buffer;
3export declare function sha1(buffer: Buffer): Buffer;
4export declare function sha256(buffer: Buffer): Buffer;
5export declare function hash160(buffer: Buffer): Buffer;
6export declare function hash256(buffer: Buffer): Buffer;
7export declare const TAGS: readonly ["BIP0340/challenge", "BIP0340/aux", "BIP0340/nonce", "TapLeaf", "TapBranch", "TapSighash", "TapTweak", "KeyAgg list", "KeyAgg coefficient"];
8export type TaggedHashPrefix = typeof TAGS[number];
9type TaggedHashPrefixes = {
10 [key in TaggedHashPrefix]: Buffer;
11};
12/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */
13export declare const TAGGED_HASH_PREFIXES: TaggedHashPrefixes;
14export declare function taggedHash(prefix: TaggedHashPrefix, data: Buffer): Buffer;
15export {};