diff --git a/.gitignore b/.gitignore index d9173be..7c0cf4b 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,7 @@ bower_components Thumbs.db # Ignore built ts files -dist/**/* +# dist/**/* # ignore yarn.lock yarn.lock diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..f1e47e3 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,2 @@ +export * from './lib/connectors/dedicatedWalletConnector.js'; +export * from './lib/connectors/universalWalletConnector.js'; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..f1e47e3 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,2 @@ +export * from './lib/connectors/dedicatedWalletConnector.js'; +export * from './lib/connectors/universalWalletConnector.js'; diff --git a/dist/lib/connectors/dedicatedWalletConnector.d.ts b/dist/lib/connectors/dedicatedWalletConnector.d.ts new file mode 100644 index 0000000..5ec24c1 --- /dev/null +++ b/dist/lib/connectors/dedicatedWalletConnector.d.ts @@ -0,0 +1,52 @@ +import type { OAuthExtension, OAuthProvider } from '@magic-ext/oauth'; +import type { MagicSDKAdditionalConfiguration } from '@magic-sdk/provider'; +import { type MagicConnectorParams, type MagicOptions } from './magicConnector.js'; +/** + * Dedicated Wallet Connector class used to connect to wallet using Dedicated Wallet. + * It uses modal UI defined in our package which also takes in various styling options + * for custom experience. + * + * @example + * ```typescript + * import { DedicatedWalletConnector } from '@magiclabs/wagmi-connector'; + * const connector = new DedicatedWalletConnector({ + * options: { + * apiKey: YOUR_MAGIC_LINK_API_KEY, //required + * //...Other options + * }, + * }); + * ``` + * @see https://github.com/magiclabs/wagmi-magic-connector#-usage + * @see https://magic.link/docs/dedicated/overview + */ +interface DedicatedWalletOptions extends MagicOptions { + enableEmailLogin?: boolean; + enableSMSLogin?: boolean; + oauthOptions?: { + providers: OAuthProvider[]; + callbackUrl?: string; + }; + magicSdkConfiguration?: MagicSDKAdditionalConfiguration; +} +export interface DedicatedWalletConnectorParams extends MagicConnectorParams { + options: DedicatedWalletOptions; +} +export declare function dedicatedWalletConnector({ chains, options, }: DedicatedWalletConnectorParams): import("@wagmi/core").CreateConnectorFn Promise<(import("@magic-sdk/provider/dist/types/modules/rpc-provider").RPCProviderModule & import("web3-core").AbstractProvider) | null>; + connect: () => Promise<{ + chainId: number; + accounts: `0x${string}`[]; + }>; + disconnect: () => Promise; + getAccounts: () => Promise<`0x${string}`[]>; + getChainId: () => Promise; + isAuthorized: () => Promise; + onAccountsChanged: (accounts: string[]) => Promise; + onChainChanged: (chain: string) => void; + onConnect: (connectInfo: import("viem").ProviderConnectInfo) => Promise; + onDisconnect: () => void; +}, {}>; +export {}; diff --git a/dist/lib/connectors/dedicatedWalletConnector.js b/dist/lib/connectors/dedicatedWalletConnector.js new file mode 100644 index 0000000..b8d611f --- /dev/null +++ b/dist/lib/connectors/dedicatedWalletConnector.js @@ -0,0 +1,150 @@ +import { createConnector, normalizeChainId } from '@wagmi/core'; +import { magicConnector, } from './magicConnector.js'; +import { UserRejectedRequestError, getAddress } from 'viem'; +import { createModal } from '../modal/view.js'; +export function dedicatedWalletConnector({ chains, options, }) { + let { id, name, type, isModalOpen, getAccount, getMagicSDK, getProvider, onAccountsChanged, } = magicConnector({ + chains, + options: { ...options, connectorType: 'dedicated' }, + }); + const oauthProviders = options.oauthOptions?.providers ?? []; + const oauthCallbackUrl = options.oauthOptions?.callbackUrl; + const enableSMSLogin = options.enableSMSLogin ?? false; + const enableEmailLogin = options.enableEmailLogin ?? true; + /** + * This method is used to get user details from the modal UI + * It first creates the modal UI and then waits for the user to + * fill in the details and submit the form. + */ + const getUserDetailsByForm = async (enableSMSLogin, enableEmailLogin, oauthProviders) => { + const output = (await createModal({ + accentColor: options.accentColor, + isDarkMode: options.isDarkMode, + customLogo: options.customLogo, + customHeaderText: options.customHeaderText, + enableSMSLogin: enableSMSLogin, + enableEmailLogin: enableEmailLogin, + oauthProviders, + })); + isModalOpen = false; + return output; + }; + return createConnector((config) => ({ + id, + type, + name, + getProvider, + connect: async function () { + if (!options.apiKey) { + throw new Error('Magic API Key is not provided.'); + } + const provider = await getProvider(); + if (provider?.on) { + provider.on('accountsChanged', this.onAccountsChanged.bind(this)); + provider.on('chainChanged', this.onChainChanged.bind(this)); + provider.on('disconnect', this.onDisconnect.bind(this)); + } + let chainId; + try { + chainId = await this.getChainId(); + } + catch { + chainId = 0; + } + if (await this.isAuthorized()) { + return { + chainId, + accounts: [await getAccount()], + }; + } + if (!isModalOpen) { + const modalOutput = await getUserDetailsByForm(enableSMSLogin, enableEmailLogin, oauthProviders); + const magic = getMagicSDK(); + // LOGIN WITH MAGIC USING OAUTH PROVIDER + if (modalOutput.oauthProvider) + await magic.oauth.loginWithRedirect({ + provider: modalOutput.oauthProvider, + redirectURI: oauthCallbackUrl ?? window.location.href, + }); + // LOGIN WITH MAGIC USING EMAIL + if (modalOutput.email) + await magic.auth.loginWithEmailOTP({ + email: modalOutput.email, + }); + // LOGIN WITH MAGIC USING PHONE NUMBER + if (modalOutput.phoneNumber) + await magic.auth.loginWithSMS({ + phoneNumber: modalOutput.phoneNumber, + }); + if (await magic.user.isLoggedIn()) + return { + accounts: [await getAccount()], + chainId, + }; + } + throw new UserRejectedRequestError(Error('User Rejected Request')); + }, + disconnect: async () => { + try { + const magic = getMagicSDK(); + await magic?.wallet.disconnect(); + config.emitter.emit('disconnect'); + } + catch (error) { + console.error('Error disconnecting from Magic SDK:', error); + } + }, + getAccounts: async () => { + const provider = await getProvider(); + const accounts = (await provider?.request({ + method: 'eth_accounts', + })); + return accounts.map((x) => getAddress(x)); + }, + getChainId: async () => { + const provider = await getProvider(); + if (provider) { + const chainId = await provider.request({ + method: 'eth_chainId', + params: [], + }); + return normalizeChainId(chainId); + } + const networkOptions = options.magicSdkConfiguration?.network; + if (typeof networkOptions === 'object') { + const chainID = networkOptions.chainId; + if (chainID) + return normalizeChainId(chainID); + } + throw new Error('Chain ID is not defined'); + }, + isAuthorized: async () => { + try { + const magic = getMagicSDK(); + if (!magic) { + return false; + } + const isLoggedIn = await magic.user.isLoggedIn(); + if (isLoggedIn) + return true; + const result = await magic.oauth.getRedirectResult(); + return result !== null; + } + catch { } + return false; + }, + onAccountsChanged, + onChainChanged(chain) { + const chainId = normalizeChainId(chain); + config.emitter.emit('change', { chainId }); + }, + async onConnect(connectInfo) { + const chainId = normalizeChainId(connectInfo.chainId); + const accounts = await this.getAccounts(); + config.emitter.emit('connect', { accounts, chainId }); + }, + onDisconnect: () => { + config.emitter.emit('disconnect'); + }, + })); +} diff --git a/dist/lib/connectors/magicConnector.d.ts b/dist/lib/connectors/magicConnector.d.ts new file mode 100644 index 0000000..b8bfd38 --- /dev/null +++ b/dist/lib/connectors/magicConnector.d.ts @@ -0,0 +1,3130 @@ +import { OAuthExtension } from '@magic-ext/oauth'; +import type { InstanceWithExtensions, MagicSDKAdditionalConfiguration, MagicSDKExtensionsOption, SDKBase } from '@magic-sdk/provider'; +import { type EthNetworkConfiguration } from 'magic-sdk'; +import { type Chain } from 'viem'; +export interface MagicOptions { + apiKey: string; + accentColor?: string; + isDarkMode?: boolean; + customLogo?: string; + customHeaderText?: string; + connectorType?: 'dedicated' | 'universal'; + magicSdkConfiguration?: MagicSDKAdditionalConfiguration; + networks?: EthNetworkConfiguration[]; +} +/** + * Magic Connector class is a base class for Dedicated Wallet and Universal Wallet Connectors + * It implements the common functionality of both the connectors + * + * Dedicated Wallet Connector and Universal Wallet Connector are the two connectors provided by this library + * And both of them extend this class. + */ +export interface MagicConnectorParams { + chains: readonly Chain[]; + options: MagicOptions; +} +export declare function magicConnector({ chains, options }: MagicConnectorParams): { + id: string; + name: string; + type: string; + isModalOpen: boolean; + isReady: boolean; + getProvider: () => Promise<(import("@magic-sdk/provider/dist/types/modules/rpc-provider").RPCProviderModule & import("web3-core").AbstractProvider) | null>; + getMagicSDK: () => InstanceWithExtensions | InstanceWithExtensions> | null; + getAccount: () => Promise<`0x${string}`>; + getWalletClient: ({ chainId }?: { + chainId?: number | undefined; + }) => Promise<{ + account: { + address: `0x${string}`; + type: "json-rpc"; + }; + batch?: { + multicall?: boolean | { + batchSize?: number | undefined; + wait?: number | undefined; + } | undefined; + } | undefined; + cacheTime: number; + ccipRead?: false | { + request?: ((parameters: import("viem").CcipRequestParameters) => Promise<`0x${string}`>) | undefined; + } | undefined; + chain: Chain; + key: string; + name: string; + pollingInterval: number; + request: import("viem").EIP1193RequestFn; + transport: import("viem").TransportConfig<"custom", import("viem").EIP1193RequestFn>; + type: string; + uid: string; + addChain: (args: import("viem").AddChainParameters) => Promise; + deployContract: (args: import("viem").DeployContractParameters) => Promise<`0x${string}`>; + getAddresses: () => Promise; + getChainId: () => Promise; + getPermissions: () => Promise; + prepareTransactionRequest: , TChainOverride extends Chain | undefined = undefined, TAccountOverride extends `0x${string}` | import("viem").Account | undefined = undefined>(args: import("viem").PrepareTransactionRequestParameters) => Promise, "transactionRequest", import("viem").TransactionRequest>, "from"> & (import("viem").DeriveChain extends infer T_12 ? T_12 extends import("viem").DeriveChain ? T_12 extends Chain ? { + chain: T_12; + } : { + chain?: undefined; + } : never : never) & (import("viem").DeriveAccount<{ + address: `0x${string}`; + type: "json-rpc"; + }, TAccountOverride> extends infer T_13 ? T_13 extends import("viem").DeriveAccount<{ + address: `0x${string}`; + type: "json-rpc"; + }, TAccountOverride> ? T_13 extends import("viem").Account ? { + account: T_13; + from: `0x${string}`; + } : { + account?: undefined; + from?: undefined; + } : never : never), import("viem").IsNever<((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_14 ? T_14 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_14 extends "legacy" ? import("viem").TransactionRequestLegacy : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_15 ? T_15 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_15 extends "eip1559" ? import("viem").TransactionRequestEIP1559 : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_16 ? T_16 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_16 extends "eip2930" ? import("viem").TransactionRequestEIP2930 : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_17 ? T_17 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_17 extends "eip4844" ? import("viem").TransactionRequestEIP4844 : never : never : never)> extends true ? unknown : import("viem").ExactPartial<((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_18 ? T_18 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_18 extends "legacy" ? import("viem").TransactionRequestLegacy : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_19 ? T_19 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_19 extends "eip1559" ? import("viem").TransactionRequestEIP1559 : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_20 ? T_20 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_20 extends "eip2930" ? import("viem").TransactionRequestEIP2930 : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_21 ? T_21 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_21 extends "eip4844" ? import("viem").TransactionRequestEIP4844 : never : never : never)>> & { + chainId?: number | undefined; + }, (TRequest["parameters"] extends import("viem").PrepareTransactionRequestParameterType[] ? TRequest["parameters"][number] : import("viem").PrepareTransactionRequestParameterType) extends infer T_22 ? T_22 extends (TRequest["parameters"] extends import("viem").PrepareTransactionRequestParameterType[] ? TRequest["parameters"][number] : import("viem").PrepareTransactionRequestParameterType) ? T_22 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_22 : never : never> & (unknown extends TRequest["kzg"] ? {} : Pick) extends infer T ? { [K in keyof T]: (import("viem").UnionRequiredBy, "transactionRequest", import("viem").TransactionRequest>, "from"> & (import("viem").DeriveChain extends infer T_1 ? T_1 extends import("viem").DeriveChain ? T_1 extends Chain ? { + chain: T_1; + } : { + chain?: undefined; + } : never : never) & (import("viem").DeriveAccount<{ + address: `0x${string}`; + type: "json-rpc"; + }, TAccountOverride> extends infer T_2 ? T_2 extends import("viem").DeriveAccount<{ + address: `0x${string}`; + type: "json-rpc"; + }, TAccountOverride> ? T_2 extends import("viem").Account ? { + account: T_2; + from: `0x${string}`; + } : { + account?: undefined; + from?: undefined; + } : never : never), import("viem").IsNever<((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_3 ? T_3 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_3 extends "legacy" ? import("viem").TransactionRequestLegacy : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_4 ? T_4 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_4 extends "eip1559" ? import("viem").TransactionRequestEIP1559 : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_5 ? T_5 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_5 extends "eip2930" ? import("viem").TransactionRequestEIP2930 : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_6 ? T_6 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_6 extends "eip4844" ? import("viem").TransactionRequestEIP4844 : never : never : never)> extends true ? unknown : import("viem").ExactPartial<((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_7 ? T_7 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_7 extends "legacy" ? import("viem").TransactionRequestLegacy : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_8 ? T_8 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_8 extends "eip1559" ? import("viem").TransactionRequestEIP1559 : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_9 ? T_9 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_9 extends "eip2930" ? import("viem").TransactionRequestEIP2930 : never : never : never) | ((TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) extends infer T_10 ? T_10 extends (TRequest["type"] extends string ? TRequest["type"] : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)> extends "legacy" ? unknown : import("viem").GetTransactionType | import("viem").Opaque ? "legacy" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: undefined; + maxFeePerBlobGas?: undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: undefined; + } & (import("viem").OneOf<{ + maxFeePerGas: bigint; + } | { + maxPriorityFeePerGas: bigint; + }, import("viem").FeeValuesEIP1559> & { + accessList?: import("viem").AccessList | undefined; + })) | import("viem").Opaque | import("viem").Opaque ? "eip1559" : never) | (TRequest extends ({ + accessList?: import("viem").AccessList | undefined; + blobs?: undefined; + blobVersionedHashes?: undefined; + gasPrice?: bigint | undefined; + sidecars?: undefined; + } & import("viem").ExactPartial & { + accessList: import("viem").AccessList | undefined; + }) | import("viem").Opaque | import("viem").Opaque ? "eip2930" : never) | (TRequest extends ({ + accessList?: undefined; + blobs?: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + blobVersionedHashes?: readonly `0x${string}`[] | undefined; + maxFeePerBlobGas?: bigint | undefined; + maxFeePerGas?: bigint | undefined; + maxPriorityFeePerGas?: bigint | undefined; + sidecars?: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + } & (import("viem").ExactPartial & import("viem").OneOf<{ + blobs: readonly `0x${string}`[] | readonly Uint8Array[] | undefined; + } | { + blobVersionedHashes: readonly `0x${string}`[] | undefined; + } | { + sidecars: false | readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; + }, import("viem").TransactionSerializableEIP4844>)) | import("viem").Opaque | import("viem").Opaque ? "eip4844" : never) | (TRequest["type"] extends string ? TRequest["type"] : never)>) ? T_10 extends "eip4844" ? import("viem").TransactionRequestEIP4844 : never : never : never)>> & { + chainId?: number | undefined; + }, (TRequest["parameters"] extends import("viem").PrepareTransactionRequestParameterType[] ? TRequest["parameters"][number] : import("viem").PrepareTransactionRequestParameterType) extends infer T_11 ? T_11 extends (TRequest["parameters"] extends import("viem").PrepareTransactionRequestParameterType[] ? TRequest["parameters"][number] : import("viem").PrepareTransactionRequestParameterType) ? T_11 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_11 : never : never> & (unknown extends TRequest["kzg"] ? {} : Pick))[K]; } : never>; + requestAddresses: () => Promise; + requestPermissions: (args: { + [x: string]: Record; + eth_accounts: Record; + }) => Promise; + sendRawTransaction: (args: import("viem").SendRawTransactionParameters) => Promise<`0x${string}`>; + sendTransaction: , TChainOverride_1 extends Chain | undefined = undefined>(args: import("viem").SendTransactionParameters) => Promise<`0x${string}`>; + signMessage: (args: import("viem").SignMessageParameters<{ + address: `0x${string}`; + type: "json-rpc"; + }>) => Promise<`0x${string}`>; + signTransaction: (args: import("viem").SignTransactionParameters) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | import("viem").TransactionSerializedLegacy>; + signTypedData: (args: import("viem").SignTypedDataParameters) => Promise<`0x${string}`>; + switchChain: (args: import("viem").SwitchChainParameters) => Promise; + watchAsset: (args: import("viem").WatchAssetParams) => Promise; + writeContract: , args extends import("viem").ContractFunctionArgs, TChainOverride_3 extends Chain | undefined = undefined>(args: import("viem").WriteContractParameters) => Promise<`0x${string}`>; + extend: , "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client>) => client) => import("viem").Client>; + }>; + onAccountsChanged: (accounts: string[]) => Promise; +}; diff --git a/dist/lib/connectors/magicConnector.js b/dist/lib/connectors/magicConnector.js new file mode 100644 index 0000000..d84ec7d --- /dev/null +++ b/dist/lib/connectors/magicConnector.js @@ -0,0 +1,69 @@ +import { OAuthExtension } from '@magic-ext/oauth'; +import { Magic } from 'magic-sdk'; +import { createWalletClient, custom, getAddress } from 'viem'; +const IS_SERVER = typeof window === 'undefined'; +export function magicConnector({ chains = [], options }) { + if (!options.apiKey) { + throw new Error('Magic API Key is required. Get one at https://dashboard.magic.link/'); + } + const getMagicSDK = () => { + if (options.connectorType === 'dedicated') { + return new Magic(options.apiKey, { + ...options.magicSdkConfiguration, + extensions: [new OAuthExtension()], + }); + } + if (options.connectorType === 'universal') { + return new Magic(options.apiKey, { + ...options.magicSdkConfiguration, + network: options.magicSdkConfiguration?.network ?? options?.networks?.[0], + }); + } + return null; + }; + const getProvider = async () => { + const magic = getMagicSDK(); + if (!magic) + return null; + return magic.rpcProvider; + }; + const getAccount = async () => { + const provider = await getProvider(); + const accounts = await provider?.request({ + method: 'eth_accounts', + }); + const account = getAddress(accounts[0]); + return account; + }; + const getWalletClient = async ({ chainId } = {}) => { + const provider = await getProvider(); + const account = await getAccount(); + const chain = chains.find((x) => x.id === chainId) ?? chains[0]; + if (!provider) + throw new Error('provider is required.'); + return createWalletClient({ + account, + chain, + transport: custom(provider), + }); + }; + const onAccountsChanged = async (accounts) => { + const provider = await getProvider(); + if (accounts.length === 0 || !accounts[0]) + provider?.emit('disconnect'); + else + provider?.emit('change', { account: getAddress(accounts[0]) }); + }; + return { + id: 'magic', + name: 'Magic', + type: 'Magic', + isModalOpen: false, + isReady: IS_SERVER, + getProvider, + getMagicSDK, + getAccount, + getWalletClient, + onAccountsChanged, + }; +} diff --git a/dist/lib/connectors/universalWalletConnector.d.ts b/dist/lib/connectors/universalWalletConnector.d.ts new file mode 100644 index 0000000..579866b --- /dev/null +++ b/dist/lib/connectors/universalWalletConnector.d.ts @@ -0,0 +1,55 @@ +import type { MagicSDKAdditionalConfiguration } from "@magic-sdk/provider"; +import type { RPCProviderModule } from "@magic-sdk/provider/dist/types/modules/rpc-provider"; +import type { EthNetworkConfiguration } from "@magic-sdk/types"; +import { type Chain } from "viem"; +export interface UniversalWalletOptions { + apiKey: string; + magicSdkConfiguration?: MagicSDKAdditionalConfiguration; + networks?: EthNetworkConfiguration[]; +} +/** + * Universal Wallet Connector class used to connect to wallet using Universal Wallet modal + * This uses the modal UI from Magic itself and styles for it can be configured using + * magic dashboard. + * + * @example + * ```typescript + * import { UniversalWalletConnector } from '@magiclabs/wagmi-connector'; + * const connector = new UniversalWalletConnector({ + * options: { + * apiKey: YOUR_MAGIC_LINK_API_KEY, //required + * //...Other options + * }, + * }); + * ``` + * @see https://github.com/magiclabs/wagmi-magic-connector#-usage + * @see https://magic.link/docs/universal/overview + */ +interface UniversalWalletConnectorParams { + chains: readonly Chain[]; + options: UniversalWalletOptions; +} +export declare function universalWalletConnector({ chains, options, }: UniversalWalletConnectorParams): import("@wagmi/core").CreateConnectorFn | import("@magic-sdk/provider").InstanceWithExtensions> | null; + getProvider: () => Promise<(RPCProviderModule & import("web3-core").AbstractProvider) | null>; + getAccount: () => Promise<`0x${string}`>; + onAccountsChanged: (accounts: string[]) => Promise; + connect: () => Promise<{ + accounts: any[]; + chainId: number; + }>; + getAccounts: () => Promise<`0x${string}`[]>; + onChainChanged: (chain: string) => void; + onConnect: (connectInfo: import("viem").ProviderConnectInfo) => Promise; + disconnect: () => Promise; + isAuthorized: () => Promise; + getChainId: () => Promise; + switchChain: ({ chainId }: { + chainId: number; + }) => Promise; + onDisconnect: () => void; +}, {}>; +export {}; diff --git a/dist/lib/connectors/universalWalletConnector.js b/dist/lib/connectors/universalWalletConnector.js new file mode 100644 index 0000000..ae3bbed --- /dev/null +++ b/dist/lib/connectors/universalWalletConnector.js @@ -0,0 +1,135 @@ +import { createConnector } from "@wagmi/core"; +import { normalizeChainId } from "../utils.js"; +import { magicConnector } from "./magicConnector.js"; +import { getAddress } from "viem"; +export function universalWalletConnector({ chains, options, }) { + const { id, name, type, getAccount, getMagicSDK, getProvider, onAccountsChanged, } = magicConnector({ + chains, + options: { ...options, connectorType: "universal" }, + }); + const magic = getMagicSDK(); + const registerProviderEventListeners = (provider, onChainChanged, onDisconnect) => { + if (provider.on) { + provider.on("accountsChanged", onAccountsChanged); + provider.on("chainChanged", (chain) => onChainChanged(chain)); + provider.on("disconnect", onDisconnect); + } + }; + return createConnector((config) => ({ + id, + name, + type, + magic, + getProvider, + getAccount, + onAccountsChanged, + async connect() { + await this.magic?.wallet.connectWithUI(); + const provider = (await this.getProvider()); + const chainId = await this.getChainId(); + provider && + registerProviderEventListeners(provider, (chain) => { + const chainId = normalizeChainId(chain); + config.emitter.emit("change", { chainId }); + }, this.onDisconnect); + const account = await this.getAccount(); + return { + accounts: [account], + chainId, + }; + }, + async getAccounts() { + const provider = await this.getProvider(); + const accounts = (await provider?.request({ + method: "eth_accounts", + })); + return accounts.map((x) => getAddress(x)); + }, + onChainChanged: (chain) => { + const chainId = normalizeChainId(chain); + config.emitter.emit("change", { chainId }); + }, + async onConnect(connectInfo) { + const chainId = normalizeChainId(connectInfo.chainId); + const accounts = await this.getAccounts(); + config.emitter.emit("connect", { accounts, chainId }); + }, + async disconnect() { + try { + await this.magic?.user.logout(); + config.emitter.emit("disconnect"); + } + catch (error) { + console.error("Error disconnecting from Magic SDK:", error); + } + }, + async isAuthorized() { + try { + const walletInfo = await this.magic?.user.getInfo(); + return !!walletInfo; + } + catch { + return false; + } + }, + getChainId: async () => { + const provider = await getProvider(); + if (provider) { + const chainId = await provider.request({ + method: "eth_chainId", + params: [], + }); + return normalizeChainId(chainId); + } + const networkOptions = options.magicSdkConfiguration?.network; + if (typeof networkOptions === "object") { + const chainID = networkOptions.chainId; + if (chainID) + return normalizeChainId(chainID); + } + throw new Error("Chain ID is not defined"); + }, + switchChain: async function ({ chainId }) { + if (!options.networks) { + throw new Error("switch chain not supported: please provide networks in options"); + } + const normalizedChainId = normalizeChainId(chainId); + const chain = chains.find((x) => x.id === normalizedChainId); + if (!chain) + throw new Error(`Unsupported chainId: ${chainId}`); + const network = options.networks.find((x) => typeof x === "object" && x.chainId + ? normalizeChainId(x.chainId) === normalizedChainId + : normalizeChainId(x) === + normalizedChainId); + if (!network) + throw new Error(`Unsupported chainId: ${chainId}`); + const account = await this.getAccount(); + const provider = (await this.getProvider()); + if (provider?.off) { + provider.off("accountsChanged", this.onAccountsChanged); + provider.off("chainChanged", this.onChainChanged); + provider.off("disconnect", this.onDisconnect); + } + const newOptions = { + ...options, + connectorType: "universal", + }; + newOptions.magicSdkConfiguration.network = network; + const { getAccount, getMagicSDK, getProvider, onAccountsChanged } = magicConnector({ + chains, + options: newOptions, + }); + this.getAccount = getAccount; + this.magic = getMagicSDK(); + this.getProvider = getProvider; + this.onAccountsChanged = onAccountsChanged; + registerProviderEventListeners(this.magic.rpcProvider, this.onChainChanged, this.onDisconnect); + this.onChainChanged(chain.id.toString()); + this.onAccountsChanged([account]); + return chain; + }, + onDisconnect: () => { + config.emitter.emit("disconnect"); + }, + })); +} diff --git a/dist/lib/modal/logos.d.ts b/dist/lib/modal/logos.d.ts new file mode 100644 index 0000000..3ed1651 --- /dev/null +++ b/dist/lib/modal/logos.d.ts @@ -0,0 +1,12 @@ +export declare const MagicLogo = "\n\n\n\n\n\n\n"; +export declare const googleLogo = "\n\n\n\n\n\n\n"; +export declare const twitchLogo = "\n\n\n\n\n"; +export declare const discordLogo = "\n\n\n\n\n"; +export declare const bitbucketLogo = "\n\n\n\n\n"; +export declare const linkedinLogo = "\n\n\n\n\n"; +export declare const appleLogo = "\n\n\n\n\n"; +export declare const twitterLogo = "\n\n\n\n\n"; +export declare const facebookLogo = "\n\n\n\n\n\n\n\n\n\n\n\n\n"; +export declare const githubLogo = "\n\n\n\n\n\n\n"; +export declare const gitlabLogo = "\n\n\n\n\n\n\n\n\n\n\n"; +export declare const microsoftLogo = "\n\n\n\n\n\n\n\n"; diff --git a/dist/lib/modal/logos.js b/dist/lib/modal/logos.js new file mode 100644 index 0000000..3c424c9 --- /dev/null +++ b/dist/lib/modal/logos.js @@ -0,0 +1,95 @@ +export const MagicLogo = ` + + + + + + +`; +export const googleLogo = ` + + + + + + +`; +export const twitchLogo = ` + + + + +`; +export const discordLogo = ` + + + + +`; +export const bitbucketLogo = ` + + + + +`; +export const linkedinLogo = ` + + + + +`; +export const appleLogo = ` + + + + +`; +export const twitterLogo = ` + + + + +`; +export const facebookLogo = ` + + + + + + + + + + + + +`; +export const githubLogo = ` + + + + + + +`; +export const gitlabLogo = ` + + + + + + + + + + +`; +export const microsoftLogo = ` + + + + + + + +`; diff --git a/dist/lib/modal/styles.d.ts b/dist/lib/modal/styles.d.ts new file mode 100644 index 0000000..8ea3aa2 --- /dev/null +++ b/dist/lib/modal/styles.d.ts @@ -0,0 +1 @@ +export declare const modalStyles: (accentColor?: string) => string; diff --git a/dist/lib/modal/styles.js b/dist/lib/modal/styles.js new file mode 100644 index 0000000..e888258 --- /dev/null +++ b/dist/lib/modal/styles.js @@ -0,0 +1,187 @@ +export const modalStyles = (accentColor = '#6452f7') => ` +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap'); +.Magic__formOverlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.7); + backdrop-filter: blur(6px); + z-index: 2147483647; + } + .Magic__formOverlay.Magic__dark { + background-color: rgba(0, 0, 0, 0.8); + } + .Magic__formContainer { + display: flex; + flex-direction: column; + font-family: 'Inter', sans-serif; + text-align: center; + gap: 30px; + align-items: center; + justify-content: start; + position: fixed; + overflow: hidden; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) scale(0); + transition: all 0.2s ease-in-out; + width: min(400px, 90%); + z-index: 9999; + box-shadow: 0 12px 56px rgb(119 118 122 / 15%); + border-radius: 30px; + padding: 80px 20px; + background-color: #fff; + } + .Magic__formContainer.Magic__dark { + background-color: #333333; + box-shadow: 0 12px 56px #00000021; + color: white; + } + .Magic__closeButton { + position: absolute; + top: 0; + right: 15px; + padding: 10px; + border: none; + background-color: transparent; + cursor: pointer; + font-size: 30px; + color: #ccc; + z-index: 9999; + } + .Magic__dark .Magic__closeButton { + color: #555; + } + .Magic__formHeader{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 5px; + width: 100%; + } + .Magic__customLogo{ + height: 80px; + object-fit: contain; + } + .Magic__logoText{ + font-size: 22px; + font-weight: bold; + color: #333; + } + .Magic__dark .Magic__logoText{ + color: white; + } + .Magic__formBody{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 10px; + width: 100%; + height: 100%; + } + .Magic__formLabel{ + font-size: 17px; + font-weight: 500; + } + .Magic__formInput { + padding: 10px; + width: 100%; + height: 45px; + max-width: 300px; + text-align: center; + margin-bottom: 10px; + border-width: 1px; + border-style: solid; + border-color: #D6D6D6; + color: #333; + font-size: 17px; + font-weight: 400; + border-radius: 10px; + accent-color: ${accentColor}; + background-color: transparent; + } + .Magic__dark .Magic__formInput { + border-color: #444; + color: white; + } + .Magic__formInput::placeholder { + color: #D6D6D6; + opacity: 1; + } + .Magic__dark .Magic__formInput::placeholder { + color: #555; + } + .Magic__divider { + display: block; + text-align: center; + color: #D6D6D6; + font-size: 14px; + } + .Magic__dark .Magic__divider { + color: #444; + } + .Magic__submitButton { + display: block; + width: 100%; + max-width: 300px; + padding: 15px 30px; + border: none; + cursor: pointer; + color: white; + margin-bottom: 10px; + font-size: 17px; + font-weight: 500; + border-radius: 100px; + background-color: ${accentColor}; + } + .Magic__submitButton:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.4) 0 0) + } + .Magic__oauthButtonsContainer{ + display: flex; + flex-direction: row; + align-items: center; + flex-wrap: wrap; + justify-content: center; + gap: 10px; + width: 90%; + } + .Magic__oauthButton{ + display: block; + padding: 5px; + border: none; + background-color: transparent; + cursor: pointer; + border-radius: 100px; + } + .Magic__aloneOauthContainer > .Magic__oauthButton{ + width: 100%; + max-width: 300px; + height: 50px; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 15px; + border: 1px solid #D6D6D6; + color: #333; + } + .Magic__dark .Magic__aloneOauthContainer > .Magic__oauthButton{ + border-color: #444; + color: white; + } + .Magic__aloneOauthContainer .Magic__oauthButtonIcon > svg{ + width: 30px; + margin-top: 5px; + } + .Magic__aloneOauthContainer .Magic__oauthButtonName{ + position: absolute; + left: 50%; + transform: translateX(-50%); + font-size: 16px; + text-transform: capitalize; + } +`; diff --git a/dist/lib/modal/view.d.ts b/dist/lib/modal/view.d.ts new file mode 100644 index 0000000..f6ae241 --- /dev/null +++ b/dist/lib/modal/view.d.ts @@ -0,0 +1,10 @@ +import type { OAuthProvider } from '@magic-ext/oauth'; +export declare const createModal: (props: { + accentColor?: string; + isDarkMode?: boolean; + customLogo?: string; + customHeaderText?: string; + enableSMSLogin?: boolean; + enableEmailLogin?: boolean; + oauthProviders?: OAuthProvider[]; +}) => Promise; diff --git a/dist/lib/modal/view.js b/dist/lib/modal/view.js new file mode 100644 index 0000000..c67edd6 --- /dev/null +++ b/dist/lib/modal/view.js @@ -0,0 +1,158 @@ +import { appleLogo, bitbucketLogo, discordLogo, facebookLogo, githubLogo, gitlabLogo, googleLogo, linkedinLogo, MagicLogo, microsoftLogo, twitchLogo, twitterLogo, } from './logos.js'; +import { modalStyles } from './styles.js'; +export const createModal = async (props) => { + // INJECT FORM STYLES + const style = document.createElement('style'); + style.innerHTML = modalStyles(props.accentColor); + document.head.appendChild(style); + // PROVIDERS FOR OAUTH BUTTONS + const allProviders = [ + { name: 'google', icon: googleLogo }, + { name: 'facebook', icon: facebookLogo }, + { name: 'apple', icon: appleLogo }, + { name: 'github', icon: githubLogo }, + { name: 'bitbucket', icon: bitbucketLogo }, + { name: 'gitlab', icon: gitlabLogo }, + { name: 'linkedin', icon: linkedinLogo }, + { name: 'twitter', icon: twitterLogo }, + { name: 'discord', icon: discordLogo }, + { name: 'twitch', icon: twitchLogo }, + { name: 'microsoft', icon: microsoftLogo }, + ]; + // make providers included in oauthProviders + const providers = props.oauthProviders + ?.map((provider) => { + return allProviders.find((p) => p.name === provider); + }) + .filter((p) => p !== undefined); + const phoneNumberRegex = '(\\+|00)[0-9]{1,3}[0-9]{4,14}(?:x.+)?$'; + const emailRegex = '^([a-zA-Z0-9_.-])+(\\+[a-zA-Z0-9-]+)?@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})'; + // MODAL HTML + const modal = ` +
+ +
+ ${props.customLogo + ? `` + : ``} +

