Skip to main content
You are viewing docs for the previous version of the Wallets SDK. We recommend upgrading to V1. See the updated version of this page or the V1 migration guide.
Defined in: packages/wallets/src/wallets/evm.ts:20

Extends

Constructors

new EVMWallet()

new EVMWallet(wallet): EVMWallet
Defined in: packages/wallets/src/wallets/evm.ts:21

Parameters

Returns

EVMWallet

Overrides

Wallet.constructor

Properties

Methods

addDelegatedSigner()

addDelegatedSigner<T>(params): Promise<T extends PrepareOnly<true> ? object : void>
Defined in: packages/wallets/src/wallets/wallet.ts:465 Add a delegated signer to the wallet

Type Parameters

Parameters

Returns

Promise<T extends PrepareOnly<true> ? object : void>

Inherited from

Wallet.addDelegatedSigner

approve()

approve<T>(params): Promise<ApproveResult<T>>
Defined in: packages/wallets/src/wallets/wallet.ts:423 Approve a transaction or signature

Type Parameters

Parameters

Returns

Promise<ApproveResult<T>> The transaction or signature

Inherited from

Wallet.approve

approveTransaction()

approveTransaction(params): Promise<Error>
Defined in: packages/wallets/src/wallets/wallet.ts:399

Parameters

Returns

Promise<Error> The transaction

Deprecated

Use approve instead. Approve a transaction

Inherited from

Wallet.approveTransaction

balances()

balances(tokens?): Promise<Balances<EVMSmartWalletChain>>
Defined in: packages/wallets/src/wallets/wallet.ts:118 Get the wallet balances - always includes USDC and native token (ETH/SOL)

Parameters

Returns

Promise<Balances<EVMSmartWalletChain>> The balances returns nativeToken, usdc, tokens

Throws

If the balances cannot be retrieved

Inherited from

Wallet.balances

delegatedSigners()

delegatedSigners(): Promise<DelegatedSigner[]>
Defined in: packages/wallets/src/wallets/wallet.ts:554 List the delegated signers for this wallet.

Returns

Promise<DelegatedSigner[]> The delegated signers

Inherited from

Wallet.delegatedSigners

experimental_activity()

experimental_activity(): Promise<WalletsV1Alpha2ActivityResponseDto>
Defined in: packages/wallets/src/wallets/wallet.ts:312 Experimental Get the wallet activity

Returns

Promise<WalletsV1Alpha2ActivityResponseDto> The activity This API is experimental and may change in the future

Throws

If the activity cannot be retrieved

Inherited from

Wallet.experimental_activity

experimental_apiClient()

experimental_apiClient(): WalletsApiClient
Defined in: packages/wallets/src/wallets/wallet.ts:101 Experimental Get the API client

Returns

WalletsApiClient The API client This API is experimental and may change in the future

Inherited from

Wallet.experimental_apiClient

experimental_nfts()

experimental_nfts(params): Promise<WalletNftsResponseDto>
Defined in: packages/wallets/src/wallets/wallet.ts:272 Experimental Get the wallet NFTs

Parameters

Returns

Promise<WalletNftsResponseDto> The NFTs This API is experimental and may change in the future

Inherited from

Wallet.experimental_nfts

experimental_transaction()

experimental_transaction(transactionId): Promise<WalletsTransactionV2025ResponseDto>
Defined in: packages/wallets/src/wallets/wallet.ts:298 Get a transaction by id

Parameters

Returns

Promise<WalletsTransactionV2025ResponseDto> The transaction

Throws

If the transaction cannot be retrieved

Inherited from

Wallet.experimental_transaction

experimental_transactions()

experimental_transactions(): Promise<GetTransactionsResponse>
Defined in: packages/wallets/src/wallets/wallet.ts:285 Get the wallet transactions

Returns

Promise<GetTransactionsResponse> The transactions

Throws

If the transactions cannot be retrieved

Inherited from

Wallet.experimental_transactions

getViemClient()

getViemClient(params?): object
Defined in: packages/wallets/src/wallets/evm.ts:203 Get a Viem public client instance configured for this wallet’s chain.

Parameters

Returns

