@dashevo/dashd-rpc
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -245,3 +245,4 @@ 'use strict'; | ||
prioritiseTransaction: 'str float int',//https://github.com/dashpay/dash/blob/v0.12.2.x/src/rpc/mining.cpp#L284 | ||
privateSend: 'str',//https://github.com/dashpay/dash/blob/v0.12.2.x/src/rpc/masternode.cpp#L28 | ||
privateSend: 'str',//https://github.com/dashpay/dash/blob/v0.12.2.x/src/rpc/masternode.cpp#L28, | ||
protx: 'str str str',//https://github.com/dashevo/dash/blob/73ed410715e70d43214400cfdce0186ad31468be/src/rpc/rpcevo.cpp#L616 | ||
reconsiderBlock: 'str',//https://github.com/dashpay/dash/blob/v0.12.2.x/src/rpc/blockchain.cpp#L1024 | ||
@@ -345,2 +346,4 @@ resendWalletTransactions: '',//https://github.com/dashpay/dash/blob/v0.12.2.x/src/wallet/rpcwallet.cpp#L2499 | ||
} | ||
constructor.prototype['apiCalls'] = apiCalls; | ||
@@ -347,0 +350,0 @@ } |
{ | ||
"name": "@dashevo/dashd-rpc", | ||
"description": "Dash Client Library to connect to Dash Core (dashd) via RPC", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"author": { | ||
@@ -46,3 +46,4 @@ "name": "Stephen Pair", | ||
"dependencies": { | ||
"async": "^1.3.0" | ||
"async": "^1.3.0", | ||
"bluebird": "^3.5.1" | ||
}, | ||
@@ -49,0 +50,0 @@ "devDependencies": { |
@@ -15,3 +15,3 @@ dashd-rpc.js | ||
```bash | ||
npm install dashd-rpc | ||
npm install @dashevo/dashd-rpc | ||
``` | ||
@@ -21,3 +21,3 @@ | ||
Arguments : | ||
Config parameters : | ||
@@ -29,18 +29,46 @@ - protocol : (string - optional) - (default: 'https') - Set the protocol to be used. Either `http` or `https`. | ||
- port : (integer - optional) - (default: 9998) - Set the port on which perform the RPC command. | ||
Promise vs callback based | ||
- `require('bitcoind-rpc-dash/promise')` to have promises returned | ||
- `require('bitcoind-rpc-dash')` to have callback functions returned | ||
## Examples | ||
Config: | ||
```javascript | ||
var run = function() { | ||
var bitcore = require('bitcore'); | ||
var RpcClient = require('@dashevo/dashd-rpc'); | ||
var config = { | ||
var config = { | ||
protocol: 'http', | ||
user: 'user', | ||
pass: 'pass', | ||
user: 'dash', | ||
pass: 'local321', | ||
host: '127.0.0.1', | ||
port: 19998 | ||
}; | ||
}; | ||
``` | ||
Promise based: | ||
```javascript | ||
var RpcClient = require('bitcoind-rpc-dash/promise'); | ||
var rpc = new RpcClient(config); | ||
rpc.getRawMemPool() | ||
.then(ret => { | ||
return Promise.all(ret.result.map(r => rpc.getRawTransaction(r))) | ||
}) | ||
.then(rawTxs => { | ||
rawTxs.forEach(rawTx => { | ||
console.log(`RawTX: ${rawTx.result}`); | ||
}) | ||
}) | ||
.catch(err => { | ||
console.log(err) | ||
}) | ||
``` | ||
Callback based (legacy): | ||
```javascript | ||
var run = function() { | ||
var bitcore = require('bitcore'); | ||
var RpcClient = require('bitcoind-rpc-dash'); | ||
var rpc = new RpcClient(config); | ||
@@ -47,0 +75,0 @@ |
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
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
38990
8
772
135
2
5
+ Addedbluebird@^3.5.1
+ Addedbluebird@3.7.2(transitive)