// biome-ignore lint/performance/noBarrelFile: export { decodeLog } from './internal/abi/decodeLog.js' export { parseLogs } from './internal/abi/parseLogs.js' export { type FromRpcLogErrorType, type ToRpcLogErrorType, fromRpcLog, /** @alias fromRpcLog */ fromRpcLog as fromRpc, toRpcLog, /** @alias toRpcLog */ toRpcLog as toRpc, } from './internal/formatter/log.js' export type { Log, LogTopic, RpcLog, } from './internal/types/log.js' //////////////////////////////////////////////////////////////////////////////////////////////// import { fromRpcLog } from './internal/formatter/log.js' import type { Log, RpcLog } from './internal/types/log.js' import type { OneOf } from './internal/types/utils.js' /** * Instantiates a typed {@link Log} object from a {@link RpcLog} or {@link Log}. * * @example * ```ts * import { Log } from 'viem' * const log = Log.from({ ... }) * ``` */ export function from>( log: log, ): log extends Log ? log : RpcLog { if (typeof log.blockNumber === 'bigint') return log as any return fromRpcLog(log as RpcLog) as any }