Interfaces
CreateEvmEip7702DelegationOptions
Defined in: client/evm/evm.types.ts:515 Options for creating an EIP-7702 delegation for an EVM EOA account.Properties
address
enableSpendPermissions?
idempotencyKey?
network
CreateServerAccountOptions
Defined in: client/evm/evm.types.ts:388 Options for creating an EVM server account.Properties
accountPolicy?
idempotencyKey?
name?
CreateSmartAccountOptions
Defined in: client/evm/evm.types.ts:577 Options for creating an EVM smart account.Properties
enableSpendPermissions?
idempotencyKey?
name?
owner
CreateSwapQuoteOptions
Defined in: client/evm/evm.types.ts:139 Options for creating a swap quote between two tokens on an EVM network.Properties
fromAmount
fromToken
gasPrice?
idempotencyKey?
network
signerAddress?
slippageBps?
smartAccount?
address
getUserOperation()
Parameters
options
Omit<GetUserOperationOptions, "smartAccount">
Parameters for getting the user operation.
Returns
Promise<UserOperation>
A promise that resolves to the user operation.
Example
listTokenBalances()
Parameters
options
Omit<ListTokenBalancesOptions, "address">
The options for the list token balances.
Returns
Promise<ListTokenBalancesResult>
The result of the list token balances.
Example
name?
owners
policies
quoteSwap()
Parameters
options
SmartAccountQuoteSwapOptions
Configuration options for creating the swap quote.
Returns
Promise<SmartAccountQuoteSwapResult>
A promise that resolves to the swap quote or a response indicating that liquidity is unavailable.
Example
requestFaucet()
Parameters
options
Omit<RequestFaucetOptions, "address">
Parameters for requesting funds from the EVM faucet.
Returns
Promise<RequestFaucetResult>
A promise that resolves to the transaction hash.
Example
sendUserOperation()
Parameters
options
Omit<SendUserOperationOptions<unknown[]>, "smartAccount">
Parameters for sending the user operation.
Returns
Promise<SendUserOperationReturnType>
A promise that resolves to an object containing the smart account address,
the user operation hash, and the status of the user operation.
Example
signTypedData()
Parameters
options
Omit<SignTypedDataOptions, "address"> & {
network: KnownEvmNetworks;
}
Configuration options for signing the typed data.
Returns
Promise<`0x${string}`>
A promise that resolves to the signature.
Example
swap()
Parameters
options
SmartAccountSwapOptions
Configuration options for the swap.
Returns
Promise<SmartAccountSwapResult>
A promise that resolves to the user operation result.
Throws
If liquidity is not available when using inline options.Examples
transfer()
Parameters
options
SmartAccountTransferOptions
The options for the transfer.
Returns
Promise<SendUserOperationReturnType>
The user operation result.
Examples
type
useNetwork()
Type Parameters
Network
Network extends NetworkOrRpcUrl
Parameters
network
Network
The network name or RPC URL
Returns
Promise<{ [K in string | number | symbol]: (Omit<EvmSmartAccountProperties, “useNetwork”> & { [K in string | number | symbol]: ({ getUserOperation: …; sendUserOperation: …; signTypedData: …; waitForUserOperation: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>
Example
useSpendPermission()
Parameters
options
UseSpendPermissionOptions
Configuration options for using the spend permission.
Returns
Promise<SendUserOperationReturnType>
A promise that resolves to the user operation result.
Throws
If the network doesn’t support spend permissions via CDP API.Example
waitForUserOperation()
Parameters
options
Omit<WaitForUserOperationOptions, "smartAccountAddress">
Parameters for waiting for the user operation.
Returns
Promise<WaitForUserOperationReturnType>
A promise that resolves to the transaction receipt.
Example
taker
toToken
CreateSwapQuoteResult
Defined in: client/evm/evm.types.ts:247 Result of creating a swap quote.Properties
blockNumber
execute()
Parameters
options?
ExecuteSwapQuoteOptions
Options for executing the swap.
Returns
Promise<ExecuteSwapQuoteResult>
A promise that resolves to the swap execution result.
fees
fromAmount
fromToken
issues
liquidityAvailable
minToAmount
network
permit2?
eip712
toAmount
toToken
transaction?
data
gas
gasPrice
to
value
EvmCall
Defined in: client/evm/evm.types.ts:342 A call to be executed in a user operation.Properties
data
overrideGasLimit?
to
value
ExecuteSwapQuoteOptions
Defined in: client/evm/evm.types.ts:225 Options for executing a swap quote.Properties
idempotencyKey?
ExecuteSwapQuoteResult
Defined in: client/evm/evm.types.ts:233 Result of executing a swap quote.Properties
smartAccountAddress?
status?
transactionHash?
userOpHash?
ExportServerAccountOptions
Defined in: client/evm/evm.types.ts:414 Options for exporting an EVM server account.Properties
address?
idempotencyKey?
name?
GetOrCreateServerAccountOptions
Defined in: client/evm/evm.types.ts:448 Options for getting an EVM account, or creating one if it doesn’t exist.Properties
name
GetOrCreateSmartAccountOptions
Defined in: client/evm/evm.types.ts:456 Options for getting an EVM account, or creating one if it doesn’t exist.Properties
enableSpendPermissions?
name
owner
GetServerAccountOptions
Defined in: client/evm/evm.types.ts:426 Options for getting an EVM account.Properties
address?
name?
GetSmartAccountOptions
Defined in: client/evm/evm.types.ts:436 Options for getting an EVM smart account.Properties
address?
name?
owner
GetSwapPriceOptions
Defined in: client/evm/evm.types.ts:165 Options for getting a swap price.Properties
fromAmount
fromToken
gasPrice?
idempotencyKey?
network
signerAddress?
slippageBps?
taker
toToken
GetSwapPriceResult
Defined in: client/evm/evm.types.ts:189 Result of getting a swap price.Properties
blockNumber
fees
fromAmount
fromToken
gas?
gasPrice?
issues
liquidityAvailable
minToAmount
toAmount
toToken
GetUserOperationOptions
Defined in: client/evm/evm.types.ts:298 Options for getting a user operation.Properties
smartAccount
Type Declaration
`0x${string}`
address
getUserOperation()
Parameters
options
Omit<GetUserOperationOptions, "smartAccount">
Parameters for getting the user operation.
Returns
Promise<UserOperation>
A promise that resolves to the user operation.
Example
listTokenBalances()
Parameters
options
Omit<ListTokenBalancesOptions, "address">
The options for the list token balances.
Returns
Promise<ListTokenBalancesResult>
The result of the list token balances.
Example
name?
owners
policies
quoteSwap()
Parameters
options
SmartAccountQuoteSwapOptions
Configuration options for creating the swap quote.
Returns
Promise<SmartAccountQuoteSwapResult>
A promise that resolves to the swap quote or a response indicating that liquidity is unavailable.
Example
requestFaucet()
Parameters
options
Omit<RequestFaucetOptions, "address">
Parameters for requesting funds from the EVM faucet.
Returns
Promise<RequestFaucetResult>
A promise that resolves to the transaction hash.
Example
sendUserOperation()
Parameters
options
Omit<SendUserOperationOptions<unknown[]>, "smartAccount">
Parameters for sending the user operation.
Returns
Promise<SendUserOperationReturnType>
A promise that resolves to an object containing the smart account address,
the user operation hash, and the status of the user operation.
Example
signTypedData()
Parameters
options
Omit<SignTypedDataOptions, "address"> & {
network: KnownEvmNetworks;
}
Configuration options for signing the typed data.
Returns
Promise<`0x${string}`>
A promise that resolves to the signature.
Example
swap()
Parameters
options
SmartAccountSwapOptions
Configuration options for the swap.
Returns
Promise<SmartAccountSwapResult>
A promise that resolves to the user operation result.
Throws
If liquidity is not available when using inline options.Examples
transfer()
Parameters
options
SmartAccountTransferOptions
The options for the transfer.
Returns
Promise<SendUserOperationReturnType>
The user operation result.
Examples
type
useNetwork()
Type Parameters
Network
Network extends NetworkOrRpcUrl
Parameters
network
Network
The network name or RPC URL
Returns
Promise<{ [K in string | number | symbol]: (Omit<EvmSmartAccountProperties, “useNetwork”> & { [K in string | number | symbol]: ({ getUserOperation: …; sendUserOperation: …; signTypedData: …; waitForUserOperation: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>
Example
useSpendPermission()
Parameters
options
UseSpendPermissionOptions
Configuration options for using the spend permission.
Returns
Promise<SendUserOperationReturnType>
A promise that resolves to the user operation result.
Throws
If the network doesn’t support spend permissions via CDP API.Example
waitForUserOperation()
Parameters
options
Omit<WaitForUserOperationOptions, "smartAccountAddress">
Parameters for waiting for the user operation.
Returns
Promise<WaitForUserOperationReturnType>
A promise that resolves to the transaction receipt.
Example
ReadonlySmartAccount
userOpHash
ImportServerAccountOptions
Defined in: client/evm/evm.types.ts:400 Options for importing an EVM server account.Properties
encryptionPublicKey?
idempotencyKey?
name?
privateKey
ListServerAccountResult
Defined in: client/evm/evm.types.ts:552 The result of listing EVM server accounts.Properties
accounts
address
listTokenBalances()
Parameters
options
Omit<ListTokenBalancesOptions, "address">
The options for the list token balances.
Returns
Promise<ListTokenBalancesResult>
The result of the list token balances.
Example
name?
policies?
quoteSwap()
Parameters
options
AccountQuoteSwapOptions
Configuration options for creating the swap quote.
Returns
Promise<AccountQuoteSwapResult>
A promise that resolves to the swap quote or a response indicating that liquidity is unavailable.
Example
requestFaucet()
Parameters
options
Omit<RequestFaucetOptions, "address">
Parameters for requesting funds from the EVM faucet.
Returns
Promise<RequestFaucetResult>
A promise that resolves to the transaction hash.
Example
sendTransaction()
Parameters
options
Omit<SendTransactionOptions, "address">
Configuration options for sending the transaction.
Returns
Promise<TransactionResult>
A promise that resolves to the transaction hash.
Examples
Sending an RLP-encoded transactionsign()
Parameters
parameters
hash
`0x${string}`
Returns
Promise<`0x${string}`>
signMessage()
Parameters
parameters
message
SignableMessage
Returns
Promise<`0x${string}`>
signTransaction()
Parameters
transaction
TransactionSerializable
Returns
Promise<`0x${string}`>
signTypedData()
Type Parameters
typedData
typedData extends
| {
[key: string]: readonly TypedDataParameter[];
[key: `string[${string}]`]: undefined;
[key: `function[${string}]`]: undefined;
[key: `address[${string}]`]: undefined;
[key: `bool[${string}]`]: undefined;
[key: `bytes[${string}]`]: undefined;
[key: `bytes1[${string}]`]: undefined;
[key: `bytes2[${string}]`]: undefined;
[key: `bytes3[${string}]`]: undefined;
[key: `bytes4[${string}]`]: undefined;
[key: `bytes5[${string}]`]: undefined;
[key: `bytes6[${string}]`]: undefined;
[key: `bytes7[${string}]`]: undefined;
[key: `bytes8[${string}]`]: undefined;
[key: `bytes9[${string}]`]: undefined;
[key: `bytes10[${string}]`]: undefined;
[key: `bytes11[${string}]`]: undefined;
[key: `bytes12[${string}]`]: undefined;
[key: `bytes13[${string}]`]: undefined;
[key: `bytes14[${string}]`]: undefined;
[key: `bytes15[${string}]`]: undefined;
[key: `bytes16[${string}]`]: undefined;
[key: `bytes17[${string}]`]: undefined;
[key: `bytes18[${string}]`]: undefined;
[key: `bytes19[${string}]`]: undefined;
[key: `bytes20[${string}]`]: undefined;
[key: `bytes21[${string}]`]: undefined;
[key: `bytes22[${string}]`]: undefined;
[key: `bytes23[${string}]`]: undefined;
[key: `bytes24[${string}]`]: undefined;
[key: `bytes25[${string}]`]: undefined;
[key: `bytes26[${string}]`]: undefined;
[key: `bytes27[${string}]`]: undefined;
[key: `bytes28[${string}]`]: undefined;
[key: `bytes29[${string}]`]: undefined;
[key: `bytes30[${string}]`]: undefined;
[key: `bytes31[${string}]`]: undefined;
[key: `bytes32[${string}]`]: undefined;
[key: `int[${string}]`]: undefined;
[key: `int8[${string}]`]: undefined;
[key: `int16[${string}]`]: undefined;
[key: `int24[${string}]`]: undefined;
[key: `int32[${string}]`]: undefined;
[key: `int40[${string}]`]: undefined;
[key: `int48[${string}]`]: undefined;
[key: `int56[${string}]`]: undefined;
[key: `int64[${string}]`]: undefined;
[key: `int72[${string}]`]: undefined;
[key: `int80[${string}]`]: undefined;
[key: `int88[${string}]`]: undefined;
[key: `int96[${string}]`]: undefined;
[key: `int104[${string}]`]: undefined;
[key: `int112[${string}]`]: undefined;
[key: `int120[${string}]`]: undefined;
[key: `int128[${string}]`]: undefined;
[key: `int136[${string}]`]: undefined;
[key: `int144[${string}]`]: undefined;
[key: `int152[${string}]`]: undefined;
[key: `int160[${string}]`]: undefined;
[key: `int168[${string}]`]: undefined;
[key: `int176[${string}]`]: undefined;
[key: `int184[${string}]`]: undefined;
[key: `int192[${string}]`]: undefined;
[key: `int200[${string}]`]: undefined;
[key: `int208[${string}]`]: undefined;
[key: `int216[${string}]`]: undefined;
[key: `int224[${string}]`]: undefined;
[key: `int232[${string}]`]: undefined;
[key: `int240[${string}]`]: undefined;
[key: `int248[${string}]`]: undefined;
[key: `int256[${string}]`]: undefined;
[key: `uint[${string}]`]: undefined;
[key: `uint8[${string}]`]: undefined;
[key: `uint16[${string}]`]: undefined;
[key: `uint24[${string}]`]: undefined;
[key: `uint32[${string}]`]: undefined;
[key: `uint40[${string}]`]: undefined;
[key: `uint48[${string}]`]: undefined;
[key: `uint56[${string}]`]: undefined;
[key: `uint64[${string}]`]: undefined;
[key: `uint72[${string}]`]: undefined;
[key: `uint80[${string}]`]: undefined;
[key: `uint88[${string}]`]: undefined;
[key: `uint96[${string}]`]: undefined;
[key: `uint104[${string}]`]: undefined;
[key: `uint112[${string}]`]: undefined;
[key: `uint120[${string}]`]: undefined;
[key: `uint128[${string}]`]: undefined;
[key: `uint136[${string}]`]: undefined;
[key: `uint144[${string}]`]: undefined;
[key: `uint152[${string}]`]: undefined;
[key: `uint160[${string}]`]: undefined;
[key: `uint168[${string}]`]: undefined;
[key: `uint176[${string}]`]: undefined;
[key: `uint184[${string}]`]: undefined;
[key: `uint192[${string}]`]: undefined;
[key: `uint200[${string}]`]: undefined;
[key: `uint208[${string}]`]: undefined;
[key: `uint216[${string}]`]: undefined;
[key: `uint224[${string}]`]: undefined;
[key: `uint232[${string}]`]: undefined;
[key: `uint240[${string}]`]: undefined;
[key: `uint248[${string}]`]: undefined;
[key: `uint256[${string}]`]: undefined;
address?: undefined;
bool?: undefined;
bytes?: undefined;
bytes1?: undefined;
bytes10?: undefined;
bytes11?: undefined;
bytes12?: undefined;
bytes13?: undefined;
bytes14?: undefined;
bytes15?: undefined;
bytes16?: undefined;
bytes17?: undefined;
bytes18?: undefined;
bytes19?: undefined;
bytes2?: undefined;
bytes20?: undefined;
bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;
bytes24?: undefined;
bytes25?: undefined;
bytes26?: undefined;
bytes27?: undefined;
bytes28?: undefined;
bytes29?: undefined;
bytes3?: undefined;
bytes30?: undefined;
bytes31?: undefined;
bytes32?: undefined;
bytes4?: undefined;
bytes5?: undefined;
bytes6?: undefined;
bytes7?: undefined;
bytes8?: undefined;
bytes9?: undefined;
int104?: undefined;
int112?: undefined;
int120?: undefined;
int128?: undefined;
int136?: undefined;
int144?: undefined;
int152?: undefined;
int16?: undefined;
int160?: undefined;
int168?: undefined;
int176?: undefined;
int184?: undefined;
int192?: undefined;
int200?: undefined;
int208?: undefined;
int216?: undefined;
int224?: undefined;
int232?: undefined;
int24?: undefined;
int240?: undefined;
int248?: undefined;
int256?: undefined;
int32?: undefined;
int40?: undefined;
int48?: undefined;
int56?: undefined;
int64?: undefined;
int72?: undefined;
int8?: undefined;
int80?: undefined;
int88?: undefined;
int96?: undefined;
string?: undefined;
uint104?: undefined;
uint112?: undefined;
uint120?: undefined;
uint128?: undefined;
uint136?: undefined;
uint144?: undefined;
uint152?: undefined;
uint16?: undefined;
uint160?: undefined;
uint168?: undefined;
uint176?: undefined;
uint184?: undefined;
uint192?: undefined;
uint200?: undefined;
uint208?: undefined;
uint216?: undefined;
uint224?: undefined;
uint232?: undefined;
uint24?: undefined;
uint240?: undefined;
uint248?: undefined;
uint256?: undefined;
uint32?: undefined;
uint40?: undefined;
uint48?: undefined;
uint56?: undefined;
uint64?: undefined;
uint72?: undefined;
uint8?: undefined;
uint80?: undefined;
uint88?: undefined;
uint96?: undefined;
}
| Record<string, unknown>
primaryType
primaryType extends string | number | symbol = keyof typedData
Parameters
parameters
TypedDataDefinition<typedData, primaryType>
Returns
Promise<`0x${string}`>
swap()
Parameters
options
AccountSwapOptions
Configuration options for the swap.
Returns
Promise<SendSwapTransactionResult>
A promise that resolves to the transaction hash.
Throws
If liquidity is not available when using inline options.Examples
transfer()
Parameters
options
TransferOptions
The options for the transfer.
Returns
Promise<{
transactionHash: `0x${string}`;
}>
An object containing the transaction hash.
Examples
type
useNetwork()
Type Parameters
Network
Network extends NetworkOrRpcUrl
Parameters
network
Network
The network name or RPC URL
Returns
Promise<{ [K in string | number | symbol]: (Omit<{ address: `0x\{string\}\`; listTokenBalances: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; name?: string; policies?: (...)\[\]; quoteSwap: (options: AccountQuoteSwapOptions) =\> Promise\<(...)\>; requestFaucet: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; sendTransaction: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; sign: (parameters: \{ hash: ... \}) =\> Promise\<(...)\>; signMessage: (parameters: \{ message: ... \}) =\> Promise\<(...)\>; signTransaction: (transaction: TransactionSerializable) =\> Promise\<(...)\>; signTypedData: (parameters: TypedDataDefinition\<(...), (...)\>) =\> Promise\<(...)\>; swap: (options: AccountSwapOptions) =\> Promise\<(...)\>; transfer: (options: TransferOptions) =\> Promise\<(...)\>; type: "evm-server"; useNetwork: \<Network extends NetworkOrRpcUrl\>(network: Network) =\> Promise\<\{ \[K in keyof (Omit\<\{ address: \`0x{string}`; sign: (parameters: { hash: `0x\{string\}\`; \}) =\> Promise\<\`0x{string}`>; signMessage: (parameters: { message: SignableMessage; }) => Promise<…>; … 12 more …; useNetwork: …; }, keyof Actions | … 5 mor…; useSpendPermission: (options: UseSpendPermissionOptions) => Promise<(…)> }, (keyof Actions) | “transfer” | “sendTransaction” | “quoteSwap” | “swap” | “useSpendPermission” | “useNetwork”> & { [K in string | number | symbol]: ({ sendTransaction: …; transfer: …; waitForTransactionReceipt: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>
Example
useSpendPermission()
Parameters
options
UseSpendPermissionOptions
Configuration options for using the spend permission.
Returns
Promise<TransactionResult>
A promise that resolves to the transaction result.
Throws
If the network doesn’t support spend permissions via CDP API.Example
nextPageToken?
ListServerAccountsOptions
Defined in: client/evm/evm.types.ts:468 Options for listing EVM accounts.Properties
pageSize?
pageToken?
ListSmartAccountResult
Defined in: client/evm/evm.types.ts:539 The result of listing EVM smart accounts.Properties
accounts
nextPageToken?
ListSmartAccountsOptions
Defined in: client/evm/evm.types.ts:565 Options for listing EVM smart accounts.Properties
name?
pageSize?
pageToken?
PrepareAndSendUserOperationOptions
Defined in: client/evm/evm.types.ts:326 Options for preparing and sending a user operation.Properties
calls
idempotencyKey?
network
paymasterUrl?
smartAccount
address
getUserOperation()
Parameters
options
Omit<GetUserOperationOptions, "smartAccount">
Parameters for getting the user operation.
Returns
Promise<UserOperation>
A promise that resolves to the user operation.
Example
listTokenBalances()
Parameters
options
Omit<ListTokenBalancesOptions, "address">
The options for the list token balances.
Returns
Promise<ListTokenBalancesResult>
The result of the list token balances.
Example
name?
owners
policies
quoteSwap()
Parameters
options
SmartAccountQuoteSwapOptions
Configuration options for creating the swap quote.
Returns
Promise<SmartAccountQuoteSwapResult>
A promise that resolves to the swap quote or a response indicating that liquidity is unavailable.
Example
requestFaucet()
Parameters
options
Omit<RequestFaucetOptions, "address">
Parameters for requesting funds from the EVM faucet.
Returns
Promise<RequestFaucetResult>
A promise that resolves to the transaction hash.
Example
sendUserOperation()
Parameters
options
Omit<SendUserOperationOptions<unknown[]>, "smartAccount">
Parameters for sending the user operation.
Returns
Promise<SendUserOperationReturnType>
A promise that resolves to an object containing the smart account address,
the user operation hash, and the status of the user operation.
Example
signTypedData()
Parameters
options
Omit<SignTypedDataOptions, "address"> & {
network: KnownEvmNetworks;
}
Configuration options for signing the typed data.
Returns
Promise<`0x${string}`>
A promise that resolves to the signature.
Example
swap()
Parameters
options
SmartAccountSwapOptions
Configuration options for the swap.
Returns
Promise<SmartAccountSwapResult>
A promise that resolves to the user operation result.
Throws
If liquidity is not available when using inline options.Examples
transfer()
Parameters
options
SmartAccountTransferOptions
The options for the transfer.
Returns
Promise<SendUserOperationReturnType>
The user operation result.
Examples
type
useNetwork()
Type Parameters
Network
Network extends NetworkOrRpcUrl
Parameters
network
Network
The network name or RPC URL
Returns
Promise<{ [K in string | number | symbol]: (Omit<EvmSmartAccountProperties, “useNetwork”> & { [K in string | number | symbol]: ({ getUserOperation: (options: …) => …; sendUserOperation: (options: …) => …; signTypedData: (options: …) => …; waitForUserOperation: (options: …) => … } & (Network extends TransferNetworks ? { transfer: … } : EmptyObject) & (Network extends ListTokenBalancesNetworks ? { listTokenBalances: … } : EmptyObject) & (Network extends RequestFaucetNetworks ? { requestFaucet: … } : EmptyObject) & (Network extends QuoteSwapNetworks ? { quoteSwap: … } : EmptyObject) & (Network extends SwapNetworks ? { swap: … } : EmptyObject) & (Network extends SpendPermissionNetwork ? { useSpendPermission: … } : EmptyObject))[K] } & { network: Network })[K] }>
Example
useSpendPermission()
Parameters
options
UseSpendPermissionOptions
Configuration options for using the spend permission.
Returns
Promise<SendUserOperationReturnType>
A promise that resolves to the user operation result.
Throws
If the network doesn’t support spend permissions via CDP API.Example
waitForUserOperation()
Parameters
options
Omit<WaitForUserOperationOptions, "smartAccountAddress">
Parameters for waiting for the user operation.
Returns
Promise<WaitForUserOperationReturnType>
A promise that resolves to the transaction receipt.
Example
PrepareUserOperationOptions
Defined in: client/evm/evm.types.ts:308 Options for preparing a user operation.Properties
calls
dataSuffix?
network
paymasterContext?
context object forwarded to the paymaster service. Only valid when a paymaster is configured.
paymasterUrl?
smartAccount
address
getUserOperation()
Parameters
options
Omit<GetUserOperationOptions, "smartAccount">
Parameters for getting the user operation.
Returns
Promise<UserOperation>
A promise that resolves to the user operation.
Example
listTokenBalances()
Parameters
options
Omit<ListTokenBalancesOptions, "address">
The options for the list token balances.
Returns
Promise<ListTokenBalancesResult>
The result of the list token balances.
Example
name?
owners
policies
quoteSwap()
Parameters
options
SmartAccountQuoteSwapOptions
Configuration options for creating the swap quote.
Returns
Promise<SmartAccountQuoteSwapResult>
A promise that resolves to the swap quote or a response indicating that liquidity is unavailable.
Example
requestFaucet()
Parameters
options
Omit<RequestFaucetOptions, "address">
Parameters for requesting funds from the EVM faucet.
Returns
Promise<RequestFaucetResult>
A promise that resolves to the transaction hash.
Example
sendUserOperation()
Parameters
options
Omit<SendUserOperationOptions<unknown[]>, "smartAccount">
Parameters for sending the user operation.
Returns
Promise<SendUserOperationReturnType>
A promise that resolves to an object containing the smart account address,
the user operation hash, and the status of the user operation.
Example
signTypedData()
Parameters
options
Omit<SignTypedDataOptions, "address"> & {
network: KnownEvmNetworks;
}
Configuration options for signing the typed data.
Returns
Promise<`0x${string}`>
A promise that resolves to the signature.
Example
swap()
Parameters
options
SmartAccountSwapOptions
Configuration options for the swap.
Returns
Promise<SmartAccountSwapResult>
A promise that resolves to the user operation result.
Throws
If liquidity is not available when using inline options.Examples
transfer()
Parameters
options
SmartAccountTransferOptions
The options for the transfer.
Returns
Promise<SendUserOperationReturnType>
The user operation result.
Examples
type
useNetwork()
Type Parameters
Network
Network extends NetworkOrRpcUrl
Parameters
network
Network
The network name or RPC URL
Returns
Promise<{ [K in string | number | symbol]: (Omit<EvmSmartAccountProperties, “useNetwork”> & { [K in string | number | symbol]: ({ getUserOperation: (options: …) => …; sendUserOperation: (options: …) => …; signTypedData: (options: …) => …; waitForUserOperation: (options: …) => … } & (Network extends TransferNetworks ? { transfer: … } : EmptyObject) & (Network extends ListTokenBalancesNetworks ? { listTokenBalances: … } : EmptyObject) & (Network extends RequestFaucetNetworks ? { requestFaucet: … } : EmptyObject) & (Network extends QuoteSwapNetworks ? { quoteSwap: … } : EmptyObject) & (Network extends SwapNetworks ? { swap: … } : EmptyObject) & (Network extends SpendPermissionNetwork ? { useSpendPermission: … } : EmptyObject))[K] } & { network: Network })[K] }>
Example
useSpendPermission()
Parameters
options
UseSpendPermissionOptions
Configuration options for using the spend permission.
Returns
Promise<SendUserOperationReturnType>
A promise that resolves to the user operation result.
Throws
If the network doesn’t support spend permissions via CDP API.Example
waitForUserOperation()
Parameters
options
Omit<WaitForUserOperationOptions, "smartAccountAddress">
Parameters for waiting for the user operation.
Returns
Promise<WaitForUserOperationReturnType>
A promise that resolves to the transaction receipt.
Example
ReadonlySmartAccount
Defined in: client/evm/evm.types.ts:478 A smart account that only contains the owner address.Extends
Omit<EvmSmartAccount, |"owners"| keyofSmartAccountActions|"useNetwork">
Properties
address
Inherited from
name?
Inherited from
owners
policies
Inherited from
type
Inherited from
SignatureResult
Defined in: client/evm/evm.types.ts:645 A signature result.Properties
signature
SignHashOptions
Defined in: client/evm/evm.types.ts:591 Options for signing an EVM hash.Properties
address
hash
idempotencyKey?
SignMessageOptions
Defined in: client/evm/evm.types.ts:603 Options for signing an EVM message.Properties
address
idempotencyKey?
message
SignTransactionOptions
Defined in: client/evm/evm.types.ts:633 Options for signing an EVM transaction.Properties
address
idempotencyKey?
transaction
SignTypedDataOptions
Defined in: client/evm/evm.types.ts:615 Options for signing an EVM typed data message.Properties
address
domain
idempotencyKey?
message
primaryType struct in the types object.
primaryType
types object that is the root of the message.
types
SmartAccountSignAndWrapTypedDataOptions
Defined in: client/evm/evm.types.ts:732 Options for signing and wrapping EIP-712 typed data with a smart account. This method handles the full smart account signature flow including replay-safe hashing.Properties
chainId
idempotencyKey?
ownerIndex?
typedData
SwapAllowanceIssue
Defined in: client/evm/evm.types.ts:673 Details of allowance issues for a swap.Properties
currentAllowance
spender
SwapBalanceIssue
Defined in: client/evm/evm.types.ts:683 Details of balance issues for a swap.Properties
currentBalance
requiredBalance
token
SwapFees
Defined in: client/evm/evm.types.ts:663 The estimated fees for a swap.Properties
gasFee?
protocolFee?
SwapIssues
Defined in: client/evm/evm.types.ts:695 Potential issues discovered during swap validation.Properties
allowance?
balance?
simulationIncomplete
SwapUnavailableResult
Defined in: client/evm/evm.types.ts:217 Result when liquidity is unavailable for a swap.Properties
liquidityAvailable
TokenFee
Defined in: client/evm/evm.types.ts:653 A fee in a specific token.Properties
amount
token
UpdateEvmAccountOptions
Defined in: client/evm/evm.types.ts:489 Options for creating an EVM server account.Properties
address
idempotencyKey?
update
UpdateEvmSmartAccountOptions
Defined in: client/evm/evm.types.ts:501 Options for updating an EVM smart account.Properties
address
idempotencyKey?
owner
update
UserOperation
Defined in: client/evm/evm.types.ts:360 A user operation.Properties
calls
expiresAt?
network
receipts?
status
transactionHash?
userOpHash
WaitForEvmEip7702DelegationOperationStatusOptions
Defined in: client/evm/evm.types.ts:529 Options for waiting for an EIP-7702 delegation operation to complete.Properties
delegationOperationId
waitOptions?
WaitForUserOperationOptions
Defined in: client/evm/evm.types.ts:707 Options for waiting for a user operation.Properties
smartAccountAddress
userOpHash
waitOptions?
Type Aliases
- CreateEvmEip7702DelegationResult
CreateSwapOptions- CreateSwapResult
- EvmClientInterface
- GetSwapQuoteOptions
- GetSwapQuoteResult
- SwapPriceUnavailableResult
- SwapQuoteUnavailableResult