@cfxjs/fullnode
Start a conflux local network from nodejs.
Last updated 9 hours ago by yqrashawn .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @cfxjs/fullnode 
SYNC missed versions from official npm registry.

@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.

Current Tags

  • 1.5.0                                ...           latest (9 hours ago)
  • 1.2.1-rc.1                                ...           rc (a month ago)

10 Versions

  • 1.5.0                                ...           9 hours ago
  • 1.4.0                                ...           17 days ago
  • 1.3.0                                ...           a month ago
  • 1.2.1                                ...           a month ago
  • 1.2.1-rc.1                                ...           a month ago
  • 1.2.0                                ...           a month ago
  • 1.2.0-rc.1                                ...           a month ago
  • 1.1.0                                ...           4 months ago
  • 1.0.0                                ...           4 months ago
  • 1.0.0-rc.1                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 8
This Month 25
Last Day 8
Last Week 0
Last Month 43
Dependencies (15)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |