import type { CurrencyConfig } from '../../config'; import type { CoinModuleApi, Memo, TxData } from '../types'; /** * Returns a copy of a {@link CoinModuleApi} whose contract methods route through the * provided `instrument` function. Everything else the object carries — non-API members * such as the legacy bridge surface, or `supports` — is copied over untouched. * * Exported so other wrappers (withLogging, withTracing, withMetrics, …) can reuse the * same interception mechanism without duplicating the boilerplate. * * The wrapped set is {@link apiMethodKeys}, the contract's own method list, rather than * "every property that happens to be a function": what gets instrumented is then readable * from the source, and a method added to the contract cannot be silently skipped — the * exhaustiveness guard next to that list fails to compile first. * * Each method is wrapped and bound once, eagerly, so repeated reads are referentially * stable (`api.getBalance === api.getBalance`) — a consumer using a method as a dependency * key, a React effect or a memo cache, would otherwise see a new function every time — and * no allocation happens on the call path. * * Expects a plain object, which is what a `createApi()` result and a `withDefaults` result * both are. Methods living on a prototype rather than on the object itself are copied by * value here, so a class instance that reassigns its own methods after wrapping would not * see the change. */ export declare function instrumentApi>(api: CoinModuleApi & Extra, instrument: (name: string, fn: (...args: unknown[]) => unknown, args: unknown[]) => unknown): CoinModuleApi & Extra; //# sourceMappingURL=instrumenter.d.ts.map