> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Types

## Interfaces

### CreateEvmEip7702DelegationOptions

Defined in: [client/evm/evm.types.ts:508](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L508)

Options for creating an EIP-7702 delegation for an EVM EOA account.

#### Properties

##### address

```ts theme={null}
address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:510](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L510)

The address of the EOA account.

##### enableSpendPermissions?

```ts theme={null}
optional enableSpendPermissions: boolean;
```

Defined in: [client/evm/evm.types.ts:514](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L514)

Whether to configure spend permissions for the upgraded, delegated account. When enabled, the account can grant permissions for third parties to spend on its behalf. Defaults to false.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:516](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L516)

Optional idempotency key.

##### network

```ts theme={null}
network: EvmEip7702DelegationNetwork;
```

Defined in: [client/evm/evm.types.ts:512](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L512)

The network for the EIP-7702 delegation.

***

### CreateServerAccountOptions

Defined in: [client/evm/evm.types.ts:381](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L381)

Options for creating an EVM server account.

#### Properties

##### accountPolicy?

```ts theme={null}
optional accountPolicy: string;
```

Defined in: [client/evm/evm.types.ts:385](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L385)

The policy ID to apply to the account.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:387](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L387)

The idempotency key.

##### name?

```ts theme={null}
optional name: string;
```

Defined in: [client/evm/evm.types.ts:383](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L383)

The name of the account.

***

### CreateSmartAccountOptions

Defined in: [client/evm/evm.types.ts:570](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L570)

Options for creating an EVM smart account.

#### Properties

##### enableSpendPermissions?

```ts theme={null}
optional enableSpendPermissions: boolean;
```

Defined in: [client/evm/evm.types.ts:578](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L578)

The flag to enable spend permissions.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:574](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L574)

The idempotency key.

##### name?

```ts theme={null}
optional name: string;
```

Defined in: [client/evm/evm.types.ts:576](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L576)

The name of the account.

##### owner

```ts theme={null}
owner: EvmAccount;
```

Defined in: [client/evm/evm.types.ts:572](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L572)

The owner of the account.

***

### CreateSwapQuoteOptions

Defined in: [client/evm/evm.types.ts:138](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L138)

Options for creating a swap quote between two tokens on an EVM network.

#### Properties

##### fromAmount

```ts theme={null}
fromAmount: bigint;
```

Defined in: [client/evm/evm.types.ts:146](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L146)

The amount to send in atomic units of the token.

##### fromToken

```ts theme={null}
fromToken: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:144](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L144)

The token to send (source token).

##### gasPrice?

```ts theme={null}
optional gasPrice: bigint;
```

Defined in: [client/evm/evm.types.ts:154](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L154)

The price per unit of gas in wei.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:158](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L158)

The idempotency key.

##### network

```ts theme={null}
network: EvmSwapsNetwork;
```

Defined in: [client/evm/evm.types.ts:140](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L140)

The network to create a swap quote on.

##### signerAddress?

```ts theme={null}
optional signerAddress: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:150](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L150)

The address signing the swap (only needed if taker is a smart contract, i.e. for smart account swaps).

##### slippageBps?

```ts theme={null}
optional slippageBps: number;
```

Defined in: [client/evm/evm.types.ts:156](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L156)

The slippage tolerance in basis points (0-10000).

##### smartAccount?

```ts theme={null}
optional smartAccount: {
  address: `0x${string}`;
  getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
  listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
  name?: string;
  owners: EvmAccount[];
  policies: string[] | undefined;
  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: ...; signTypedData: ...; waitForUserOperation: ... } & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)))[K] } & { network: Network })[K] }>;
  useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
  waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
};
```

Defined in: [client/evm/evm.types.ts:152](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L152)

The smart account object (required for smart account execution context only).

###### address

```ts theme={null}
address: `0x${string}`;
```

The smart account's address.

###### getUserOperation()

```ts theme={null}
getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
```

Gets a user operation by its hash.

###### Parameters

###### options

`Omit`\<[`GetUserOperationOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#getuseroperationoptions), `"smartAccount"`>

Parameters for getting the user operation.

###### Returns

`Promise`\<[`UserOperation`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#useroperation)>

A promise that resolves to the user operation.

###### Example

```ts theme={null}
const userOp = await smartAccount.getUserOperation({
  userOpHash: "0x1234567890123456789012345678901234567890",
});
```

###### listTokenBalances()

```ts theme={null}
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
```

List the token balances of an account.

###### Parameters

###### options

`Omit`\<`ListTokenBalancesOptions`, `"address"`>

The options for the list token balances.

###### Returns

`Promise`\<`ListTokenBalancesResult`>

The result of the list token balances.

###### Example

```typescript theme={null}
const balances = await account.listTokenBalances({
  network: "base-sepolia",
});
```

###### name?

```ts theme={null}
optional name: string;
```

The name of the smart account.

###### owners

```ts theme={null}
owners: EvmAccount[];
```

Array of accounts that own and can sign for the smart account (currently only supports one owner but will be extended to support multiple owners in the future).

###### policies

```ts theme={null}
policies: string[] | undefined;
```

The list of policy IDs that apply to the smart account. This will include both the project-level policy and the account-level policy, if one exists.

###### quoteSwap()

```ts theme={null}
quoteSwap: (options: SmartAccountQuoteSwapOptions) => Promise<SmartAccountQuoteSwapResult>;
```

Creates a swap quote without executing the transaction.
This is useful when you need to get swap details before executing the swap.
The taker is automatically set to the smart account's address.

###### 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

```ts theme={null}
const swapQuote = await smartAccount.quoteSwap({
  network: "base",
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

if (swapQuote.liquidityAvailable) {
  console.log(`Can swap for ${swapQuote.toAmount} USDC`);
}
```

###### requestFaucet()

```ts theme={null}
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<RequestFaucetResult>;
```

Requests funds from an EVM faucet.

###### 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

```ts theme={null}
const result = await account.requestFaucet({
  network: "base-sepolia",
  token: "eth",
});
```

###### sendUserOperation()

```ts theme={null}
sendUserOperation: (options: Omit<SendUserOperationOptions<unknown[]>, "smartAccount">) => Promise<SendUserOperationReturnType>;
```

Sends a user operation.

###### 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

```ts theme={null}
const userOp = await smartAccount.sendUserOperation({
  network: "base-sepolia",
  calls: [
    {
      to: "0x1234567890123456789012345678901234567890",
      value: parseEther("0.000001"),
      data: "0x",
    },
  ],
});
```

###### signTypedData()

```ts theme={null}
signTypedData: (options: Omit<SignTypedDataOptions, "address"> & {
  network: KnownEvmNetworks;
}) => Promise<`0x${string}`>;
```

Signs a typed data message.

###### Parameters

###### options

`Omit`\<[`SignTypedDataOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#signtypeddataoptions), `"address"`> & \{
`network`: `KnownEvmNetworks`;
}

Configuration options for signing the typed data.

###### Returns

`Promise`\<`` `0x${string}` ``>

A promise that resolves to the signature.

###### Example

```ts theme={null}
const signature = await smartAccount.signTypedData({
  network: "base-sepolia",
  typedData: {
    domain: {
      name: "Test",
      chainId: 84532,
      verifyingContract: "0x0000000000000000000000000000000000000000",
    },
    types: {
      Test: [{ name: "name", type: "string" }],
    },
    primaryType: "Test",
    message: {
      name: "John Doe",
    },
  },
});
```

###### swap()

```ts theme={null}
swap: (options: SmartAccountSwapOptions) => Promise<SmartAccountSwapResult>;
```

Executes a token swap on the specified network via a user operation.
This method handles all the steps required for a swap, including Permit2 signatures if needed.
The taker is automatically set to the smart account's address.

###### 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

```ts theme={null}
// First create a swap quote
const swapQuote = await cdp.evm.createSwapQuote({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
  taker: smartAccount.address,
  signerAddress: smartAccount.owners[0].address
});

// Check if liquidity is available
if (!swapQuote.liquidityAvailable) {
  console.error("Insufficient liquidity for swap");
  return;
}

// Execute the swap
const { userOpHash } = await smartAccount.swap({
  swapQuote: swapQuote
});

console.log(`Swap executed with user op hash: ${userOpHash}`);
```

```ts theme={null}
// Create and execute swap in one call
const { userOpHash } = await smartAccount.swap({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

console.log(`Swap executed with user op hash: ${userOpHash}`);
```

###### transfer()

```ts theme={null}
transfer: (options: SmartAccountTransferOptions) => Promise<SendUserOperationReturnType>;
```

Transfer an amount of a token from an account to another account.

###### Parameters

###### options

`SmartAccountTransferOptions`

The options for the transfer.

###### Returns

`Promise`\<`SendUserOperationReturnType`>

The user operation result.

###### Examples

```typescript theme={null}
const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

**Using parseUnits to specify USDC amount**

```typescript theme={null}
import { parseUnits } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseUnits("0.01", 6), // USDC uses 6 decimal places
  token: "usdc",
  network: "base-sepolia",
});
```

**Transfer ETH**

```typescript theme={null}
import { parseEther } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "eth",
  network: "base-sepolia",
});
```

**Using a contract address**

```typescript theme={null}
import { parseEther } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "0x4200000000000000000000000000000000000006", // WETH on Base Sepolia
  network: "base-sepolia",
});
```

**Transfer to another account**

```typescript theme={null}
const sender = await cdp.evm.createAccount({ name: "Sender" });
const receiver = await cdp.evm.createAccount({ name: "Receiver" });

const { userOpHash } = await sender.transfer({
  to: receiver,
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

###### type

```ts theme={null}
type: "evm-smart";
```

Identifier for the smart account type.

###### useNetwork()

```ts theme={null}
useNetwork: <Network>(network: Network) => 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] }>;
```

A function that returns a network-scoped smart account.

###### Type Parameters

###### Network

`Network` *extends* `NetworkOrRpcUrl`

###### Parameters

###### network

`Network`

The network name or RPC URL

###### Returns

`Promise`\<\&#123; \[K in string | number | symbol]: (Omit\<EvmSmartAccountProperties, "useNetwork"> & \&#123; \[K in string | number | symbol]: (\&#123; getUserOperation: ...; sendUserOperation: ...; signTypedData: ...; waitForUserOperation: ... \&#125; & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)))\[K] } & \&#123; network: Network \&#125;)\[K] }>

###### Example

```ts theme={null}
// For known networks, type is inferred automatically:
const baseAccount = await smartAccount.useNetwork("base");

// For custom RPC URLs with type hints (requires casting):
const typedAccount = await smartAccount.useNetwork<"base">("https://mainnet.base.org" as "base");

// For custom RPC URLs without type hints (only sendTransaction, transfer and waitForTransactionReceipt methods available):
const customAccount = await smartAccount.useNetwork("https://mainnet.base.org");
```

###### useSpendPermission()

```ts theme={null}
useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
```

Uses a spend permission to execute a transaction via user operation.
This allows the smart account to spend tokens that have been approved via a spend permission.

###### 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

```typescript theme={null}
const spendPermission = {
  account: "0x1234...", // Smart account that owns the tokens
  spender: smartAccount.address, // This smart account that can spend
  token: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH
  allowance: parseEther("0.01"),
  period: 86400, // 1 day
  start: 0,
  end: 281474976710655,
  salt: 0n,
  extraData: "0x",
};

const result = await smartAccount.useSpendPermission({
  spendPermission,
  value: parseEther("0.001"), // Spend 0.001 ETH
  network: "base-sepolia",
});
```

###### waitForUserOperation()

```ts theme={null}
waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
```

Waits for a user operation to complete or fail.

###### Parameters

###### options

`Omit`\<`WaitForUserOperationOptions`, `"smartAccountAddress"`>

Parameters for waiting for the user operation.

###### Returns

`Promise`\<`WaitForUserOperationReturnType`>

A promise that resolves to the transaction receipt.

###### Example

```ts theme={null}
// Send a user operation and get the user operation hash
const { userOpHash } = await smartAccount.sendUserOperation({
  network: "base-sepolia",
  calls: [
    {
      to: "0x0000000000000000000000000000000000000000",
      value: parseEther("0.000001"),
      data: "0x",
    },
  ],
});

// Wait for the user operation to complete or fail
const result = await smartAccount.waitForUserOperation({
  userOpHash: userOp.userOpHash,
});
```

##### taker

```ts theme={null}
taker: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:148](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L148)

The address receiving the output of the swap.

##### toToken

```ts theme={null}
toToken: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:142](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L142)

The token to receive (destination token).

***

### CreateSwapQuoteResult

Defined in: [client/evm/evm.types.ts:246](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L246)

Result of creating a swap quote.

#### Properties

##### blockNumber

```ts theme={null}
blockNumber: bigint;
```

Defined in: [client/evm/evm.types.ts:262](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L262)

The block number at which the liquidity conditions were examined.

##### execute()

```ts theme={null}
execute: (options?: ExecuteSwapQuoteOptions) => Promise<ExecuteSwapQuoteResult>;
```

Defined in: [client/evm/evm.types.ts:291](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L291)

Execute the swap using the quote.

###### Parameters

###### options?

[`ExecuteSwapQuoteOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#executeswapquoteoptions)

Options for executing the swap.

###### Returns

`Promise`\<[`ExecuteSwapQuoteResult`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#executeswapquoteresult)>

A promise that resolves to the swap execution result.

##### fees

```ts theme={null}
fees: SwapFees;
```

Defined in: [client/evm/evm.types.ts:264](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L264)

The estimated fees for the swap.

##### fromAmount

```ts theme={null}
fromAmount: bigint;
```

Defined in: [client/evm/evm.types.ts:256](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L256)

The amount to send in atomic units of the token.

##### fromToken

```ts theme={null}
fromToken: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:254](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L254)

The token to send (source token).

##### issues

```ts theme={null}
issues: SwapIssues;
```

Defined in: [client/evm/evm.types.ts:266](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L266)

Potential issues discovered during validation.

##### liquidityAvailable

```ts theme={null}
liquidityAvailable: true;
```

Defined in: [client/evm/evm.types.ts:248](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L248)

Whether liquidity is available for the swap.

##### minToAmount

```ts theme={null}
minToAmount: bigint;
```

Defined in: [client/evm/evm.types.ts:260](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L260)

The minimum amount to receive after slippage in atomic units of the token.

##### network

```ts theme={null}
network: EvmSwapsNetwork;
```

Defined in: [client/evm/evm.types.ts:250](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L250)

The network for which this swap quote was created.

##### permit2?

```ts theme={null}
optional permit2: {
  eip712: EIP712Message;
};
```

Defined in: [client/evm/evm.types.ts:281](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L281)

Permit2 data if required for the swap.

###### eip712

```ts theme={null}
eip712: EIP712Message;
```

EIP-712 typed data for signing.

##### toAmount

```ts theme={null}
toAmount: bigint;
```

Defined in: [client/evm/evm.types.ts:258](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L258)

The amount to receive in atomic units of the token.

##### toToken

```ts theme={null}
toToken: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:252](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L252)

The token to receive (destination token).

##### transaction?

```ts theme={null}
optional transaction: {
  data: `0x${string}`;
  gas: bigint;
  gasPrice: bigint;
  to: `0x${string}`;
  value: bigint;
};
```

Defined in: [client/evm/evm.types.ts:268](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L268)

The transaction to execute the swap.

###### data

```ts theme={null}
data: `0x${string}`;
```

The transaction data.

###### gas

```ts theme={null}
gas: bigint;
```

The gas limit for the transaction.

###### gasPrice

```ts theme={null}
gasPrice: bigint;
```

The gas price for the transaction in Wei.

###### to

```ts theme={null}
to: `0x${string}`;
```

The contract address to send the transaction to.

###### value

```ts theme={null}
value: bigint;
```

The value to send with the transaction in Wei.

***

### EvmCall

Defined in: [client/evm/evm.types.ts:339](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L339)

A call to be executed in a user operation.

#### Properties

##### data

```ts theme={null}
data: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:349](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L349)

The call data to send. This is the hex-encoded data of the function call consisting of the method selector and the function arguments.

##### overrideGasLimit?

```ts theme={null}
optional overrideGasLimit: string;
```

Defined in: [client/evm/evm.types.ts:351](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L351)

The override gas limit.

##### to

```ts theme={null}
to: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:343](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L343)

The address the call is directed to.

##### value

```ts theme={null}
value: bigint;
```

Defined in: [client/evm/evm.types.ts:345](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L345)

The amount of ETH to send with the call, in wei.

***

### ExecuteSwapQuoteOptions

Defined in: [client/evm/evm.types.ts:224](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L224)

Options for executing a swap quote.

#### Properties

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:226](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L226)

Optional idempotency key for the request.

***

### ExecuteSwapQuoteResult

Defined in: [client/evm/evm.types.ts:232](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L232)

Result of executing a swap quote.

#### Properties

##### smartAccountAddress?

```ts theme={null}
optional smartAccountAddress: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:238](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L238)

The address of the smart account (for smart account swaps).

##### status?

```ts theme={null}
optional status: "broadcast";
```

Defined in: [client/evm/evm.types.ts:240](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L240)

The status of the user operation (for smart accounts swaps).

##### transactionHash?

```ts theme={null}
optional transactionHash: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:234](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L234)

The transaction hash of the executed swap (for EOA swaps).

##### userOpHash?

```ts theme={null}
optional userOpHash: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:236](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L236)

The user operation hash of the executed swap (for smart account swaps).

***

### ExportServerAccountOptions

Defined in: [client/evm/evm.types.ts:407](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L407)

Options for exporting an EVM server account.

#### Properties

##### address?

```ts theme={null}
optional address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:409](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L409)

The address of the account.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:413](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L413)

The idempotency key.

##### name?

```ts theme={null}
optional name: string;
```

Defined in: [client/evm/evm.types.ts:411](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L411)

The name of the account.

***

### GetOrCreateServerAccountOptions

Defined in: [client/evm/evm.types.ts:441](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L441)

Options for getting an EVM account, or creating one if it doesn't exist.

#### Properties

##### name

```ts theme={null}
name: string;
```

Defined in: [client/evm/evm.types.ts:443](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L443)

The name of the account.

***

### GetOrCreateSmartAccountOptions

Defined in: [client/evm/evm.types.ts:449](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L449)

Options for getting an EVM account, or creating one if it doesn't exist.

#### Properties

##### enableSpendPermissions?

```ts theme={null}
optional enableSpendPermissions: boolean;
```

Defined in: [client/evm/evm.types.ts:455](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L455)

The flag to enable spend permissions.

##### name

```ts theme={null}
name: string;
```

Defined in: [client/evm/evm.types.ts:451](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L451)

The name of the account.

##### owner

```ts theme={null}
owner: EvmAccount;
```

Defined in: [client/evm/evm.types.ts:453](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L453)

The owner of the account.

***

### GetServerAccountOptions

Defined in: [client/evm/evm.types.ts:419](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L419)

Options for getting an EVM account.

#### Properties

##### address?

```ts theme={null}
optional address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:421](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L421)

The address of the account.

##### name?

```ts theme={null}
optional name: string;
```

Defined in: [client/evm/evm.types.ts:423](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L423)

The name of the account.

***

### GetSmartAccountOptions

Defined in: [client/evm/evm.types.ts:429](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L429)

Options for getting an EVM smart account.

#### Properties

##### address?

```ts theme={null}
optional address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:431](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L431)

The address of the account.

##### name?

```ts theme={null}
optional name: string;
```

Defined in: [client/evm/evm.types.ts:435](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L435)

The name of the account.

##### owner

```ts theme={null}
owner: EvmAccount;
```

Defined in: [client/evm/evm.types.ts:433](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L433)

The owner of the account.

***

### GetSwapPriceOptions

Defined in: [client/evm/evm.types.ts:164](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L164)

Options for getting a swap price.

#### Properties

##### fromAmount

```ts theme={null}
fromAmount: bigint;
```

Defined in: [client/evm/evm.types.ts:172](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L172)

The amount to send in atomic units of the token.

##### fromToken

```ts theme={null}
fromToken: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:170](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L170)

The token to send (source token).

##### gasPrice?

```ts theme={null}
optional gasPrice: bigint;
```

Defined in: [client/evm/evm.types.ts:178](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L178)

The gas price in Wei.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:182](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L182)

The idempotency key.

##### network

```ts theme={null}
network: EvmSwapsNetwork;
```

Defined in: [client/evm/evm.types.ts:166](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L166)

The network to get a price from.

##### signerAddress?

```ts theme={null}
optional signerAddress: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:176](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L176)

The signer address (only needed if taker is a smart contract).

##### slippageBps?

```ts theme={null}
optional slippageBps: number;
```

Defined in: [client/evm/evm.types.ts:180](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L180)

The slippage tolerance in basis points (0-10000).

##### taker

```ts theme={null}
taker: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:174](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L174)

The address that will perform the swap.

##### toToken

```ts theme={null}
toToken: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:168](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L168)

The token to receive (destination token).

***

### GetSwapPriceResult

Defined in: [client/evm/evm.types.ts:188](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L188)

Result of getting a swap price.

#### Properties

##### blockNumber

```ts theme={null}
blockNumber: bigint;
```

Defined in: [client/evm/evm.types.ts:202](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L202)

The block number at which the liquidity conditions were examined.

##### fees

```ts theme={null}
fees: SwapFees;
```

Defined in: [client/evm/evm.types.ts:204](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L204)

The estimated fees for the swap.

##### fromAmount

```ts theme={null}
fromAmount: bigint;
```

Defined in: [client/evm/evm.types.ts:196](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L196)

The amount to send in atomic units of the token.

##### fromToken

```ts theme={null}
fromToken: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:194](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L194)

The token to send (source token).

##### gas?

```ts theme={null}
optional gas: bigint;
```

Defined in: [client/evm/evm.types.ts:208](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L208)

The gas estimate for the swap.

##### gasPrice?

```ts theme={null}
optional gasPrice: bigint;
```

Defined in: [client/evm/evm.types.ts:210](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L210)

The gas price in Wei.

##### issues

```ts theme={null}
issues: SwapIssues;
```

Defined in: [client/evm/evm.types.ts:206](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L206)

Potential issues discovered during validation.

##### liquidityAvailable

```ts theme={null}
liquidityAvailable: true;
```

Defined in: [client/evm/evm.types.ts:190](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L190)

Whether liquidity is available for the swap.

##### minToAmount

```ts theme={null}
minToAmount: bigint;
```

Defined in: [client/evm/evm.types.ts:200](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L200)

The minimum amount to receive after slippage in atomic units of the token.

##### toAmount

```ts theme={null}
toAmount: bigint;
```

Defined in: [client/evm/evm.types.ts:198](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L198)

The amount to receive in atomic units of the token.

##### toToken

```ts theme={null}
toToken: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:192](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L192)

The token to receive (destination token).

***

### GetUserOperationOptions

Defined in: [client/evm/evm.types.ts:297](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L297)

Options for getting a user operation.

#### Properties

##### smartAccount

```ts theme={null}
smartAccount: 
  | `0x${string}`
  | {
  address: `0x${string}`;
  getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
  listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
  name?: string;
  owners: EvmAccount[];
  policies: string[] | undefined;
  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: ...; signTypedData: ...; waitForUserOperation: ... } & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)))[K] } & { network: Network })[K] }>;
  useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
  waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
}
  | ReadonlySmartAccount;
```

Defined in: [client/evm/evm.types.ts:299](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L299)

The smart account.

###### Type Declaration

`` `0x${string}` ``

```ts theme={null}
{
  address: `0x${string}`;
  getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
  listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
  name?: string;
  owners: EvmAccount[];
  policies: string[] | undefined;
  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: ...; signTypedData: ...; waitForUserOperation: ... } & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)))[K] } & { network: Network })[K] }>;
  useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
  waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
}
```

###### address

```ts theme={null}
address: `0x${string}`;
```

The smart account's address.

###### getUserOperation()

```ts theme={null}
getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
```

Gets a user operation by its hash.

###### Parameters

###### options

`Omit`\<[`GetUserOperationOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#getuseroperationoptions), `"smartAccount"`>

Parameters for getting the user operation.

###### Returns

`Promise`\<[`UserOperation`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#useroperation)>

A promise that resolves to the user operation.

###### Example

```ts theme={null}
const userOp = await smartAccount.getUserOperation({
  userOpHash: "0x1234567890123456789012345678901234567890",
});
```

###### listTokenBalances()

```ts theme={null}
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
```

List the token balances of an account.

###### Parameters

###### options

`Omit`\<`ListTokenBalancesOptions`, `"address"`>

The options for the list token balances.

###### Returns

`Promise`\<`ListTokenBalancesResult`>

The result of the list token balances.

###### Example

```typescript theme={null}
const balances = await account.listTokenBalances({
  network: "base-sepolia",
});
```

###### name?

```ts theme={null}
optional name: string;
```

The name of the smart account.

###### owners

```ts theme={null}
owners: EvmAccount[];
```

Array of accounts that own and can sign for the smart account (currently only supports one owner but will be extended to support multiple owners in the future).

###### policies

```ts theme={null}
policies: string[] | undefined;
```

The list of policy IDs that apply to the smart account. This will include both the project-level policy and the account-level policy, if one exists.

###### quoteSwap()

```ts theme={null}
quoteSwap: (options: SmartAccountQuoteSwapOptions) => Promise<SmartAccountQuoteSwapResult>;
```

Creates a swap quote without executing the transaction.
This is useful when you need to get swap details before executing the swap.
The taker is automatically set to the smart account's address.

###### 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

```ts theme={null}
const swapQuote = await smartAccount.quoteSwap({
  network: "base",
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

if (swapQuote.liquidityAvailable) {
  console.log(`Can swap for ${swapQuote.toAmount} USDC`);
}
```

###### requestFaucet()

```ts theme={null}
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<RequestFaucetResult>;
```

Requests funds from an EVM faucet.

###### 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

```ts theme={null}
const result = await account.requestFaucet({
  network: "base-sepolia",
  token: "eth",
});
```

###### sendUserOperation()

```ts theme={null}
sendUserOperation: (options: Omit<SendUserOperationOptions<unknown[]>, "smartAccount">) => Promise<SendUserOperationReturnType>;
```

Sends a user operation.

###### 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

```ts theme={null}
const userOp = await smartAccount.sendUserOperation({
  network: "base-sepolia",
  calls: [
    {
      to: "0x1234567890123456789012345678901234567890",
      value: parseEther("0.000001"),
      data: "0x",
    },
  ],
});
```

###### signTypedData()

```ts theme={null}
signTypedData: (options: Omit<SignTypedDataOptions, "address"> & {
  network: KnownEvmNetworks;
}) => Promise<`0x${string}`>;
```

Signs a typed data message.

###### Parameters

###### options

`Omit`\<[`SignTypedDataOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#signtypeddataoptions), `"address"`> & \{
`network`: `KnownEvmNetworks`;
}

Configuration options for signing the typed data.

###### Returns

`Promise`\<`` `0x${string}` ``>

A promise that resolves to the signature.

###### Example

```ts theme={null}
const signature = await smartAccount.signTypedData({
  network: "base-sepolia",
  typedData: {
    domain: {
      name: "Test",
      chainId: 84532,
      verifyingContract: "0x0000000000000000000000000000000000000000",
    },
    types: {
      Test: [{ name: "name", type: "string" }],
    },
    primaryType: "Test",
    message: {
      name: "John Doe",
    },
  },
});
```

###### swap()

```ts theme={null}
swap: (options: SmartAccountSwapOptions) => Promise<SmartAccountSwapResult>;
```

Executes a token swap on the specified network via a user operation.
This method handles all the steps required for a swap, including Permit2 signatures if needed.
The taker is automatically set to the smart account's address.

###### 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

```ts theme={null}
// First create a swap quote
const swapQuote = await cdp.evm.createSwapQuote({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
  taker: smartAccount.address,
  signerAddress: smartAccount.owners[0].address
});

// Check if liquidity is available
if (!swapQuote.liquidityAvailable) {
  console.error("Insufficient liquidity for swap");
  return;
}

// Execute the swap
const { userOpHash } = await smartAccount.swap({
  swapQuote: swapQuote
});

console.log(`Swap executed with user op hash: ${userOpHash}`);
```

```ts theme={null}
// Create and execute swap in one call
const { userOpHash } = await smartAccount.swap({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

console.log(`Swap executed with user op hash: ${userOpHash}`);
```

###### transfer()

```ts theme={null}
transfer: (options: SmartAccountTransferOptions) => Promise<SendUserOperationReturnType>;
```

Transfer an amount of a token from an account to another account.

###### Parameters

###### options

`SmartAccountTransferOptions`

The options for the transfer.

###### Returns

`Promise`\<`SendUserOperationReturnType`>

The user operation result.

###### Examples

```typescript theme={null}
const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

**Using parseUnits to specify USDC amount**

```typescript theme={null}
import { parseUnits } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseUnits("0.01", 6), // USDC uses 6 decimal places
  token: "usdc",
  network: "base-sepolia",
});
```

**Transfer ETH**

```typescript theme={null}
import { parseEther } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "eth",
  network: "base-sepolia",
});
```

**Using a contract address**

```typescript theme={null}
import { parseEther } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "0x4200000000000000000000000000000000000006", // WETH on Base Sepolia
  network: "base-sepolia",
});
```

**Transfer to another account**

```typescript theme={null}
const sender = await cdp.evm.createAccount({ name: "Sender" });
const receiver = await cdp.evm.createAccount({ name: "Receiver" });

const { userOpHash } = await sender.transfer({
  to: receiver,
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

###### type

```ts theme={null}
type: "evm-smart";
```

Identifier for the smart account type.

###### useNetwork()

```ts theme={null}
useNetwork: <Network>(network: Network) => 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] }>;
```

A function that returns a network-scoped smart account.

###### Type Parameters

###### Network

`Network` *extends* `NetworkOrRpcUrl`

###### Parameters

###### network

`Network`

The network name or RPC URL

###### Returns

`Promise`\<\&#123; \[K in string | number | symbol]: (Omit\<EvmSmartAccountProperties, "useNetwork"> & \&#123; \[K in string | number | symbol]: (\&#123; getUserOperation: ...; sendUserOperation: ...; signTypedData: ...; waitForUserOperation: ... \&#125; & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)))\[K] } & \&#123; network: Network \&#125;)\[K] }>

###### Example

```ts theme={null}
// For known networks, type is inferred automatically:
const baseAccount = await smartAccount.useNetwork("base");

// For custom RPC URLs with type hints (requires casting):
const typedAccount = await smartAccount.useNetwork<"base">("https://mainnet.base.org" as "base");

// For custom RPC URLs without type hints (only sendTransaction, transfer and waitForTransactionReceipt methods available):
const customAccount = await smartAccount.useNetwork("https://mainnet.base.org");
```

###### useSpendPermission()

```ts theme={null}
useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
```

Uses a spend permission to execute a transaction via user operation.
This allows the smart account to spend tokens that have been approved via a spend permission.

###### 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

```typescript theme={null}
const spendPermission = {
  account: "0x1234...", // Smart account that owns the tokens
  spender: smartAccount.address, // This smart account that can spend
  token: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH
  allowance: parseEther("0.01"),
  period: 86400, // 1 day
  start: 0,
  end: 281474976710655,
  salt: 0n,
  extraData: "0x",
};

const result = await smartAccount.useSpendPermission({
  spendPermission,
  value: parseEther("0.001"), // Spend 0.001 ETH
  network: "base-sepolia",
});
```

###### waitForUserOperation()

```ts theme={null}
waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
```

Waits for a user operation to complete or fail.

###### Parameters

###### options

`Omit`\<`WaitForUserOperationOptions`, `"smartAccountAddress"`>

Parameters for waiting for the user operation.

###### Returns

`Promise`\<`WaitForUserOperationReturnType`>

A promise that resolves to the transaction receipt.

###### Example

```ts theme={null}
// Send a user operation and get the user operation hash
const { userOpHash } = await smartAccount.sendUserOperation({
  network: "base-sepolia",
  calls: [
    {
      to: "0x0000000000000000000000000000000000000000",
      value: parseEther("0.000001"),
      data: "0x",
    },
  ],
});

// Wait for the user operation to complete or fail
const result = await smartAccount.waitForUserOperation({
  userOpHash: userOp.userOpHash,
});
```

[`ReadonlySmartAccount`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#readonlysmartaccount)

##### userOpHash

```ts theme={null}
userOpHash: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:301](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L301)

The user operation hash.

***

### ImportServerAccountOptions

Defined in: [client/evm/evm.types.ts:393](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L393)

Options for importing an EVM server account.

#### Properties

##### encryptionPublicKey?

```ts theme={null}
optional encryptionPublicKey: string;
```

Defined in: [client/evm/evm.types.ts:395](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L395)

The public RSA key used to encrypt the private key when importing an EVM account.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:399](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L399)

The idempotency key.

##### name?

```ts theme={null}
optional name: string;
```

Defined in: [client/evm/evm.types.ts:397](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L397)

The name of the account.

##### privateKey

```ts theme={null}
privateKey: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:401](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L401)

The private key of the account.

***

### ListServerAccountResult

Defined in: [client/evm/evm.types.ts:545](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L545)

The result of listing EVM server accounts.

#### Properties

##### accounts

```ts theme={null}
accounts: {
  address: `0x${string}`;
  listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
  name?: string;
  policies?: string[];
  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}`; 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] }>;
  useSpendPermission: (options: UseSpendPermissionOptions) => Promise<TransactionResult>;
}[];
```

Defined in: [client/evm/evm.types.ts:547](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L547)

The accounts.

###### address

```ts theme={null}
address: `0x${string}`;
```

The address of the signer.

###### listTokenBalances()

```ts theme={null}
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
```

List the token balances of an account.

###### Parameters

###### options

`Omit`\<`ListTokenBalancesOptions`, `"address"`>

The options for the list token balances.

###### Returns

`Promise`\<`ListTokenBalancesResult`>

The result of the list token balances.

###### Example

```typescript theme={null}
const balances = await account.listTokenBalances({
  network: "base-sepolia",
});
```

###### name?

```ts theme={null}
optional name: string;
```

Optional name for the server account.

###### policies?

```ts theme={null}
optional policies: string[];
```

A list of Policy ID's that apply to the account.

###### quoteSwap()

```ts theme={null}
quoteSwap: (options: AccountQuoteSwapOptions) => Promise<AccountQuoteSwapResult>;
```

Creates a swap quote without executing the transaction.
This is useful when you need to get swap details before executing the swap.
The taker is automatically set to the account's address.

###### 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

```ts theme={null}
const swapQuote = await account.quoteSwap({
  network: "base",
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

if (swapQuote.liquidityAvailable) {
  console.log(`Can swap for ${swapQuote.toAmount} USDC`);
}
```

###### requestFaucet()

```ts theme={null}
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<RequestFaucetResult>;
```

Requests funds from an EVM faucet.

###### 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

```ts theme={null}
const result = await account.requestFaucet({
  network: "base-sepolia",
  token: "eth",
});
```

###### sendTransaction()

```ts theme={null}
sendTransaction: (options: Omit<SendTransactionOptions, "address">) => Promise<TransactionResult>;
```

Signs an EVM transaction and sends it to the specified network using the Coinbase API.
This method handles nonce management and gas estimation automatically.

###### 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 transaction**

```ts theme={null}
import { parseEther, serializeTransaction } from "viem";
import { baseSepolia } from "viem/chains";

const { transactionHash } = await account.sendTransaction({
  transaction: serializeTransaction({
    to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
    value: parseEther("0.000001"),
    chainId: baseSepolia.id,
    // Fields below are optional, CDP API will populate them if omitted.
    // nonce
    // maxPriorityFeePerGas
    // maxFeePerGas
    // gas
  }),
  network: "base-sepolia",
});
```

**Sending an EIP-1559 transaction request object**

```ts theme={null}
const { transactionHash } = await account.sendTransaction({
  transaction: {
    to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
    value: parseEther("0.000001"),
    // Fields below are optional, CDP API will populate them if omitted.
    // nonce
    // maxPriorityFeePerGas
    // maxFeePerGas
    // gas
  },
  network: "base-sepolia",
});
```

###### sign()

```ts theme={null}
sign: (parameters: {
  hash: `0x${string}`;
}) => Promise<`0x${string}`>;
```

Signs a message hash and returns the signature as a hex string.

###### Parameters

###### parameters

###### hash

`` `0x${string}` ``

###### Returns

`Promise`\<`` `0x${string}` ``>

###### signMessage()

```ts theme={null}
signMessage: (parameters: {
  message: SignableMessage;
}) => Promise<`0x${string}`>;
```

Signs a message and returns the signature as a hex string.

###### Parameters

###### parameters

###### message

`SignableMessage`

###### Returns

`Promise`\<`` `0x${string}` ``>

###### signTransaction()

```ts theme={null}
signTransaction: (transaction: TransactionSerializable) => Promise<`0x${string}`>;
```

Signs a transaction and returns the signed transaction as a hex string.

###### Parameters

###### transaction

`TransactionSerializable`

###### Returns

`Promise`\<`` `0x${string}` ``>

###### signTypedData()

```ts theme={null}
signTypedData: <typedData, primaryType>(parameters: TypedDataDefinition<typedData, primaryType>) => Promise<`0x${string}`>;
```

Signs a typed data and returns the signature as a hex string.

###### 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()

```ts theme={null}
swap: (options: AccountSwapOptions) => Promise<SendSwapTransactionResult>;
```

Executes a token swap on the specified network.
This method handles all the steps required for a swap, including Permit2 signatures if needed.
The taker is automatically set to the account's address.

###### 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

```ts theme={null}
// First create a swap quote
const swapQuote = await cdp.evm.createSwapQuote({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
  taker: account.address
});

// Check if liquidity is available
if (!swapQuote.liquidityAvailable) {
  console.error("Insufficient liquidity for swap");
  return;
}

// Execute the swap
const { transactionHash } = await account.swap({
  swapQuote: swapQuote
});

console.log(`Swap executed with transaction hash: ${transactionHash}`);
```

```ts theme={null}
// Create and execute swap in one call
const { transactionHash } = await account.swap({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

console.log(`Swap executed with transaction hash: ${transactionHash}`);
```

###### transfer()

```ts theme={null}
transfer: (options: TransferOptions) => Promise<{
  transactionHash: `0x${string}`;
}>;
```

Transfer an amount of a token from an account to another account.

###### Parameters

###### options

`TransferOptions`

The options for the transfer.

###### Returns

`Promise`\<\{
`transactionHash`: `` `0x${string}` ``;
}>

An object containing the transaction hash.

###### Examples

```typescript theme={null}
const { transactionHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

**Using parseUnits to specify USDC amount**

```typescript theme={null}
import { parseUnits } from "viem";

const { transactionHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseUnits("0.01", 6), // USDC uses 6 decimal places
  token: "usdc",
  network: "base-sepolia",
});
```

**Transfer ETH**

```typescript theme={null}
import { parseEther } from "viem";

const { transactionHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "eth",
  network: "base-sepolia",
});
```

**Using a contract address**

```typescript theme={null}
import { parseEther } from "viem";

const { transactionHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "0x4200000000000000000000000000000000000006", // WETH on Base Sepolia
  network: "base-sepolia",
});
```

**Transfer to another account**

```typescript theme={null}
const sender = await cdp.evm.createAccount({ name: "Sender" });
const receiver = await cdp.evm.createAccount({ name: "Receiver" });

const { transactionHash } = await sender.transfer({
  to: receiver,
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

###### type

```ts theme={null}
type: "evm-server";
```

Indicates this is a server-managed account.

###### useNetwork()

```ts theme={null}
useNetwork: <Network>(network: Network) => 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] }>;
```

A function that returns a network-scoped server-managed account.

###### Type Parameters

###### Network

`Network` *extends* `NetworkOrRpcUrl`

###### Parameters

###### network

`Network`

The network name or RPC URL

###### Returns

`Promise`\<\&#123; \[K in string | number | symbol]: (Omit\<\&#123; address: \`0x$\&#123;string\&#125;\`; 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$\&#123;string\&#125;\`; sign: (parameters: \{ hash: \`0x$\&#123;string\&#125;\`; \}) =\> Promise\<\`0x$\&#123;string\&#125;\`>; signMessage: (parameters: \&#123; message: SignableMessage; \&#125;) => Promise\<...>; ... 12 more ...; useNetwork: ...; }, keyof Actions | ... 5 mor...; useSpendPermission: (options: UseSpendPermissionOptions) => Promise\<(...)> }, (keyof Actions) | "transfer" | "sendTransaction" | "quoteSwap" | "swap" | "useSpendPermission" | "useNetwork"> & \&#123; \[K in string | number | symbol]: (\&#123; sendTransaction: ...; transfer: ...; waitForTransactionReceipt: ... \&#125; & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)))\[K] } & \&#123; network: Network \&#125;)\[K] }>

###### Example

```ts theme={null}
// For known networks, type is inferred automatically:
const baseAccount = await account.useNetwork("base");

// For custom RPC URLs with type hints (requires casting):
const typedAccount = await account.useNetwork<"base">("https://mainnet.base.org" as "base");

// For custom RPC URLs without type hints (only sendTransaction and waitForTransactionReceipt methods available):
const customAccount = await account.useNetwork("https://mainnet.base.org");
```

###### useSpendPermission()

```ts theme={null}
useSpendPermission: (options: UseSpendPermissionOptions) => Promise<TransactionResult>;
```

Uses a spend permission to execute a transaction.
This allows the account to spend tokens that have been approved via a spend permission.

###### 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

```typescript theme={null}
const spendPermission = {
  account: "0x1234...", // Smart account that owns the tokens
  spender: account.address, // This account that can spend
  token: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH
  allowance: parseEther("0.01"),
  period: 86400, // 1 day
  start: 0,
  end: 281474976710655,
  salt: 0n,
  extraData: "0x",
};

const result = await account.useSpendPermission({
  spendPermission,
  value: parseEther("0.001"), // Spend 0.001 ETH
  network: "base-sepolia",
});
```

##### nextPageToken?

```ts theme={null}
optional nextPageToken: string;
```

Defined in: [client/evm/evm.types.ts:552](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L552)

The next page token to paginate through the accounts.
If undefined, there are no more accounts to paginate through.

***

### ListServerAccountsOptions

Defined in: [client/evm/evm.types.ts:461](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L461)

Options for listing EVM accounts.

#### Properties

##### pageSize?

```ts theme={null}
optional pageSize: number;
```

Defined in: [client/evm/evm.types.ts:463](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L463)

The page size to paginate through the accounts.

##### pageToken?

```ts theme={null}
optional pageToken: string;
```

Defined in: [client/evm/evm.types.ts:465](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L465)

The page token to paginate through the accounts.

***

### ListSmartAccountResult

Defined in: [client/evm/evm.types.ts:532](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L532)

The result of listing EVM smart accounts.

#### Properties

##### accounts

```ts theme={null}
accounts: ReadonlySmartAccount[];
```

Defined in: [client/evm/evm.types.ts:534](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L534)

The accounts.

##### nextPageToken?

```ts theme={null}
optional nextPageToken: string;
```

Defined in: [client/evm/evm.types.ts:539](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L539)

The next page token to paginate through the accounts.
If undefined, there are no more accounts to paginate through.

***

### ListSmartAccountsOptions

Defined in: [client/evm/evm.types.ts:558](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L558)

Options for listing EVM smart accounts.

#### Properties

##### name?

```ts theme={null}
optional name: string;
```

Defined in: [client/evm/evm.types.ts:560](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L560)

The name of the account.

##### pageSize?

```ts theme={null}
optional pageSize: number;
```

Defined in: [client/evm/evm.types.ts:562](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L562)

The page size to paginate through the accounts.

##### pageToken?

```ts theme={null}
optional pageToken: string;
```

Defined in: [client/evm/evm.types.ts:564](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L564)

The page token to paginate through the accounts.

***

### PrepareAndSendUserOperationOptions

Defined in: [client/evm/evm.types.ts:323](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L323)

Options for preparing and sending a user operation.

#### Properties

##### calls

```ts theme={null}
calls: readonly {
  data: `0x${string}`;
  overrideGasLimit?: string;
  to: `0x${string}`;
  value: bigint;
}[];
```

Defined in: [client/evm/evm.types.ts:329](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L329)

The calls.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:333](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L333)

An optional idempotency key.

##### network

```ts theme={null}
network: EvmUserOperationNetwork;
```

Defined in: [client/evm/evm.types.ts:327](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L327)

The network.

##### paymasterUrl?

```ts theme={null}
optional paymasterUrl: string;
```

Defined in: [client/evm/evm.types.ts:331](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L331)

The paymaster URL.

##### smartAccount

```ts theme={null}
smartAccount: {
  address: `0x${string}`;
  getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
  listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
  name?: string;
  owners: EvmAccount[];
  policies: string[] | undefined;
  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: (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] }>;
  useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
  waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
};
```

Defined in: [client/evm/evm.types.ts:325](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L325)

The smart account.

###### address

```ts theme={null}
address: `0x${string}`;
```

The smart account's address.

###### getUserOperation()

```ts theme={null}
getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
```

Gets a user operation by its hash.

###### Parameters

###### options

`Omit`\<[`GetUserOperationOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#getuseroperationoptions), `"smartAccount"`>

Parameters for getting the user operation.

###### Returns

`Promise`\<[`UserOperation`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#useroperation)>

A promise that resolves to the user operation.

###### Example

```ts theme={null}
const userOp = await smartAccount.getUserOperation({
  userOpHash: "0x1234567890123456789012345678901234567890",
});
```

###### listTokenBalances()

```ts theme={null}
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
```

List the token balances of an account.

###### Parameters

###### options

`Omit`\<`ListTokenBalancesOptions`, `"address"`>

The options for the list token balances.

###### Returns

`Promise`\<`ListTokenBalancesResult`>

The result of the list token balances.

###### Example

```typescript theme={null}
const balances = await account.listTokenBalances({
  network: "base-sepolia",
});
```

###### name?

```ts theme={null}
optional name: string;
```

The name of the smart account.

###### owners

```ts theme={null}
owners: EvmAccount[];
```

Array of accounts that own and can sign for the smart account (currently only supports one owner but will be extended to support multiple owners in the future).

###### policies

```ts theme={null}
policies: string[] | undefined;
```

The list of policy IDs that apply to the smart account. This will include both the project-level policy and the account-level policy, if one exists.

###### quoteSwap()

```ts theme={null}
quoteSwap: (options: SmartAccountQuoteSwapOptions) => Promise<SmartAccountQuoteSwapResult>;
```

Creates a swap quote without executing the transaction.
This is useful when you need to get swap details before executing the swap.
The taker is automatically set to the smart account's address.

###### 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

```ts theme={null}
const swapQuote = await smartAccount.quoteSwap({
  network: "base",
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

if (swapQuote.liquidityAvailable) {
  console.log(`Can swap for ${swapQuote.toAmount} USDC`);
}
```

###### requestFaucet()

```ts theme={null}
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<RequestFaucetResult>;
```

Requests funds from an EVM faucet.

###### 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

```ts theme={null}
const result = await account.requestFaucet({
  network: "base-sepolia",
  token: "eth",
});
```

###### sendUserOperation()

```ts theme={null}
sendUserOperation: (options: Omit<SendUserOperationOptions<unknown[]>, "smartAccount">) => Promise<SendUserOperationReturnType>;
```

Sends a user operation.

###### 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

```ts theme={null}
const userOp = await smartAccount.sendUserOperation({
  network: "base-sepolia",
  calls: [
    {
      to: "0x1234567890123456789012345678901234567890",
      value: parseEther("0.000001"),
      data: "0x",
    },
  ],
});
```

###### signTypedData()

```ts theme={null}
signTypedData: (options: Omit<SignTypedDataOptions, "address"> & {
  network: KnownEvmNetworks;
}) => Promise<`0x${string}`>;
```

Signs a typed data message.

###### Parameters

###### options

`Omit`\<[`SignTypedDataOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#signtypeddataoptions), `"address"`> & \{
`network`: `KnownEvmNetworks`;
}

Configuration options for signing the typed data.

###### Returns

`Promise`\<`` `0x${string}` ``>

A promise that resolves to the signature.

###### Example

```ts theme={null}
const signature = await smartAccount.signTypedData({
  network: "base-sepolia",
  typedData: {
    domain: {
      name: "Test",
      chainId: 84532,
      verifyingContract: "0x0000000000000000000000000000000000000000",
    },
    types: {
      Test: [{ name: "name", type: "string" }],
    },
    primaryType: "Test",
    message: {
      name: "John Doe",
    },
  },
});
```

###### swap()

```ts theme={null}
swap: (options: SmartAccountSwapOptions) => Promise<SmartAccountSwapResult>;
```

Executes a token swap on the specified network via a user operation.
This method handles all the steps required for a swap, including Permit2 signatures if needed.
The taker is automatically set to the smart account's address.

###### 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

```ts theme={null}
// First create a swap quote
const swapQuote = await cdp.evm.createSwapQuote({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
  taker: smartAccount.address,
  signerAddress: smartAccount.owners[0].address
});

// Check if liquidity is available
if (!swapQuote.liquidityAvailable) {
  console.error("Insufficient liquidity for swap");
  return;
}

// Execute the swap
const { userOpHash } = await smartAccount.swap({
  swapQuote: swapQuote
});

console.log(`Swap executed with user op hash: ${userOpHash}`);
```

```ts theme={null}
// Create and execute swap in one call
const { userOpHash } = await smartAccount.swap({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

console.log(`Swap executed with user op hash: ${userOpHash}`);
```

###### transfer()

```ts theme={null}
transfer: (options: SmartAccountTransferOptions) => Promise<SendUserOperationReturnType>;
```

Transfer an amount of a token from an account to another account.

###### Parameters

###### options

`SmartAccountTransferOptions`

The options for the transfer.

###### Returns

`Promise`\<`SendUserOperationReturnType`>

The user operation result.

###### Examples

```typescript theme={null}
const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

**Using parseUnits to specify USDC amount**

```typescript theme={null}
import { parseUnits } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseUnits("0.01", 6), // USDC uses 6 decimal places
  token: "usdc",
  network: "base-sepolia",
});
```

**Transfer ETH**

```typescript theme={null}
import { parseEther } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "eth",
  network: "base-sepolia",
});
```

**Using a contract address**

```typescript theme={null}
import { parseEther } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "0x4200000000000000000000000000000000000006", // WETH on Base Sepolia
  network: "base-sepolia",
});
```

**Transfer to another account**

```typescript theme={null}
const sender = await cdp.evm.createAccount({ name: "Sender" });
const receiver = await cdp.evm.createAccount({ name: "Receiver" });

const { userOpHash } = await sender.transfer({
  to: receiver,
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

###### type

```ts theme={null}
type: "evm-smart";
```

Identifier for the smart account type.

###### useNetwork()

```ts theme={null}
useNetwork: <Network>(network: Network) => 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] }>;
```

A function that returns a network-scoped smart account.

###### Type Parameters

###### Network

`Network` *extends* `NetworkOrRpcUrl`

###### Parameters

###### network

`Network`

The network name or RPC URL

###### Returns

`Promise`\<\&#123; \[K in string | number | symbol]: (Omit\<EvmSmartAccountProperties, "useNetwork"> & \&#123; \[K in string | number | symbol]: (\&#123; getUserOperation: (options: ...) => ...; sendUserOperation: (options: ...) => ...; signTypedData: (options: ...) => ...; waitForUserOperation: (options: ...) => ... \&#125; & (Network extends TransferNetworks ? \&#123; transfer: ... \&#125; : EmptyObject) & (Network extends ListTokenBalancesNetworks ? \&#123; listTokenBalances: ... \&#125; : EmptyObject) & (Network extends RequestFaucetNetworks ? \&#123; requestFaucet: ... \&#125; : EmptyObject) & (Network extends QuoteSwapNetworks ? \&#123; quoteSwap: ... \&#125; : EmptyObject) & (Network extends SwapNetworks ? \&#123; swap: ... \&#125; : EmptyObject) & (Network extends SpendPermissionNetwork ? \&#123; useSpendPermission: ... \&#125; : EmptyObject))\[K] } & \&#123; network: Network \&#125;)\[K] }>

###### Example

```ts theme={null}
// For known networks, type is inferred automatically:
const baseAccount = await smartAccount.useNetwork("base");

// For custom RPC URLs with type hints (requires casting):
const typedAccount = await smartAccount.useNetwork<"base">("https://mainnet.base.org" as "base");

// For custom RPC URLs without type hints (only sendTransaction, transfer and waitForTransactionReceipt methods available):
const customAccount = await smartAccount.useNetwork("https://mainnet.base.org");
```

###### useSpendPermission()

```ts theme={null}
useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
```

Uses a spend permission to execute a transaction via user operation.
This allows the smart account to spend tokens that have been approved via a spend permission.

###### 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

```typescript theme={null}
const spendPermission = {
  account: "0x1234...", // Smart account that owns the tokens
  spender: smartAccount.address, // This smart account that can spend
  token: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH
  allowance: parseEther("0.01"),
  period: 86400, // 1 day
  start: 0,
  end: 281474976710655,
  salt: 0n,
  extraData: "0x",
};

const result = await smartAccount.useSpendPermission({
  spendPermission,
  value: parseEther("0.001"), // Spend 0.001 ETH
  network: "base-sepolia",
});
```

###### waitForUserOperation()

```ts theme={null}
waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
```

Waits for a user operation to complete or fail.

###### Parameters

###### options

`Omit`\<`WaitForUserOperationOptions`, `"smartAccountAddress"`>

Parameters for waiting for the user operation.

###### Returns

`Promise`\<`WaitForUserOperationReturnType`>

A promise that resolves to the transaction receipt.

###### Example

```ts theme={null}
// Send a user operation and get the user operation hash
const { userOpHash } = await smartAccount.sendUserOperation({
  network: "base-sepolia",
  calls: [
    {
      to: "0x0000000000000000000000000000000000000000",
      value: parseEther("0.000001"),
      data: "0x",
    },
  ],
});

// Wait for the user operation to complete or fail
const result = await smartAccount.waitForUserOperation({
  userOpHash: userOp.userOpHash,
});
```

***

### PrepareUserOperationOptions

Defined in: [client/evm/evm.types.ts:307](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L307)

Options for preparing a user operation.

#### Properties

##### calls

```ts theme={null}
calls: readonly {
  data: `0x${string}`;
  overrideGasLimit?: string;
  to: `0x${string}`;
  value: bigint;
}[];
```

Defined in: [client/evm/evm.types.ts:313](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L313)

The calls.

##### dataSuffix?

```ts theme={null}
optional dataSuffix: string;
```

Defined in: [client/evm/evm.types.ts:317](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L317)

Optional data suffix (EIP-8021) to enable transaction attribution.

##### network

```ts theme={null}
network: EvmUserOperationNetwork;
```

Defined in: [client/evm/evm.types.ts:311](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L311)

The network.

##### paymasterUrl?

```ts theme={null}
optional paymasterUrl: string;
```

Defined in: [client/evm/evm.types.ts:315](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L315)

The paymaster URL.

##### smartAccount

```ts theme={null}
smartAccount: {
  address: `0x${string}`;
  getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
  listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
  name?: string;
  owners: EvmAccount[];
  policies: string[] | undefined;
  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: (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] }>;
  useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
  waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
};
```

Defined in: [client/evm/evm.types.ts:309](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L309)

The smart account.

###### address

```ts theme={null}
address: `0x${string}`;
```

The smart account's address.

###### getUserOperation()

```ts theme={null}
getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount">) => Promise<UserOperation>;
```

Gets a user operation by its hash.

###### Parameters

###### options

`Omit`\<[`GetUserOperationOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#getuseroperationoptions), `"smartAccount"`>

Parameters for getting the user operation.

###### Returns

`Promise`\<[`UserOperation`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#useroperation)>

A promise that resolves to the user operation.

###### Example

```ts theme={null}
const userOp = await smartAccount.getUserOperation({
  userOpHash: "0x1234567890123456789012345678901234567890",
});
```

###### listTokenBalances()

```ts theme={null}
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
```

List the token balances of an account.

###### Parameters

###### options

`Omit`\<`ListTokenBalancesOptions`, `"address"`>

The options for the list token balances.

###### Returns

`Promise`\<`ListTokenBalancesResult`>

The result of the list token balances.

###### Example

```typescript theme={null}
const balances = await account.listTokenBalances({
  network: "base-sepolia",
});
```

###### name?

```ts theme={null}
optional name: string;
```

The name of the smart account.

###### owners

```ts theme={null}
owners: EvmAccount[];
```

Array of accounts that own and can sign for the smart account (currently only supports one owner but will be extended to support multiple owners in the future).

###### policies

```ts theme={null}
policies: string[] | undefined;
```

The list of policy IDs that apply to the smart account. This will include both the project-level policy and the account-level policy, if one exists.

###### quoteSwap()

```ts theme={null}
quoteSwap: (options: SmartAccountQuoteSwapOptions) => Promise<SmartAccountQuoteSwapResult>;
```

Creates a swap quote without executing the transaction.
This is useful when you need to get swap details before executing the swap.
The taker is automatically set to the smart account's address.

###### 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

```ts theme={null}
const swapQuote = await smartAccount.quoteSwap({
  network: "base",
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

if (swapQuote.liquidityAvailable) {
  console.log(`Can swap for ${swapQuote.toAmount} USDC`);
}
```

###### requestFaucet()

```ts theme={null}
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<RequestFaucetResult>;
```

Requests funds from an EVM faucet.

###### 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

```ts theme={null}
const result = await account.requestFaucet({
  network: "base-sepolia",
  token: "eth",
});
```

###### sendUserOperation()

```ts theme={null}
sendUserOperation: (options: Omit<SendUserOperationOptions<unknown[]>, "smartAccount">) => Promise<SendUserOperationReturnType>;
```

Sends a user operation.

###### 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

```ts theme={null}
const userOp = await smartAccount.sendUserOperation({
  network: "base-sepolia",
  calls: [
    {
      to: "0x1234567890123456789012345678901234567890",
      value: parseEther("0.000001"),
      data: "0x",
    },
  ],
});
```

###### signTypedData()

```ts theme={null}
signTypedData: (options: Omit<SignTypedDataOptions, "address"> & {
  network: KnownEvmNetworks;
}) => Promise<`0x${string}`>;
```

Signs a typed data message.

###### Parameters

###### options

`Omit`\<[`SignTypedDataOptions`](/sdks/cdp-sdks-v2/typescript/evm/Types/index#signtypeddataoptions), `"address"`> & \{
`network`: `KnownEvmNetworks`;
}

Configuration options for signing the typed data.

###### Returns

`Promise`\<`` `0x${string}` ``>

A promise that resolves to the signature.

###### Example

```ts theme={null}
const signature = await smartAccount.signTypedData({
  network: "base-sepolia",
  typedData: {
    domain: {
      name: "Test",
      chainId: 84532,
      verifyingContract: "0x0000000000000000000000000000000000000000",
    },
    types: {
      Test: [{ name: "name", type: "string" }],
    },
    primaryType: "Test",
    message: {
      name: "John Doe",
    },
  },
});
```

###### swap()

```ts theme={null}
swap: (options: SmartAccountSwapOptions) => Promise<SmartAccountSwapResult>;
```

Executes a token swap on the specified network via a user operation.
This method handles all the steps required for a swap, including Permit2 signatures if needed.
The taker is automatically set to the smart account's address.

###### 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

```ts theme={null}
// First create a swap quote
const swapQuote = await cdp.evm.createSwapQuote({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
  taker: smartAccount.address,
  signerAddress: smartAccount.owners[0].address
});

// Check if liquidity is available
if (!swapQuote.liquidityAvailable) {
  console.error("Insufficient liquidity for swap");
  return;
}

// Execute the swap
const { userOpHash } = await smartAccount.swap({
  swapQuote: swapQuote
});

console.log(`Swap executed with user op hash: ${userOpHash}`);
```

```ts theme={null}
// Create and execute swap in one call
const { userOpHash } = await smartAccount.swap({
  network: "base",
  toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
  fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
});

console.log(`Swap executed with user op hash: ${userOpHash}`);
```

###### transfer()

```ts theme={null}
transfer: (options: SmartAccountTransferOptions) => Promise<SendUserOperationReturnType>;
```

Transfer an amount of a token from an account to another account.

###### Parameters

###### options

`SmartAccountTransferOptions`

The options for the transfer.

###### Returns

`Promise`\<`SendUserOperationReturnType`>

The user operation result.

###### Examples

```typescript theme={null}
const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

**Using parseUnits to specify USDC amount**

```typescript theme={null}
import { parseUnits } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseUnits("0.01", 6), // USDC uses 6 decimal places
  token: "usdc",
  network: "base-sepolia",
});
```

**Transfer ETH**

```typescript theme={null}
import { parseEther } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "eth",
  network: "base-sepolia",
});
```

**Using a contract address**

```typescript theme={null}
import { parseEther } from "viem";

const { userOpHash } = await sender.transfer({
  to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
  amount: parseEther("0.000001"),
  token: "0x4200000000000000000000000000000000000006", // WETH on Base Sepolia
  network: "base-sepolia",
});
```

**Transfer to another account**

```typescript theme={null}
const sender = await cdp.evm.createAccount({ name: "Sender" });
const receiver = await cdp.evm.createAccount({ name: "Receiver" });

const { userOpHash } = await sender.transfer({
  to: receiver,
  amount: 10000n, // equivalent to 0.01 USDC
  token: "usdc",
  network: "base-sepolia",
});
```

###### type

```ts theme={null}
type: "evm-smart";
```

Identifier for the smart account type.

###### useNetwork()

```ts theme={null}
useNetwork: <Network>(network: Network) => 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] }>;
```

A function that returns a network-scoped smart account.

###### Type Parameters

###### Network

`Network` *extends* `NetworkOrRpcUrl`

###### Parameters

###### network

`Network`

The network name or RPC URL

###### Returns

`Promise`\<\&#123; \[K in string | number | symbol]: (Omit\<EvmSmartAccountProperties, "useNetwork"> & \&#123; \[K in string | number | symbol]: (\&#123; getUserOperation: (options: ...) => ...; sendUserOperation: (options: ...) => ...; signTypedData: (options: ...) => ...; waitForUserOperation: (options: ...) => ... \&#125; & (Network extends TransferNetworks ? \&#123; transfer: ... \&#125; : EmptyObject) & (Network extends ListTokenBalancesNetworks ? \&#123; listTokenBalances: ... \&#125; : EmptyObject) & (Network extends RequestFaucetNetworks ? \&#123; requestFaucet: ... \&#125; : EmptyObject) & (Network extends QuoteSwapNetworks ? \&#123; quoteSwap: ... \&#125; : EmptyObject) & (Network extends SwapNetworks ? \&#123; swap: ... \&#125; : EmptyObject) & (Network extends SpendPermissionNetwork ? \&#123; useSpendPermission: ... \&#125; : EmptyObject))\[K] } & \&#123; network: Network \&#125;)\[K] }>

###### Example

```ts theme={null}
// For known networks, type is inferred automatically:
const baseAccount = await smartAccount.useNetwork("base");

// For custom RPC URLs with type hints (requires casting):
const typedAccount = await smartAccount.useNetwork<"base">("https://mainnet.base.org" as "base");

// For custom RPC URLs without type hints (only sendTransaction, transfer and waitForTransactionReceipt methods available):
const customAccount = await smartAccount.useNetwork("https://mainnet.base.org");
```

###### useSpendPermission()

```ts theme={null}
useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
```

Uses a spend permission to execute a transaction via user operation.
This allows the smart account to spend tokens that have been approved via a spend permission.

###### 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

```typescript theme={null}
const spendPermission = {
  account: "0x1234...", // Smart account that owns the tokens
  spender: smartAccount.address, // This smart account that can spend
  token: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH
  allowance: parseEther("0.01"),
  period: 86400, // 1 day
  start: 0,
  end: 281474976710655,
  salt: 0n,
  extraData: "0x",
};

const result = await smartAccount.useSpendPermission({
  spendPermission,
  value: parseEther("0.001"), // Spend 0.001 ETH
  network: "base-sepolia",
});
```

###### waitForUserOperation()

```ts theme={null}
waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
```

Waits for a user operation to complete or fail.

###### Parameters

###### options

`Omit`\<`WaitForUserOperationOptions`, `"smartAccountAddress"`>

Parameters for waiting for the user operation.

###### Returns

`Promise`\<`WaitForUserOperationReturnType`>

A promise that resolves to the transaction receipt.

###### Example

```ts theme={null}
// Send a user operation and get the user operation hash
const { userOpHash } = await smartAccount.sendUserOperation({
  network: "base-sepolia",
  calls: [
    {
      to: "0x0000000000000000000000000000000000000000",
      value: parseEther("0.000001"),
      data: "0x",
    },
  ],
});

// Wait for the user operation to complete or fail
const result = await smartAccount.waitForUserOperation({
  userOpHash: userOp.userOpHash,
});
```

***

### ReadonlySmartAccount

Defined in: [client/evm/evm.types.ts:471](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L471)

A smart account that only contains the owner address.

#### Extends

* `Omit`\<[`EvmSmartAccount`](/sdks/cdp-sdks-v2/typescript/evm/Accounts/EvmSmartAccount),
  \| `"owners"`
  \| keyof [`SmartAccountActions`](/sdks/cdp-sdks-v2/typescript/evm/Actions/SmartAccountActions)
  \| `"useNetwork"`>

#### Properties

##### address

```ts theme={null}
address: `0x${string}`;
```

Defined in: [accounts/evm/types.ts:144](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/accounts/evm/types.ts#L144)

The smart account's address.

###### Inherited from

```ts theme={null}
Omit.address
```

##### name?

```ts theme={null}
optional name: string;
```

Defined in: [accounts/evm/types.ts:146](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/accounts/evm/types.ts#L146)

The name of the smart account.

###### Inherited from

```ts theme={null}
Omit.name
```

##### owners

```ts theme={null}
owners: `0x${string}`[];
```

Defined in: [client/evm/evm.types.ts:476](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L476)

The owners of the smart account.

##### policies

```ts theme={null}
policies: string[] | undefined;
```

Defined in: [accounts/evm/types.ts:152](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/accounts/evm/types.ts#L152)

The list of policy IDs that apply to the smart account. This will include both the project-level policy and the account-level policy, if one exists.

###### Inherited from

```ts theme={null}
Omit.policies
```

##### type

```ts theme={null}
type: "evm-smart";
```

Defined in: [accounts/evm/types.ts:150](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/accounts/evm/types.ts#L150)

Identifier for the smart account type.

###### Inherited from

```ts theme={null}
Omit.type
```

***

### SignatureResult

Defined in: [client/evm/evm.types.ts:638](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L638)

A signature result.

#### Properties

##### signature

```ts theme={null}
signature: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:640](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L640)

The signature.

***

### SignHashOptions

Defined in: [client/evm/evm.types.ts:584](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L584)

Options for signing an EVM hash.

#### Properties

##### address

```ts theme={null}
address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:586](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L586)

The address of the account.

##### hash

```ts theme={null}
hash: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:588](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L588)

The hash to sign.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:590](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L590)

The idempotency key.

***

### SignMessageOptions

Defined in: [client/evm/evm.types.ts:596](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L596)

Options for signing an EVM message.

#### Properties

##### address

```ts theme={null}
address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:598](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L598)

The address of the account.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:602](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L602)

The idempotency key.

##### message

```ts theme={null}
message: string;
```

Defined in: [client/evm/evm.types.ts:600](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L600)

The message to sign.

***

### SignTransactionOptions

Defined in: [client/evm/evm.types.ts:626](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L626)

Options for signing an EVM transaction.

#### Properties

##### address

```ts theme={null}
address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:628](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L628)

The address of the account.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:632](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L632)

The idempotency key.

##### transaction

```ts theme={null}
transaction: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:630](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L630)

The RLP-encoded transaction to sign, as a 0x-prefixed hex string.

***

### SignTypedDataOptions

Defined in: [client/evm/evm.types.ts:608](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L608)

Options for signing an EVM typed data message.

#### Properties

##### address

```ts theme={null}
address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:610](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L610)

The address of the account.

##### domain

```ts theme={null}
domain: EIP712Domain;
```

Defined in: [client/evm/evm.types.ts:612](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L612)

The domain of the message.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:620](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L620)

The idempotency key.

##### message

```ts theme={null}
message: EIP712MessageMessage;
```

Defined in: [client/evm/evm.types.ts:618](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L618)

The message to sign. The structure of this message must match the `primaryType` struct in the `types` object.

##### primaryType

```ts theme={null}
primaryType: string;
```

Defined in: [client/evm/evm.types.ts:616](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L616)

The primary type of the message. This is the name of the struct in the `types` object that is the root of the message.

##### types

```ts theme={null}
types: EIP712Types;
```

Defined in: [client/evm/evm.types.ts:614](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L614)

The types of the message.

***

### SmartAccountSignAndWrapTypedDataOptions

Defined in: [client/evm/evm.types.ts:725](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L725)

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

```ts theme={null}
chainId: bigint;
```

Defined in: [client/evm/evm.types.ts:727](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L727)

The chain ID for the signature (used for replay protection).

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:733](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L733)

Optional idempotency key for the signing request.

##### ownerIndex?

```ts theme={null}
optional ownerIndex: bigint;
```

Defined in: [client/evm/evm.types.ts:731](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L731)

The index of the owner to sign with (defaults to 0).

##### typedData

```ts theme={null}
typedData: EIP712Message;
```

Defined in: [client/evm/evm.types.ts:729](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L729)

The EIP-712 typed data message to sign.

***

### SwapAllowanceIssue

Defined in: [client/evm/evm.types.ts:666](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L666)

Details of allowance issues for a swap.

#### Properties

##### currentAllowance

```ts theme={null}
currentAllowance: bigint;
```

Defined in: [client/evm/evm.types.ts:668](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L668)

The current allowance of the fromToken by the taker.

##### spender

```ts theme={null}
spender: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:670](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L670)

The address to set the allowance on.

***

### SwapBalanceIssue

Defined in: [client/evm/evm.types.ts:676](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L676)

Details of balance issues for a swap.

#### Properties

##### currentBalance

```ts theme={null}
currentBalance: bigint;
```

Defined in: [client/evm/evm.types.ts:680](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L680)

The current balance of the fromToken by the taker.

##### requiredBalance

```ts theme={null}
requiredBalance: bigint;
```

Defined in: [client/evm/evm.types.ts:682](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L682)

The amount of the token that the taker must hold.

##### token

```ts theme={null}
token: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:678](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L678)

The contract address of the token.

***

### SwapFees

Defined in: [client/evm/evm.types.ts:656](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L656)

The estimated fees for a swap.

#### Properties

##### gasFee?

```ts theme={null}
optional gasFee: TokenFee;
```

Defined in: [client/evm/evm.types.ts:658](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L658)

The estimated gas fee for the swap.

##### protocolFee?

```ts theme={null}
optional protocolFee: TokenFee;
```

Defined in: [client/evm/evm.types.ts:660](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L660)

The estimated protocol fee for the swap.

***

### SwapIssues

Defined in: [client/evm/evm.types.ts:688](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L688)

Potential issues discovered during swap validation.

#### Properties

##### allowance?

```ts theme={null}
optional allowance: SwapAllowanceIssue;
```

Defined in: [client/evm/evm.types.ts:690](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L690)

Details of the allowances that the taker must set. Null if no allowance is required.

##### balance?

```ts theme={null}
optional balance: SwapBalanceIssue;
```

Defined in: [client/evm/evm.types.ts:692](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L692)

Details of the balance of the fromToken that the taker must hold. Null if sufficient balance.

##### simulationIncomplete

```ts theme={null}
simulationIncomplete: boolean;
```

Defined in: [client/evm/evm.types.ts:694](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L694)

True when the transaction cannot be validated (e.g., insufficient balance).

***

### SwapUnavailableResult

Defined in: [client/evm/evm.types.ts:216](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L216)

Result when liquidity is unavailable for a swap.

#### Properties

##### liquidityAvailable

```ts theme={null}
liquidityAvailable: false;
```

Defined in: [client/evm/evm.types.ts:218](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L218)

Whether liquidity is available for the swap.

***

### TokenFee

Defined in: [client/evm/evm.types.ts:646](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L646)

A fee in a specific token.

#### Properties

##### amount

```ts theme={null}
amount: bigint;
```

Defined in: [client/evm/evm.types.ts:648](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L648)

The amount of the fee in atomic units of the token.

##### token

```ts theme={null}
token: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:650](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L650)

The contract address of the token that the fee is paid in.

***

### UpdateEvmAccountOptions

Defined in: [client/evm/evm.types.ts:482](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L482)

Options for creating an EVM server account.

#### Properties

##### address

```ts theme={null}
address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:484](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L484)

The address of the account.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:488](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L488)

The idempotency key.

##### update

```ts theme={null}
update: UpdateEvmAccountBody;
```

Defined in: [client/evm/evm.types.ts:486](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L486)

The updates to apply to the account

***

### UpdateEvmSmartAccountOptions

Defined in: [client/evm/evm.types.ts:494](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L494)

Options for updating an EVM smart account.

#### Properties

##### address

```ts theme={null}
address: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:496](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L496)

The address of the account.

##### idempotencyKey?

```ts theme={null}
optional idempotencyKey: string;
```

Defined in: [client/evm/evm.types.ts:500](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L500)

The idempotency key.

##### owner

```ts theme={null}
owner: EvmAccount;
```

Defined in: [client/evm/evm.types.ts:502](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L502)

The owner of the account.

##### update

```ts theme={null}
update: UpdateEvmSmartAccountBody;
```

Defined in: [client/evm/evm.types.ts:498](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L498)

The updates to apply to the account

***

### UserOperation

Defined in: [client/evm/evm.types.ts:357](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L357)

A user operation.

#### Properties

##### calls

```ts theme={null}
calls: readonly {
  data: `0x${string}`;
  overrideGasLimit?: string;
  to: `0x${string}`;
  value: bigint;
}[];
```

Defined in: [client/evm/evm.types.ts:365](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L365)

The list of calls in the user operation.

##### network

```ts theme={null}
network: EvmUserOperationNetwork;
```

Defined in: [client/evm/evm.types.ts:359](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L359)

The network the user operation is for.

##### receipts?

```ts theme={null}
optional receipts: UserOperationReceipt[];
```

Defined in: [client/evm/evm.types.ts:375](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L375)

The receipts associated with the broadcasted user operation.

##### status

```ts theme={null}
status: EvmUserOperationStatus;
```

Defined in: [client/evm/evm.types.ts:367](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L367)

The status of the user operation.

##### transactionHash?

```ts theme={null}
optional transactionHash: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:371](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L371)

The hash of the transaction that included this particular user operation. This gets set after the user operation is broadcasted and the transaction is included in a block.

##### userOpHash

```ts theme={null}
userOpHash: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:363](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L363)

The hash of the user operation. This is not the transaction hash, as a transaction consists of multiple user operations. The user operation hash is the hash of this particular user operation which gets signed by the owner of the Smart Account.

***

### WaitForEvmEip7702DelegationOperationStatusOptions

Defined in: [client/evm/evm.types.ts:522](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L522)

Options for waiting for an EIP-7702 delegation operation to complete.

#### Properties

##### delegationOperationId

```ts theme={null}
delegationOperationId: string;
```

Defined in: [client/evm/evm.types.ts:524](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L524)

The delegation operation ID returned by createEvmEip7702Delegation.

##### waitOptions?

```ts theme={null}
optional waitOptions: WaitOptions;
```

Defined in: [client/evm/evm.types.ts:526](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L526)

Optional options for the wait operation.

***

### WaitForUserOperationOptions

Defined in: [client/evm/evm.types.ts:700](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L700)

Options for waiting for a user operation.

#### Properties

##### smartAccountAddress

```ts theme={null}
smartAccountAddress: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:702](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L702)

The smart account address.

##### userOpHash

```ts theme={null}
userOpHash: `0x${string}`;
```

Defined in: [client/evm/evm.types.ts:704](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L704)

The user operation hash.

##### waitOptions?

```ts theme={null}
optional waitOptions: WaitOptions;
```

Defined in: [client/evm/evm.types.ts:706](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L706)

The wait options.

## Type Aliases

* [CreateEvmEip7702DelegationResult](/sdks/cdp-sdks-v2/typescript/evm/Types/CreateEvmEip7702DelegationResult)
* [~~CreateSwapOptions~~](/sdks/cdp-sdks-v2/typescript/evm/Types/CreateSwapOptions)
* [CreateSwapResult](/sdks/cdp-sdks-v2/typescript/evm/Types/CreateSwapResult)
* [EvmClientInterface](/sdks/cdp-sdks-v2/typescript/evm/Types/EvmClientInterface)
* [GetSwapQuoteOptions](/sdks/cdp-sdks-v2/typescript/evm/Types/GetSwapQuoteOptions)
* [GetSwapQuoteResult](/sdks/cdp-sdks-v2/typescript/evm/Types/GetSwapQuoteResult)
* [SwapPriceUnavailableResult](/sdks/cdp-sdks-v2/typescript/evm/Types/SwapPriceUnavailableResult)
* [SwapQuoteUnavailableResult](/sdks/cdp-sdks-v2/typescript/evm/Types/SwapQuoteUnavailableResult)

## References

### ServerAccount

Renames and re-exports [EvmServerAccount](/sdks/cdp-sdks-v2/typescript/evm/Accounts/EvmServerAccount)

***

### SmartAccount

Renames and re-exports [EvmSmartAccount](/sdks/cdp-sdks-v2/typescript/evm/Accounts/EvmSmartAccount)
