### Table of Contents - [Block][1] - [Parameters][2] - [Properties][3] - [hash][4] - [isGenisis][5] - [setGenesisParams][6] - [serialize][7] - [Parameters][8] - [genTxTrie][9] - [Parameters][10] - [validateTransactionTrie][11] - [validateTransactions][12] - [Parameters][13] - [validate][14] - [Parameters][15] - [validateUncleHash][16] - [validateUncles][17] - [Parameters][18] - [toJSON][19] - [Parameters][20] ## Block Creates a new block object ### Parameters - `data` **([Array][21] \| [Buffer][22] \| [Object][23])** ### Properties - `header` **Header** the block's header - `uncleList` **[Array][21]<Header>** an array of uncle headers - `raw` **[Array][21]<[Buffer][22]>** an array of buffers containing the raw blocks. ## hash Produces a hash the RLP of the block ## isGenisis Determines if a given block is the genesis block Returns **any** Boolean ## setGenesisParams turns the block in to the canonical genesis block ## serialize Produces a serialization of the block. ### Parameters - `rlpEncode` **[Boolean][24]** whether to rlp encode the block or not ## genTxTrie Generate transaction trie. The tx trie must be generated before the transaction trie can be validated with `validateTransactionTrie` ### Parameters - `cb` **[Function][25]** the callback ## validateTransactionTrie Validates the transaction trie Returns **[Boolean][24]** ## validateTransactions Validates the transactions ### Parameters - `stringError` **[Boolean][24]** whether to return a string with a dscription of why the validation failed or return a Bloolean (optional, default `false`) Returns **[Boolean][24]** ## validate Validates the entire block. Returns a string to the callback if block is invalid ### Parameters - `blockChain` **BlockChain** the blockchain that this block wants to be part of - `cb` **[Function][25]** the callback which is given a `String` if the block is not valid ## validateUncleHash Validates the uncle's hash Returns **[Boolean][24]** ## validateUncles Validates the uncles that are in the block if any. Returns a string to the callback if uncles are invalid ### Parameters - `blockChain` **Blockchain** an instance of the block chain - `cb` **[Function][25]** the callback ## toJSON Converts the block toJSON ### Parameters - `labeled` **Bool** whether to create an labeled object or an array Returns **[Object][23]** [1]: #block [2]: #parameters [3]: #properties [4]: #hash [5]: #isgenisis [6]: #setgenesisparams [7]: #serialize [8]: #parameters-1 [9]: #gentxtrie [10]: #parameters-2 [11]: #validatetransactiontrie [12]: #validatetransactions [13]: #parameters-3 [14]: #validate [15]: #parameters-4 [16]: #validateunclehash [17]: #validateuncles [18]: #parameters-5 [19]: #tojson [20]: #parameters-6 [21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array [22]: https://nodejs.org/api/buffer.html [23]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object [24]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean [25]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function