dfinity-block0.0.0 • Public • Published
This library provides basic functions for creating serializing and deserializing blocks
npm install dfinity-block
const block =version: 0height: 1000timestamp: 0preBlockHash: 20stateRoot: 20beaconSig: 32preNotarySig: 32minterID: 0minterSig: 32const sk = crypto// sign the block as a minter and serialize the blockconst signedBlock = await block// desialize the blockconst block2 = await DfinityBlock// read the height of the blockblock2height
All code and designs are open sourced under GPL V3.