@btc-vision/transaction
Version:
OPNet transaction library allows you to create and sign transactions for the OPNet network.
26 lines • 755 B
TypeScript
/**
* Utility class for Bitcoin related functions
*/
export declare class BitcoinUtils {
/**
* Converts satoshi to BTC
* @param {number} btc - The amount in BTC
* @returns {bigint} The amount in satoshi
*/
static btcToSatoshi(btc: number): bigint;
/**
* Generates random bytes.
* @public
* @returns {Uint8Array} The random bytes
*/
static rndBytes(): Uint8Array;
static getSafeRandomValues(length: number): Uint8Array;
static isValidHex(hex: string): boolean;
/**
* Hashes the given data
* @param {Uint8Array} data - The data to hash
* @returns {string} The hashed data
*/
static opnetHash(data: Uint8Array): string;
}
//# sourceMappingURL=BitcoinUtils.d.ts.map