${props.customHeaderText || 'Magic'}

+ +
+ ${props.enableSMSLogin && props.enableEmailLogin + ? ` + + + ` + : props.enableEmailLogin + ? ` + + + ` + : props.enableSMSLogin + ? ` + + + ` + : ''} + ${props.enableSMSLogin || props.enableEmailLogin + ? ` ` + : ''} +
+ ${providers && + providers.length > 0 && + (props.enableSMSLogin || props.enableEmailLogin) + ? `
+ ⎯⎯⎯ OR ⎯⎯⎯ +
` + : ''} +
+ ${providers + ?.map((provider) => { + return ` + + `; + }) + .join('')} +
+ ${!props.enableEmailLogin && + !props.enableEmailLogin && + providers?.length === 0 + ? '
No Login Methods Configured 😥
' + : ''} +
+
+ `; + // ADD FORM TO BODY + const overlay = document.createElement('div'); + overlay.classList.add('Magic__formOverlay'); + if (props.isDarkMode) + overlay.classList.add('Magic__dark'); + document.body.appendChild(overlay); + overlay.innerHTML = modal; + const formBody = document.getElementById('MagicModalBody'); + setTimeout(() => { + if (formBody) + formBody.style.transform = 'translate(-50%, -50%) scale(1)'; + }, 100); + // FORM SUBMIT HANDLER + const removeForm = () => { + if (formBody) + formBody.style.transform = 'translate(-50%, -50%) scale(0)'; + setTimeout(() => { + overlay.remove(); + }, 200); + }; + return new Promise((resolve) => { + // FORM CLOSE BUTTON + document.getElementById('MagicCloseBtn')?.addEventListener('click', () => { + removeForm(); + resolve({ + email: '', + phoneNumber: '', + isGoogle: false, + isDiscord: false, + }); + }); + // EMAIL FORM SUBMIT HANDLER + document.getElementById('MagicForm')?.addEventListener('submit', (e) => { + e.preventDefault(); + const formInputField = document.getElementById('MagicFormInput'); + const isFormValid = formInputField?.checkValidity(); + if (isFormValid) { + let output; + if (RegExp(phoneNumberRegex).test(formInputField.value)) { + output = { + phoneNumber: formInputField?.value, + }; + } + else { + output = { + email: formInputField?.value, + }; + } + removeForm(); + resolve(output); + } + }); + // OAUTH BUTTONS + providers?.forEach((provider) => { + const oauthButton = document.getElementById(`MagicOauth${provider?.name}`); + oauthButton?.addEventListener('click', () => { + const output = { + oauthProvider: provider?.name, + }; + removeForm(); + resolve(output); + }); + }); + }); +}; diff --git a/dist/lib/utils.d.ts b/dist/lib/utils.d.ts new file mode 100644 index 0000000..a85b382 --- /dev/null +++ b/dist/lib/utils.d.ts @@ -0,0 +1 @@ +export declare function normalizeChainId(chainId: string | number | bigint): number; diff --git a/dist/lib/utils.js b/dist/lib/utils.js new file mode 100644 index 0000000..a31bd4e --- /dev/null +++ b/dist/lib/utils.js @@ -0,0 +1,7 @@ +export function normalizeChainId(chainId) { + if (typeof chainId === 'string') + return Number.parseInt(chainId, chainId.trim().startsWith('0x') ? 16 : 10); + if (typeof chainId === 'bigint') + return Number(chainId); + return chainId; +} diff --git a/package.json b/package.json index 9b57303..9e26702 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,14 @@ { - "name": "@magiclabs/wagmi-connector", - "version": "2.0.0", + "name": "@alexandria-labs/wagmi-connector", + "version": "2.1.0", "description": "wagmi connector to connect with Magic SDK", "main": "dist/index.js", "types": "dist/index.d.ts", "type": "module", - "repository": "https://github.com/magiclabs/wagmi-magic-connector", + "repository": { + "type": "git", + "url": "git+https://github.com/Alexandria-Labs/wagmi-magic-connector.git" + }, "license": "MIT", "keywords": [ "wagmi", @@ -25,12 +28,12 @@ }, "dependencies": { "@changesets/cli": "^2.24.0", - "@magic-ext/oauth": "^12.3.0", - "@magic-sdk/provider": "^18.3.0", - "@wagmi/connectors": "^4.1.14", - "@wagmi/core": "^2.6.5", - "magic-sdk": "^18.3.0", - "tsc-esm-fix": "^2.20.10" + "@magic-ext/oauth": "^22.0.3", + "@magic-sdk/provider": "^28.0.2", + "@wagmi/connectors": "^5.0.6", + "@wagmi/core": "^2.10.4", + "magic-sdk": "^28.0.3", + "tsc-esm-fix": "^2.20.27" }, "devDependencies": { "@types/node": "^20.11.24", diff --git a/src/lib/connectors/universalWalletConnector.ts b/src/lib/connectors/universalWalletConnector.ts index f1a88d5..66288a0 100644 --- a/src/lib/connectors/universalWalletConnector.ts +++ b/src/lib/connectors/universalWalletConnector.ts @@ -3,7 +3,7 @@ import type { RPCProviderModule } from '@magic-sdk/provider/dist/types/modules/r import type { EthNetworkConfiguration } from '@magic-sdk/types' import { createConnector } from '@wagmi/core' import { normalizeChainId } from '../utils' -import { magicConnector } from './magicConnector' +import { MagicOptions, magicConnector } from './magicConnector' import { type Chain, getAddress } from 'viem' export interface UniversalWalletOptions { @@ -71,10 +71,14 @@ export function universalWalletConnector({ id, name, type, + magic, getProvider, - connect: async function () { - await magic?.wallet.connectWithUI() - const provider = await getProvider() + getAccount, + onAccountsChanged, + + async connect() { + await this.magic?.wallet.connectWithUI() + const provider = await this.getProvider() as RPCProviderModule const chainId = await this.getChainId() provider && registerProviderEventListeners( @@ -85,15 +89,15 @@ export function universalWalletConnector({ }, this.onDisconnect, ) - const account = await getAccount() + const account: any = await this.getAccount() return { accounts: [account], chainId, } }, - onAccountsChanged, - getAccounts: async () => { - const provider = await getProvider() + + async getAccounts() { + const provider: any = await this.getProvider() const accounts = (await provider?.request({ method: 'eth_accounts', })) as string[] @@ -109,17 +113,17 @@ export function universalWalletConnector({ const accounts = await this.getAccounts() config.emitter.emit('connect', { accounts, chainId }) }, - disconnect: async () => { + async disconnect() { try { - await magic?.wallet.disconnect() + await this.magic?.user.logout() config.emitter.emit('disconnect') } catch (error) { console.error('Error disconnecting from Magic SDK:', error) } }, - isAuthorized: async () => { + async isAuthorized() { try { - const walletInfo = await magic?.wallet.getInfo() + const walletInfo = await (this.magic as any)?.user.getInfo() return !!walletInfo } catch { return false @@ -141,7 +145,50 @@ export function universalWalletConnector({ } throw new Error('Chain ID is not defined') }, + switchChain: async function ({ chainId }: { chainId: number }) { + if (!options.networks) { + throw new Error('switch chain not supported: please provide networks in options') + } + const normalizedChainId = normalizeChainId(chainId) + const chain = chains.find((x) => x.id === normalizedChainId) + + if (!chain) + throw new Error(`Unsupported chainId: ${chainId}`) + + const network = options.networks.find((x) => typeof x === 'object' && x.chainId + ? normalizeChainId(x.chainId) === normalizedChainId + : normalizeChainId(x as bigint | number | string) === normalizedChainId) + + if (!network) + throw new Error(`Unsupported chainId: ${chainId}`) + + const account = await this.getAccount() + const provider = await this.getProvider() as RPCProviderModule + + if (provider?.off) { + provider.off('accountsChanged', this.onAccountsChanged) + provider.off('chainChanged', this.onChainChanged) + provider.off('disconnect', this.onDisconnect) + } + + const newOptions: MagicOptions = {...options, connectorType: 'universal'} + newOptions.magicSdkConfiguration!.network = network + + const { getAccount, getMagicSDK, getProvider, onAccountsChanged, } = magicConnector({ + chains, + options: newOptions, + }) + this.getAccount = getAccount + this.magic = getMagicSDK() + this.getProvider = getProvider + this.onAccountsChanged = onAccountsChanged + + registerProviderEventListeners(this.magic!.rpcProvider, this.onChainChanged, this.onDisconnect) + this.onChainChanged(chain.id.toString()) + this.onAccountsChanged([account]) + return chain + }, onDisconnect: () => { config.emitter.emit('disconnect') },