object A Viem public client
account
account: undefined
The Account of the Client.
batch?
optional batch: object
Flags for batch settings.
batch.multicall?
optional multicall: boolean | { batchSize: number; wait: number; }
Toggle to enable eth_call multicall aggregation.
Type Declaration
boolean { batchSize: number; wait: number; }
cacheTime
cacheTime: number
Time (in ms) that cached data will remain in memory.
call()
call: (parameters) => Promise<CallReturnType>
Executes a new message call immediately without submitting a transaction to the network.
Parameters
Returns
Promise<CallReturnType> The call data. CallReturnType
Example
ccipRead?
optional ccipRead: false | { request: (parameters) => Promise<`0x${string}`>; }
CCIP Read configuration.
Type Declaration
false { request: (parameters) => Promise<`0x${string}`>; }
chain
chain: Chain
Chain for the client.
createAccessList()
createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>
Creates an EIP-2930 access list that you can include in a transaction.
Parameters
Returns
Promise<{ accessList: AccessList; gasUsed: bigint; }> The call data. CreateAccessListReturnType
Example
createBlockFilter()
createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>
Creates a Filter to listen for new block hashes that can be used with getFilterChanges.
Returns
Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> Filter. CreateBlockFilterReturnType
Example
createContractEventFilter()
createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>
Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs.
Type Parameters
Parameters
Returns
Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> Filter. CreateContractEventFilterReturnType
Example
createEventFilter()
createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<“event”, abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>
Creates a Filter to listen for new events that can be used with getFilterChanges.
Type Parameters
Parameters
Returns
Promise<{ [K in string | number | symbol]: Filter<“event”, abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> Filter. CreateEventFilterReturnType
Example
createPendingTransactionFilter()
createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>
Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges.
Returns
Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> Filter. CreateBlockFilterReturnType
Example
estimateContractGas()
estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>
Estimates the gas required to successfully execute a contract write function call.
Type Parameters
Parameters
Returns
Promise<bigint> The gas estimate (in wei). EstimateContractGasReturnType
Remarks
Internally, uses a Public Client to call the estimateGas action with ABI-encoded data.
Example
estimateFeesPerGas()
estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>
Returns an estimate for the fees per gas for a transaction to be included in the next block.
Type Parameters
Parameters
Returns
Promise<EstimateFeesPerGasReturnType<type>> An estimate (in wei) for the fees per gas. EstimateFeesPerGasReturnType
Example
estimateGas()
estimateGas: (args) => Promise<bigint>
Estimates the gas necessary to complete a transaction without submitting it to the network.
Parameters
Returns
Promise<bigint> The gas estimate (in wei). EstimateGasReturnType
Example
estimateMaxPriorityFeePerGas()
estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>
Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block.
Type Parameters
Parameters
Returns
Promise<bigint> An estimate (in wei) for the max priority fee per gas. EstimateMaxPriorityFeePerGasReturnType
Example
experimental_blockTag?
optional experimental_blockTag: BlockTag
Default block tag to use for RPC requests.
extend()
extend: <client>(fn) => Client<HttpTransport, Chain, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<HttpTransport, Chain>>
Type Parameters
Parameters
Returns
Client<HttpTransport, Chain, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<HttpTransport, Chain>>
getBalance()
getBalance: (args) => Promise<bigint>
Returns the balance of an address in wei.
Parameters
Returns
Promise<bigint> The balance of the address in wei. GetBalanceReturnType
Remarks
You can convert the balance to ether units with formatEther.
Example
getBlobBaseFee()
getBlobBaseFee: () => Promise<bigint>
Returns the base fee per blob gas in wei.
Returns
Promise<bigint> The blob base fee (in wei). GetBlobBaseFeeReturnType
Example
getBlock()
getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ({ accessList: undefined; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: undefined; maxPriorityFeePerGas: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: undefined; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: undefined; maxPriorityFeePerGas: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals: Withdrawal[]; withdrawalsRoot: `0x${string}`; }>
Returns information about a block at a block number, hash, or tag.
Type Parameters
Parameters
Returns
Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ({ accessList: undefined; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: undefined; maxPriorityFeePerGas: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: undefined; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: undefined; maxPriorityFeePerGas: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals: Withdrawal[]; withdrawalsRoot: `0x${string}`; }> Information about the block. GetBlockReturnType
Example
getBlockNumber()
getBlockNumber: (args?) => Promise<bigint>
Returns the number of the most recent block seen.
Parameters
Returns
Promise<bigint> The number of the block. GetBlockNumberReturnType
Example
getBlockTransactionCount()
getBlockTransactionCount: (args?) => Promise<number>
Returns the number of Transactions at a block number, hash, or tag.
Parameters
Returns
Promise<number> The block transaction count. GetBlockTransactionCountReturnType
Example
getBytecode()
getBytecode: (args) => Promise<GetCodeReturnType>
Parameters
Returns
Promise<GetCodeReturnType>
Deprecated
Use getCode instead.
getChainId()
getChainId: () => Promise<number>
Returns the chain ID associated with the current network.
Returns
Promise<number> The current chain ID. GetChainIdReturnType
Example
getCode()
getCode: (args) => Promise<GetCodeReturnType>
Retrieves the bytecode at an address.
Parameters
Returns
Promise<GetCodeReturnType> The contract’s bytecode. GetBytecodeReturnType
Example
getContractEvents()
getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>
Returns a list of event logs emitted by a contract.
Type Parameters
Parameters
Returns
Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> A list of event logs. GetContractEventsReturnType
Example
getEip712Domain()
getEip712Domain: (args) => Promise<GetEip712DomainReturnType>
Reads the EIP-712 domain from a contract, based on the ERC-5267 specification.
Parameters
Returns
Promise<GetEip712DomainReturnType> The EIP-712 domain, fields, and extensions. GetEip712DomainReturnType
Example
getEnsAddress()
getEnsAddress: (args) => Promise<GetEnsAddressReturnType>
Gets address for ENS name.
Parameters
Returns
Promise<GetEnsAddressReturnType> Address for ENS name or null if not found. GetEnsAddressReturnType
Remarks
Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
getEnsAvatar()
getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>
Gets the avatar of an ENS name.
Parameters
Returns
Promise<GetEnsAvatarReturnType> Avatar URI or null if not found. GetEnsAvatarReturnType
Remarks
Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
getEnsName()
getEnsName: (args) => Promise<GetEnsNameReturnType>
Gets primary name for specified address.
Parameters
Returns
Promise<GetEnsNameReturnType> Name or null if not found. GetEnsNameReturnType
Remarks
Calls reverse(bytes) on ENS Universal Resolver Contract to “reverse resolve” the address to the primary ENS name.
Example
getEnsResolver()
getEnsResolver: (args) => Promise<`0x${string}`>
Gets resolver for ENS name.
Parameters
Returns
Promise<`0x${string}`> Address for ENS resolver. GetEnsResolverReturnType
Remarks
Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
getEnsText()
getEnsText: (args) => Promise<GetEnsTextReturnType>
Gets a text record for specified ENS name.
Parameters
Returns
Promise<GetEnsTextReturnType> Address for ENS resolver. GetEnsTextReturnType
Remarks
Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
getFeeHistory()
getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>
Returns a collection of historical gas information.
Parameters
Returns
Promise<GetFeeHistoryReturnType> The gas estimate (in wei). GetFeeHistoryReturnType
Example
getFilterChanges()
getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>
Returns a list of logs or hashes based on a Filter since the last time it was called.
Type Parameters
Parameters
Returns
Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> Logs or hashes. GetFilterChangesReturnType
Remarks
A Filter can be created from the following actions: Depending on the type of filter, the return value will be different:
  • If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs.
  • If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes.
  • If the filter was created with createBlockFilter, it returns a list of block hashes.
Examples
getFilterLogs()
getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>
Returns a list of event logs since the filter was created.
Type Parameters
Parameters
Returns
Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> A list of event logs. GetFilterLogsReturnType
Remarks
getFilterLogs is only compatible with event filters.
Example
getGasPrice()
getGasPrice: () => Promise<bigint>
Returns the current price of gas (in wei).
Returns
Promise<bigint> The gas price (in wei). GetGasPriceReturnType
Example
getLogs()
getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>
Returns a list of event logs matching the provided parameters.
Type Parameters
Parameters
Returns
Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> A list of event logs. GetLogsReturnType
Example
getProof()
getProof: (args) => Promise<GetProofReturnType>
Returns the account and storage values of the specified account including the Merkle-proof.
Parameters
Returns
Promise<GetProofReturnType> Proof data. GetProofReturnType
Example
getStorageAt()
getStorageAt: (args) => Promise<GetStorageAtReturnType>
Returns the value from a storage slot at a given address.
Parameters
Returns
Promise<GetStorageAtReturnType> The value of the storage slot. GetStorageAtReturnType
Example
getTransaction()
getTransaction: <blockTag>(args) => Promise<{ accessList: undefined; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: undefined; maxPriorityFeePerGas: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: undefined; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: undefined; maxPriorityFeePerGas: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>
Returns information about a Transaction given a hash or block identifier.
Type Parameters
Parameters
Returns
Promise<{ accessList: undefined; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: undefined; maxPriorityFeePerGas: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: undefined; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: undefined; maxPriorityFeePerGas: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> The transaction information. GetTransactionReturnType
Example
getTransactionConfirmations()
getTransactionConfirmations: (args) => Promise<bigint>
Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
Parameters
Returns
Promise<bigint> The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. GetTransactionConfirmationsReturnType
Example
getTransactionCount()
getTransactionCount: (args) => Promise<number>
Returns the number of Transactions an Account has broadcast / sent.
Parameters
Returns
Promise<number> The number of transactions an account has sent. GetTransactionCountReturnType
Example
getTransactionReceipt()
getTransactionReceipt: (args) => Promise<TransactionReceipt>
Returns the Transaction Receipt given a Transaction hash.
Parameters
Returns
Promise<TransactionReceipt> The transaction receipt. GetTransactionReceiptReturnType
Example
key
key: string
A key for the client.
multicall()
multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>
Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract.
Type Parameters
Parameters
Returns
Promise<MulticallReturnType<contracts, allowFailure>> An array of results with accompanying status. MulticallReturnType
Example
name
name: string
A name for the client.
pollingInterval
pollingInterval: number
Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds.
prepareTransactionRequest()
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(…), (…)> & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)), IsNever<(…)> extends true ? unknown : ExactPartial<(…)>> & { chainId?: number }, ParameterTypeToParameters<request[“parameters”] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : “fees” | “gas” | “nonce” | “blobVersionedHashes” | “chainId” | “type”>> & (unknown extends request[“kzg”] ? {} : Pick<request, “kzg”>))[K] }>
Prepares a transaction request for signing.
Type Parameters
Parameters
Returns
Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(…), (…)> & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)), IsNever<(…)> extends true ? unknown : ExactPartial<(…)>> & { chainId?: number }, ParameterTypeToParameters<request[“parameters”] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : “fees” | “gas” | “nonce” | “blobVersionedHashes” | “chainId” | “type”>> & (unknown extends request[“kzg”] ? {} : Pick<request, “kzg”>))[K] }> The transaction request. PrepareTransactionRequestReturnType
Examples
readContract()
readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>
Calls a read-only function on a contract, and returns the response.
Type Parameters
Parameters
Returns
Promise<ReadContractReturnType<abi, functionName, args>> The response from the contract. Type is inferred. ReadContractReturnType
Remarks
A “read-only” function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data.
Example
request
request: EIP1193RequestFn<PublicRpcSchema>
Request function wrapped with friendly error handling
sendRawTransaction()
sendRawTransaction: (args) => Promise<`0x${string}`>
Sends a signed transaction to the network
Parameters
Returns
Promise<`0x${string}`> The transaction hash. SendRawTransactionReturnType
Example
simulate()
simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>
Type Parameters
Parameters
Returns
Promise<SimulateBlocksReturnType<calls>>
Deprecated
Use simulateBlocks instead.
simulateBlocks()
simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>
Simulates a set of calls on block(s) with optional block and state overrides.
Type Parameters
Parameters
Returns
Promise<SimulateBlocksReturnType<calls>> Simulated blocks. SimulateReturnType
Example
simulateCalls()
simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>
Simulates a set of calls.
Type Parameters
Parameters
Returns
Promise<SimulateCallsReturnType<calls>> Results. SimulateCallsReturnType
Example
simulateContract()
simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain, Account | undefined, chainOverride, accountOverride>>
Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions.
Type Parameters
Parameters
Returns
Promise<SimulateContractReturnType<abi, functionName, args, Chain, Account | undefined, chainOverride, accountOverride>> The simulation result and write request. SimulateContractReturnType
Remarks
This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data.
Example
transport
transport: TransportConfig<"http", EIP1193RequestFn> & object
The RPC transport
Type Declaration
fetchOptions?
optional fetchOptions: Omit<RequestInit, "body">
url?
optional url: string
type
type: string
The type of client.
uid
uid: string
A unique ID for the client.
uninstallFilter()
uninstallFilter: (args) => Promise<boolean>
Destroys a Filter that was created from one of the following Actions:
Parameters
Returns
Promise<boolean> A boolean indicating if the Filter was successfully uninstalled. UninstallFilterReturnType
Example
verifyMessage()
verifyMessage: (args) => Promise<boolean>
Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492.
Parameters
Returns
Promise<boolean> Whether or not the signature is valid. VerifyMessageReturnType
verifySiweMessage()
verifySiweMessage: (args) => Promise<boolean>
Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492.
Parameters
Returns
Promise<boolean> Whether or not the signature is valid. VerifySiweMessageReturnType
verifyTypedData()
verifyTypedData: (args) => Promise<boolean>
Verify that typed data was signed by the provided address.
Parameters
Returns
Promise<boolean> Whether or not the signature is valid. VerifyTypedDataReturnType
waitForTransactionReceipt()
waitForTransactionReceipt: (args) => Promise<TransactionReceipt>
Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error.
Parameters
Returns
Promise<TransactionReceipt> The transaction receipt. WaitForTransactionReceiptReturnType
Remarks
The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons:
  • repriced: The gas price has been modified (e.g. different maxFeePerGas)
  • cancelled: The Transaction has been cancelled (e.g. value === 0n)
  • replaced: The Transaction has been replaced (e.g. different value or data)
