Header

Interface
Attributes of a Block persisted to the blockchain. Header includes all information except the list of Transactions.
export interface Header { 
  readonly hash: Hash256; 
  readonly version: Integer; 
  readonly previousHash: Hash256; 
  readonly index: Integer; 
  readonly merkleRoot: Hash256; 
  readonly time: Integer; 
  readonly nextConsensus: Address; 
  readonly [OpaqueTagSymbol0]: unique symbol; 
} 

Properties

hash
Block hash.
version
NEO blockchain version.
previousHash
Previous Block hash.
index
Block index.
merkleRoot
Root of the Transaction hash Merkle Tree.
time
Block time persisted.
nextConsensus
Next consensus address.

Static Methods

for

Accepts either the Hash256 or the index of the Block.
(hashOrIndex: Hash256 | Integer) => Header 

Example

const blockHash = Hash256.from('0xd6572a459b95d9136b7a713c5485ca709f9efa4f08f1c25dd792672d2bd75bfb'); 
const header = Header.for(blockHash); 
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE