UNPKG

@bithive/bitcoin-sdk

Version:

BitHive SDK

48 lines (47 loc) 1.28 kB
import { Buffer } from 'buffer'; /** * 32-byte hash with reversed hex encoding. * This is useful for Bitcoin transaction hash, block hash and merkle proof */ export declare class H256 { private readonly buffer; private constructor(); equals(hash: H256): boolean; compare(hash: H256): number; static fromBuffer(buffer: Uint8Array): H256; toBuffer(): Buffer; static fromHex(s: string): H256; toHex(): string; toString(): string; toJSON(): string; } /** * 33-byte compressed public key */ export declare class PublicKey { private readonly buffer; private constructor(); equals(hash: PublicKey): boolean; compare(hash: PublicKey): number; static fromBuffer(buffer: Uint8Array): PublicKey; toBuffer(): Buffer; static fromHex(s: string): PublicKey; toHex(): string; toString(): string; toJSON(): string; } /** * 65-byte signature with recovery id */ export declare class Signature { private readonly buffer; private constructor(); equals(hash: Signature): boolean; compare(hash: Signature): number; static fromBuffer(buffer: Uint8Array): Signature; toBuffer(): Buffer; static fromHex(s: string): Signature; toHex(): string; toString(): string; toJSON(): string; }