Skip to main content
type EvmSmartAccountProperties = {
  address: Address;
  name?: string;
  owners: EvmAccount[];
  policies: string[] | undefined;
  type: "evm-smart";
  useNetwork: <Network>(network: Network) => Promise<NetworkScopedEvmSmartAccount<Network>>;
};
Defined in: accounts/evm/types.ts:142

Properties

address

address: Address;
Defined in: accounts/evm/types.ts:144 The smart account’s address.

name?

optional name: string;
Defined in: accounts/evm/types.ts:146 The name of the smart account.

owners

owners: EvmAccount[];
Defined in: accounts/evm/types.ts:148 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

policies: string[] | undefined;
Defined in: accounts/evm/types.ts:152 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.

type

type: "evm-smart";
Defined in: accounts/evm/types.ts:150 Identifier for the smart account type.

useNetwork()

useNetwork: <Network>(network: Network) => Promise<NetworkScopedEvmSmartAccount<Network>>;
Defined in: accounts/evm/types.ts:167 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<NetworkScopedEvmSmartAccount<Network>>

Example

// 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");