Class: BlockMeta

wallet/records~BlockMeta(hash, height, time)

Block Meta

Constructor

new BlockMeta(hash, height, time)

Create block meta.

Parameters:
Name Type Description
hash Hash
height Number
time Number
Source:

Methods

(static) fromEntry(entry) → {BlockMeta}

Instantiate block meta from chain entry.

Parameters:
Name Type Description
entry ChainEntry
Source:
Returns:
Type
BlockMeta

(static) fromJSON(json) → {BlockMeta}

Instantiate block meta from json object.

Parameters:
Name Type Description
json Object
Source:
Returns:
Type
BlockMeta

(static) fromRaw(hash, data) → {BlockMeta}

Instantiate block meta from serialized data.

Parameters:
Name Type Description
hash Hash
data Buffer
Source:
Returns:
Type
BlockMeta

clone() → {BlockMeta}

Clone the block.

Source:
Returns:
Type
BlockMeta

(private) fromEntry(entry)

Instantiate block meta from chain entry.

Parameters:
Name Type Description
entry ChainEntry
Source:

(private) fromJSON(json)

Instantiate block meta from json object.

Parameters:
Name Type Description
json Object
Source:

(private) fromRaw(data)

Instantiate block meta from serialized tip data.

Parameters:
Name Type Description
data Buffer
Source:

toHash() → {Buffer}

Get block meta hash as a buffer.

Source:
Returns:
Type
Buffer

toJSON() → {Object}

Convert the block meta to a more json-friendly object.

Source:
Returns:
Type
Object

toRaw() → {Buffer}

Serialize the block meta.

Source:
Returns:
Type
Buffer