UNPKG

@rarible/estimate-middleware

Version:
9 lines (8 loc) 512 B
import type { JsonRpcEngine, JsonRpcMiddleware } from "json-rpc-engine"; import type { Block } from "eth-json-rpc-middleware/dist/utils/cache.js"; /** * Creates async middleware for gas estimation if gas not defined * @param engine JsonRpcEngine to use for gas estimation * @param force set true if estimate tx even if gas is provided */ export declare function createEstimateGasMiddleware(engine: JsonRpcEngine, force?: boolean, threshold?: number, multiplier?: number): JsonRpcMiddleware<string[], Block>;