> ## 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:515](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L515)

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:517](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L517)

The address of the EOA account.

##### enableSpendPermissions?

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

Defined in: [client/evm/evm.types.ts:521](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L521)

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:523](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L523)

Optional idempotency key.

##### network

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

Defined in: [client/evm/evm.types.ts:519](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L519)

The network for the EIP-7702 delegation.

***

### CreateServerAccountOptions

Defined in: [client/evm/evm.types.ts:388](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L388)

Options for creating an EVM server account.

#### Properties

##### accountPolicy?

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

Defined in: [client/evm/evm.types.ts:392](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L392)

The policy ID to apply to the account.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:394](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L394)

The idempotency key.

##### name?

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

Defined in: [client/evm/evm.types.ts:390](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L390)

The name of the account.

***

### CreateSmartAccountOptions

Defined in: [client/evm/evm.types.ts:577](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L577)

Options for creating an EVM smart account.

#### Properties

##### enableSpendPermissions?

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

Defined in: [client/evm/evm.types.ts:585](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L585)

The flag to enable spend permissions.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:581](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L581)

The idempotency key.

##### name?

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

Defined in: [client/evm/evm.types.ts:583](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L583)

The name of the account.

##### owner

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

Defined in: [client/evm/evm.types.ts:579](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L579)

The owner of the account.

***

### CreateSwapQuoteOptions

Defined in: [client/evm/evm.types.ts:139](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L139)

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:147](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L147)

The amount to send in atomic units of the token.

##### fromToken

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

Defined in: [client/evm/evm.types.ts:145](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L145)

The token to send (source token).

##### gasPrice?

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

Defined in: [client/evm/evm.types.ts:155](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L155)

The price per unit of gas in wei.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:159](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L159)

The idempotency key.

##### network

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

Defined in: [client/evm/evm.types.ts:141](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L141)

The network to create a swap quote on.

##### signerAddress?

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

Defined in: [client/evm/evm.types.ts:151](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L151)

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:157](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L157)

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:153](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L153)

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:149](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L149)

The address receiving the output of the swap.

##### toToken

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

Defined in: [client/evm/evm.types.ts:143](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L143)

The token to receive (destination token).

***

### CreateSwapQuoteResult

Defined in: [client/evm/evm.types.ts:247](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L247)

Result of creating a swap quote.

#### Properties

##### blockNumber

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

Defined in: [client/evm/evm.types.ts:263](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L263)

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:292](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L292)

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:265](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L265)

The estimated fees for the swap.

##### fromAmount

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

Defined in: [client/evm/evm.types.ts:257](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L257)

The amount to send in atomic units of the token.

##### fromToken

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

Defined in: [client/evm/evm.types.ts:255](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L255)

The token to send (source token).

##### issues

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

Defined in: [client/evm/evm.types.ts:267](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L267)

Potential issues discovered during validation.

##### liquidityAvailable

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

Defined in: [client/evm/evm.types.ts:249](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L249)

Whether liquidity is available for the swap.

##### minToAmount

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

Defined in: [client/evm/evm.types.ts:261](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L261)

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:251](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L251)

The network for which this swap quote was created.

##### permit2?

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

Defined in: [client/evm/evm.types.ts:282](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L282)

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:259](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L259)

The amount to receive in atomic units of the token.

##### toToken

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

Defined in: [client/evm/evm.types.ts:253](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L253)

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:269](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L269)

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:342](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L342)

A call to be executed in a user operation.

#### Properties

##### data

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

Defined in: [client/evm/evm.types.ts:352](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L352)

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:354](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L354)

The override gas limit.

##### to

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

Defined in: [client/evm/evm.types.ts:346](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L346)

The address the call is directed to.

##### value

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

Defined in: [client/evm/evm.types.ts:348](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L348)

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

***

### ExecuteSwapQuoteOptions

Defined in: [client/evm/evm.types.ts:225](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L225)

Options for executing a swap quote.

#### Properties

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:227](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L227)

Optional idempotency key for the request.

***

### ExecuteSwapQuoteResult

Defined in: [client/evm/evm.types.ts:233](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L233)

Result of executing a swap quote.

#### Properties

##### smartAccountAddress?

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

Defined in: [client/evm/evm.types.ts:239](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L239)

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

##### status?

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

Defined in: [client/evm/evm.types.ts:241](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L241)

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:235](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L235)

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:237](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L237)

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

***

### ExportServerAccountOptions

Defined in: [client/evm/evm.types.ts:414](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L414)

Options for exporting an EVM server account.

#### Properties

##### address?

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

Defined in: [client/evm/evm.types.ts:416](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L416)

The address of the account.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:420](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L420)

The idempotency key.

##### name?

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

Defined in: [client/evm/evm.types.ts:418](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L418)

The name of the account.

***

### GetOrCreateServerAccountOptions

Defined in: [client/evm/evm.types.ts:448](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L448)

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:450](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L450)

The name of the account.

***

### GetOrCreateSmartAccountOptions

Defined in: [client/evm/evm.types.ts:456](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L456)

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:462](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L462)

The flag to enable spend permissions.

##### name

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

Defined in: [client/evm/evm.types.ts:458](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L458)

The name of the account.

##### owner

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

Defined in: [client/evm/evm.types.ts:460](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L460)

The owner of the account.

***

### GetServerAccountOptions

Defined in: [client/evm/evm.types.ts:426](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L426)

Options for getting an EVM account.

#### Properties

##### address?

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

Defined in: [client/evm/evm.types.ts:428](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L428)

The address of the account.

##### name?

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

Defined in: [client/evm/evm.types.ts:430](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L430)

The name of the account.

***

### GetSmartAccountOptions

Defined in: [client/evm/evm.types.ts:436](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L436)

Options for getting an EVM smart account.

#### Properties

##### address?

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

Defined in: [client/evm/evm.types.ts:438](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L438)

The address of the account.

##### name?

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

Defined in: [client/evm/evm.types.ts:442](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L442)

The name of the account.

##### owner

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

Defined in: [client/evm/evm.types.ts:440](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L440)

The owner of the account.

***

### GetSwapPriceOptions

Defined in: [client/evm/evm.types.ts:165](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L165)

Options for getting a swap price.

#### Properties

##### fromAmount

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

Defined in: [client/evm/evm.types.ts:173](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L173)

The amount to send in atomic units of the token.

##### fromToken

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

Defined in: [client/evm/evm.types.ts:171](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L171)

The token to send (source token).

##### gasPrice?

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

Defined in: [client/evm/evm.types.ts:179](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L179)

The gas price in Wei.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:183](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L183)

The idempotency key.

##### network

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

Defined in: [client/evm/evm.types.ts:167](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L167)

The network to get a price from.

##### signerAddress?

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

Defined in: [client/evm/evm.types.ts:177](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L177)

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:181](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L181)

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

##### taker

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

Defined in: [client/evm/evm.types.ts:175](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L175)

The address that will perform the swap.

##### toToken

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

Defined in: [client/evm/evm.types.ts:169](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L169)

The token to receive (destination token).

***

### GetSwapPriceResult

Defined in: [client/evm/evm.types.ts:189](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L189)

Result of getting a swap price.

#### Properties

##### blockNumber

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

Defined in: [client/evm/evm.types.ts:203](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L203)

The block number at which the liquidity conditions were examined.

##### fees

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

Defined in: [client/evm/evm.types.ts:205](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L205)

The estimated fees for the swap.

##### fromAmount

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

Defined in: [client/evm/evm.types.ts:197](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L197)

The amount to send in atomic units of the token.

##### fromToken

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

Defined in: [client/evm/evm.types.ts:195](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L195)

The token to send (source token).

##### gas?

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

Defined in: [client/evm/evm.types.ts:209](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L209)

The gas estimate for the swap.

##### gasPrice?

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

Defined in: [client/evm/evm.types.ts:211](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L211)

The gas price in Wei.

##### issues

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

Defined in: [client/evm/evm.types.ts:207](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L207)

Potential issues discovered during validation.

##### liquidityAvailable

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

Defined in: [client/evm/evm.types.ts:191](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L191)

Whether liquidity is available for the swap.

##### minToAmount

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

Defined in: [client/evm/evm.types.ts:201](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L201)

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:199](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L199)

The amount to receive in atomic units of the token.

##### toToken

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

Defined in: [client/evm/evm.types.ts:193](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L193)

The token to receive (destination token).

***

### GetUserOperationOptions

Defined in: [client/evm/evm.types.ts:298](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L298)

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:300](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L300)

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:302](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L302)

The user operation hash.

***

### ImportServerAccountOptions

Defined in: [client/evm/evm.types.ts:400](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L400)

Options for importing an EVM server account.

#### Properties

##### encryptionPublicKey?

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

Defined in: [client/evm/evm.types.ts:402](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L402)

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:406](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L406)

The idempotency key.

##### name?

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

Defined in: [client/evm/evm.types.ts:404](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L404)

The name of the account.

##### privateKey

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

Defined in: [client/evm/evm.types.ts:408](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L408)

The private key of the account.

***

### ListServerAccountResult

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

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:554](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L554)

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:559](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L559)

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:468](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L468)

Options for listing EVM accounts.

#### Properties

##### pageSize?

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

Defined in: [client/evm/evm.types.ts:470](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L470)

The page size to paginate through the accounts.

##### pageToken?

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

Defined in: [client/evm/evm.types.ts:472](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L472)

The page token to paginate through the accounts.

***

### ListSmartAccountResult

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

The result of listing EVM smart accounts.

#### Properties

##### accounts

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

Defined in: [client/evm/evm.types.ts:541](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L541)

The accounts.

##### nextPageToken?

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

Defined in: [client/evm/evm.types.ts:546](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L546)

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:565](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L565)

Options for listing EVM smart accounts.

#### Properties

##### name?

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

Defined in: [client/evm/evm.types.ts:567](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L567)

The name of the account.

##### pageSize?

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

Defined in: [client/evm/evm.types.ts:569](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L569)

The page size to paginate through the accounts.

##### pageToken?

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

Defined in: [client/evm/evm.types.ts:571](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L571)

The page token to paginate through the accounts.

***

### PrepareAndSendUserOperationOptions

Defined in: [client/evm/evm.types.ts:326](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L326)

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:332](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L332)

The calls.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:336](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L336)

An optional idempotency key.

##### network

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

Defined in: [client/evm/evm.types.ts:330](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L330)

The network.

##### paymasterUrl?

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

Defined in: [client/evm/evm.types.ts:334](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L334)

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:328](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L328)

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:308](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L308)

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:314](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L314)

The calls.

##### dataSuffix?

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

Defined in: [client/evm/evm.types.ts:320](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L320)

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

##### network

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

Defined in: [client/evm/evm.types.ts:312](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L312)

The network.

##### paymasterContext?

```ts theme={null}
optional paymasterContext: PaymasterContext;
```

Defined in: [client/evm/evm.types.ts:318](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L318)

Optional ERC-7677 `context` object forwarded to the paymaster service. Only valid when a paymaster is configured.

##### paymasterUrl?

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

Defined in: [client/evm/evm.types.ts:316](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L316)

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:310](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L310)

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:478](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L478)

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/30d1b3dc350cd763fecf481c5bc976bd77951f3b/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/30d1b3dc350cd763fecf481c5bc976bd77951f3b/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:483](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L483)

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/30d1b3dc350cd763fecf481c5bc976bd77951f3b/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/30d1b3dc350cd763fecf481c5bc976bd77951f3b/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:645](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L645)

A signature result.

#### Properties

##### signature

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

Defined in: [client/evm/evm.types.ts:647](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L647)

The signature.

***

### SignHashOptions

Defined in: [client/evm/evm.types.ts:591](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L591)

Options for signing an EVM hash.

#### Properties

##### address

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

Defined in: [client/evm/evm.types.ts:593](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L593)

The address of the account.

##### hash

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

Defined in: [client/evm/evm.types.ts:595](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L595)

The hash to sign.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:597](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L597)

The idempotency key.

***

### SignMessageOptions

Defined in: [client/evm/evm.types.ts:603](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L603)

Options for signing an EVM message.

#### Properties

##### address

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

Defined in: [client/evm/evm.types.ts:605](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L605)

The address of the account.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:609](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L609)

The idempotency key.

##### message

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

Defined in: [client/evm/evm.types.ts:607](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L607)

The message to sign.

***

### SignTransactionOptions

Defined in: [client/evm/evm.types.ts:633](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L633)

Options for signing an EVM transaction.

#### Properties

##### address

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

Defined in: [client/evm/evm.types.ts:635](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L635)

The address of the account.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:639](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L639)

The idempotency key.

##### transaction

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

Defined in: [client/evm/evm.types.ts:637](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L637)

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

***

### SignTypedDataOptions

Defined in: [client/evm/evm.types.ts:615](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L615)

Options for signing an EVM typed data message.

#### Properties

##### address

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

Defined in: [client/evm/evm.types.ts:617](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L617)

The address of the account.

##### domain

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

Defined in: [client/evm/evm.types.ts:619](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L619)

The domain of the message.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:627](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L627)

The idempotency key.

##### message

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

Defined in: [client/evm/evm.types.ts:625](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L625)

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:623](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L623)

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:621](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L621)

The types of the message.

***

### SmartAccountSignAndWrapTypedDataOptions

Defined in: [client/evm/evm.types.ts:732](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L732)

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:734](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L734)

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

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:740](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L740)

Optional idempotency key for the signing request.

##### ownerIndex?

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

Defined in: [client/evm/evm.types.ts:738](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L738)

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

##### typedData

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

Defined in: [client/evm/evm.types.ts:736](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L736)

The EIP-712 typed data message to sign.

***

### SwapAllowanceIssue

Defined in: [client/evm/evm.types.ts:673](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L673)

Details of allowance issues for a swap.

#### Properties

##### currentAllowance

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

Defined in: [client/evm/evm.types.ts:675](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L675)

The current allowance of the fromToken by the taker.

##### spender

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

Defined in: [client/evm/evm.types.ts:677](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L677)

The address to set the allowance on.

***

### SwapBalanceIssue

Defined in: [client/evm/evm.types.ts:683](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L683)

Details of balance issues for a swap.

#### Properties

##### currentBalance

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

Defined in: [client/evm/evm.types.ts:687](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L687)

The current balance of the fromToken by the taker.

##### requiredBalance

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

Defined in: [client/evm/evm.types.ts:689](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L689)

The amount of the token that the taker must hold.

##### token

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

Defined in: [client/evm/evm.types.ts:685](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L685)

The contract address of the token.

***

### SwapFees

Defined in: [client/evm/evm.types.ts:663](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L663)

The estimated fees for a swap.

#### Properties

##### gasFee?

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

Defined in: [client/evm/evm.types.ts:665](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L665)

The estimated gas fee for the swap.

##### protocolFee?

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

Defined in: [client/evm/evm.types.ts:667](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L667)

The estimated protocol fee for the swap.

***

### SwapIssues

Defined in: [client/evm/evm.types.ts:695](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L695)

Potential issues discovered during swap validation.

#### Properties

##### allowance?

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

Defined in: [client/evm/evm.types.ts:697](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L697)

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:699](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L699)

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:701](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L701)

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

***

### SwapUnavailableResult

Defined in: [client/evm/evm.types.ts:217](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L217)

Result when liquidity is unavailable for a swap.

#### Properties

##### liquidityAvailable

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

Defined in: [client/evm/evm.types.ts:219](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L219)

Whether liquidity is available for the swap.

***

### TokenFee

Defined in: [client/evm/evm.types.ts:653](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L653)

A fee in a specific token.

#### Properties

##### amount

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

Defined in: [client/evm/evm.types.ts:655](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L655)

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:657](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L657)

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

***

### UpdateEvmAccountOptions

Defined in: [client/evm/evm.types.ts:489](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L489)

Options for creating an EVM server account.

#### Properties

##### address

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

Defined in: [client/evm/evm.types.ts:491](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L491)

The address of the account.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:495](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L495)

The idempotency key.

##### update

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

Defined in: [client/evm/evm.types.ts:493](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L493)

The updates to apply to the account

***

### UpdateEvmSmartAccountOptions

Defined in: [client/evm/evm.types.ts:501](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L501)

Options for updating an EVM smart account.

#### Properties

##### address

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

Defined in: [client/evm/evm.types.ts:503](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L503)

The address of the account.

##### idempotencyKey?

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

Defined in: [client/evm/evm.types.ts:507](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L507)

The idempotency key.

##### owner

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

Defined in: [client/evm/evm.types.ts:509](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L509)

The owner of the account.

##### update

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

Defined in: [client/evm/evm.types.ts:505](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L505)

The updates to apply to the account

***

### UserOperation

Defined in: [client/evm/evm.types.ts:360](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L360)

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:368](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L368)

The list of calls in the user operation.

##### expiresAt?

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

Defined in: [client/evm/evm.types.ts:382](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L382)

The timestamp at which the prepared user operation expires, as an ISO 8601 string.

##### network

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

Defined in: [client/evm/evm.types.ts:362](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L362)

The network the user operation is for.

##### receipts?

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

Defined in: [client/evm/evm.types.ts:378](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L378)

The receipts associated with the broadcasted user operation.

##### status

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

Defined in: [client/evm/evm.types.ts:370](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L370)

The status of the user operation.

##### transactionHash?

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

Defined in: [client/evm/evm.types.ts:374](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L374)

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:366](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L366)

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:529](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L529)

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:531](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L531)

The delegation operation ID returned by createEvmEip7702Delegation.

##### waitOptions?

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

Defined in: [client/evm/evm.types.ts:533](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L533)

Optional options for the wait operation.

***

### WaitForUserOperationOptions

Defined in: [client/evm/evm.types.ts:707](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L707)

Options for waiting for a user operation.

#### Properties

##### smartAccountAddress

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

Defined in: [client/evm/evm.types.ts:709](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L709)

The smart account address.

##### userOpHash

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

Defined in: [client/evm/evm.types.ts:711](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L711)

The user operation hash.

##### waitOptions?

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

Defined in: [client/evm/evm.types.ts:713](https://github.com/coinbase/cdp-sdk/blob/30d1b3dc350cd763fecf481c5bc976bd77951f3b/typescript/packages/cdp-sdk/src/client/evm/evm.types.ts#L713)

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)
