eris-db-promise
Advanced tools
Comparing version 1.0.3 to 1.1.0
'use strict' | ||
const Request = require('./Request') | ||
const HttpRequest = require('./request/HttpRequest') | ||
const WsRequest = require('./request/WsRequest') | ||
@@ -22,3 +23,6 @@ const Accounts = require('./components/Accounts') | ||
this.url = rpcUrl | ||
this.request = new Request(rpcUrl) | ||
if (this.url.indexOf('ws') == 0) | ||
this.request = new WsRequest(rpcUrl) | ||
else | ||
this.request = new HttpRequest(rpcUrl) | ||
@@ -25,0 +29,0 @@ this.network = new Network(this) |
{ | ||
"name": "eris-db-promise", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "", | ||
@@ -48,4 +48,5 @@ "main": "index.js", | ||
"request-promise": "^4.1.1", | ||
"tendermint-crypto": "0.0.1" | ||
"tendermint-crypto": "0.0.1", | ||
"ws": "^2.1.0" | ||
} | ||
} |
@@ -28,3 +28,6 @@ # ErisDB Promise JS lib (Alpha) | ||
const erisFactory = require('eris-db-promise') | ||
// For base HTTP JSON RPC | ||
const erisDb = erisFactory.createInstance('http://<Your IP Address>:1337/rpc') | ||
// For WebSocket RPC client | ||
const erisDb = erisFactory.createInstance('ws://<Your IP Address>:1337/socketrpc') | ||
``` | ||
@@ -31,0 +34,0 @@ |
@@ -25,2 +25,6 @@ 'use strict' | ||
tx = { | ||
// data: new Buffer(JSON.stringify({ | ||
// value: 1000, | ||
// data: compiled.bytecode.toUpperCase() | ||
// })).toString('hex').toUpperCase(), | ||
data: compiled.bytecode.toUpperCase(), | ||
@@ -27,0 +31,0 @@ input: { |
@@ -249,5 +249,2 @@ 'use strict' | ||
.then((info) => { | ||
console.log('==========================') | ||
console.log(info) | ||
console.log('==========================') | ||
expect(info).to.be.an('object') | ||
@@ -254,0 +251,0 @@ .and.to.contain.all.keys([ |
@@ -5,3 +5,3 @@ 'use strict' | ||
const expect = require('chai').expect | ||
const Request = require('../../lib/Request') | ||
const Request = require('../../lib/request/HttpRequest') | ||
@@ -8,0 +8,0 @@ describe('ErisDB.Request :: ', () => { |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
3712061
40
107614
109
5
9
+ Addedws@^2.1.0
+ Addedsafe-buffer@5.0.1(transitive)
+ Addedultron@1.1.1(transitive)
+ Addedws@2.3.1(transitive)