Docs

viemAdapter

let viemAdapter: { contract: { fromViem: (options: FromViemContractOptions<TAbi>) => ThirdwebContract<TAbi>; toViem: (options: { thirdwebContract: Readonly<ContractOptions<TAbi>> }) => Promise<GetContractReturnType<TAbi>> }; publicClient: { toViem: (options: ToViemPublicClientOptions) => PublicClient }; walletClient: { fromViem: (options: { walletClient: { account: undefined | (Account); addChain: (args: AddChainParameters) => Promise<void>; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${...}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters<abi, undefined | (Chain), undefined | (Account), chainOverride>) => Promise<`0x${string}`>; extend: (fn: (client: Client<Transport, undefined | (Chain), undefined | (Account), WalletRpcSchema, WalletActions<undefined | (Chain), undefined | (Account)>>) => client) => Client<Transport, undefined | (Chain), undefined | (Account), WalletRpcSchema, ({[K in string | number | symbol] : client[K]}) & (WalletActions<undefined | (Chain), undefined | (Account)>)>; getAddresses: () => Promise<GetAddressesReturnType>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters<undefined | (Chain), undefined | (Account), TChainOverride, TAccountOverride, TRequest>) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<..., ...>) & (... extends ... ? ... : ...)[K]}>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args: { eth_accounts: Record<string, any> }) => Promise<RequestPermissionsReturnType>; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters<undefined | (Chain), undefined | (Account), TChainOverride, TRequest>) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters<undefined | (Account)>) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters<undefined | (Chain), undefined | (Account), TChainOverride>) => Promise<(`0x02${string}`) | (`0x01${string}`) | (`0x03${string}`) | (TransactionSerializedLegacy)>; signTypedData: (args: SignTypedDataParameters<TTypedData, TPrimaryType, undefined | (Account)>) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise<void>; transport: (TransportConfig<string, EIP1193RequestFn>) & (Record<string, any>); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise<boolean>; writeContract: (args: WriteContractParameters<abi, functionName, args, undefined | (Chain), undefined | (Account), TChainOverride>) => Promise<`0x${string}`> } }) => Account; toViem: (options: ToViemWalletClientOptions) => WalletClient } }