EvmWalletClient.ts
This module provides an EVM-backed wallet client.
Added in v0.4.0
constructors
Section titled “constructors”EvmWalletClientConfig (type alias)
Section titled “EvmWalletClientConfig (type alias)”Signature
export type EvmWalletClientConfig = {}Added in v0.4.0
layers
Section titled “layers”layerFromBrowser
Section titled “layerFromBrowser”Signature
export declare const layerFromBrowser: (options: { providerPredicate: P.Predicate<Mipd.EIP6963ProviderDetail> accountPredicate: P.Predicate<`0x${string}`>}) => Layer.Layer<EvmWalletClient | Client.WalletClient, Error.SdkError>Added in v0.4.0
layerFromThirdweb
Section titled “layerFromThirdweb”Signature
export declare const layerFromThirdweb: (options: { thirdwebWallet: Wallet thirdwebClient: ThirdwebClient chain: Chain}) => Layer.Layer<EvmWalletClient | Client.WalletClient, Error.SdkError>Added in v0.4.0
layerFromViem
Section titled “layerFromViem”Signature
export declare const layerFromViem: ( config: Viem.WalletClient) => Layer.Layer<EvmWalletClient | Client.WalletClient, Error.SdkError>Added in v0.4.0
models
Section titled “models”Eip5792Call (type alias)
Section titled “Eip5792Call (type alias)”EIP-5792 call type - re-exported from viem
Signature
export type Eip5792Call = Viem.CallAdded in v1.0.0
Eip5792CallsStatus (type alias)
Section titled “Eip5792CallsStatus (type alias)”EIP-5792 get calls status return type - re-exported from viem
Signature
export type Eip5792CallsStatus = ViemActions.GetCallsStatusReturnTypeAdded in v1.0.0
Eip5792Capabilities (type alias)
Section titled “Eip5792Capabilities (type alias)”EIP-5792 get capabilities return type - re-exported from viem
Signature
export type Eip5792Capabilities = ViemActions.GetCapabilitiesReturnTypeAdded in v1.0.0
Eip5792SendCallsResult (type alias)
Section titled “Eip5792SendCallsResult (type alias)”EIP-5792 send calls return type - re-exported from viem
Signature
export type Eip5792SendCallsResult = ViemActions.SendCallsReturnTypeAdded in v1.0.0
EvmWalletClient (interface)
Section titled “EvmWalletClient (interface)”Signature
export interface EvmWalletClient extends Client.WalletClient { readonly [TypeId]: TypeId readonly prepareBatchTransactionRequest: ( requests: ReadonlyArray<Domain.PreparedRequest> ) => Effect.Effect<ReadonlyArray<Viem.PrepareTransactionRequestReturnType>, Error.SdkError, never> readonly writeContract: < const abi extends Viem.Abi | readonly unknown[], functionName extends Viem.ContractFunctionName<abi, "payable" | "nonpayable">, args extends Viem.ContractFunctionArgs<abi, "payable" | "nonpayable", functionName> >( params: Viem.WriteContractParameters<abi, functionName, args> ) => Effect.Effect<Domain.SubmissionResult, Error.SdkError, never>
/** * EIP-5792: Get wallet capabilities * @since 1.0.0 * @category eip5792 */ readonly getCapabilities: () => Effect.Effect<Eip5792Capabilities, Error.SdkError, never>
/** * EIP-5792: Send multiple calls as a batch * @since 1.0.0 * @category eip5792 */ readonly sendCalls: ( calls: ReadonlyArray<Eip5792Call> ) => Effect.Effect<Eip5792SendCallsResult, Error.SdkError, never>
/** * EIP-5792: Get status of a batch call * @since 1.0.0 * @category eip5792 */ readonly getCallsStatus: (id: string) => Effect.Effect<Eip5792CallsStatus, Error.SdkError, never>}Added in v0.4.0
EvmWalletClient
Section titled “EvmWalletClient”Signature
export declare const EvmWalletClient: Context.Tag<EvmWalletClient, EvmWalletClient>Added in v0.4.0
type ids
Section titled “type ids”TypeId
Section titled “TypeId”Signature
export declare const TypeId: typeof TypeIdAdded in v0.4.0
TypeId (type alias)
Section titled “TypeId (type alias)”Signature
export type TypeId = typeof TypeIdAdded in v0.4.0
utilities
Section titled “utilities”BatchCallInput (type alias)
Section titled “BatchCallInput (type alias)”Input type for toBatchCalls - accepts SDK PreparedRequest or custom contract calls.
Signature
export type BatchCallInput = Domain.PreparedRequest | CustomContractCallAdded in v1.0.0
CustomContractCall (type alias)
Section titled “CustomContractCall (type alias)”A custom contract call for use with toBatchCalls. Re-exported from Domain for convenience.
Signature
export type CustomContractCall = Domain.CustomContractCallAdded in v1.0.0
toBatchCalls
Section titled “toBatchCalls”Convert SDK PreparedRequests and custom contract calls to EIP-5792 batch calls.
Use this to combine SDK-prepared transactions with your own contract calls (e.g., a batch proxy) into a single batched transaction.
Signature
export declare function toBatchCalls(inputs: ReadonlyArray<BatchCallInput>): Eip5792Call[]Added in v1.0.0