@node-dlc/bitcoin
Version:
16 lines (15 loc) • 457 B
TypeScript
/// <reference types="node" />
export declare class Stack {
/**
* Decodes a number from the stack format (signed magnitude
* representation).
* @param buf
*/
static decodeNum(buf: Buffer): bigint;
/**
* Encodes a number into a stack compatible byte-array. The number
* is encoded using little-endian signed-magnitude representation.
* @param num
*/
static encodeNum(input: number | bigint): Buffer;
}