Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

ethjs-rpc

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.7 to 0.1.8

2

dist/ethjs-rpc.js

@@ -128,3 +128,3 @@ /* eslint-disable */

if (err || responseObject.error) {
var payloadErrorMessage = '[ethjs-rpc] ' + (responseObject.error && 'rpc' || '') + ' error with payload ' + JSON.stringify(parsedPayload, null, self.options.jsonSpace) + ' ' + (String(err) || JSON.stringify(responseObject.error, null, self.options.jsonSpace));
var payloadErrorMessage = '[ethjs-rpc] ' + (responseObject.error && 'rpc' || '') + ' error with payload ' + JSON.stringify(parsedPayload, null, self.options.jsonSpace) + ' ' + (err ? String(err) : JSON.stringify(responseObject.error, null, self.options.jsonSpace));
var payloadError = new Error(payloadErrorMessage);

@@ -131,0 +131,0 @@ payloadError.value = err || responseObject.error;

@@ -1,1 +0,1 @@

!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("EthRPC",[],r):"object"==typeof exports?exports.EthRPC=r():t.EthRPC=r()}(this,function(){return function(t){function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}var e={};return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,r,e){Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=0)}([function(t,r){"use strict";function e(t,r){var o=this,n=r||{};if(!(this instanceof e))throw Error('[ethjs-rpc] the EthRPC object requires the "new" flag in order to function normally (i.e. `const eth = new EthRPC(provider);`).');o.options=Object.assign({jsonSpace:n.jsonSpace||0,max:n.max||9999999999999}),o.idCounter=Math.floor(Math.random()*o.options.max),(o.setProvider=function(t){if("object"!=typeof t)throw Error("[ethjs-rpc] the EthRPC object requires that the first input 'provider' must be an object, got '"+typeof t+"' (i.e. 'const eth = new EthRPC(provider);')");o.currentProvider=t})(t)}function o(t,r){return Object.assign({},{id:r,jsonrpc:"2.0",params:[]},t)}t.exports=e,e.prototype.sendAsync=function(t,r){var e=this,n=r||function(){};e.idCounter=e.idCounter%e.options.max;var i=o(t,e.idCounter++);return new Promise(function(t,r){e.currentProvider.sendAsync(i,function(o,s){var c=s||{};if(o||c.error){var u="[ethjs-rpc] "+(c.error&&"rpc"||"")+" error with payload "+JSON.stringify(i,null,e.options.jsonSpace)+" "+(o+""||JSON.stringify(c.error,null,e.options.jsonSpace)),p=Error(u);return p.value=o||c.error,r(p),n(p,null)}return t(c.result),n(null,c.result)})})}}])});
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("EthRPC",[],r):"object"==typeof exports?exports.EthRPC=r():t.EthRPC=r()}(this,function(){return function(t){function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}var e={};return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,r,e){Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=0)}([function(t,r){"use strict";function e(t,r){var o=this,n=r||{};if(!(this instanceof e))throw Error('[ethjs-rpc] the EthRPC object requires the "new" flag in order to function normally (i.e. `const eth = new EthRPC(provider);`).');o.options=Object.assign({jsonSpace:n.jsonSpace||0,max:n.max||9999999999999}),o.idCounter=Math.floor(Math.random()*o.options.max),(o.setProvider=function(t){if("object"!=typeof t)throw Error("[ethjs-rpc] the EthRPC object requires that the first input 'provider' must be an object, got '"+typeof t+"' (i.e. 'const eth = new EthRPC(provider);')");o.currentProvider=t})(t)}function o(t,r){return Object.assign({},{id:r,jsonrpc:"2.0",params:[]},t)}t.exports=e,e.prototype.sendAsync=function(t,r){var e=this,n=r||function(){};e.idCounter=e.idCounter%e.options.max;var i=o(t,e.idCounter++);return new Promise(function(t,r){e.currentProvider.sendAsync(i,function(o,s){var c=s||{};if(o||c.error){var u="[ethjs-rpc] "+(c.error&&"rpc"||"")+" error with payload "+JSON.stringify(i,null,e.options.jsonSpace)+" "+(o?o+"":JSON.stringify(c.error,null,e.options.jsonSpace)),p=Error(u);return p.value=o||c.error,r(p),n(p,null)}return t(c.result),n(null,c.result)})})}}])});

@@ -55,3 +55,3 @@ 'use strict';

if (err || responseObject.error) {
var payloadErrorMessage = '[ethjs-rpc] ' + (responseObject.error && 'rpc' || '') + ' error with payload ' + JSON.stringify(parsedPayload, null, self.options.jsonSpace) + ' ' + (String(err) || JSON.stringify(responseObject.error, null, self.options.jsonSpace));
var payloadErrorMessage = '[ethjs-rpc] ' + (responseObject.error && 'rpc' || '') + ' error with payload ' + JSON.stringify(parsedPayload, null, self.options.jsonSpace) + ' ' + (err ? String(err) : JSON.stringify(responseObject.error, null, self.options.jsonSpace));
var payloadError = new Error(payloadErrorMessage);

@@ -58,0 +58,0 @@ payloadError.value = err || responseObject.error;

{
"name": "ethjs-rpc",
"version": "0.1.7",
"version": "0.1.8",
"description": "A super simple module for querying the Ethereum RPC layer without formatting.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -49,3 +49,3 @@ module.exports = EthRPC;

if (err || responseObject.error) {
const payloadErrorMessage = `[ethjs-rpc] ${(responseObject.error && 'rpc' || '')} error with payload ${JSON.stringify(parsedPayload, null, self.options.jsonSpace)} ${String(err) || (JSON.stringify(responseObject.error, null, self.options.jsonSpace))}`;
const payloadErrorMessage = `[ethjs-rpc] ${(responseObject.error && 'rpc' || '')} error with payload ${JSON.stringify(parsedPayload, null, self.options.jsonSpace)} ${err ? String(err) : (JSON.stringify(responseObject.error, null, self.options.jsonSpace))}`;
const payloadError = new Error(payloadErrorMessage);

@@ -52,0 +52,0 @@ payloadError.value = (err || responseObject.error);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc