Catalog npm
Back to packageRELEASE DETAILS

3.0.3

npm

3dcoin

Communicate with 3dcoind via JSON-RPC

3dcoinrpc
Published15 Jan 2019
Direct dependencies3
Transitive dependenciesNot calculated

README

Current package documentation

node-3dcoin

npm downloads js-standard-style

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

The API is equivalent to the API document here. The methods are exposed as lower camelcase methods on the 3dcoin.Client object, or you may call the API directly using the cmd method.

Install

npm i 3dcoin

Examples

Create client

// all config options are optional
var node_3dcoin = require('3dcoin');
var client = new node_3dcoin.Client({
  host: 'localhost',
  port: 'port',
  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);
});

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 3

Native requirements
3 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
clone
Environment
{
  "local_name": "clone",
  "alias": false,
  "peer_metadata": null
}
^1.0.2development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^2.3.3development
standard
Environment
{
  "local_name": "standard",
  "alias": false,
  "peer_metadata": null
}
^5.3.1development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "e36ff2c04a6a7c804883166bc19085815205ea8a",
  "tarball": "https://registry.npmjs.org/3dcoin/-/3dcoin-3.0.3.tgz",
  "integrity": "sha512-2pygxA8iDkpHjrv0UAWeWN5qktz6gSCuZiXokWTF9URoIaI5bYDW5qd011zsbXQmO+3vZ09Mq508ilFUs7ZQ2Q==",
  "fileCount": 9,
  "unpackedSize": 17789,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPe+GCRA9TVsSAnZWagAA7bUP/igkQJzsRpctdPVSqPi8\nkoH1sA6dMxlzwVNPFRJnLzPGQeBO4DV3MfarX70dC/4F3ISZL11yi71J9j2M\nEnJ7kKMLb/dZAK7VC0eJtoGr0CaxLDq2jrQBLsCr3IpyVM1aZ627F8KcCaGj\nexW8EpDa+3w95yorq9kHbpfTlpHzDOcDaPgpprxD8otG5doRNBmXDalE9qSj\nt+yWSHRIVN4mE+Lvk0XQfS9K7DkbGWBdvr/X/4VD8qkLp4mhSXzYPwCc6kk7\ngr6LnLGr2u8xFqpyFqvofVbEcD4kpgmOcT4N9UAI7Ee5eRxWpLIuYYcTVMel\nAAl4I5w3UYvwv8tGVV1+E2Kqkb3GSVWA2VHT4bYKhd91kYFLJEQHQEYRorK/\ntZ77vmxGWws5eIkwuTs7N7yT7nPta+dCl09/cbXaTtQP3yEI7Z2RFzZqQLI1\nf/zfZbXrAwAg6FpI8WAXz9nU5gTkCC8NNRM6qe2VV1ULyfgvbOdXoMTMHAzB\nbIauElZKMSiCDq++zPGXVnK4H3xsd8QTkdpZmJ8PhbOeR0BBkeQZEgfV3zdO\n/U38AOpimmgTr8fhFLToP61zpqpGzAU1Jejpd3ECOr6Kk6kw1pynhRyJcx9l\nFs2iM6VsyzLWeQ2J6OE75DP/zn172E+gvas/OZRmHXZLCu3cXEXtQoFz88d2\nJAH9\r\n=GWJf\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIA285j21gaAD+iC78OVcBSw2phNJO0ySHFzGE15BgNbhAiEAufGimthPSC9HQbB8kOFQ0TPBkwM1h5CJX0rkmGKQKEc="
    }
  ]
}

Repository

PENDING
vitruvedz/node-3dcoin

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:39 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:d4896f55b33a3da2eeefefc51c8fa64a13481d1844f5dd002be0af98f692bb77

Other collected versions

3.0.616 Jan3.0.515 Jan3.0.415 Jan3.0.215 JanView all collected versions →