Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gxchain2/core

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gxchain2/core

[![NPM Version](https://img.shields.io/npm/v/@gxchain2/core)](https://www.npmjs.org/package/@gxchain2/core) ![License](https://img.shields.io/npm/l/@gxchain2/core)

  • 0.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@gxchain2/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: Used for communication and data transmission between nodes

  • Txpool: Manage pending and queued transactions

  • Sync : Synchronize blocks

  • Txsync: Synchronize transactions

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

  • Staking: An implementation of staking logic

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

INSTALL

npm install @gxchain2/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

FAQs

Package last updated on 08 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc