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

@dashevo/dashd-rpc

Package Overview
Dependencies
Maintainers
11
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dashevo/dashd-rpc - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

promise.js

5

lib/index.js

@@ -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": {

48

README.md

@@ -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 @@

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