viem 0.2.0-canary.20230316T042447 → 0.2.0-jxom-local-accounts.20230321T210352

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/abi.d.ts +3 -3
  2. package/dist/abi.js +2 -2
  3. package/dist/abi.mjs +1 -1
  4. package/dist/{chain-1b53ef88.d.ts → chain-75b0942e.d.ts} +53 -48
  5. package/dist/{chain-ec8c485d.d.ts → chain-f8db473f.d.ts} +1 -1
  6. package/dist/chains.d.ts +3 -3
  7. package/dist/chains.js +63 -63
  8. package/dist/chains.mjs +1 -1
  9. package/dist/{chunk-A5BRAPQQ.js → chunk-FHJTO6BQ.js} +1480 -1162
  10. package/dist/chunk-FHJTO6BQ.js.map +1 -0
  11. package/dist/{chunk-PLALZ2GD.mjs → chunk-IXGTN6B7.mjs} +2 -2
  12. package/dist/chunk-IXGTN6B7.mjs.map +1 -0
  13. package/dist/{chunk-GZ67J32T.js → chunk-K66BKQUH.js} +19 -19
  14. package/dist/{chunk-GZ67J32T.js.map → chunk-K66BKQUH.js.map} +1 -1
  15. package/dist/{chunk-ISLCPEI2.mjs → chunk-PB263D6W.mjs} +1768 -1450
  16. package/dist/chunk-PB263D6W.mjs.map +1 -0
  17. package/dist/contract.d.ts +8 -7
  18. package/dist/contract.js +2 -2
  19. package/dist/contract.mjs +1 -1
  20. package/dist/{createClient-a28317a9.d.ts → createClient-f87255c1.d.ts} +6 -6
  21. package/dist/{createPublicClient-75540130.d.ts → createPublicClient-62c74ebc.d.ts} +160 -206
  22. package/dist/{eip1193-4f4e240c.d.ts → eip1193-ae706fd8.d.ts} +1 -1
  23. package/dist/{encodeFunctionResult-1f324375.d.ts → encodeFunctionResult-4792a6a3.d.ts} +1 -1
  24. package/dist/{encodePacked-d5d5264a.d.ts → encodePacked-3fcdd54b.d.ts} +1 -1
  25. package/dist/ens.d.ts +5 -4
  26. package/dist/ens.js +3 -3
  27. package/dist/ens.mjs +2 -2
  28. package/dist/ethers.d.ts +4 -6
  29. package/dist/ethers.js +5 -5
  30. package/dist/ethers.js.map +1 -1
  31. package/dist/ethers.mjs +5 -5
  32. package/dist/ethers.mjs.map +1 -1
  33. package/dist/{formatAbiItem-15e8817d.d.ts → formatAbiItem-765ebc53.d.ts} +1 -1
  34. package/dist/{getAbiItem-3e809ff9.d.ts → getAbiItem-693e6e1b.d.ts} +1 -1
  35. package/dist/index.d.ts +14 -13
  36. package/dist/index.js +99 -91
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +13 -5
  39. package/dist/index.mjs.map +1 -1
  40. package/dist/{parseGwei-6fff7cbe.d.ts → parseGwei-7efc43fc.d.ts} +46 -10
  41. package/dist/public.d.ts +5 -4
  42. package/dist/public.js +2 -2
  43. package/dist/public.mjs +1 -1
  44. package/dist/{test-2bd23d7e.d.ts → test-98c0b642.d.ts} +33 -32
  45. package/dist/test.d.ts +10 -10
  46. package/dist/test.js +2 -2
  47. package/dist/test.mjs +1 -1
  48. package/dist/typedData-0514bb3c.d.ts +76 -0
  49. package/dist/utils/index.d.ts +28 -18
  50. package/dist/utils/index.js +8 -2
  51. package/dist/utils/index.mjs +11 -5
  52. package/dist/wallet.d.ts +5 -4
  53. package/dist/wallet.js +2 -2
  54. package/dist/wallet.mjs +1 -1
  55. package/dist/window.d.ts +2 -2
  56. package/package.json +3 -1
  57. package/dist/chunk-A5BRAPQQ.js.map +0 -1
  58. package/dist/chunk-ISLCPEI2.mjs.map +0 -1
  59. package/dist/chunk-PLALZ2GD.mjs.map +0 -1
@@ -1,27 +1,17 @@
1
- import { W as WalletPermission, a as WatchAssetParams, P as PublicRequests } from './eip1193-4f4e240c.js';
2
- import { a as Transport, b as ClientConfig, C as Client } from './createClient-a28317a9.js';
3
- import { Abi, Narrow, Address, AbiEvent, ExtractAbiEvent, TypedData, TypedDataDomain, TypedDataToPrimitiveTypes } from 'abitype';
4
- import { C as Chain, H as Hex, h as ExtractConstructorArgsFromAbi, W as ExtractFormatter, a1 as Formatters, a2 as Formatter, X as Formatted, c as Block, R as RpcBlock, O as Transaction, T as TransactionReceipt, z as RpcTransactionReceipt, a3 as TransactionType, D as RpcTransactionRequest, I as TransactionRequest, f as BlockTag, a4 as MergeIntersectionProperties, g as ContractConfig, a5 as GetValue, p as ExtractResultFromAbi, a6 as MaybeAbiEventName, a7 as MaybeExtractEventArgsFromAbi, e as BlockNumber, m as ExtractEventNameFromAbi, a as Hash, F as FeeHistory, L as Log, Y as FormattedTransaction, Z as TransactionFormatter, k as ExtractEventArgsFromAbi, a8 as Prettify } from './chain-1b53ef88.js';
5
-
6
- type AddChainParameters = {
7
- chain: Chain;
1
+ import { W as WalletPermission, a as WatchAssetParams, P as PublicRequests } from './eip1193-ae706fd8.js';
2
+ import { a as Transport, b as ClientConfig, C as Client } from './createClient-f87255c1.js';
3
+ import { Address, Abi, Narrow, TypedData, AbiEvent, ExtractAbiEvent } from 'abitype';
4
+ import { C as Chain, W as ExtractFormatter, a1 as Formatters, a2 as Formatter, X as Formatted, c as Block, R as RpcBlock, O as Transaction, T as TransactionReceipt, z as RpcTransactionReceipt, a3 as TransactionType, D as RpcTransactionRequest, I as TransactionRequest, f as BlockTag, H as Hex, a4 as MergeIntersectionProperties, a5 as GetChain, h as ExtractConstructorArgsFromAbi, a as Hash, a6 as GetValue, g as ContractConfig, p as ExtractResultFromAbi, a7 as MaybeAbiEventName, a8 as MaybeExtractEventArgsFromAbi, e as BlockNumber, m as ExtractEventNameFromAbi, F as FeeHistory, L as Log, Y as FormattedTransaction, Z as TransactionFormatter, k as ExtractEventArgsFromAbi, a9 as Prettify } from './chain-75b0942e.js';
5
+ import { A as Account, J as JsonRpcAccount, T as TypedDataDefinition } from './typedData-0514bb3c.js';
6
+
7
+ type GetAccountParameter<TAccount extends Account | undefined = undefined> = TAccount extends undefined ? {
8
+ account: Account | Address;
9
+ } : {
10
+ account?: Account | Address;
8
11
  };
9
- declare function addChain(client: WalletClient, { chain }: AddChainParameters): Promise<void>;
10
-
11
- type DeployContractParameters<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi> = Omit<SendTransactionParameters<TChain>, 'accessList' | 'to' | 'data' | 'value'> & {
12
- abi: Narrow<TAbi>;
13
- bytecode: Hex;
14
- } & ExtractConstructorArgsFromAbi<TAbi>;
15
- type DeployContractReturnType = SendTransactionReturnType;
16
- declare function deployContract<TChain extends Chain, TAbi extends Abi | readonly unknown[]>(walletClient: WalletClient, { abi, args, bytecode, ...request }: DeployContractParameters<TChain, TAbi>): Promise<DeployContractReturnType>;
12
+ type ParseAccount<TAccount extends Account | Address | undefined> = (TAccount extends Account ? TAccount : never) | (TAccount extends Address ? JsonRpcAccount : never) | (TAccount extends undefined ? undefined : never);
17
13
 
18
- type GetAddressesReturnType = Address[];
19
- declare function getAddresses(client: WalletClient): Promise<GetAddressesReturnType>;
20
-
21
- type GetChainIdReturnType = number;
22
- declare function getChainId(client: PublicClient | WalletClient): Promise<GetChainIdReturnType>;
23
-
24
- type BlockFormatter<TChain extends Chain = Chain> = ExtractFormatter<TChain, 'block', NonNullable<Formatters['block']>>;
14
+ type BlockFormatter<TChain extends Chain | undefined = Chain> = TChain extends Chain ? ExtractFormatter<TChain, 'block', NonNullable<Formatters['block']>> : Formatters['block'];
25
15
  type FormattedBlock<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, Block>;
26
16
  declare function formatBlock(block: Partial<RpcBlock>): Block<bigint, Transaction<bigint, number>>;
27
17
  declare const defineBlock: <TFormat extends Formatter<Partial<RpcBlock>, Partial<Block<bigint, Transaction<bigint, number>>> & {
@@ -33,7 +23,7 @@ declare const defineBlock: <TFormat extends Formatter<Partial<RpcBlock>, Partial
33
23
  [key: string]: unknown;
34
24
  }) => Block<bigint, Transaction<bigint, number>> & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
