UNPKG

wagmi

Version:

React Hooks for Ethereum

17 lines 1.44 kB
import type { Config, ConnectErrorType, ResolvedRegister } from '@wagmi/core'; import type { Compute } from '@wagmi/core/internal'; import { type ConnectData, type ConnectMutate, type ConnectMutateAsync, type ConnectVariables } from '@wagmi/core/query'; import type { ConfigParameter } from '../types/properties.js'; import type { UseMutationParameters, UseMutationReturnType } from '../utils/query.js'; import { type UseConnectorsReturnType } from './useConnectors.js'; export type UseConnectParameters<config extends Config = Config, context = unknown> = Compute<ConfigParameter<config> & { mutation?: UseMutationParameters<ConnectData<config>, ConnectErrorType, ConnectVariables<config, config['connectors'][number]>, context> | undefined; }>; export type UseConnectReturnType<config extends Config = Config, context = unknown> = Compute<UseMutationReturnType<ConnectData<config>, ConnectErrorType, ConnectVariables<config, config['connectors'][number]>, context> & { connect: ConnectMutate<config, context>; connectAsync: ConnectMutateAsync<config, context>; connectors: Compute<UseConnectorsReturnType> | config['connectors']; }>; /** https://wagmi.sh/react/api/hooks/useConnect */ export declare function useConnect<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: UseConnectParameters<config, context>): UseConnectReturnType<config, context>; //# sourceMappingURL=useConnect.d.ts.map