Skip to content

createClient

createClient<transport, chain, accountOrAddress, rpcSchema>(parameters): Prettify<Client<transport, chain, accountOrAddress extends Address ? Prettify<JsonRpcAccount<accountOrAddress>> : accountOrAddress, rpcSchema>>

Type Parameters

transport extends Transport

chain extends undefined | Chain = undefined

accountOrAddress extends undefined | `0x${string}` | Account = undefined

rpcSchema extends undefined | RpcSchema = undefined

Parameters

parameters: ClientConfig<transport, chain, accountOrAddress, rpcSchema>

Returns

Prettify<Client<transport, chain, accountOrAddress extends Address ? Prettify<JsonRpcAccount<accountOrAddress>> : accountOrAddress, rpcSchema>>

Defined in

node_modules/.pnpm/viem@2.21.1_bufferutil@4.0.8_typescript@5.5.4_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_types/clients/createClient.d.ts:99