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

@rarible/estimate-middleware

Package Overview
Dependencies
Maintainers
2
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rarible/estimate-middleware - npm Package Compare versions

Comparing version 0.5.0 to 0.5.5

2

build/estimate.d.ts
import { JsonRpcEngine } from "json-rpc-engine";
import type { SafeEventEmitterProvider } from "eth-json-rpc-middleware/dist/utils/cache";
export declare function estimate(provider: any, estimate: JsonRpcEngine | string): SafeEventEmitterProvider;
export declare function estimate(provider: any, estimate?: JsonRpcEngine | string): SafeEventEmitterProvider;

@@ -9,3 +9,3 @@ "use strict";

var engine = new json_rpc_engine_1.JsonRpcEngine();
engine.push((0, middleware_1.estimateGasMiddliware)(getEstimateEngine(estimate)));
engine.push((0, middleware_1.estimateGasMiddliware)(getEstimateEngine(provider, estimate)));
engine.push((0, eth_json_rpc_middleware_1.providerAsMiddleware)(provider));

@@ -15,4 +15,9 @@ return (0, eth_json_rpc_middleware_1.providerFromEngine)(engine);

exports.estimate = estimate;
function getEstimateEngine(estimate) {
if (typeof estimate === "string") {
function getEstimateEngine(provider, estimate) {
if (estimate === undefined) {
var estimateEngine = new json_rpc_engine_1.JsonRpcEngine();
estimateEngine.push((0, eth_json_rpc_middleware_1.providerAsMiddleware)(provider));
return estimateEngine;
}
else if (typeof estimate === "string") {
var engine = new json_rpc_engine_1.JsonRpcEngine();

@@ -19,0 +24,0 @@ engine.push((0, eth_json_rpc_middleware_1.createFetchMiddleware)({ rpcUrl: estimate }));

{
"name": "@rarible/estimate-middleware",
"version": "0.5.0",
"version": "0.5.5",
"keywords": [

@@ -37,3 +37,3 @@ "rarible",

},
"gitHead": "371aa2124f5ac7b3c10ba4266230bc3f556edf68"
"gitHead": "00fb8a5a10ad9d345e45fbb47d0eb5e576a3ab1d"
}

Sorry, the diff of this file is not supported yet

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