EvmClient
CreateServerAccountOptions
= {}
Optional parameters for creating the account.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
policies?
: string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: AccountQuoteSwapOptions
) => Promise
<AccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendTransaction
: (options
: Omit
<SendTransactionOptions
, "address"
>) => Promise
<TransactionResult
>;
sign
: (parameters
: {
hash
: `0x${string}`
;
}) => Promise
<`0x${string}`
>;
signMessage
: (parameters
: {
message
: SignableMessage
;
}) => Promise
<`0x${string}`
>;
signTransaction
: (transaction
: TransactionSerializable
) => Promise
<`0x${string}`
>;
signTypedData
: <typedData
, primaryType
>(parameters
: TypedDataDefinition
<typedData
, primaryType
>) => Promise
<`0x${string}`
>;
swap
: (options
: AccountSwapOptions
) => Promise
<SendSwapTransactionResult
>;
transfer
: (options
: TransferOptions
) => Promise
<{
transactionHash
: `0x${string}`
;
}>;
type
: "evm-server"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<{ address: `0x\{string\}\`; fund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; listTokenBalances: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; name?: string; policies?: (...)\[\]; quoteFund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; 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}`>; signMessage: (parameters: { message: SignableMessage; }) => Promise<…>; … 15 more …; useNetwork: …; }, “transfer” | … 5 more …; useSpendPermission: (options: UseSpendPermissionOptions) => Promise<(…)>; waitForFundOperationReceipt: any }, “transfer” | “sendTransaction” | “quoteSwap” | “swap” | “useSpendPermission” | “useNetwork” | (keyof Actions)> & { [K in string | number | symbol]: ({ sendTransaction: …; transfer: …; waitForTransactionReceipt: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<TransactionResult
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the newly created account.
CreateSmartAccountOptions
Parameters for creating the smart account.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
getUserOperation
: (options
: Omit
<GetUserOperationOptions
, "smartAccount"
>) => Promise
<UserOperation
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
owners
: EvmAccount
[];
policies
: undefined
| string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: SmartAccountQuoteSwapOptions
) => Promise
<SmartAccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendUserOperation
: (options
: Omit
<SendUserOperationOptions
<unknown
[]>, "smartAccount"
>) => Promise
<SendUserOperationReturnType
>;
signTypedData
: (options
: Omit
<SignTypedDataOptions
, "address"
> & {
network
: KnownEvmNetworks
;
}) => Promise
<`0x${string}`
>;
swap
: (options
: SmartAccountSwapOptions
) => Promise
<SmartAccountSwapResult
>;
transfer
: (options
: SmartAccountTransferOptions
) => Promise
<SendUserOperationReturnType
>;
type
: "evm-smart"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<EvmSmartAccountProperties, “useNetwork”> & { [K in string | number | symbol]: ({ getUserOperation: …; sendUserOperation: …; waitForUserOperation: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<SendUserOperationReturnType
>;
waitForUserOperation
: (options
: Omit
<WaitForUserOperationOptions
, "smartAccountAddress"
>) => Promise
<WaitForUserOperationReturnType
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the newly created smart account.
CreateSpendPermissionOptions
Parameters for creating the spend permission.
Promise
<UserOperation
>
A promise that resolves to the spend permission.
CreateSwapQuoteOptions
The options for creating a swap quote.
Promise
<
| CreateSwapQuoteResult
| SwapUnavailableResult
>
A promise that resolves to the swap quote result or a response indicating that liquidity is unavailable.
ExportServerAccountOptions
Parameters for exporting the account.
Promise
<string
>
A promise that resolves to the exported account’s 32-byte private key as a hex string, without the “0x” prefix.
GetServerAccountOptions
Parameters for getting the account.
Either address
or name
must be provided.
If both are provided, lookup will be done by address
and name
will be ignored.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
policies?
: string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: AccountQuoteSwapOptions
) => Promise
<AccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendTransaction
: (options
: Omit
<SendTransactionOptions
, "address"
>) => Promise
<TransactionResult
>;
sign
: (parameters
: {
hash
: `0x${string}`
;
}) => Promise
<`0x${string}`
>;
signMessage
: (parameters
: {
message
: SignableMessage
;
}) => Promise
<`0x${string}`
>;
signTransaction
: (transaction
: TransactionSerializable
) => Promise
<`0x${string}`
>;
signTypedData
: <typedData
, primaryType
>(parameters
: TypedDataDefinition
<typedData
, primaryType
>) => Promise
<`0x${string}`
>;
swap
: (options
: AccountSwapOptions
) => Promise
<SendSwapTransactionResult
>;
transfer
: (options
: TransferOptions
) => Promise
<{
transactionHash
: `0x${string}`
;
}>;
type
: "evm-server"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<{ address: `0x\{string\}\`; fund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; listTokenBalances: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; name?: string; policies?: (...)\[\]; quoteFund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; 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}`>; signMessage: (parameters: { message: SignableMessage; }) => Promise<…>; … 15 more …; useNetwork: …; }, “transfer” | … 5 more …; useSpendPermission: (options: UseSpendPermissionOptions) => Promise<(…)>; waitForFundOperationReceipt: any }, “transfer” | “sendTransaction” | “quoteSwap” | “swap” | “useSpendPermission” | “useNetwork” | (keyof Actions)> & { [K in string | number | symbol]: ({ sendTransaction: …; transfer: …; waitForTransactionReceipt: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<TransactionResult
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the account.
GetOrCreateServerAccountOptions
Parameters for getting or creating the account.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
policies?
: string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: AccountQuoteSwapOptions
) => Promise
<AccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendTransaction
: (options
: Omit
<SendTransactionOptions
, "address"
>) => Promise
<TransactionResult
>;
sign
: (parameters
: {
hash
: `0x${string}`
;
}) => Promise
<`0x${string}`
>;
signMessage
: (parameters
: {
message
: SignableMessage
;
}) => Promise
<`0x${string}`
>;
signTransaction
: (transaction
: TransactionSerializable
) => Promise
<`0x${string}`
>;
signTypedData
: <typedData
, primaryType
>(parameters
: TypedDataDefinition
<typedData
, primaryType
>) => Promise
<`0x${string}`
>;
swap
: (options
: AccountSwapOptions
) => Promise
<SendSwapTransactionResult
>;
transfer
: (options
: TransferOptions
) => Promise
<{
transactionHash
: `0x${string}`
;
}>;
type
: "evm-server"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<{ address: `0x\{string\}\`; fund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; listTokenBalances: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; name?: string; policies?: (...)\[\]; quoteFund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; 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}`>; signMessage: (parameters: { message: SignableMessage; }) => Promise<…>; … 15 more …; useNetwork: …; }, “transfer” | … 5 more …; useSpendPermission: (options: UseSpendPermissionOptions) => Promise<(…)>; waitForFundOperationReceipt: any }, “transfer” | “sendTransaction” | “quoteSwap” | “swap” | “useSpendPermission” | “useNetwork” | (keyof Actions)> & { [K in string | number | symbol]: ({ sendTransaction: …; transfer: …; waitForTransactionReceipt: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<TransactionResult
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the account.
GetOrCreateSmartAccountOptions
Configuration options for getting or creating the smart account.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
getUserOperation
: (options
: Omit
<GetUserOperationOptions
, "smartAccount"
>) => Promise
<UserOperation
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
owners
: EvmAccount
[];
policies
: undefined
| string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: SmartAccountQuoteSwapOptions
) => Promise
<SmartAccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendUserOperation
: (options
: Omit
<SendUserOperationOptions
<unknown
[]>, "smartAccount"
>) => Promise
<SendUserOperationReturnType
>;
signTypedData
: (options
: Omit
<SignTypedDataOptions
, "address"
> & {
network
: KnownEvmNetworks
;
}) => Promise
<`0x${string}`
>;
swap
: (options
: SmartAccountSwapOptions
) => Promise
<SmartAccountSwapResult
>;
transfer
: (options
: SmartAccountTransferOptions
) => Promise
<SendUserOperationReturnType
>;
type
: "evm-smart"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<EvmSmartAccountProperties, “useNetwork”> & { [K in string | number | symbol]: ({ getUserOperation: …; sendUserOperation: …; waitForUserOperation: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<SendUserOperationReturnType
>;
waitForUserOperation
: (options
: Omit
<WaitForUserOperationOptions
, "smartAccountAddress"
>) => Promise
<WaitForUserOperationReturnType
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the retrieved or newly created smart account.
GetSmartAccountOptions
Parameters for getting the smart account.
Either address
or name
must be provided.
If both are provided, lookup will be done by address
and name
will be ignored.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
getUserOperation
: (options
: Omit
<GetUserOperationOptions
, "smartAccount"
>) => Promise
<UserOperation
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
owners
: EvmAccount
[];
policies
: undefined
| string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: SmartAccountQuoteSwapOptions
) => Promise
<SmartAccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendUserOperation
: (options
: Omit
<SendUserOperationOptions
<unknown
[]>, "smartAccount"
>) => Promise
<SendUserOperationReturnType
>;
signTypedData
: (options
: Omit
<SignTypedDataOptions
, "address"
> & {
network
: KnownEvmNetworks
;
}) => Promise
<`0x${string}`
>;
swap
: (options
: SmartAccountSwapOptions
) => Promise
<SmartAccountSwapResult
>;
transfer
: (options
: SmartAccountTransferOptions
) => Promise
<SendUserOperationReturnType
>;
type
: "evm-smart"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<EvmSmartAccountProperties, “useNetwork”> & { [K in string | number | symbol]: ({ getUserOperation: …; sendUserOperation: …; waitForUserOperation: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<SendUserOperationReturnType
>;
waitForUserOperation
: (options
: Omit
<WaitForUserOperationOptions
, "smartAccountAddress"
>) => Promise
<WaitForUserOperationReturnType
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the smart account.
GetSwapPriceOptions
The options for getting a swap price.
Promise
<
| SwapUnavailableResult
| GetSwapPriceResult
>
A promise that resolves to the swap price result or a response indicating that liquidity is unavailable.
GetUserOperationOptions
Parameters for getting the user operation.
Promise
<UserOperation
>
A promise that resolves to the user operation.
ImportServerAccountOptions
Parameters for importing the account.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
policies?
: string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: AccountQuoteSwapOptions
) => Promise
<AccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendTransaction
: (options
: Omit
<SendTransactionOptions
, "address"
>) => Promise
<TransactionResult
>;
sign
: (parameters
: {
hash
: `0x${string}`
;
}) => Promise
<`0x${string}`
>;
signMessage
: (parameters
: {
message
: SignableMessage
;
}) => Promise
<`0x${string}`
>;
signTransaction
: (transaction
: TransactionSerializable
) => Promise
<`0x${string}`
>;
signTypedData
: <typedData
, primaryType
>(parameters
: TypedDataDefinition
<typedData
, primaryType
>) => Promise
<`0x${string}`
>;
swap
: (options
: AccountSwapOptions
) => Promise
<SendSwapTransactionResult
>;
transfer
: (options
: TransferOptions
) => Promise
<{
transactionHash
: `0x${string}`
;
}>;
type
: "evm-server"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<{ address: `0x\{string\}\`; fund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; listTokenBalances: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; name?: string; policies?: (...)\[\]; quoteFund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; 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}`>; signMessage: (parameters: { message: SignableMessage; }) => Promise<…>; … 15 more …; useNetwork: …; }, “transfer” | … 5 more …; useSpendPermission: (options: UseSpendPermissionOptions) => Promise<(…)>; waitForFundOperationReceipt: any }, “transfer” | “sendTransaction” | “quoteSwap” | “swap” | “useSpendPermission” | “useNetwork” | (keyof Actions)> & { [K in string | number | symbol]: ({ sendTransaction: …; transfer: …; waitForTransactionReceipt: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<TransactionResult
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the imported account.
ListServerAccountsOptions
= {}
Optional parameters for listing the accounts.
Promise
<ListServerAccountResult
>
A promise that resolves to an array of accounts, and a token to paginate through the accounts.
ListSmartAccountsOptions
= {}
Parameters for listing the smart accounts.
Promise
<ListSmartAccountResult
>
A promise that resolves to an array of smart accounts, and a token to paginate through the smart accounts.
ListSpendPermissionsOptions
Parameters for listing the spend permissions.
Promise
<ListSpendPermissionsResult
>
A promise that resolves to the spend permissions.
ListTokenBalancesOptions
Parameters for listing the token balances.
Promise
<ListTokenBalancesResult
>
A promise that resolves to an array of token balances, and a token to paginate through the token balances.
PrepareUserOperationOptions
Parameters for preparing the user operation.
Promise
<UserOperation
>
A promise that resolves to the user operation hash.
RequestFaucetOptions
Parameters for requesting funds from the EVM faucet.
Promise
<RequestFaucetResult
>
A promise that resolves to the transaction hash.
RevokeSpendPermissionOptions
Parameters for revoking the spend permission.
Promise
<UserOperation
>
A promise that resolves to the user operation.
SendTransactionOptions
Configuration options for sending the transaction.
Promise
<TransactionResult
>
A promise that resolves to the transaction hash.
SendUserOperationOptions
<unknown
[]>
Parameters for sending the user operation.
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.
SignHashOptions
Parameters for signing the hash.
Promise
<SignatureResult
>
A promise that resolves to the signature.
SignMessageOptions
Parameters for signing the message.
Promise
<SignatureResult
>
A promise that resolves to the signature.
SignTransactionOptions
Configuration options for signing the transaction.
Promise
<SignatureResult
>
A promise that resolves to the signature.
SignTypedDataOptions
Parameters for signing the EIP-712 message.
Promise
<SignatureResult
>
A promise that resolves to the signature.
UpdateEvmAccountOptions
Optional parameters for creating the account.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
policies?
: string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: AccountQuoteSwapOptions
) => Promise
<AccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendTransaction
: (options
: Omit
<SendTransactionOptions
, "address"
>) => Promise
<TransactionResult
>;
sign
: (parameters
: {
hash
: `0x${string}`
;
}) => Promise
<`0x${string}`
>;
signMessage
: (parameters
: {
message
: SignableMessage
;
}) => Promise
<`0x${string}`
>;
signTransaction
: (transaction
: TransactionSerializable
) => Promise
<`0x${string}`
>;
signTypedData
: <typedData
, primaryType
>(parameters
: TypedDataDefinition
<typedData
, primaryType
>) => Promise
<`0x${string}`
>;
swap
: (options
: AccountSwapOptions
) => Promise
<SendSwapTransactionResult
>;
transfer
: (options
: TransferOptions
) => Promise
<{
transactionHash
: `0x${string}`
;
}>;
type
: "evm-server"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<{ address: `0x\{string\}\`; fund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; listTokenBalances: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; name?: string; policies?: (...)\[\]; quoteFund: (options: Omit\<(...), (...)\>) =\> Promise\<(...)\>; 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}`>; signMessage: (parameters: { message: SignableMessage; }) => Promise<…>; … 15 more …; useNetwork: …; }, “transfer” | … 5 more …; useSpendPermission: (options: UseSpendPermissionOptions) => Promise<(…)>; waitForFundOperationReceipt: any }, “transfer” | “sendTransaction” | “quoteSwap” | “swap” | “useSpendPermission” | “useNetwork” | (keyof Actions)> & { [K in string | number | symbol]: ({ sendTransaction: …; transfer: …; waitForTransactionReceipt: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<TransactionResult
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the updated account.
UpdateEvmSmartAccountOptions
Optional parameters for updating the account.
Promise
<{
address
: `0x${string}`
;
fund
: (options
: Omit
<EvmFundOptions
, "address"
>) => Promise
<FundOperationResult
>;
getUserOperation
: (options
: Omit
<GetUserOperationOptions
, "smartAccount"
>) => Promise
<UserOperation
>;
listTokenBalances
: (options
: Omit
<ListTokenBalancesOptions
, "address"
>) => Promise
<ListTokenBalancesResult
>;
name?
: string
;
owners
: EvmAccount
[];
policies
: undefined
| string
[];
quoteFund
: (options
: Omit
<EvmQuoteFundOptions
, "address"
>) => Promise
<EvmQuote
>;
quoteSwap
: (options
: SmartAccountQuoteSwapOptions
) => Promise
<SmartAccountQuoteSwapResult
>;
requestFaucet
: (options
: Omit
<RequestFaucetOptions
, "address"
>) => Promise
<RequestFaucetResult
>;
sendUserOperation
: (options
: Omit
<SendUserOperationOptions
<unknown
[]>, "smartAccount"
>) => Promise
<SendUserOperationReturnType
>;
signTypedData
: (options
: Omit
<SignTypedDataOptions
, "address"
> & {
network
: KnownEvmNetworks
;
}) => Promise
<`0x${string}`
>;
swap
: (options
: SmartAccountSwapOptions
) => Promise
<SmartAccountSwapResult
>;
transfer
: (options
: SmartAccountTransferOptions
) => Promise
<SendUserOperationReturnType
>;
type
: "evm-smart"
;
useNetwork
: <Network
>(network
: Network
) => Promise
<{ [K in string | number | symbol]: (Omit<EvmSmartAccountProperties, “useNetwork”> & { [K in string | number | symbol]: ({ getUserOperation: …; sendUserOperation: …; waitForUserOperation: … } & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)))[K] } & { network: Network })[K] }>;
useSpendPermission
: (options
: UseSpendPermissionOptions
) => Promise
<SendUserOperationReturnType
>;
waitForUserOperation
: (options
: Omit
<WaitForUserOperationOptions
, "smartAccountAddress"
>) => Promise
<WaitForUserOperationReturnType
>;
waitForFundOperationReceipt
: Promise
<WaitForFundOperationResult
>;
}>
A promise that resolves to the updated account.
WaitForUserOperationOptions
Parameters for waiting for the user operation.
Promise
<WaitForUserOperationReturnType
>
A promise that resolves to the transaction receipt.