3.2.0 • Published 2 years ago
@cfxjs/fullnode v3.2.0
@cfxjs/fullnode
Start a conflux local network from nodejs.
Features
- Download conflux binary depends on system type
- Start/restart/quit a conflux node locally
- Initialize accounts with specified balance on start/restart
Note
- The latest version may not support windows.
Install
npm i -D @cfxjs/fullnode
yarn add --dev @cfxjs/fullnode
Examples
Start server
const Node = require("@cfxjs/fullnode");
(async () => {
const node = new Node({accounts: [
// initialize accounts with specified gdrip balance
{
address: "0x91e36D5f4ce79054e2e7811132860469d6E802d6",
balance: 100000000000000000000
}
]});
await node.start();
// it has a js-conflux-sdk instance in it
console.log(node.cfx);
})();
A conflux node will be start at localhost:12537
be default.
Stop server
await server.quit().catch(() => console.log('failed to quit'));
Restart server
await server.restart(); // accepts the same arguments as server.start
Check out index.js for more information.
3.2.0
2 years ago
3.1.0
2 years ago
3.0.3
2 years ago
3.0.2
2 years ago
3.0.1
2 years ago
2.1.1
2 years ago
2.1.0
2 years ago
2.0.0
2 years ago
3.0.0
2 years ago
1.9.0
3 years ago
1.8.0
3 years ago
1.7.2
3 years ago
1.7.1
3 years ago
1.7.0
3 years ago
1.6.3
3 years ago
1.6.2
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.5.0
3 years ago
1.4.0
3 years ago
1.3.0
4 years ago
1.2.1-rc.1
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.2.0-rc.1
4 years ago
1.1.0
4 years ago
1.0.0
4 years ago
1.0.0-rc.1
4 years ago