diff --git a/lib/index.js b/lib/index.js index d28d541..ef3b08c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -15,12 +15,14 @@ function decodeURL(str) { var parts = auth.split(':'); var user = parts[0] ? decodeURIComponent(parts[0]) : null; var pass = parts[1] ? decodeURIComponent(parts[1]) : null; + var path = parsedUrl.path; var opts = { host: hostname, port: port, protocol: protocol, user: user, pass: pass, + path: path }; return opts; } @@ -38,6 +40,7 @@ function RpcClient(opts) { this.protocol = opts.protocol === 'http' ? http : https; this.batchedCalls = null; this.disableAgent = opts.disableAgent || false; + this.path = opts.path || '/'; var isRejectUnauthorized = typeof opts.rejectUnauthorized !== 'undefined'; this.rejectUnauthorized = isRejectUnauthorized ? opts.rejectUnauthorized : true; @@ -72,7 +75,7 @@ function rpc(request, callback) { var options = { host: self.host, - path: '/', + path: self.path, method: 'POST', port: self.port, rejectUnauthorized: self.rejectUnauthorized, @@ -243,6 +246,7 @@ RpcClient.callspec = { signMessage: '', signRawTransaction: '', signRawTransactionWithWallet: 'str', + signRawTransactionWithKey: '', stop: '', submitBlock: '', validateAddress: '', diff --git a/package.json b/package.json index a670777..3092fc1 100644 --- a/package.json +++ b/package.json @@ -1,36 +1,18 @@ { - "name": "bitcoind-rpc", - "description": "Bitcoin Client Library to connect to Bitcoin Core via RPC", - "version": "0.8.1", + "name": "bitcoind-rpc-zmaike", + "description": "Bitcoin Client Library to connect to Bitcoin Core via RPC. Forked from https://github.com/bitpay/bitcoind-rpc. Already submit a pull request to the origin project.", + "version": "0.8.2", "author": { - "name": "Stephen Pair", - "email": "stephen@bitpay.com" + "name": "zmaike", + "email": "juxiez5@126.com" }, - "contributors": [ - { - "name": "Jeff Garzik", - "email": "jgarzik@bitpay.com" - }, - { - "name": "Manuel Araoz", - "email": "manuelaraoz@gmail.com" - }, - { - "name": "Matias Alejo Garcia", - "email": "ematiu@gmail.com" - }, - { - "name": "Braydon Fuller", - "email": "braydon@bitpay.com" - } - ], "keywords": [ "bitcoin", "rpc" ], "repository": { "type": "git", - "url": "https://github.com/bitpay/bitcoind-rpc" + "url": "https://github.com/zmaike/bitcoind-rpc" }, "license": "MIT", "main": "lib/index.js", @@ -46,8 +28,5 @@ "mocha": "^2.1.0", "sinon": "^1.12.2" }, - "bugs": { - "url": "https://github.com/bitpay/bitcoind-rpc/issues" - }, - "homepage": "https://github.com/bitpay/bitcoind-rpc" + "homepage": "https://github.com/zmaike/bitcoind-rpc" }