Example
watchBlockNumber()
watchBlockNumber: (args) => WatchBlockNumberReturnType
Watches and returns incoming block numbers.
Parameters
Returns
WatchBlockNumberReturnType A function that can be invoked to stop watching for new block numbers. WatchBlockNumberReturnType
Example
watchBlocks()
watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType
Watches and returns information for incoming blocks.
Type Parameters
Parameters
Returns
WatchBlocksReturnType A function that can be invoked to stop watching for new block numbers. WatchBlocksReturnType
Example
watchContractEvent()
watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType
Watches and returns emitted contract event logs.
Type Parameters
Parameters
Returns
WatchContractEventReturnType A function that can be invoked to stop watching for new event logs. WatchContractEventReturnType
Remarks
This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead.
Example
watchEvent()
watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType
Watches and returns emitted Event Logs.
Type Parameters
Parameters
Returns
WatchEventReturnType A function that can be invoked to stop watching for new Event Logs. WatchEventReturnType
Remarks
This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead.
Example
watchPendingTransactions()
watchPendingTransactions: (args) => WatchPendingTransactionsReturnType
Watches and returns pending transaction hashes.
Parameters
Returns
WatchPendingTransactionsReturnType A function that can be invoked to stop watching for new pending transaction hashes. WatchPendingTransactionsReturnType
Remarks
This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions.
Example

