@rei-network/core
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

@rei-network/core

NPM Version License

The core logic of blockchain node, including:

  • BlockchainMonitor: Contains several events

    • logs: Emit when a new transaction's log is generated
    • removedLogs: Emit when the transaction has been rolled back
    • newHeads: Emit when canonical chain changes
  • Indexer and BloomBitsFilter: Create bloom bits index for section

  • Consensus: Consensus engine implement

  • Protocols: P2P protocols, include rei-ethwire and rei-consensus

  • Txpool: Manage pending and queued transactions

  • Sync : Synchronize blocks

  • TxSync: Synchronize transactions

  • Tracer: Tracer provides an implementation of tracing blocks or transactions

  • Contracts: Some classes are used to interact with the smart contract

  • Validation: Contains the logic to verify the block

  • Hardforks: Contains logic related to the hard fork

INSTALL

npm install @rei-network/core

USAGE

const node = await NodeFactory.createNode({
  databasePath: "path/to/dataDir",
  chain: "chainName",
  mine: {
    enable: true,
    coinbase: "address1",
  },
  network: {
    enable: true,
  },
  account: {
    keyStorePath: "path/to/keystore",
    unlock: [
      ["address1", "passphrase1"],
      ["address2", "passphrase2"],
    ],
  },
});

await node.abort();

License

GNU General Public License v3.0

Readme

Keywords

none

Package Sidebar

Install

npm i @rei-network/core

Weekly Downloads

30

Version

3.0.2

License

GPL-3.0-or-later

Unpacked Size

2.77 MB

Total Files

599

Last publish

Collaborators

  • bijianing97
  • samlior_
  • lanhaoxiang