Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitcoin

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitcoin - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

.npmignore

2

lib/bitcoin/client.js

@@ -16,3 +16,3 @@

getBlockCount: 'getblockcount',
getBlockNumber: 'getblocknumber',
getBlockNumber: 'getblockcount', // getblocknumber deprecated since Bitcoin v0.5.1
getConnectionCount: 'getconnectioncount',

@@ -19,0 +19,0 @@ getDifficulty: 'getdifficulty',

@@ -1,2 +0,2 @@

var sys = require('sys');
var util = require('util');
var http = require('http');

@@ -128,3 +128,3 @@ var METHOD_NOT_ALLOWED = "Method Not Allowed\n";

Server.trace = function(direction, message) {
sys.puts(' ' + direction + ' ' + message);
util.puts(' ' + direction + ' ' + message);
}

@@ -131,0 +131,0 @@

{
"name": "bitcoin",
"description": "Communicate with bitcoind via JSON-RPC",
"version": "1.1.3",
"version": "1.1.4",
"main": "./lib/bitcoin",

@@ -12,3 +12,3 @@ "keywords": [

"dependencies": {
"underscore": ">= 1.0.3"
"underscore": "1.3.x"
},

@@ -20,10 +20,11 @@ "repository": {

"devDependencies": {
"vows": "*"
"vows": "0.6.x"
},
"engines": {
"node": "*"
"node": ">=0.2.6"
},
"scripts": {
"test": "node test/api.js"
}
},
"optionalDependencies": {}
}

@@ -9,2 +9,11 @@ # node-bitcoin

You can choose to ignore the helper methods and call the api directly like so:
```js
client.cmd('getbalance', '*', 6, function(err, balance){
if (err) return console.log(err);
console.log('Balance:', balance);
});
```
## Install

@@ -11,0 +20,0 @@

var path = require('path');
require.paths.unshift(path.join(__dirname, '..'));

@@ -10,8 +9,3 @@ // test variables

var config = {
host: 'localhost',
port: 8332,
user: 'jb55',
pass: 'thisisthepassword'
};
var config = require('./config');

@@ -23,3 +17,3 @@ // end test variables

var bitcoin = require('lib/bitcoin');
var bitcoin = require('../lib/bitcoin');

@@ -128,6 +122,38 @@ function makeClient() {

},
},
'getblocknumber is deprecated': {
topic: function(client) {
client.cmd('getblocknumber', this.callback);
},
'and has been replaced by getblockcount': {
topic: function(number, client) {
client.cmd('getblockcount', this.callback);
},
'getBlockNumber uses getblockcount': {
topic: function(count, number, client) {
var self = this;
client.getBlockNumber(function(err, number2) {
self.callback(err, number2, count, number);
});
},
'and should match both': function(err, number2, count, number) {
assert.equal(number2, count);
assert.equal(number2, number);
}
}
}
},
"creating a bitcoin related error": {
topic: function(client) {
client.cmd('nomethod', this.callback);
},
"should create non-null err in callback": function(err, expectedValue) {
assert.deepEqual(err, {
code: -32601,
message: 'Method not found'
});
assert.equal(expectedValue, undefined);
}
}
}
}).export(module);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc