Comparing version 1.1.3 to 1.1.4
@@ -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); | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18490
472
67
1
+ Addedunderscore@1.3.3(transitive)
- Removedunderscore@1.13.7(transitive)
Updatedunderscore@1.3.x