UNPKG

@wagmi/core

Version:

VanillaJS library for Ethereum

17 lines 613 B
import { getBlock, } from '../actions/getBlock.js'; import { filterQueryOptions } from './utils.js'; export function getBlockQueryOptions(config, options = {}) { return { ...options.query, queryFn: async (context) => { const [, { scopeKey: _, ...parameters }] = context.queryKey; const block = await getBlock(config, parameters); return (block ?? null); }, queryKey: getBlockQueryKey(options), }; } export function getBlockQueryKey(options = {}) { return ['block', filterQueryOptions(options)]; } //# sourceMappingURL=getBlock.js.map