Commit js, ts, and definitions in separate folders
This commit is contained in:
parent
e7ac2b9a4e
commit
bc28949056
148 changed files with 3850 additions and 39 deletions
types
27
types/block.d.ts
vendored
Normal file
27
types/block.d.ts
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
/// <reference types="node" />
|
||||
import { Transaction } from './transaction';
|
||||
export declare class Block {
|
||||
version: number;
|
||||
prevHash?: Buffer;
|
||||
merkleRoot?: Buffer;
|
||||
timestamp: number;
|
||||
witnessCommit?: Buffer;
|
||||
bits: number;
|
||||
nonce: number;
|
||||
transactions?: Array<Transaction>;
|
||||
constructor();
|
||||
static fromBuffer(buffer: Buffer): Block;
|
||||
static fromHex(hex: string): Block;
|
||||
static calculateTarget(bits: number): Buffer;
|
||||
static calculateMerkleRoot(transactions: Array<Transaction>, forWitness?: boolean): Buffer;
|
||||
hasWitnessCommit(): boolean;
|
||||
byteLength(headersOnly: boolean): number;
|
||||
getHash(): Buffer;
|
||||
getId(): string;
|
||||
getUTCDate(): Date;
|
||||
toBuffer(headersOnly: boolean): Buffer;
|
||||
toHex(headersOnly: boolean): string;
|
||||
checkMerkleRoot(): boolean;
|
||||
checkWitnessCommit(): boolean;
|
||||
checkProofOfWork(): boolean;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue