Type Declaration
getUserOperation()
Parameters
options
Omit<GetUserOperationOptions, "smartAccount">
Parameters for getting the user operation.
Returns
Promise<UserOperation>
A promise that resolves to the user operation.
Example
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
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<Hex>
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
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.