0.0.4 • Published 2 years ago
@gxchain2/core v0.0.4
@gxchain2/core
The core logic of blockchain node, including:
BlockchainMonitor
: Contains several eventslogs
: Emit when a new transaction's log is generatedremovedLogs
: Emit when the transaction has been rolled backnewHeads
: Emit when canonical chain changes
Indexer
andBloomBitsFilter
: Create bloom bits index for sectionConsensus
: Consensus engine implementProtocols
: Used for communication and data transmission between nodesTxpool
: Manage pending and queued transactionsSync
: Synchronize blocksTxsync
: Synchronize transactionsTracer
: Tracer provides an implementation of tracing blocks or transactionsStaking
: An implementation of staking logicContracts
: 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
0.0.3
2 years ago
0.0.4
2 years ago
0.0.1
2 years ago
0.0.2
2 years ago
0.0.7-alpha.0
2 years ago
0.0.6-alpha.0
3 years ago
0.0.5-alpha.0
3 years ago
0.0.4-alpha.0
3 years ago
0.0.3-alpha.0
3 years ago
0.0.2-alpha.0
3 years ago
0.0.1-alpha.0
3 years ago