BlockChain
Static Method Summary
Static Public Methods | ||
public static |
lowestCommonAncestor(chain1: BlockChain, chain2: BlockChain): Block |
|
public static |
merge(chain1: BlockChain, chain2: BlockChain): BlockChain |
|
public static |
unserialize(buf: SerialBuffer): BlockChain |
Constructor Summary
Public Constructor | ||
public |
constructor(blocks: Array<Block>, superChains: Array<BlockChain>) |
Member Summary
Public Members | ||
public get |
|
|
public get |
|
|
public get |
length: number |
|
public get |
serializedSize: number |
|
public get |
|
Method Summary
Public Methods | ||
public |
denseSuffix(): Array<Block> |
|
public |
async getSuperChains(): Promise<Array<BlockChain>> |
|
public |
isAnchored(): boolean |
|
public |
serialize(buf: SerialBuffer): SerialBuffer |
|
public |
toString(): string |
|
public |
totalDifficulty(): number |
|
public |
async verify(): Promise<boolean> |
Static Public Methods
public static lowestCommonAncestor(chain1: BlockChain, chain2: BlockChain): Block source
Params:
Name | Type | Attribute | Description |
chain1 | BlockChain | ||
chain2 | BlockChain |
public static merge(chain1: BlockChain, chain2: BlockChain): BlockChain source
Params:
Name | Type | Attribute | Description |
chain1 | BlockChain | ||
chain2 | BlockChain |
public static unserialize(buf: SerialBuffer): BlockChain source
Params:
Name | Type | Attribute | Description |
buf | SerialBuffer |
Public Constructors
public constructor(blocks: Array<Block>, superChains: Array<BlockChain>) source
Params:
Name | Type | Attribute | Description |
blocks | Array<Block> | ||
superChains | Array<BlockChain> |
|
Public Methods
public serialize(buf: SerialBuffer): SerialBuffer source
Params:
Name | Type | Attribute | Description |
buf | SerialBuffer |
|