Type Aliases
AccountActions
Type declaration
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
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 transactionswap()
Parameters
options
AccountSwapOptions
Configuration options for the swap.
Returns
Promise
<AccountSwapResult
>
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
: Hex
;
}>
An object containing the transaction hash.
Examples
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
Actions
Properties
fund()
Parameters
options
Omit
<EvmFundOptions
, "address"
>
The options for the fund operation.
Returns
Promise
<FundOperationResult
>
A promise that resolves to the fund operation result containing the transfer details.
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
quoteFund()
Parameters
options
Omit
<EvmQuoteFundOptions
, "address"
>
The options for the quote fund.
Returns
Promise
<EvmQuote
>
A promise that resolves to a Quote object containing details about the funding operation.
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
Methods
waitForFundOperationReceipt()
Parameters
options
WaitForFundOperationOptions
The options for the wait for fund operation.
Returns
Promise
<WaitForFundOperationResult
>
A promise that resolves to the completed transfer receipt containing details about the funding operation.
Example
SmartAccountActions
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.