UNPKG

eth-rpc-cache

Version:

A simple cache for Ethereum RPC requests extensible with different caching strategies

5 lines (3 loc) 179 B
import stringify from 'json-stable-stringify' export const getKey = (method: string, params: unknown[] = []) => `${method}(${params.map(param => stringify(param)).join(',')})`