send()

send<T>(to, token, amount, options?): Promise<Transaction<T extends PrepareOnly<true> ? true : false>>
Defined in: packages/wallets/src/wallets/wallet.ts:335 Send a token to a wallet or user locator

Type Parameters

Parameters

Returns

Promise<Transaction<T extends PrepareOnly<true> ? true : false>> The transaction

Inherited from

Wallet.send

sendTransaction()

sendTransaction<T>(params): Promise<Transaction<T["options"] extends PrepareOnly<true> ? true : false>>
Defined in: packages/wallets/src/wallets/evm.ts:55 Send a raw EVM transaction.

Type Parameters

Parameters

Returns

Promise<Transaction<T["options"] extends PrepareOnly<true> ? true : false>> The transaction result

signMessage()

signMessage<T>(params): Promise<Signature<T["options"] extends PrepareOnly<true> ? true : false>>
Defined in: packages/wallets/src/wallets/evm.ts:95 Sign a message with the wallet’s private key.

Type Parameters

Parameters

Returns

Promise<Signature<T["options"] extends PrepareOnly<true> ? true : false>> The signature

signTypedData()

signTypedData<T>(params): Promise<Signature<T["options"] extends PrepareOnly<true> ? true : false>>
Defined in: packages/wallets/src/wallets/evm.ts:141 Sign EIP-712 typed data.

Type Parameters

Parameters

Returns

Promise<Signature<T["options"] extends PrepareOnly<true> ? true : false>> The signature

stagingFund()

stagingFund(amount, chain?): Promise<FundWalletResponse>
Defined in: packages/wallets/src/wallets/wallet.ts:166 Funds the wallet with Crossmint’s stablecoin (USDXM). Note: This method is only available in staging environments and exclusively supports USDXM tokens. It cannot be used in production environments.

Parameters

Returns

Promise<FundWalletResponse> The funding response

Throws

If the funding operation fails or if called in a production environment

Inherited from

Wallet.stagingFund

from()

static from(wallet): EVMWallet
Defined in: packages/wallets/src/wallets/evm.ts:35

Parameters

Returns

EVMWallet