35
25
 
36
- type TransactionReceiptFormatter<TChain extends Chain = Chain> = ExtractFormatter<TChain, 'transactionReceipt', NonNullable<Formatters['transactionReceipt']>>;
26
+ type TransactionReceiptFormatter<TChain extends Chain | undefined = Chain> = TChain extends Chain ? ExtractFormatter<TChain, 'transactionReceipt', NonNullable<Formatters['transactionReceipt']>> : Formatters['transactionReceipt'];
37
27
  type FormattedTransactionReceipt<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, TransactionReceipt>;
38
28
  declare const defineTransactionReceipt: <TFormat extends Formatter<Partial<RpcTransactionReceipt>, Partial<TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>> & {
39
29
  [key: string]: unknown;
@@ -44,7 +34,7 @@ declare const defineTransactionReceipt: <TFormat extends Formatter<Partial<RpcTr
44
34
  [key: string]: unknown;
45
35
  }) => TransactionReceipt<bigint, number, "success" | "reverted", TransactionType> & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
46
36
 
47
- type TransactionRequestFormatter<TChain extends Chain = Chain> = ExtractFormatter<TChain, 'transactionRequest', NonNullable<Formatters['transactionRequest']>>;
37
+ type TransactionRequestFormatter<TChain extends Chain | undefined = Chain> = TChain extends Chain ? ExtractFormatter<TChain, 'transactionRequest', NonNullable<Formatters['transactionRequest']>> : Formatters['transactionRequest'];
48
38
  type FormattedTransactionRequest$1<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, RpcTransactionRequest>;
49
39
  declare function formatTransactionRequest(transactionRequest: Partial<TransactionRequest>): RpcTransactionRequest;
50
40
  declare const defineTransactionRequest: <TFormat extends Formatter<Partial<TransactionRequest<bigint, number>>, Partial<RpcTransactionRequest> & {
@@ -57,8 +47,8 @@ declare const defineTransactionRequest: <TFormat extends Formatter<Partial<Trans
57
47
  }) => RpcTransactionRequest & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
58
48
 
59
49
  type FormattedCall<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
60
- type CallParameters<TChain extends Chain = Chain> = FormattedCall<TransactionRequestFormatter<TChain>> & {
61
- account?: Account;
50
+ type CallParameters<TChain extends Chain | undefined = Chain> = FormattedCall<TransactionRequestFormatter<TChain>> & {
51
+ account?: Account | Address;
62
52
  } & ({
63
53
  /** The balance of the account at a block number. */
64
54
  blockNumber?: bigint;
@@ -71,24 +61,97 @@ type CallParameters<TChain extends Chain = Chain> = FormattedCall<TransactionReq
71
61
  type CallReturnType = {
72
62
  data: Hex | undefined;
73
63
  };
74
- declare function call<TChain extends Chain>(client: PublicClient<any, TChain>, args: CallParameters<TChain>): Promise<CallReturnType>;
64
+ declare function call<TChain extends Chain | undefined>(client: PublicClientArg<Transport, TChain>, args: CallParameters<TChain>): Promise<CallReturnType>;
65
+
66
+ type AddChainParameters = {
67
+ chain: Chain;
68
+ };
69
+ declare function addChain(client: WalletClientArg, { chain }: AddChainParameters): Promise<void>;
70
+
71
+ type DeployContractParameters<TChain extends Chain | undefined = Chain | undefined, TAbi extends Abi | readonly unknown[] = Abi, TAccount extends Account | undefined = undefined, TChainOverride extends Chain | undefined = TChain> = Omit<SendTransactionParameters<TChain, TAccount, TChainOverride>, 'accessList' | 'chain' | 'to' | 'data' | 'value'> & {
72
+ abi: Narrow<TAbi>;
73
+ bytecode: Hex;
74
+ } & GetChain<TChain, TChainOverride> & ExtractConstructorArgsFromAbi<TAbi>;
75
+ type DeployContractReturnType = SendTransactionReturnType;
76
+ declare function deployContract<TChain extends Chain | undefined, TAbi extends Abi | readonly unknown[], TAccount extends Account | undefined, TChainOverride extends Chain | undefined = TChain>(walletClient: WalletClientArg<Transport, TChain, TAccount>, { abi, args, bytecode, ...request }: DeployContractParameters<TChain, TAbi, TAccount, TChainOverride>): Promise<DeployContractReturnType>;
77
+
78
+ type GetAddressesReturnType = Address[];
79
+ declare function getAddresses(client: WalletClientArg): Promise<GetAddressesReturnType>;
80
+
81
+ type GetChainIdReturnType = number;
82
+ declare function getChainId(client: PublicClientArg | WalletClientArg): Promise<GetChainIdReturnType>;
83
+
84
+ type GetPermissionsReturnType = WalletPermission[];
85
+ declare function getPermissions(client: WalletClientArg): Promise<WalletPermission[]>;
86
+
87
+ type RequestAddressesReturnType = Address[];
88
+ declare function requestAddresses(client: WalletClientArg): Promise<RequestAddressesReturnType>;
89
+
90
+ type RequestPermissionsParameters = {
91
+ eth_accounts: Record<string, any>;
92
+ } & {
93
+ [key: string]: Record<string, any>;
94
+ };
95
+ type RequestPermissionsReturnType = WalletPermission[];
96
+ declare function requestPermissions(client: WalletClientArg, permissions: RequestPermissionsParameters): Promise<WalletPermission[]>;
97
+
98
+ type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
99
+ type SendTransactionParameters<TChain extends Chain | undefined = Chain, TAccount extends Account | undefined = undefined, TChainOverride extends Chain | undefined = TChain> = FormattedTransactionRequest<TransactionRequestFormatter<TChainOverride>> & GetAccountParameter<TAccount> & GetChain<TChain, TChainOverride>;
100
+ type SendTransactionReturnType = Hash;
101
+ declare function sendTransaction<TChain extends Chain | undefined, TAccount extends Account | undefined, TChainOverride extends Chain | undefined = TChain>(client: WalletClientArg<Transport, TChain, TAccount>, args: SendTransactionParameters<TChain, TAccount, TChainOverride>): Promise<SendTransactionReturnType>;
102
+
103
+ type SignMessageParameters<TAccount extends Account | undefined = undefined> = GetAccountParameter<TAccount> & ({
104
+ /** @deprecated – `data` will be removed in 0.2.0; use `message` instead. */
105
+ data: string;
106
+ message?: never;
107
+ } | {
108
+ data?: never;
109
+ message: string;
110
+ });
111
+ type SignMessageReturnType = Hex;
112
+ declare function signMessage<TAccount extends Account | undefined>(client: WalletClientArg<Transport, Chain | undefined, TAccount>, { account: account_, data, message, }: SignMessageParameters<TAccount>): Promise<SignMessageReturnType>;
75
113
 
76
- type SimulateContractParameters<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any, TChainOverride extends Chain | undefined = undefined> = Omit<CallParameters<TChainOverride extends Chain ? TChainOverride : TChain>, 'to' | 'data' | 'value'> & {
114
+ type SignTypedDataParameters<TTypedData extends TypedData | {
115
+ [key: string]: unknown;
116
+ } = TypedData, TPrimaryType extends string = string, TAccount extends Account | undefined = undefined> = GetAccountParameter<TAccount> & TypedDataDefinition<TTypedData, TPrimaryType>;
117
+ type SignTypedDataReturnType = Hex;
118
+ declare function signTypedData<TTypedData extends TypedData | {
119
+ [key: string]: unknown;
120
+ }, TPrimaryType extends string = string, TAccount extends Account | undefined = undefined>(client: WalletClientArg<Transport, Chain | undefined, TAccount>, { account: account_, domain, message, primaryType, types: types_, }: SignTypedDataParameters<TTypedData, TPrimaryType, TAccount>): Promise<SignTypedDataReturnType>;
121
+
122
+ type SwitchChainParameters = {
123
+ id: Chain['id'];
124
+ };
125
+ declare function switchChain(client: WalletClientArg, { id }: SwitchChainParameters): Promise<void>;
126
+
127
+ type WatchAssetParameters = WatchAssetParams;
128
+ type WatchAssetReturnType = boolean;
129
+ declare function watchAsset(client: WalletClientArg, params: WatchAssetParameters): Promise<WatchAssetReturnType>;
130
+
131
+ type WriteContractParameters<TChain extends Chain | undefined = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string, TAccount extends Account | undefined = undefined, TChainOverride extends Chain | undefined = TChain> = Omit<SendTransactionParameters<TChain, TAccount, TChainOverride>, 'chain' | 'to' | 'data' | 'value'> & {
132
+ value?: GetValue<TAbi, TFunctionName, SendTransactionParameters<TChain>['value']>;
133
+ } & GetChain<TChain, TChainOverride> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'>;
134
+ type WriteContractReturnType = SendTransactionReturnType;
135
+ declare function writeContract<TChain extends Chain | undefined, TAbi extends Abi | readonly unknown[], TFunctionName extends string, TAccount extends Account | undefined, TChainOverride extends Chain | undefined = TChain>(client: WalletClientArg<Transport, TChain, TAccount>, { abi, address, args, functionName, ...request }: WriteContractParameters<TChain, TAbi, TFunctionName, TAccount, TChainOverride>): Promise<WriteContractReturnType>;
136
+
137
+ type SimulateContractParameters<TChain extends Chain | undefined = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any, TChainOverride extends Chain | undefined = undefined> = Omit<CallParameters<TChainOverride extends Chain ? TChainOverride : TChain>, 'to' | 'data' | 'value'> & {
77
138
  chain?: TChainOverride;
78
139
  } & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & {
79
140
  value?: GetValue<TAbi, TFunctionName, CallParameters<TChain>['value']>;
80
141
  };
81
- type SimulateContractReturnType<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = {
142
+ type SimulateContractReturnType<TChain extends Chain | undefined = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string, TChainOverride extends Chain | undefined = TChain> = {
82
143
  result: ExtractResultFromAbi<TAbi, TFunctionName>;
83
- request: WriteContractParameters<TChain, TAbi, TFunctionName> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'>;
144
+ request: Omit<WriteContractParameters<TChain, TAbi, TFunctionName, undefined, TChainOverride>, 'chain'> & {
145
+ chain: TChainOverride;
146
+ } & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'>;
84
147
  };
85
- declare function simulateContract<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainOverride extends Chain | undefined>(client: PublicClient<any, TChain>, { abi, address, args, functionName, ...callRequest }: SimulateContractParameters<TChain, TAbi, TFunctionName, TChainOverride>): Promise<SimulateContractReturnType<TChainOverride extends Chain ? TChainOverride : TChain, TAbi, TFunctionName>>;
148
+ declare function simulateContract<TChain extends Chain | undefined, TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainOverride extends Chain | undefined>(client: PublicClientArg<Transport, TChain>, { abi, address, args, functionName, ...callRequest }: SimulateContractParameters<TChain, TAbi, TFunctionName, TChainOverride>): Promise<SimulateContractReturnType<TChain, TAbi, TFunctionName, TChainOverride>>;
86
149
 
87
150
  type CreatePendingTransactionFilterReturnType = Filter<'transaction'>;
88
- declare function createPendingTransactionFilter(client: PublicClient): Promise<CreatePendingTransactionFilterReturnType>;
151
+ declare function createPendingTransactionFilter(client: PublicClientArg): Promise<CreatePendingTransactionFilterReturnType>;
89
152
 
90
153
  type CreateBlockFilterReturnType = Filter<'block'>;
91
- declare function createBlockFilter(client: PublicClient): Promise<CreateBlockFilterReturnType>;
154
+ declare function createBlockFilter(client: PublicClientArg): Promise<CreateBlockFilterReturnType>;
92
155
 
93
156
  type CreateEventFilterParameters<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
94
157
  address?: Address | Address[];
@@ -108,7 +171,7 @@ type CreateEventFilterParameters<TAbiEvent extends AbiEvent | undefined = undefi
108
171
  event?: never;
109
172
  });
110
173
  type CreateEventFilterReturnType<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = Filter<'event', TAbi, TEventName, TArgs>;
111
- declare function createEventFilter<TAbiEvent extends AbiEvent | undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined>(client: PublicClient, { address, args, event, fromBlock, toBlock, }?: CreateEventFilterParameters<TAbiEvent, TAbi, TEventName, TArgs>): Promise<CreateEventFilterReturnType<TAbiEvent, TAbi, TEventName, TArgs>>;
174
+ declare function createEventFilter<TAbiEvent extends AbiEvent | undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined>(client: PublicClientArg, { address, args, event, fromBlock, toBlock, }?: CreateEventFilterParameters<TAbiEvent, TAbi, TEventName, TArgs>): Promise<CreateEventFilterReturnType<TAbiEvent, TAbi, TEventName, TArgs>>;
112
175
 
113
176
  type CreateContractEventFilterParameters<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
114
177
  address?: Address | Address[];
@@ -124,12 +187,10 @@ type CreateContractEventFilterParameters<TAbi extends Abi | readonly unknown[] =
124
187
  args?: never;
125
188
  });
126
189
  type CreateContractEventFilterReturnType<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = Filter<'event', TAbi, TEventName, TArgs>;
127
- declare function createContractEventFilter<TAbi extends Abi | readonly unknown[], TEventName extends string | undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined>(client: PublicClient, { address, abi, args, eventName, fromBlock, toBlock, }: CreateContractEventFilterParameters<TAbi, TEventName, TArgs>): Promise<CreateContractEventFilterReturnType<TAbi, TEventName, TArgs>>;
190
+ declare function createContractEventFilter<TAbi extends Abi | readonly unknown[], TEventName extends string | undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined>(client: PublicClientArg, { address, abi, args, eventName, fromBlock, toBlock, }: CreateContractEventFilterParameters<TAbi, TEventName, TArgs>): Promise<CreateContractEventFilterReturnType<TAbi, TEventName, TArgs>>;
128
191
 
129
192
  type FormattedEstimateGas<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
130
- type EstimateGasParameters<TChain extends Chain = Chain> = FormattedEstimateGas<TransactionRequestFormatter<TChain>> & {
131
- account: Account;
132
- } & ({
193
+ type EstimateGasParameters<TChain extends Chain | undefined = Chain, TAccount extends Account | undefined = undefined> = FormattedEstimateGas<TransactionRequestFormatter<TChain>> & GetAccountParameter<TAccount> & ({
133
194
  /** The balance of the account at a block number. */
134
195
  blockNumber?: bigint;
135
196
  blockTag?: never;
@@ -142,13 +203,13 @@ type EstimateGasReturnType = bigint;
142
203
  /**
143
204
  * @description Estimates the gas necessary to complete a transaction without submitting it to the network.
144
205
  */
145
- declare function estimateGas<TChain extends Chain>(client: PublicClient<any, TChain> | WalletClient, args: EstimateGasParameters<TChain>): Promise<EstimateGasReturnType>;
206
+ declare function estimateGas<TChain extends Chain | undefined, TAccount extends Account | undefined = undefined>(client: PublicClientArg<Transport, TChain> | WalletClientArg<Transport, TChain, TAccount>, args: EstimateGasParameters<TChain, TAccount>): Promise<EstimateGasReturnType>;
146
207
 
147
- type EstimateContractGasParameters<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<EstimateGasParameters<TChain>, 'data' | 'to' | 'value'> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & {
208
+ type EstimateContractGasParameters<TChain extends Chain | undefined = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<EstimateGasParameters<TChain>, 'data' | 'to' | 'value'> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & {
148
209
  value?: GetValue<TAbi, TFunctionName, EstimateGasParameters<TChain>['value']>;
149
210
  };
150
211
  type EstimateContractGasReturnType = bigint;
151
- declare function estimateContractGas<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: PublicClient<any, TChain>, { abi, address, args, functionName, ...request }: EstimateContractGasParameters<TChain, TAbi, TFunctionName>): Promise<EstimateContractGasReturnType>;
212
+ declare function estimateContractGas<TChain extends Chain | undefined, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: PublicClientArg<Transport, TChain>, { abi, address, args, functionName, ...request }: EstimateContractGasParameters<TChain, TAbi, TFunctionName>): Promise<EstimateContractGasReturnType>;
152
213
 
153
214
  type GetBalanceParameters = {
154
215
  /** The address of the account. */
@@ -166,7 +227,7 @@ type GetBalanceReturnType = bigint;
166
227
  /**
167
228
  * @description Returns the balance of an address in wei.
168
229
  */
169
- declare function getBalance(client: PublicClient, { address, blockNumber, blockTag }: GetBalanceParameters): Promise<GetBalanceReturnType>;
230
+ declare function getBalance(client: PublicClientArg, { address, blockNumber, blockTag }: GetBalanceParameters): Promise<GetBalanceReturnType>;
170
231
 
171
232
  type GetBlockParameters = {
172
233
  /** Whether or not to include transaction data in the response. */
@@ -187,8 +248,8 @@ type GetBlockParameters = {
187
248
  /** The block tag. Defaults to 'latest'. */
188
249
  blockTag?: BlockTag;
189
250
  });
190
- type GetBlockReturnType<TChain extends Chain = Chain> = FormattedBlock<BlockFormatter<TChain>>;
191
- declare function getBlock<TChain extends Chain>(client: PublicClient<any, TChain> | WalletClient, { blockHash, blockNumber, blockTag, includeTransactions, }?: GetBlockParameters): Promise<GetBlockReturnType<TChain>>;
251
+ type GetBlockReturnType<TChain extends Chain | undefined = Chain> = FormattedBlock<BlockFormatter<TChain>>;
252
+ declare function getBlock<TChain extends Chain | undefined>(client: PublicClientArg<Transport, TChain> | WalletClientArg<Transport, TChain>, { blockHash, blockNumber, blockTag, includeTransactions, }?: GetBlockParameters): Promise<GetBlockReturnType<TChain>>;
192
253
 
193
254
  type GetBlockNumberParameters = {
194
255
  /** The maximum age (in ms) of the cached value. */
@@ -220,7 +281,7 @@ declare function getBlockNumberCache(id: string): {
220
281
  /**
221
282
  * @description Returns the number of the most recent block seen.
222
283
  */
223
- declare function getBlockNumber(client: PublicClient<any, any, any>, { maxAge }?: GetBlockNumberParameters): Promise<GetBlockNumberReturnType>;
284
+ declare function getBlockNumber(client: PublicClientArg, { maxAge }?: GetBlockNumberParameters): Promise<GetBlockNumberReturnType>;
224
285
 
225
286
  type GetBlockTransactionCountParameters = {
226
287
  /** Hash of the block. */
@@ -239,7 +300,7 @@ type GetBlockTransactionCountParameters = {
239
300
  blockTag?: BlockTag;
240
301
  };
241
302
  type GetBlockTransactionCountReturnType = number;
242
- declare function getBlockTransactionCount<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, }?: GetBlockTransactionCountParameters): Promise<GetBlockTransactionCountReturnType>;
303
+ declare function getBlockTransactionCount<TChain extends Chain | undefined>(client: PublicClientArg<Transport, TChain>, { blockHash, blockNumber, blockTag, }?: GetBlockTransactionCountParameters): Promise<GetBlockTransactionCountReturnType>;
243
304
 
244
305
  type GetBytecodeParameters = {
245
306
  address: Address;
@@ -251,7 +312,7 @@ type GetBytecodeParameters = {
251
312
  blockTag?: never;
252
313
  });
253
314
  type GetBytecodeReturnType = Hex | undefined;
254
- declare function getBytecode(client: PublicClient, { address, blockNumber, blockTag }: GetBytecodeParameters): Promise<GetBytecodeReturnType>;
315
+ declare function getBytecode(client: PublicClientArg, { address, blockNumber, blockTag }: GetBytecodeParameters): Promise<GetBytecodeReturnType>;
255
316
 
256
317
  type GetFeeHistoryParameters = {
257
318
  blockCount: number;
@@ -267,25 +328,25 @@ type GetFeeHistoryReturnType = FeeHistory;
267
328
  /**
268
329
  * @description Returns a collection of historical gas information.
269
330
  */
270
- declare function getFeeHistory(client: PublicClient, { blockCount, blockNumber, blockTag, rewardPercentiles, }: GetFeeHistoryParameters): Promise<GetFeeHistoryReturnType>;
331
+ declare function getFeeHistory(client: PublicClientArg, { blockCount, blockNumber, blockTag, rewardPercentiles, }: GetFeeHistoryParameters): Promise<GetFeeHistoryReturnType>;
271
332
 
272
333
  type GetFilterChangesParameters<TFilterType extends FilterType = FilterType, TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
273
334
  filter: Filter<TFilterType, TAbi, TEventName, any>;
274
335
  };
275
336
  type GetFilterChangesReturnType<TFilterType extends FilterType = FilterType, TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = TFilterType extends 'event' ? Log<bigint, number, TAbiEvent, TAbi, TEventName>[] : Hash[];
276
- declare function getFilterChanges<TFilterType extends FilterType, TAbiEvent extends AbiEvent | undefined, TAbi extends Abi | readonly unknown[], TEventName extends string | undefined>(client: PublicClient, { filter, }: GetFilterChangesParameters<TFilterType, TAbiEvent, TAbi, TEventName>): Promise<GetFilterChangesReturnType<TFilterType, TAbiEvent, TAbi, TEventName>>;
337
+ declare function getFilterChanges<TFilterType extends FilterType, TAbiEvent extends AbiEvent | undefined, TAbi extends Abi | readonly unknown[], TEventName extends string | undefined>(client: PublicClientArg, { filter, }: GetFilterChangesParameters<TFilterType, TAbiEvent, TAbi, TEventName>): Promise<GetFilterChangesReturnType<TFilterType, TAbiEvent, TAbi, TEventName>>;
277
338
 
278
339
  type GetFilterLogsParameters<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
279
340
  filter: Filter<'event', TAbi, TEventName, any>;
280
341
  };
281
342
  type GetFilterLogsReturnType<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = Log<bigint, number, TAbiEvent, TAbi, TEventName>[];
282
- declare function getFilterLogs<TAbiEvent extends AbiEvent | undefined, TAbi extends Abi | readonly unknown[], TEventName extends string | undefined>(client: PublicClient, { filter }: GetFilterLogsParameters<TAbiEvent, TAbi, TEventName>): Promise<GetFilterLogsReturnType<TAbiEvent, TAbi, TEventName>>;
343
+ declare function getFilterLogs<TAbiEvent extends AbiEvent | undefined, TAbi extends Abi | readonly unknown[], TEventName extends string | undefined>(client: PublicClientArg, { filter }: GetFilterLogsParameters<TAbiEvent, TAbi, TEventName>): Promise<GetFilterLogsReturnType<TAbiEvent, TAbi, TEventName>>;
283
344
 
284
345
  type GetGasPriceReturnType = bigint;
285
346
  /**
286
347
  * @description Returns the current price of gas (in wei).
287
348
  */
288
- declare function getGasPrice(client: PublicClient | WalletClient): Promise<GetGasPriceReturnType>;
349
+ declare function getGasPrice(client: PublicClientArg | WalletClientArg): Promise<GetGasPriceReturnType>;
289
350
 
290
351
  type GetLogsParameters<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
291
352
  /** Address or list of addresses from which logs originated */
@@ -312,7 +373,7 @@ type GetLogsReturnType<TAbiEvent extends AbiEvent | undefined = undefined, TEven
312
373
  /**
313
374
  * @description Returns a collection of event logs.
314
375
  */
315
- declare function getLogs<TAbiEvent extends AbiEvent | undefined>(client: PublicClient, { address, blockHash, fromBlock, toBlock, event, args, }?: GetLogsParameters<TAbiEvent>): Promise<GetLogsReturnType<TAbiEvent>>;
376
+ declare function getLogs<TAbiEvent extends AbiEvent | undefined>(client: PublicClientArg, { address, blockHash, fromBlock, toBlock, event, args, }?: GetLogsParameters<TAbiEvent>): Promise<GetLogsReturnType<TAbiEvent>>;
316
377
 
317
378
  type GetStorageAtParameters = {
318
379
  address: Address;
@@ -325,7 +386,7 @@ type GetStorageAtParameters = {
325
386
  blockTag?: never;
326
387
  });
327
388
  type GetStorageAtReturnType = Hex | undefined;
328
- declare function getStorageAt(client: PublicClient, { address, blockNumber, blockTag, slot }: GetStorageAtParameters): Promise<GetStorageAtReturnType>;
389
+ declare function getStorageAt(client: PublicClientArg, { address, blockNumber, blockTag, slot }: GetStorageAtParameters): Promise<GetStorageAtReturnType>;
329
390
 
330
391
  type GetTransactionParameters = {
331
392
  /** The block hash */
@@ -359,11 +420,11 @@ type GetTransactionParameters = {
359
420
  hash: Hash;
360
421
  index?: number;
361
422
  };
362
- type GetTransactionReturnType<TChain extends Chain = Chain> = FormattedTransaction<TransactionFormatter<TChain>>;
423
+ type GetTransactionReturnType<TChain extends Chain | undefined = Chain> = FormattedTransaction<TransactionFormatter<TChain>>;
363
424
  /** @description Returns information about a transaction given a hash or block identifier. */
364
- declare function getTransaction<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, hash, index, }: GetTransactionParameters): Promise<GetTransactionReturnType<TChain>>;
425
+ declare function getTransaction<TChain extends Chain | undefined>(client: PublicClientArg<Transport, TChain>, { blockHash, blockNumber, blockTag, hash, index, }: GetTransactionParameters): Promise<GetTransactionReturnType<TChain>>;
365
426
 
366
- type GetTransactionConfirmationsParameters<TChain extends Chain = Chain> = {
427
+ type GetTransactionConfirmationsParameters<TChain extends Chain | undefined = Chain> = {
367
428
  /** The transaction hash. */
368
429
  hash: Hash;
369
430
  transactionReceipt?: never;
@@ -373,7 +434,7 @@ type GetTransactionConfirmationsParameters<TChain extends Chain = Chain> = {
373
434
  transactionReceipt: FormattedTransactionReceipt<TransactionReceiptFormatter<TChain>>;
374
435
  };
375
436
  type GetTransactionConfirmationsReturnType = bigint;
376
- declare function getTransactionConfirmations<TChain extends Chain>(client: PublicClient<any, TChain>, { hash, transactionReceipt }: GetTransactionConfirmationsParameters<TChain>): Promise<GetTransactionConfirmationsReturnType>;
437
+ declare function getTransactionConfirmations<TChain extends Chain | undefined>(client: PublicClientArg<Transport, TChain>, { hash, transactionReceipt }: GetTransactionConfirmationsParameters<TChain>): Promise<GetTransactionConfirmationsReturnType>;
377
438
 
378
439
  type GetTransactionCountParameters = {
379
440
  /** The account address. */
@@ -391,14 +452,14 @@ type GetTransactionCountReturnType = number;
391
452
  /**
392
453
  * @description Returns the number of transactions an account has broadcast / sent.
393
454
  */
394
- declare function getTransactionCount(client: PublicClient | WalletClient, { address, blockTag, blockNumber }: GetTransactionCountParameters): Promise<GetTransactionCountReturnType>;
455
+ declare function getTransactionCount(client: PublicClientArg | WalletClientArg, { address, blockTag, blockNumber }: GetTransactionCountParameters): Promise<GetTransactionCountReturnType>;
395
456
 
396
457
  type GetTransactionReceiptParameters = {
397
458
  /** The hash of the transaction. */
398
459
  hash: Hash;
399
460
  };
400
- type GetTransactionReceiptReturnType<TChain extends Chain = Chain> = FormattedTransactionReceipt<TransactionReceiptFormatter<TChain>>;
401
- declare function getTransactionReceipt<TChain extends Chain>(client: PublicClient<any, TChain>, { hash }: GetTransactionReceiptParameters): Promise<Formatted<ExtractFormatter<TChain, "transactionReceipt", Formatter<RpcTransactionReceipt, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>>>, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>, false, false>>;
461
+ type GetTransactionReceiptReturnType<TChain extends Chain | undefined = Chain> = FormattedTransactionReceipt<TransactionReceiptFormatter<TChain>>;
462
+ declare function getTransactionReceipt<TChain extends Chain | undefined>(client: PublicClientArg<Transport, TChain>, { hash }: GetTransactionReceiptParameters): Promise<Formatted<TransactionReceiptFormatter<TChain>, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>, false, false>>;
402
463
 
403
464
  type MAXIMUM_DEPTH = 20;
404
465
  type Contract<TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[], TFunctionName extends string = string> = {
@@ -448,27 +509,27 @@ type MulticallParameters<TContracts extends ContractConfig[] = ContractConfig[],
448
509
  multicallAddress?: Address;
449
510
  };
450
511
  type MulticallReturnType<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = MulticallResults<TContracts, TAllowFailure>;
451
- declare function multicall<TContracts extends ContractConfig[], TAllowFailure extends boolean = true>(client: PublicClient, args: MulticallParameters<TContracts, TAllowFailure>): Promise<MulticallReturnType<TContracts, TAllowFailure>>;
512
+ declare function multicall<TContracts extends ContractConfig[], TAllowFailure extends boolean = true>(client: PublicClientArg, args: MulticallParameters<TContracts, TAllowFailure>): Promise<MulticallReturnType<TContracts, TAllowFailure>>;
452
513
 
453
514
  type ReadContractParameters<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = Pick<CallParameters, 'blockNumber' | 'blockTag'> & ContractConfig<TAbi, TFunctionName, 'view' | 'pure'>;
454
515
  type ReadContractReturnType<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = ExtractResultFromAbi<TAbi, TFunctionName>;
455
- declare function readContract<TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: PublicClient, { abi, address, args, functionName, ...callRequest }: ReadContractParameters<TAbi, TFunctionName>): Promise<ReadContractReturnType<TAbi, TFunctionName>>;
516
+ declare function readContract<TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: PublicClientArg, { abi, address, args, functionName, ...callRequest }: ReadContractParameters<TAbi, TFunctionName>): Promise<ReadContractReturnType<TAbi, TFunctionName>>;
456
517
 
457
518
  type UninstallFilterParameters = {
458
519
  filter: Filter<any>;
459
520
  };
460
521
  type UninstallFilterReturnType = boolean;
461
- declare function uninstallFilter(client: PublicClient, { filter }: UninstallFilterParameters): Promise<UninstallFilterReturnType>;
522
+ declare function uninstallFilter(client: PublicClientArg, { filter }: UninstallFilterParameters): Promise<UninstallFilterReturnType>;
462
523
 
463
524
  type ReplacementReason = 'cancelled' | 'replaced' | 'repriced';
464
- type ReplacementReturnType<TChain extends Chain = Chain> = {
525
+ type ReplacementReturnType<TChain extends Chain | undefined = Chain> = {
465
526
  reason: ReplacementReason;
466
527
  replacedTransaction: Transaction;
467
528
  transaction: Transaction;
468
529
  transactionReceipt: GetTransactionReceiptReturnType<TChain>;
469
530
  };
470
- type WaitForTransactionReceiptReturnType<TChain extends Chain = Chain> = GetTransactionReceiptReturnType<TChain>;
471
- type WaitForTransactionReceiptParameters<TChain extends Chain = Chain> = {
531
+ type WaitForTransactionReceiptReturnType<TChain extends Chain | undefined = Chain> = GetTransactionReceiptReturnType<TChain>;
532
+ type WaitForTransactionReceiptParameters<TChain extends Chain | undefined = Chain> = {
472
533
  /** The number of confirmations (blocks that have passed) to wait before resolving. */
473
534
  confirmations?: number;
474
535
  /** The hash of the transaction. */
@@ -479,7 +540,7 @@ type WaitForTransactionReceiptParameters<TChain extends Chain = Chain> = {
479
540
  /** Optional timeout (in milliseconds) to wait before stopping polling. */
480
541
  timeout?: number;
481
542
  };
482
- declare function waitForTransactionReceipt<TChain extends Chain>(client: PublicClient<any, TChain>, { confirmations, hash, onReplaced, pollingInterval, timeout, }: WaitForTransactionReceiptParameters<TChain>): Promise<WaitForTransactionReceiptReturnType<TChain>>;
543
+ declare function waitForTransactionReceipt<TChain extends Chain | undefined>(client: PublicClientArg<Transport, TChain>, { confirmations, hash, onReplaced, pollingInterval, timeout, }: WaitForTransactionReceiptParameters<TChain>): Promise<WaitForTransactionReceiptReturnType<TChain>>;
483
544
 
484
545
  type OnBlockNumberParameter = GetBlockNumberReturnType;
485
546
  type OnBlockNumberFn = (blockNumber: OnBlockNumberParameter, prevBlockNumber: OnBlockNumberParameter | undefined) => void;
@@ -496,11 +557,11 @@ type WatchBlockNumberParameters = {
496
557
  pollingInterval?: number;
497
558
  };
498
559
  /** @description Watches and returns incoming block numbers. */
499
- declare function watchBlockNumber(client: PublicClient<any, any, any>, { emitOnBegin, emitMissed, onBlockNumber, onError, pollingInterval, }: WatchBlockNumberParameters): () => void;
560
+ declare function watchBlockNumber(client: PublicClientArg, { emitOnBegin, emitMissed, onBlockNumber, onError, pollingInterval, }: WatchBlockNumberParameters): () => void;
500
561
 
501
- type OnBlockParameter<TChain extends Chain = Chain, TIncludeTransactions = false> = Omit<GetBlockReturnType<TChain>, TIncludeTransactions extends false ? 'transactions' : ''>;
502
- type OnBlock<TChain extends Chain = Chain, TIncludeTransactions = false> = (block: OnBlockParameter<TChain, TIncludeTransactions>, prevBlock: OnBlockParameter<TChain, TIncludeTransactions> | undefined) => void;
503
- type WatchBlocksParameters<TChain extends Chain = Chain> = {
562
+ type OnBlockParameter<TChain extends Chain | undefined = Chain, TIncludeTransactions = false> = Omit<GetBlockReturnType<TChain>, TIncludeTransactions extends false ? 'transactions' : ''>;
563
+ type OnBlock<TChain extends Chain | undefined = Chain, TIncludeTransactions = false> = (block: OnBlockParameter<TChain, TIncludeTransactions>, prevBlock: OnBlockParameter<TChain, TIncludeTransactions> | undefined) => void;
564
+ type WatchBlocksParameters<TChain extends Chain | undefined = Chain> = {
504
565
  /** The block tag. Defaults to "latest". */
505
566
  blockTag?: BlockTag;
506
567
  /** Whether or not to emit the missed blocks to the callback. */
@@ -523,7 +584,7 @@ type WatchBlocksParameters<TChain extends Chain = Chain> = {
523
584
  onBlock: OnBlock<TChain>;
524
585
  });
525
586
  /** @description Watches and returns information for incoming blocks. */
526
- declare function watchBlocks<TChain extends Chain, TWatchBlocksParameters extends WatchBlocksParameters<TChain>>(client: PublicClient<any, TChain>, { blockTag, emitMissed, emitOnBegin, onBlock, onError, includeTransactions, pollingInterval, }: TWatchBlocksParameters): () => void;
587
+ declare function watchBlocks<TChain extends Chain | undefined, TWatchBlocksParameters extends WatchBlocksParameters<TChain>>(client: PublicClientArg<Transport, TChain>, { blockTag, emitMissed, emitOnBegin, onBlock, onError, includeTransactions, pollingInterval, }: TWatchBlocksParameters): () => void;
527
588
 
528
589
  type OnLogsParameter$1<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string> = TAbi extends Abi ? Log<bigint, number, ExtractAbiEvent<TAbi, TEventName>>[] : Log[];
529
590
  type OnLogsFn$1<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string> = (logs: OnLogsParameter$1<TAbi, TEventName>) => void;
@@ -544,7 +605,7 @@ type WatchContractEventParameters<TAbi extends Abi | readonly unknown[] = readon
544
605
  /** Polling frequency (in ms). Defaults to Client's pollingInterval config. */
545
606
  pollingInterval?: number;
546
607
  };
547
- declare function watchContractEvent<TAbi extends Abi | readonly unknown[], TEventName extends string>(client: PublicClient, { abi, address, args, batch, eventName, onError, onLogs, pollingInterval, }: WatchContractEventParameters<TAbi, TEventName>): () => void;
608
+ declare function watchContractEvent<TAbi extends Abi | readonly unknown[], TEventName extends string>(client: PublicClientArg, { abi, address, args, batch, eventName, onError, onLogs, pollingInterval, }: WatchContractEventParameters<TAbi, TEventName>): () => void;
548
609
 
549
610
  type OnLogsParameter<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = Log<bigint, number, TAbiEvent, [TAbiEvent], TEventName>[];
550
611
  type OnLogsFn<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = (logs: OnLogsParameter<TAbiEvent, TEventName>) => void;
@@ -566,7 +627,7 @@ type WatchEventParameters<TAbiEvent extends AbiEvent | undefined = undefined, TE
566
627
  event?: never;
567
628
  args?: never;
568
629
  });
569
- declare function watchEvent<TAbiEvent extends AbiEvent | undefined, TEventName extends string | undefined>(client: PublicClient, { address, args, batch, event, onError, onLogs, pollingInterval, }: WatchEventParameters<TAbiEvent>): () => void;
630
+ declare function watchEvent<TAbiEvent extends AbiEvent | undefined, TEventName extends string | undefined>(client: PublicClientArg, { address, args, batch, event, onError, onLogs, pollingInterval, }: WatchEventParameters<TAbiEvent>): () => void;
570
631
 
571
632
  type OnTransactionsParameter = Hash[];
572
633
  type OnTransactionsFn = (transactions: OnTransactionsParameter) => void;
@@ -580,119 +641,7 @@ type WatchPendingTransactionsParameters = {
580
641
  /** Polling frequency (in ms). Defaults to Client's pollingInterval config. */
581
642
  pollingInterval?: number;
582
643
  };
583
- declare function watchPendingTransactions(client: PublicClient, { batch, onError, onTransactions, pollingInterval, }: WatchPendingTransactionsParameters): () => void;
584
-
585
- type GetPermissionsReturnType = WalletPermission[];
586
- declare function getPermissions(client: WalletClient): Promise<WalletPermission[]>;
587
-
588
- type RequestAddressesReturnType = Address[];
589
- declare function requestAddresses(client: WalletClient): Promise<RequestAddressesReturnType>;
590
-
591
- type RequestPermissionsParameters = {
592
- eth_accounts: Record<string, any>;
593
- } & {
594
- [key: string]: Record<string, any>;
595
- };
596
- type RequestPermissionsReturnType = WalletPermission[];
597
- declare function requestPermissions(client: WalletClient, permissions: RequestPermissionsParameters): Promise<WalletPermission[]>;
598
-
599
- type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
600
- type SendTransactionParameters<TChain extends Chain = Chain> = FormattedTransactionRequest<TransactionRequestFormatter<TChain>> & {
601
- account: Account;
602
- } & ({
603
- assertChain?: false;
604
- chain?: TChain;
605
- } | {
606
- assertChain: true;
607
- chain: TChain;
608
- });
609
- type SendTransactionReturnType = Hash;
610
- declare function sendTransaction<TChain extends Chain>(client: WalletClient<any, any>, args: SendTransactionParameters<TChain>): Promise<SendTransactionReturnType>;
611
-
612
- type SignMessageParameters = {
613
- account: Account;
614
- } & ({
615
- /** @deprecated – `data` will be removed in 0.2.0; use `message` instead. */
616
- data: string;
617
- message?: never;
618
- } | {
619
- data?: never;
620
- message: string;
621
- });
622
- type SignMessageReturnType = Hex;
623
- declare function signMessage(client: WalletClient, { account, data, message }: SignMessageParameters): Promise<SignMessageReturnType>;
624
-
625
- type SignTypedDataParameters<TTypedData extends TypedData | {
626
- [key: string]: unknown;
627
- } = TypedData, TPrimaryType extends string = string> = {
628
- account: Account;
629
- } & TypedDataDefinition<TTypedData, TPrimaryType>;
630
- type TypedDataDefinition<TTypedData extends TypedData | {
631
- [key: string]: unknown;
632
- } = TypedData, TPrimaryType extends string = string> = {
633
- domain?: TypedDataDomain;
634
- types: Narrow<TTypedData>;
635
- primaryType: GetPrimaryType<TTypedData, TPrimaryType>;
636
- } & GetMessage<TTypedData, TPrimaryType>;
637
- type GetPrimaryType<TTypedData extends TypedData | {
638
- [key: string]: unknown;
639
- } = TypedData, TPrimaryType extends string = string> = TTypedData extends TypedData ? keyof TTypedData extends infer AbiFunctionNames ? AbiFunctionNames | (TPrimaryType extends AbiFunctionNames ? TPrimaryType : never) | (TypedData extends TTypedData ? string : never) : never : TPrimaryType;
640
- type GetMessage<TTypedData extends TypedData | {
641
- [key: string]: unknown;
642
- } = TypedData, TPrimaryType extends string = string, TSchema = TTypedData extends TypedData ? TypedDataToPrimitiveTypes<TTypedData> : {
643
- [key: string]: any;
644
- }, TMessage = TSchema[TPrimaryType extends keyof TSchema ? TPrimaryType : keyof TSchema]> = {
645
- [key: string]: any;
646
- } extends TMessage ? {
647
- /**
648
- * Data to sign
649
- *
650
- * Use a [const assertion](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) on {@link types} for type inference.
651
- */
652
- message: {
653
- [key: string]: unknown;
654
- };
655
- } : {
656
- /** Data to sign */
657
- message: TMessage;
658
- };
659
- type SignTypedDataReturnType = Hex;
660
- declare function signTypedData<TTypedData extends TypedData | {
661
- [key: string]: unknown;
662
- }, TPrimaryType extends string = string>(client: WalletClient, { account, domain, message, primaryType, types: types_, }: SignTypedDataParameters<TTypedData, TPrimaryType>): Promise<SignTypedDataReturnType>;
663
-
664
- type SwitchChainParameters = {
665
- id: Chain['id'];
666
- };
667
- declare function switchChain(client: WalletClient, { id }: SwitchChainParameters): Promise<void>;
668
-
669
- type WatchAssetParameters = WatchAssetParams;
670
- type WatchAssetReturnType = boolean;
671
- declare function watchAsset(client: WalletClient, params: WatchAssetParameters): Promise<WatchAssetReturnType>;
672
-
673
- type WriteContractParameters<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = Omit<SendTransactionParameters<TChain>, 'to' | 'data' | 'value'> & {
674
- value?: GetValue<TAbi, TFunctionName, SendTransactionParameters<TChain>['value']>;
675
- } & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'>;
676
- type WriteContractReturnType = SendTransactionReturnType;
677
- declare function writeContract<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: WalletClient, { abi, address, args, functionName, ...request }: WriteContractParameters<TChain, TAbi, TFunctionName>): Promise<WriteContractReturnType>;
678
-
679
- type Account = JsonRpcAccount | LocalAccount;
680
- type JsonRpcAccount = {
681
- address: Address;
682
- type: 'json-rpc';
683
- };
684
- type LocalAccount = {
685
- address: Address;
686
- signMessage: (message: string) => Promise<Hash>;
687
- signTransaction: (transaction: Omit<TransactionRequest, 'from'> & {
688
- chainId: number;
689
- from: Address;
690
- }) => Promise<Hash>;
691
- signTypedData: <TTypedData extends TypedData | {
692
- [key: string]: unknown;
693
- }, TPrimaryType extends string = string>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hash>;
694
- type: 'local';
695
- };
644
+ declare function watchPendingTransactions(client: PublicClientArg, { batch, onError, onTransactions, pollingInterval, }: WatchPendingTransactionsParameters): () => void;
696
645
 
697
646
  type FilterType = 'transaction' | 'block' | 'event';
698
647
  type Filter<TFilterType extends FilterType = 'event', TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = MaybeExtractEventArgsFromAbi<TAbi, TEventName>> = {
@@ -737,7 +686,7 @@ type GetEnsAddressReturnType = Address;
737
686
  * })
738
687
  * // '0xd2135CfB216b74109775236E36d4b433F1DF507B'
739
688
  */
740
- declare function getEnsAddress(client: PublicClient, { blockNumber, blockTag, name, universalResolverAddress: universalResolverAddress_, }: GetEnsAddressParameters): Promise<GetEnsAddressReturnType>;
689
+ declare function getEnsAddress(client: PublicClientArg, { blockNumber, blockTag, name, universalResolverAddress: universalResolverAddress_, }: GetEnsAddressParameters): Promise<GetEnsAddressReturnType>;
741
690
 
742
691
  type GetEnsNameParameters = Prettify<Pick<ReadContractParameters, 'blockNumber' | 'blockTag'> & {
743
692
  /** Address to get ENS name for. */
@@ -757,15 +706,15 @@ type GetEnsNameReturnType = string | null;
757
706
  * })
758
707
  * // 'wagmi-dev.eth'
759
708
  */
760
- declare function getEnsName(client: PublicClient, { address, blockNumber, blockTag, universalResolverAddress: universalResolverAddress_, }: GetEnsNameParameters): Promise<GetEnsNameReturnType>;
709
+ declare function getEnsName(client: PublicClientArg, { address, blockNumber, blockTag, universalResolverAddress: universalResolverAddress_, }: GetEnsNameParameters): Promise<GetEnsNameReturnType>;
761
710
 
762
- type PublicActions<TChain extends Chain = Chain> = {
711
+ type PublicActions<TChain extends Chain | undefined = Chain> = {
763
712
  call: (args: CallParameters<TChain>) => Promise<CallReturnType>;
764
713
  createBlockFilter: () => Promise<CreateBlockFilterReturnType>;
765
714
  createContractEventFilter: <TAbi extends Abi | readonly unknown[], TEventName extends string | undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined>(args: CreateContractEventFilterParameters<TAbi, TEventName, TArgs>) => Promise<CreateContractEventFilterReturnType<TAbi, TEventName, TArgs>>;
766
715
  createEventFilter: <TAbiEvent extends AbiEvent | undefined, TAbi extends Abi | readonly unknown[], TEventName extends string | undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined>(args?: CreateEventFilterParameters<TAbiEvent, TAbi, TEventName, TArgs>) => Promise<CreateEventFilterReturnType<TAbiEvent, TAbi, TEventName, TArgs>>;
767
716
  createPendingTransactionFilter: () => Promise<CreatePendingTransactionFilterReturnType>;
768
- estimateContractGas: <TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(args: EstimateContractGasParameters<TChain, TAbi, TFunctionName>) => Promise<EstimateContractGasReturnType>;
717
+ estimateContractGas: <TChain extends Chain | undefined, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(args: EstimateContractGasParameters<TChain, TAbi, TFunctionName>) => Promise<EstimateContractGasReturnType>;
769
718
  estimateGas: (args: EstimateGasParameters<TChain>) => Promise<EstimateGasReturnType>;
770
719
  getBalance: (args: GetBalanceParameters) => Promise<GetBalanceReturnType>;
771
720
  getBlock: (args?: GetBlockParameters) => Promise<GetBlockReturnType<TChain>>;
@@ -787,7 +736,7 @@ type PublicActions<TChain extends Chain = Chain> = {
787
736
  getTransactionReceipt: (args: GetTransactionReceiptParameters) => Promise<GetTransactionReceiptReturnType<TChain>>;
788
737
  multicall: <TContracts extends ContractConfig[], TAllowFailure extends boolean = true>(args: MulticallParameters<TContracts, TAllowFailure>) => Promise<MulticallReturnType<TContracts, TAllowFailure>>;
789
738
  readContract: <TAbi extends Abi | readonly unknown[], TFunctionName extends string>(args: ReadContractParameters<TAbi, TFunctionName>) => Promise<ReadContractReturnType<TAbi, TFunctionName>>;
790
- simulateContract: <TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any, TChainOverride extends Chain | undefined = undefined>(args: SimulateContractParameters<TChain, TAbi, TFunctionName, TChainOverride>) => Promise<SimulateContractReturnType<TChainOverride extends Chain ? TChainOverride : TChain, TAbi, TFunctionName>>;
739
+ simulateContract: <TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any, TChainOverride extends Chain | undefined = undefined>(args: SimulateContractParameters<TChain, TAbi, TFunctionName, TChainOverride>) => Promise<SimulateContractReturnType<TChain, TAbi, TFunctionName, TChainOverride>>;
791
740
  uninstallFilter: (args: UninstallFilterParameters) => Promise<UninstallFilterReturnType>;
792
741
  waitForTransactionReceipt: (args: WaitForTransactionReceiptParameters<TChain>) => Promise<WaitForTransactionReceiptReturnType<TChain>>;
793
742
  watchBlockNumber: (args: WatchBlockNumberParameters) => ReturnType<typeof watchBlockNumber>;
@@ -797,8 +746,9 @@ type PublicActions<TChain extends Chain = Chain> = {
797
746
  watchPendingTransactions: (args: WatchPendingTransactionsParameters) => ReturnType<typeof watchPendingTransactions>;
798
747
  };
799
748
 
800
- type WalletClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain> = {
801
- chain?: ClientConfig<TTransport, TChain>['chain'];
749
+ type WalletClientConfig<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain, TAccount extends Account | Address | undefined = undefined> = {
750
+ account?: TAccount;
751
+ chain?: TChain;
802
752
  /** The key of the Wallet Client. */
803
753
  key?: ClientConfig['key'];
804
754
  /** The name of the Wallet Client. */
@@ -807,35 +757,39 @@ type WalletClientConfig<TTransport extends Transport = Transport, TChain extends
807
757
  pollingInterval?: ClientConfig['pollingInterval'];
808
758
  transport: ClientConfig<TTransport, TChain>['transport'];
809
759
  };
810
- type WalletClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain> & (TIncludeActions extends true ? WalletActions<TChain> : {});
760
+ type WalletClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = undefined, TAccount extends Account | undefined = undefined, TIncludeActions extends boolean = true> = Client<TTransport, TChain> & {
761
+ account: TAccount;
762
+ } & (TIncludeActions extends true ? WalletActions<TChain, TAccount> : {});
763
+ type WalletClientArg<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined, TIncludeActions extends boolean = boolean> = WalletClient<TTransport, TChain, TAccount, TIncludeActions>;
811
764
  /**
812
765
  * @description Creates a wallet client with a given transport.
813
766
  */
814
- declare function createWalletClient<TTransport extends Transport, TChain extends Chain>({ chain, transport, key, name, pollingInterval, }: WalletClientConfig<TTransport, TChain>): WalletClient<TTransport, TChain, true>;
767
+ declare function createWalletClient<TTransport extends Transport, TChain extends Chain | undefined = undefined, TAccountOrAddress extends Account | Address | undefined = undefined, TAccount extends Account | undefined = ParseAccount<TAccountOrAddress>>({ account, chain, transport, key, name, pollingInterval, }: WalletClientConfig<TTransport, TChain, TAccountOrAddress>): WalletClient<TTransport, TChain, TAccount, true>;
815
768
 
816
- type WalletActions<TChain extends Chain = Chain> = {
769
+ type WalletActions<TChain extends Chain | undefined = Chain, TAccount extends Account | undefined = undefined> = {
817
770
  addChain: (args: AddChainParameters) => Promise<void>;
818
- deployContract: <TAbi extends Abi | readonly unknown[]>(args: DeployContractParameters<TChain, TAbi>) => Promise<DeployContractReturnType>;
771
+ deployContract: <TAbi extends Abi | readonly unknown[], TChainOverride extends Chain | undefined>(args: DeployContractParameters<TChain, TAbi, TAccount, TChainOverride>) => Promise<DeployContractReturnType>;
819
772
  getAddresses: () => Promise<GetAddressesReturnType>;
820
773
  getChainId: () => Promise<GetChainIdReturnType>;
821
774
  getPermissions: () => Promise<GetPermissionsReturnType>;
822
775
  requestAddresses: () => Promise<RequestAddressesReturnType>;
823
776
  requestPermissions: (args: RequestPermissionsParameters) => Promise<RequestPermissionsReturnType>;
824
- sendTransaction: <TChainOverride extends Chain>(args: SendTransactionParameters<TChainOverride>) => Promise<SendTransactionReturnType>;
825
- signMessage: (args: SignMessageParameters) => Promise<SignMessageReturnType>;
777
+ sendTransaction: <TChainOverride extends Chain | undefined>(args: SendTransactionParameters<TChain, TAccount, TChainOverride>) => Promise<SendTransactionReturnType>;
778
+ signMessage: (args: SignMessageParameters<TAccount>) => Promise<SignMessageReturnType>;
826
779
  signTypedData: <TTypedData extends TypedData | {
827
780
  [key: string]: unknown;
828
- }>(args: SignTypedDataParameters<TTypedData>) => Promise<SignTypedDataReturnType>;
781
+ }, TPrimaryType extends string = string>(args: SignTypedDataParameters<TTypedData, TPrimaryType, TAccount>) => Promise<SignTypedDataReturnType>;
829
782
  switchChain: (args: SwitchChainParameters) => Promise<void>;
830
783
  watchAsset: (args: WatchAssetParameters) => Promise<WatchAssetReturnType>;
831
- writeContract: <TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainOverride extends Chain>(args: WriteContractParameters<TChainOverride, TAbi, TFunctionName>) => Promise<WriteContractReturnType>;
784
+ writeContract: <TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainOverride extends Chain | undefined>(args: WriteContractParameters<TChainOverride, TAbi, TFunctionName, TAccount, TChainOverride>) => Promise<WriteContractReturnType>;
832
785
  };
833
786
 
834
- type PublicClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain> = Pick<ClientConfig<TTransport, TChain>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'transport'>;
835
- type PublicClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain, PublicRequests> & (TIncludeActions extends true ? PublicActions<TChain> : {});
787
+ type PublicClientConfig<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain> = Pick<ClientConfig<TTransport, TChain>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'transport'>;
788
+ type PublicClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain, PublicRequests> & (TIncludeActions extends true ? PublicActions<TChain> : {});
789
+ type PublicClientArg<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TIncludeActions extends boolean = boolean> = PublicClient<TTransport, TChain, TIncludeActions>;
836
790
  /**
837
791
  * @description Creates a public client with a given transport.
838
792
  */
839
- declare function createPublicClient<TTransport extends Transport, TChain extends Chain>({ chain, key, name, transport, pollingInterval, }: PublicClientConfig<TTransport, TChain>): PublicClient<TTransport, TChain, true>;
793
+ declare function createPublicClient<TTransport extends Transport, TChain extends Chain | undefined>({ chain, key, name, transport, pollingInterval, }: PublicClientConfig<TTransport, TChain>): PublicClient<TTransport, TChain, true>;
840
794
 
841
- export { writeContract as $, Account as A, BlockFormatter as B, CallParameters as C, estimateContractGas as D, EstimateGasParameters as E, FormattedBlock as F, GetBytecodeParameters as G, getBytecode as H, getStorageAt as I, JsonRpcAccount as J, multicall as K, LocalAccount as L, MulticallParameters as M, readContract as N, OnLogsFn as O, PublicClient as P, simulateContract as Q, ReadContractParameters as R, SendTransactionParameters as S, TransactionReceiptFormatter as T, watchContractEvent as U, DeployContractParameters as V, WalletClient as W, DeployContractReturnType as X, WriteContractParameters as Y, WriteContractReturnType as Z, deployContract as _, PublicClientConfig as a, OnTransactionsFn as a$, GetEnsAddressParameters as a0, GetEnsNameParameters as a1, getEnsAddress as a2, getEnsName as a3, call as a4, createBlockFilter as a5, createEventFilter as a6, createPendingTransactionFilter as a7, estimateGas as a8, getBalance as a9, GetBalanceParameters as aA, GetBalanceReturnType as aB, GetBlockParameters as aC, GetBlockNumberParameters as aD, GetBlockNumberReturnType as aE, GetBlockReturnType as aF, GetBlockTransactionCountParameters as aG, GetBlockTransactionCountReturnType as aH, GetFeeHistoryParameters as aI, GetFeeHistoryReturnType as aJ, GetFilterChangesParameters as aK, GetFilterChangesReturnType as aL, GetFilterLogsParameters as aM, GetFilterLogsReturnType as aN, GetGasPriceReturnType as aO, GetTransactionParameters as aP, GetTransactionConfirmationsParameters as aQ, GetTransactionConfirmationsReturnType as aR, GetTransactionCountParameters as aS, GetTransactionCountReturnType as aT, GetTransactionReceiptParameters as aU, GetTransactionReceiptReturnType as aV, GetTransactionReturnType as aW, OnBlock as aX, OnBlockNumberFn as aY, OnBlockNumberParameter as aZ, OnBlockParameter as a_, getBlock as aa, getBlockNumber as ab, getBlockNumberCache as ac, getBlockTransactionCount as ad, getChainId as ae, getFeeHistory as af, getFilterChanges as ag, getFilterLogs as ah, getLogs as ai, getGasPrice as aj, getTransaction as ak, getTransactionConfirmations as al, getTransactionCount as am, getTransactionReceipt as an, uninstallFilter as ao, waitForTransactionReceipt as ap, watchBlockNumber as aq, watchBlocks as ar, watchEvent as as, watchPendingTransactions as at, CallReturnType as au, CreateBlockFilterReturnType as av, CreateEventFilterParameters as aw, CreateEventFilterReturnType as ax, CreatePendingTransactionFilterReturnType as ay, EstimateGasReturnType as az, WalletClientConfig as b, OnTransactionsParameter as b0, ReplacementReason as b1, ReplacementReturnType as b2, UninstallFilterParameters as b3, UninstallFilterReturnType as b4, WaitForTransactionReceiptParameters as b5, WaitForTransactionReceiptReturnType as b6, WatchBlockNumberParameters as b7, WatchBlocksParameters as b8, WatchPendingTransactionsParameters as b9, addChain as ba, getAddresses as bb, getPermissions as bc, requestAddresses as bd, requestPermissions as be, sendTransaction as bf, signMessage as bg, signTypedData as bh, switchChain as bi, watchAsset as bj, AddChainParameters as bk, FormattedTransactionRequest as bl, GetPermissionsReturnType as bm, GetAddressesReturnType as bn, RequestAddressesReturnType as bo, RequestPermissionsReturnType as bp, SendTransactionReturnType as bq, SignMessageParameters as br, SignMessageReturnType as bs, SignTypedDataParameters as bt, SignTypedDataReturnType as bu, SwitchChainParameters as bv, WatchAssetParameters as bw, WatchAssetReturnType as bx, createPublicClient as c, createWalletClient as d, FormattedTransactionReceipt as e, FormattedTransactionRequest$1 as f, TransactionRequestFormatter as g, defineBlock as h, defineTransactionReceipt as i, defineTransactionRequest as j, formatBlock as k, formatTransactionRequest as l, CreateContractEventFilterParameters as m, CreateContractEventFilterReturnType as n, EstimateContractGasParameters as o, EstimateContractGasReturnType as p, GetBytecodeReturnType as q, GetStorageAtParameters as r, GetStorageAtReturnType as s, MulticallReturnType as t, OnLogsParameter as u, ReadContractReturnType as v, SimulateContractParameters as w, SimulateContractReturnType as x, WatchContractEventParameters as y, createContractEventFilter as z };
795
+ export { getEnsAddress as $, estimateContractGas as A, BlockFormatter as B, CallParameters as C, getBytecode as D, EstimateGasParameters as E, FormattedBlock as F, GetBytecodeParameters as G, getStorageAt as H, multicall as I, readContract as J, simulateContract as K, watchContractEvent as L, MulticallParameters as M, DeployContractParameters as N, OnLogsFn as O, PublicClient as P, DeployContractReturnType as Q, ReadContractParameters as R, SendTransactionParameters as S, TransactionReceiptFormatter as T, WriteContractParameters as U, WriteContractReturnType as V, WalletClient as W, deployContract as X, writeContract as Y, GetEnsAddressParameters as Z, GetEnsNameParameters as _, PublicClientConfig as a, ReplacementReturnType as a$, getEnsName as a0, call as a1, createBlockFilter as a2, createEventFilter as a3, createPendingTransactionFilter as a4, estimateGas as a5, getBalance as a6, getBlock as a7, getBlockNumber as a8, getBlockNumberCache as a9, GetBlockNumberParameters as aA, GetBlockNumberReturnType as aB, GetBlockReturnType as aC, GetBlockTransactionCountParameters as aD, GetBlockTransactionCountReturnType as aE, GetFeeHistoryParameters as aF, GetFeeHistoryReturnType as aG, GetFilterChangesParameters as aH, GetFilterChangesReturnType as aI, GetFilterLogsParameters as aJ, GetFilterLogsReturnType as aK, GetGasPriceReturnType as aL, GetTransactionParameters as aM, GetTransactionConfirmationsParameters as aN, GetTransactionConfirmationsReturnType as aO, GetTransactionCountParameters as aP, GetTransactionCountReturnType as aQ, GetTransactionReceiptParameters as aR, GetTransactionReceiptReturnType as aS, GetTransactionReturnType as aT, OnBlock as aU, OnBlockNumberFn as aV, OnBlockNumberParameter as aW, OnBlockParameter as aX, OnTransactionsFn as aY, OnTransactionsParameter as aZ, ReplacementReason as a_, getBlockTransactionCount as aa, getChainId as ab, getFeeHistory as ac, getFilterChanges as ad, getFilterLogs as ae, getLogs as af, getGasPrice as ag, getTransaction as ah, getTransactionConfirmations as ai, getTransactionCount as aj, getTransactionReceipt as ak, uninstallFilter as al, waitForTransactionReceipt as am, watchBlockNumber as an, watchBlocks as ao, watchEvent as ap, watchPendingTransactions as aq, CallReturnType as ar, CreateBlockFilterReturnType as as, CreateEventFilterParameters as at, CreateEventFilterReturnType as au, CreatePendingTransactionFilterReturnType as av, EstimateGasReturnType as aw, GetBalanceParameters as ax, GetBalanceReturnType as ay, GetBlockParameters as az, WalletClientConfig as b, UninstallFilterParameters as b0, UninstallFilterReturnType as b1, WaitForTransactionReceiptParameters as b2, WaitForTransactionReceiptReturnType as b3, WatchBlockNumberParameters as b4, WatchBlocksParameters as b5, WatchPendingTransactionsParameters as b6, WalletClientArg as b7, PublicClientArg as b8, GetAccountParameter as b9, addChain as ba, getAddresses as bb, getPermissions as bc, requestAddresses as bd, requestPermissions as be, sendTransaction as bf, signMessage as bg, signTypedData as bh, switchChain as bi, watchAsset as bj, AddChainParameters as bk, FormattedTransactionRequest as bl, GetPermissionsReturnType as bm, GetAddressesReturnType as bn, RequestAddressesReturnType as bo, RequestPermissionsReturnType as bp, SendTransactionReturnType as bq, SignMessageParameters as br, SignMessageReturnType as bs, SignTypedDataParameters as bt, SignTypedDataReturnType as bu, SwitchChainParameters as bv, WatchAssetParameters as bw, WatchAssetReturnType as bx, createPublicClient as c, createWalletClient as d, FormattedTransactionReceipt as e, FormattedTransactionRequest$1 as f, TransactionRequestFormatter as g, defineBlock as h, defineTransactionReceipt as i, defineTransactionRequest as j, formatBlock as k, formatTransactionRequest as l, CreateContractEventFilterParameters as m, CreateContractEventFilterReturnType as n, EstimateContractGasParameters as o, EstimateContractGasReturnType as p, GetBytecodeReturnType as q, GetStorageAtParameters as r, GetStorageAtReturnType as s, MulticallReturnType as t, OnLogsParameter as u, ReadContractReturnType as v, SimulateContractParameters as w, SimulateContractReturnType as x, WatchContractEventParameters as y, createContractEventFilter as z };