@gxchain2/blockchain
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.2 • Public • Published

    @gxchain2/blockchain

    NPM Version License

    Definition of blockchain structure and rules, based on @gxchain2-ethereumjs/blockchain

    INSTALL

    npm install @gxchain2/blockchain

    USAGE

    blockchain = new Blockchain({
      db: chaindb, // Database to store blocks and metadata. Should be an abstract-leveldown compliant store
      database: database,
      genesisBlock, // Messages of genesis block to initialize blockchain
    });
    
    await blockchain.putBlock(block);
    console.log(blockchain.latestBlock);
    console.log(blockchain.totalDifficulty);

    License

    GNU General Public License v3.0

    Keywords

    none

    Install

    npm i @gxchain2/blockchain

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    GPL-3.0-or-later

    Unpacked Size

    22.6 kB

    Total Files

    10

    Last publish

    Collaborators

    • lanhaoxiang
    • samlior