Socket
Book a DemoInstallSign in
Socket

flappycoin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flappycoin

Communicate with flappycoind via JSON-RPC, forked from npm package, bitcoin

0.0.3
latest
Source
npmnpm
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

node-flappycoin

npm downloads js-standard-style

node-flappycoin is a simple wrapper for the flappycoin client's JSON-RPC API.

If starting a new project, I highly encourage you to take a look at the more modern flappycoin-core, which features:

  • ES6 support
  • optional promise support
  • support for newer REST API, in addition to RPC methods

Install

npm install flappycoin

Examples

Create client

// all config options are optional
var client = new flappycoin.Client({
  host: 'localhost',
  port: 8332,
  user: 'username',
  pass: 'password',
  timeout: 30000
});

Get balance across all accounts with minimum confirmations of 6

client.getBalance('*', 6, function(err, balance, resHeaders) {
  if (err) return console.log(err);
  console.log('Balance:', balance);
});

Getting the balance directly using cmd

client.cmd('getbalance', '*', 6, function(err, balance, resHeaders){
  if (err) return console.log(err);
  console.log('Balance:', balance);
});

Batch multiple RPC calls into single HTTP request

var batch = [];
for (var i = 0; i < 10; ++i) {
  batch.push({
    method: 'getnewaddress',
    params: ['myaccount']
  });
}
client.cmd(batch, function(err, address, resHeaders) {
  if (err) return console.log(err);
  console.log('Address:', address);
});

Flap on!

Keywords

flappycoin

FAQs

Package last updated on 30 Nov 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.