Constructor
new BlockHeader(blockNumber, previousHash, data)
Create a block header
Parameters:
Name | Type | Description |
---|---|---|
blockNumber |
number | the block number |
previousHash |
string | hex string of previous hash |
data |
Array.<string> | array of hex string representing transactions |
- Source:
Members
hash
Sha3 hash of the hex string representing transactions in this block header
- Source:
Methods
(static) fromJSON(json)
Create a block header from json
Parameters:
Name | Type | Description |
---|---|---|
json |
Object | json object representing block header |
- Source:
setSignature(signature)
Set signature of the header
Parameters:
Name | Type | Description |
---|---|---|
signature |
string | hex string signature of the header |
- Source:
toJSON()
Convert this block header to json
- Source:
toString(includingSig)
Convert this block header to string
Parameters:
Name | Type | Description |
---|---|---|
includingSig |
boolean | whether to include the signature in the block header string |
- Source: