viem 0.0.1-alpha.35 → 0.0.1-alpha.37

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 (67) hide show
  1. package/README.md +132 -0
  2. package/dist/abi.d.ts +2 -2
  3. package/dist/abi.js +2 -2
  4. package/dist/abi.mjs +1 -1
  5. package/dist/{chain-7b7ac245.d.ts → chain-a34aa9a2.d.ts} +65 -63
  6. package/dist/{chain-145cfaf3.d.ts → chain-b1229232.d.ts} +1 -1
  7. package/dist/chains.d.ts +3 -3
  8. package/dist/chains.js +46 -46
  9. package/dist/chains.mjs +1 -1
  10. package/dist/{chunk-HQCSH22G.js → chunk-534U2FZG.js} +1824 -129
  11. package/dist/chunk-534U2FZG.js.map +1 -0
  12. package/dist/{chunk-5NDMORWZ.mjs → chunk-AS2YWIFN.mjs} +3 -5
  13. package/dist/{chunk-5NDMORWZ.mjs.map → chunk-AS2YWIFN.mjs.map} +1 -1
  14. package/dist/{chunk-57YM6E7I.js → chunk-JXFHSHM6.js} +21 -23
  15. package/dist/chunk-JXFHSHM6.js.map +1 -0
  16. package/dist/{chunk-PBW4YL37.mjs → chunk-WVZFIDQ5.mjs} +1844 -149
  17. package/dist/chunk-WVZFIDQ5.mjs.map +1 -0
  18. package/dist/contract.d.ts +7 -7
  19. package/dist/contract.js +2 -6
  20. package/dist/contract.mjs +11 -15
  21. package/dist/{createClient-7c715e2c.d.ts → createClient-8024655d.d.ts} +3 -11
  22. package/dist/{createPublicClient-4d24afb2.d.ts → createPublicClient-f283b09d.d.ts} +62 -59
  23. package/dist/{eip1193-d538ae6d.d.ts → eip1193-a4f254d2.d.ts} +2 -2
  24. package/dist/{encodeFunctionResult-f59f4cfe.d.ts → encodeFunctionResult-c3d6c7ea.d.ts} +1 -1
  25. package/dist/ens.d.ts +4 -4
  26. package/dist/ens.js +3 -4
  27. package/dist/ens.js.map +1 -1
  28. package/dist/ens.mjs +2 -3
  29. package/dist/ens.mjs.map +1 -1
  30. package/dist/{formatAbiItem-89d97367.d.ts → formatAbiItem-d79cb207.d.ts} +1 -1
  31. package/dist/{getAbiItem-c9cbc8b8.d.ts → getAbiItem-48e793da.d.ts} +1 -1
  32. package/dist/index.d.ts +27 -16
  33. package/dist/index.js +89 -93
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +82 -86
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/{parseGwei-ad6d1914.d.ts → parseGwei-a8c67c77.d.ts} +11 -22
  38. package/dist/public.d.ts +6 -6
  39. package/dist/public.js +2 -3
  40. package/dist/public.mjs +1 -2
  41. package/dist/{test-8646fb50.d.ts → test-f8bc2fa7.d.ts} +3 -11
  42. package/dist/test.d.ts +5 -5
  43. package/dist/test.js +2 -3
  44. package/dist/test.mjs +1 -2
  45. package/dist/utils/index.d.ts +27 -16
  46. package/dist/utils/index.js +2 -4
  47. package/dist/utils/index.mjs +11 -13
  48. package/dist/wallet.d.ts +4 -4
  49. package/dist/wallet.js +2 -4
  50. package/dist/wallet.mjs +5 -7
  51. package/dist/window.d.ts +2 -2
  52. package/package.json +1 -1
  53. package/dist/chunk-3FT7UKPT.js +0 -1216
  54. package/dist/chunk-3FT7UKPT.js.map +0 -1
  55. package/dist/chunk-57YM6E7I.js.map +0 -1
  56. package/dist/chunk-A665BF7O.js +0 -205
  57. package/dist/chunk-A665BF7O.js.map +0 -1
  58. package/dist/chunk-HQCSH22G.js.map +0 -1
  59. package/dist/chunk-PBW4YL37.mjs.map +0 -1
  60. package/dist/chunk-PH5LCMME.mjs +0 -205
  61. package/dist/chunk-PH5LCMME.mjs.map +0 -1
  62. package/dist/chunk-TJK6AFBM.js +0 -265
  63. package/dist/chunk-TJK6AFBM.js.map +0 -1
  64. package/dist/chunk-WQDVW7EJ.mjs +0 -1216
  65. package/dist/chunk-WQDVW7EJ.mjs.map +0 -1
  66. package/dist/chunk-YEVW7GK5.mjs +0 -265
  67. package/dist/chunk-YEVW7GK5.mjs.map +0 -1
@@ -1,10 +1,10 @@
1
- export { D as DecodeAbiParametersResponse, E as EncodeAbiParametersResponse, G as GetAbiItemArgs, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-c9cbc8b8.js';
2
- export { D as DecodeErrorResultArgs, a as DecodeErrorResultResponse, b as DecodeEventLogArgs, c as DecodeEventLogResponse, d as DecodeFunctionDataArgs, e as DecodeFunctionResultArgs, f as DecodeFunctionResultResponse, E as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-f59f4cfe.js';
3
- export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-89d97367.js';
4
- export { m as CreateContractEventFilterArgs, n as CreateContractEventFilterResponse, N as DeployContractArgs, Q as DeployContractResponse, o as EstimateContractGasArgs, p as EstimateContractGasResponse, G as GetBytecodeArgs, q as GetBytecodeResponse, r as GetStorageAtArgs, s as GetStorageAtResponse, M as MulticallArgs, t as MulticallResponse, O as OnLogs, u as OnLogsResponse, R as ReadContractArgs, v as ReadContractResponse, w as SimulateContractArgs, x as SimulateContractResponse, y as WatchContractEventArgs, U as WriteContractArgs, V as WriteContractResponse, z as createContractEventFilter, X as deployContract, A as estimateContractGas, D as getBytecode, H as getStorageAt, I as multicall, J as readContract, K as simulateContract, L as watchContractEvent, Y as writeContract } from './createPublicClient-4d24afb2.js';
1
+ export { D as DecodeAbiParametersResponse, E as EncodeAbiParametersResponse, G as GetAbiItemArgs, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-48e793da.js';
2
+ export { D as DecodeErrorResultArgs, a as DecodeErrorResultResponse, b as DecodeEventLogArgs, c as DecodeEventLogResponse, d as DecodeFunctionDataArgs, e as DecodeFunctionResultArgs, f as DecodeFunctionResultResponse, E as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-c3d6c7ea.js';
3
+ export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-d79cb207.js';
4
+ export { n as CreateContractEventFilterArgs, o as CreateContractEventFilterResponse, U as DeployContractArgs, V as DeployContractResponse, p as EstimateContractGasArgs, q as EstimateContractGasResponse, G as GetBytecodeArgs, r as GetBytecodeResponse, s as GetStorageAtArgs, t as GetStorageAtResponse, M as MulticallArgs, u as MulticallResponse, O as OnLogs, v as OnLogsResponse, R as ReadContractArgs, w as ReadContractResponse, x as SimulateContractArgs, y as SimulateContractResponse, z as WatchContractEventArgs, X as WriteContractArgs, Y as WriteContractResponse, D as createContractEventFilter, Z as deployContract, H as estimateContractGas, I as getBytecode, J as getStorageAt, K as multicall, L as readContract, N as simulateContract, Q as watchContractEvent, _ as writeContract } from './createPublicClient-f283b09d.js';
5
5
  import 'abitype';
6
- import './chain-7b7ac245.js';
6
+ import './chain-a34aa9a2.js';
7
7
  import '@wagmi/chains';
8
8
  import 'ethers@6/types/providers';
9
- import './eip1193-d538ae6d.js';
10
- import './createClient-7c715e2c.js';
9
+ import './eip1193-a4f254d2.js';
10
+ import './createClient-8024655d.js';
package/dist/contract.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkA665BF7Ojs = require('./chunk-A665BF7O.js');
5
4
 
6
5
 
7
6
 
@@ -11,7 +10,6 @@ var _chunkA665BF7Ojs = require('./chunk-A665BF7O.js');
11
10
 
12
11
 
13
12
 
14
- var _chunk3FT7UKPTjs = require('./chunk-3FT7UKPT.js');
15
13
 
16
14
 
17
15
 
@@ -25,9 +23,9 @@ var _chunk3FT7UKPTjs = require('./chunk-3FT7UKPT.js');
25
23
 
26
24
 
27
25
 
26
+ var _chunk534U2FZGjs = require('./chunk-534U2FZG.js');
28
27
 
29
28
 
30
- var _chunkHQCSH22Gjs = require('./chunk-HQCSH22G.js');
31
29
 
32
30
 
33
31
 
@@ -51,7 +49,5 @@ var _chunkHQCSH22Gjs = require('./chunk-HQCSH22G.js');
51
49
 
52
50
 
53
51
 
54
-
55
-
56
- exports.createContractEventFilter = _chunk3FT7UKPTjs.createContractEventFilter; exports.decodeAbiParameters = _chunkHQCSH22Gjs.decodeAbiParameters; exports.decodeErrorResult = _chunkHQCSH22Gjs.decodeErrorResult; exports.decodeEventLog = _chunkHQCSH22Gjs.decodeEventLog; exports.decodeFunctionData = _chunkHQCSH22Gjs.decodeFunctionData; exports.decodeFunctionResult = _chunkHQCSH22Gjs.decodeFunctionResult; exports.deployContract = _chunkA665BF7Ojs.deployContract; exports.encodeAbiParameters = _chunkHQCSH22Gjs.encodeAbiParameters; exports.encodeDeployData = _chunkHQCSH22Gjs.encodeDeployData; exports.encodeErrorResult = _chunkHQCSH22Gjs.encodeErrorResult; exports.encodeEventTopics = _chunkHQCSH22Gjs.encodeEventTopics; exports.encodeFunctionData = _chunkHQCSH22Gjs.encodeFunctionData; exports.encodeFunctionResult = _chunkHQCSH22Gjs.encodeFunctionResult; exports.estimateContractGas = _chunk3FT7UKPTjs.estimateContractGas; exports.formatAbiItem = _chunkHQCSH22Gjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkHQCSH22Gjs.formatAbiItemWithArgs; exports.getAbiItem = _chunkHQCSH22Gjs.getAbiItem; exports.getBytecode = _chunk3FT7UKPTjs.getBytecode; exports.getStorageAt = _chunk3FT7UKPTjs.getStorageAt; exports.multicall = _chunk3FT7UKPTjs.multicall; exports.readContract = _chunk3FT7UKPTjs.readContract; exports.simulateContract = _chunk3FT7UKPTjs.simulateContract; exports.watchContractEvent = _chunk3FT7UKPTjs.watchContractEvent; exports.writeContract = _chunkA665BF7Ojs.writeContract;
52
+ exports.createContractEventFilter = _chunk534U2FZGjs.createContractEventFilter; exports.decodeAbiParameters = _chunk534U2FZGjs.decodeAbiParameters; exports.decodeErrorResult = _chunk534U2FZGjs.decodeErrorResult; exports.decodeEventLog = _chunk534U2FZGjs.decodeEventLog; exports.decodeFunctionData = _chunk534U2FZGjs.decodeFunctionData; exports.decodeFunctionResult = _chunk534U2FZGjs.decodeFunctionResult; exports.deployContract = _chunk534U2FZGjs.deployContract; exports.encodeAbiParameters = _chunk534U2FZGjs.encodeAbiParameters; exports.encodeDeployData = _chunk534U2FZGjs.encodeDeployData; exports.encodeErrorResult = _chunk534U2FZGjs.encodeErrorResult; exports.encodeEventTopics = _chunk534U2FZGjs.encodeEventTopics; exports.encodeFunctionData = _chunk534U2FZGjs.encodeFunctionData; exports.encodeFunctionResult = _chunk534U2FZGjs.encodeFunctionResult; exports.estimateContractGas = _chunk534U2FZGjs.estimateContractGas; exports.formatAbiItem = _chunk534U2FZGjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunk534U2FZGjs.formatAbiItemWithArgs; exports.getAbiItem = _chunk534U2FZGjs.getAbiItem; exports.getBytecode = _chunk534U2FZGjs.getBytecode; exports.getStorageAt = _chunk534U2FZGjs.getStorageAt; exports.multicall = _chunk534U2FZGjs.multicall; exports.readContract = _chunk534U2FZGjs.readContract; exports.simulateContract = _chunk534U2FZGjs.simulateContract; exports.watchContractEvent = _chunk534U2FZGjs.watchContractEvent; exports.writeContract = _chunk534U2FZGjs.writeContract;
57
53
  //# sourceMappingURL=contract.js.map
package/dist/contract.mjs CHANGED
@@ -1,33 +1,29 @@
1
- import {
2
- deployContract,
3
- writeContract
4
- } from "./chunk-PH5LCMME.mjs";
5
1
  import {
6
2
  createContractEventFilter,
7
- estimateContractGas,
8
- getBytecode,
9
- getStorageAt,
10
- multicall,
11
- readContract,
12
- simulateContract,
13
- watchContractEvent
14
- } from "./chunk-WQDVW7EJ.mjs";
15
- import {
16
3
  decodeAbiParameters,
17
4
  decodeErrorResult,
18
5
  decodeEventLog,
19
6
  decodeFunctionData,
20
7
  decodeFunctionResult,
8
+ deployContract,
21
9
  encodeAbiParameters,
22
10
  encodeDeployData,
23
11
  encodeErrorResult,
24
12
  encodeEventTopics,
25
13
  encodeFunctionData,
26
14
  encodeFunctionResult,
15
+ estimateContractGas,
27
16
  formatAbiItem,
28
17
  formatAbiItemWithArgs,
29
- getAbiItem
30
- } from "./chunk-PBW4YL37.mjs";
18
+ getAbiItem,
19
+ getBytecode,
20
+ getStorageAt,
21
+ multicall,
22
+ readContract,
23
+ simulateContract,
24
+ watchContractEvent,
25
+ writeContract
26
+ } from "./chunk-WVZFIDQ5.mjs";
31
27
  export {
32
28
  createContractEventFilter,
33
29
  decodeAbiParameters,
@@ -1,5 +1,5 @@
1
- import { R as Requests } from './eip1193-d538ae6d.js';
2
- import { C as Chain } from './chain-7b7ac245.js';
1
+ import { R as Requests } from './eip1193-a4f254d2.js';
2
+ import { C as Chain } from './chain-a34aa9a2.js';
3
3
 
4
4
  type BaseRpcRequests = {
5
5
  request(...args: any): Promise<any>;
@@ -55,15 +55,7 @@ type ClientConfig<TTransport extends Transport = Transport, TChain extends Chain
55
55
  transport: TTransport;
56
56
  };
57
57
  /**
58
- * @description Creates a base RPC client with the given transport.
59
- *
60
- * - Intended to be used as a base for other RPC clients.
61
- * - Has access to _all_ EIP-1474 RPC methods.
62
- *
63
- * @example
64
- * import { mainnet } from 'viem/chains'
65
- * import { createClient, http } from 'viem/clients'
66
- * const client = createClient(http({ chain: mainnet }))
58
+ * @description Creates a base client with the given transport.
67
59
  */
68
60
  declare function createClient<TTransport extends Transport, TChain extends Chain, TRequests extends BaseRpcRequests>({ chain, key, name, pollingInterval, transport, type, }: ClientConfig<TTransport, TChain, TRequests>): Client<TTransport, TChain, TRequests>;
69
61
 
@@ -1,7 +1,7 @@
1
- import { W as WalletPermission, a as WatchAssetParams, S as SignableRequests, b as WalletRequests, P as PublicRequests } from './eip1193-d538ae6d.js';
2
- import { a as Transport, b as ClientConfig, C as Client } from './createClient-7c715e2c.js';
3
- import { Abi, Narrow, Address as Address$1, AbiEvent, ExtractAbiEvent } from 'abitype';
4
- import { C as Chain, J as ExtractFormatter, S as Formatters, V as Formatter, K as Formatted, d as Block, R as RpcBlock, z as Transaction, T as TransactionReceipt, r as RpcTransactionReceipt, W as TransactionType, s as RpcTransactionRequest, u as TransactionRequest, A as Address, g as BlockTag, H as Hex, X as MergeIntersectionProperties, Y as ExtractConstructorArgsFromAbi, a as Hash, B as ByteArray, Z as GetValue, h as ContractConfig, _ as ExtractResultFromAbi, $ as MaybeAbiEventName, a0 as MaybeExtractEventArgsFromAbi, f as BlockNumber, a1 as ExtractEventNameFromAbi, F as FeeHistory, L as Log, M as FormattedTransaction, N as TransactionFormatter, a2 as ExtractEventArgsFromAbi, a3 as Prettify } from './chain-7b7ac245.js';
1
+ import { W as WalletPermission, a as WatchAssetParams, P as PublicRequests } from './eip1193-a4f254d2.js';
2
+ import { a as Transport, b as ClientConfig, C as Client } from './createClient-8024655d.js';
3
+ import { Abi, Narrow, Address, AbiEvent, ExtractAbiEvent } from 'abitype';
4
+ import { C as Chain, J as ExtractFormatter, S as Formatters, V as Formatter, K as Formatted, d as Block, R as RpcBlock, z as Transaction, T as TransactionReceipt, r as RpcTransactionReceipt, W as TransactionType, s as RpcTransactionRequest, u as TransactionRequest, g as BlockTag, H as Hex, X as MergeIntersectionProperties, Y as ExtractConstructorArgsFromAbi, a as Hash, Z as GetValue, h as ContractConfig, _ as ExtractResultFromAbi, $ as MaybeAbiEventName, a0 as MaybeExtractEventArgsFromAbi, c as Address$1, f as BlockNumber, a1 as ExtractEventNameFromAbi, F as FeeHistory, L as Log, M as FormattedTransaction, N as TransactionFormatter, a2 as ExtractEventArgsFromAbi, a3 as Prettify } from './chain-a34aa9a2.js';
5
5
 
6
6
  type BlockFormatter<TChain extends Chain = Chain> = ExtractFormatter<TChain, 'block', NonNullable<Formatters['block']>>;
7
7
  type FormattedBlock<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, Block>;
@@ -31,16 +31,16 @@ type FormattedTransactionRequest$1<TFormatter extends Formatter | undefined = Fo
31
31
  declare function formatTransactionRequest(transactionRequest: Partial<TransactionRequest>): RpcTransactionRequest;
32
32
  declare const defineTransactionRequest: <TFormat extends Formatter<Partial<TransactionRequest<bigint, number>>, Partial<RpcTransactionRequest> & {
33
33
  [key: string]: unknown;
34
- }>, TExclude extends ("value" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "data" | "from" | "gas" | "nonce" | "to" | "accessList")[] = []>({ exclude, format: formatOverride, }: {
34
+ }>, TExclude extends ("value" | "from" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "data" | "gas" | "nonce" | "to" | "accessList")[] = []>({ exclude, format: formatOverride, }: {
35
35
  exclude?: TExclude | undefined;
36
36
  format?: TFormat | undefined;
37
37
  }) => (data: Partial<TransactionRequest<bigint, number>> & {
38
38
  [key: string]: unknown;
39
39
  }) => RpcTransactionRequest & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
40
40
 
41
- type FormattedCall<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
41
+ type FormattedCall<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
42
42
  type CallArgs<TChain extends Chain = Chain> = FormattedCall<TransactionRequestFormatter<TChain>> & {
43
- from?: Address;
43
+ account?: Account;
44
44
  } & ({
45
45
  /** The balance of the account at a block number. */
46
46
  blockNumber?: bigint;
@@ -67,8 +67,8 @@ type DeployContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonl
67
67
  type DeployContractResponse = SendTransactionResponse;
68
68
  declare function deployContract<TChain extends Chain, TAbi extends Abi | readonly unknown[]>(walletClient: WalletClient, { abi, args, bytecode, ...request }: DeployContractArgs<TChain, TAbi>): Promise<DeployContractResponse>;
69
69
 
70
- type GetAccountsResponse = Address$1[];
71
- declare function getAccounts(client: WalletClient): Promise<GetAccountsResponse>;
70
+ type GetAddressesResponse = Address[];
71
+ declare function getAddresses(client: WalletClient): Promise<GetAddressesResponse>;
72
72
 
73
73
  type GetChainIdResponse = number;
74
74
  declare function getChainId(client: PublicClient | WalletClient): Promise<GetChainIdResponse>;
@@ -76,8 +76,8 @@ declare function getChainId(client: PublicClient | WalletClient): Promise<GetCha
76
76
  type GetPermissionsResponse = WalletPermission[];
77
77
  declare function getPermissions(client: WalletClient): Promise<WalletPermission[]>;
78
78
 
79
- type RequestAccountsResponse = Address$1[];
80
- declare function requestAccounts(client: WalletClient): Promise<RequestAccountsResponse>;
79
+ type RequestAddressesResponse = Address[];
80
+ declare function requestAddresses(client: WalletClient): Promise<RequestAddressesResponse>;
81
81
 
82
82
  type RequestPermissionsArgs = {
83
83
  eth_accounts: Record<string, any>;
@@ -87,8 +87,10 @@ type RequestPermissionsArgs = {
87
87
  type RequestPermissionsResponse = WalletPermission[];
88
88
  declare function requestPermissions(client: WalletClient, permissions: RequestPermissionsArgs): Promise<WalletPermission[]>;
89
89
 
90
- type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
91
- type SendTransactionArgs<TChain extends Chain = Chain> = FormattedTransactionRequest<TransactionRequestFormatter<TChain>> & ({
90
+ type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
91
+ type SendTransactionArgs<TChain extends Chain = Chain> = FormattedTransactionRequest<TransactionRequestFormatter<TChain>> & {
92
+ account: Account;
93
+ } & ({
92
94
  assertChain?: false;
93
95
  chain?: TChain;
94
96
  } | {
@@ -99,11 +101,11 @@ type SendTransactionResponse = Hash;
99
101
  declare function sendTransaction<TChain extends Chain>(client: WalletClient, args: SendTransactionArgs<TChain>): Promise<SendTransactionResponse>;
100
102
 
101
103
  type SignMessageArgs = {
102
- from: Address;
103
- data: Hex | ByteArray;
104
+ account: Account;
105
+ data: string;
104
106
  };
105
107
  type SignMessageResponse = Hex;
106
- declare function signMessage(client: WalletClient, { from, data: data_ }: SignMessageArgs): Promise<SignMessageResponse>;
108
+ declare function signMessage(client: WalletClient, { account, data }: SignMessageArgs): Promise<SignMessageResponse>;
107
109
 
108
110
  type SwitchChainArgs = {
109
111
  id: Chain['id'];
@@ -136,7 +138,7 @@ type CreateBlockFilterResponse = Filter<'block'>;
136
138
  declare function createBlockFilter(client: PublicClient): Promise<CreateBlockFilterResponse>;
137
139
 
138
140
  type CreateEventFilterArgs<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
139
- address?: Address | Address[];
141
+ address?: Address$1 | Address$1[];
140
142
  fromBlock?: BlockNumber | BlockTag;
141
143
  toBlock?: BlockNumber | BlockTag;
142
144
  } & (MaybeExtractEventArgsFromAbi<TAbi, TEventName> extends infer TEventFilterArgs ? {
@@ -156,7 +158,7 @@ type CreateEventFilterResponse<TAbiEvent extends AbiEvent | undefined = undefine
156
158
  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, }?: CreateEventFilterArgs<TAbiEvent, TAbi, TEventName, TArgs>): Promise<CreateEventFilterResponse<TAbiEvent, TAbi, TEventName, TArgs>>;
157
159
 
158
160
  type CreateContractEventFilterArgs<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
159
- address?: Address | Address[];
161
+ address?: Address$1 | Address$1[];
160
162
  abi: Narrow<TAbi>;
161
163
  eventName?: ExtractEventNameFromAbi<TAbi, TEventName>;
162
164
  fromBlock?: BlockNumber | BlockTag;
@@ -171,8 +173,10 @@ type CreateContractEventFilterArgs<TAbi extends Abi | readonly unknown[] = Abi,
171
173
  type CreateContractEventFilterResponse<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = Filter<'event', TAbi, TEventName, TArgs>;
172
174
  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, }: CreateContractEventFilterArgs<TAbi, TEventName, TArgs>): Promise<CreateContractEventFilterResponse<TAbi, TEventName, TArgs>>;
173
175
 
174
- type FormattedEstimateGas<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
175
- type EstimateGasArgs<TChain extends Chain = Chain> = FormattedEstimateGas<TransactionRequestFormatter<TChain>> & ({
176
+ type FormattedEstimateGas<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
177
+ type EstimateGasArgs<TChain extends Chain = Chain> = FormattedEstimateGas<TransactionRequestFormatter<TChain>> & {
178
+ account: Account;
179
+ } & ({
176
180
  /** The balance of the account at a block number. */
177
181
  blockNumber?: bigint;
178
182
  blockTag?: never;
@@ -185,17 +189,17 @@ type EstimateGasResponse = bigint;
185
189
  /**
186
190
  * @description Estimates the gas necessary to complete a transaction without submitting it to the network.
187
191
  */
188
- declare function estimateGas<TChain extends Chain>(client: PublicClient<any, TChain>, args: EstimateGasArgs<TChain>): Promise<EstimateGasResponse>;
192
+ declare function estimateGas<TChain extends Chain>(client: PublicClient<any, TChain> | WalletClient, args: EstimateGasArgs<TChain>): Promise<EstimateGasResponse>;
189
193
 
190
- type EstimateContractGasArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<CallArgs<TChain>, 'to' | 'data' | 'value'> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & {
191
- value?: GetValue<TAbi, TFunctionName, CallArgs<TChain>['value']>;
194
+ type EstimateContractGasArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<EstimateGasArgs<TChain>, 'data' | 'to' | 'value'> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & {
195
+ value?: GetValue<TAbi, TFunctionName, EstimateGasArgs<TChain>['value']>;
192
196
  };
193
197
  type EstimateContractGasResponse = bigint;
194
198
  declare function estimateContractGas<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: PublicClient<any, TChain>, { abi, address, args, functionName, ...request }: EstimateContractGasArgs<TChain, TAbi, TFunctionName>): Promise<EstimateContractGasResponse>;
195
199
 
196
200
  type GetBalanceArgs = {
197
201
  /** The address of the account. */
198
- address: Address;
202
+ address: Address$1;
199
203
  } & ({
200
204
  /** The balance of the account at a block number. */
201
205
  blockNumber?: bigint;
@@ -231,7 +235,7 @@ type GetBlockArgs = {
231
235
  blockTag?: BlockTag;
232
236
  });
233
237
  type GetBlockResponse<TChain extends Chain = Chain> = FormattedBlock<BlockFormatter<TChain>>;
234
- declare function getBlock<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, includeTransactions, }?: GetBlockArgs): Promise<GetBlockResponse<TChain>>;
238
+ declare function getBlock<TChain extends Chain>(client: PublicClient<any, TChain> | WalletClient, { blockHash, blockNumber, blockTag, includeTransactions, }?: GetBlockArgs): Promise<GetBlockResponse<TChain>>;
235
239
 
236
240
  type GetBlockNumberArgs = {
237
241
  /** The maximum age (in ms) of the cached value. */
@@ -285,7 +289,7 @@ type GetBlockTransactionCountResponse = number;
285
289
  declare function getBlockTransactionCount<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, }?: GetBlockTransactionCountArgs): Promise<GetBlockTransactionCountResponse>;
286
290
 
287
291
  type GetBytecodeArgs = {
288
- address: Address;
292
+ address: Address$1;
289
293
  } & ({
290
294
  blockNumber?: never;
291
295
  blockTag?: BlockTag;
@@ -328,11 +332,11 @@ type GetGasPriceResponse = bigint;
328
332
  /**
329
333
  * @description Returns the current price of gas (in wei).
330
334
  */
331
- declare function getGasPrice(client: PublicClient): Promise<GetGasPriceResponse>;
335
+ declare function getGasPrice(client: PublicClient | WalletClient): Promise<GetGasPriceResponse>;
332
336
 
333
337
  type GetLogsArgs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
334
338
  /** Address or list of addresses from which logs originated */
335
- address?: Address | Address[];
339
+ address?: Address$1 | Address$1[];
336
340
  } & ({
337
341
  event: TAbiEvent;
338
342
  args?: MaybeExtractEventArgsFromAbi<[TAbiEvent], TEventName>;
@@ -358,7 +362,7 @@ type GetLogsResponse<TAbiEvent extends AbiEvent | undefined = undefined, TEventN
358
362
  declare function getLogs<TAbiEvent extends AbiEvent | undefined>(client: PublicClient, { address, blockHash, fromBlock, toBlock, event, args, }?: GetLogsArgs<TAbiEvent>): Promise<GetLogsResponse<TAbiEvent>>;
359
363
 
360
364
  type GetStorageAtArgs = {
361
- address: Address;
365
+ address: Address$1;
362
366
  slot: Hex;
363
367
  } & ({
364
368
  blockNumber?: never;
@@ -423,7 +427,7 @@ type GetTransactionReceiptArgs = {
423
427
  hash: Hash;
424
428
  };
425
429
  type GetTransactionReceiptResponse<TChain extends Chain = Chain> = FormattedTransactionReceipt<TransactionReceiptFormatter<TChain>>;
426
- declare function getTransactionReceipt<TChain extends Chain>(client: PublicClient<any, TChain>, { hash }: GetTransactionReceiptArgs): Promise<Formatted<ExtractFormatter<TChain, "transactionReceipt", Formatter<RpcTransactionReceipt, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>>>, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>, false>>;
430
+ declare function getTransactionReceipt<TChain extends Chain>(client: PublicClient<any, TChain>, { hash }: GetTransactionReceiptArgs): Promise<Formatted<ExtractFormatter<TChain, "transactionReceipt", Formatter<RpcTransactionReceipt, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>>>, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>, false, false>>;
427
431
 
428
432
  type MAXIMUM_DEPTH = 20;
429
433
  type Contract<TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[], TFunctionName extends string = string> = {
@@ -470,7 +474,7 @@ type MulticallResults<TContracts extends Contract[], TAllowFailure extends boole
470
474
  type MulticallArgs<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = Pick<CallArgs, 'blockNumber' | 'blockTag'> & {
471
475
  allowFailure?: TAllowFailure;
472
476
  contracts: readonly [...MulticallContracts<TContracts>];
473
- multicallAddress: Address;
477
+ multicallAddress: Address$1;
474
478
  };
475
479
  type MulticallResponse<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = MulticallResults<TContracts, TAllowFailure>;
476
480
  declare function multicall<TContracts extends ContractConfig[], TAllowFailure extends boolean = true>(client: PublicClient, args: MulticallArgs<TContracts, TAllowFailure>): Promise<MulticallResponse<TContracts, TAllowFailure>>;
@@ -554,7 +558,7 @@ type OnLogsResponse$1<TAbi extends Abi | readonly unknown[] = readonly unknown[]
554
558
  type OnLogs$1<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string> = (logs: OnLogsResponse$1<TAbi, TEventName>) => void;
555
559
  type WatchContractEventArgs<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string> = {
556
560
  /** The address of the contract. */
557
- address?: Address | Address[];
561
+ address?: Address$1 | Address$1[];
558
562
  /** Contract ABI. */
559
563
  abi: Narrow<TAbi>;
560
564
  args?: ExtractEventArgsFromAbi<TAbi, TEventName>;
@@ -575,7 +579,7 @@ type OnLogsResponse<TAbiEvent extends AbiEvent | undefined = undefined, TEventNa
575
579
  type OnLogs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = (logs: OnLogsResponse<TAbiEvent, TEventName>) => void;
576
580
  type WatchEventArgs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
577
581
  /** The address of the contract. */
578
- address?: Address | Address[];
582
+ address?: Address$1 | Address$1[];
579
583
  /** Whether or not the event logs should be batched on each invocation. */
580
584
  batch?: boolean;
581
585
  /** The callback to call when an error occurred when trying to get for a new block. */
@@ -607,6 +611,21 @@ type WatchPendingTransactionsArgs = {
607
611
  };
608
612
  declare function watchPendingTransactions(client: PublicClient, { batch, onError, onTransactions, pollingInterval, }: WatchPendingTransactionsArgs): () => void;
609
613
 
614
+ type Account = JsonRpcAccount | ExternallyOwnedAccount;
615
+ type JsonRpcAccount = {
616
+ address: Address$1;
617
+ type: 'json-rpc';
618
+ };
619
+ type ExternallyOwnedAccount = {
620
+ address: Address$1;
621
+ signMessage: (message: string) => Promise<Hash>;
622
+ signTransaction: (transaction: Omit<TransactionRequest, 'from'> & {
623
+ chainId: number;
624
+ from: Address$1;
625
+ }) => Promise<Hash>;
626
+ type: 'externally-owned';
627
+ };
628
+
610
629
  type FilterType = 'transaction' | 'block' | 'event';
611
630
  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>> = {
612
631
  id: Hex;
@@ -633,9 +652,9 @@ type GetEnsAddressArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockT
633
652
  /** ENS name to get address. */
634
653
  name: string;
635
654
  /** Address of ENS Universal Resolver Contract */
636
- universalResolverAddress?: Address;
655
+ universalResolverAddress?: Address$1;
637
656
  }>;
638
- type GetEnsAddressResponse = Address;
657
+ type GetEnsAddressResponse = Address$1;
639
658
  /**
640
659
  * @description Gets address for ENS name.
641
660
  *
@@ -651,9 +670,9 @@ declare function getEnsAddress(client: PublicClient, { blockNumber, blockTag, na
651
670
 
652
671
  type GetEnsNameArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockTag'> & {
653
672
  /** Address to get ENS name for. */
654
- address: Address;
673
+ address: Address$1;
655
674
  /** Address of ENS Universal Resolver Contract. */
656
- universalResolverAddress?: Address;
675
+ universalResolverAddress?: Address$1;
657
676
  }>;
658
677
  type GetEnsNameResponse = string | null;
659
678
  /**
@@ -716,48 +735,32 @@ type WalletClientConfig<TTransport extends Transport = Transport, TChain extends
716
735
  pollingInterval?: ClientConfig['pollingInterval'];
717
736
  transport: ClientConfig<TTransport, TChain>['transport'];
718
737
  };
719
- type WalletClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain, SignableRequests & WalletRequests> & (TIncludeActions extends true ? WalletActions<TChain> : {});
738
+ type WalletClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain> & (TIncludeActions extends true ? WalletActions<TChain> : {});
720
739
  /**
721
740
  * @description Creates a wallet client with a given transport.
722
- *
723
- * - Only has access to "wallet" & "signable" EIP-1474 RPC methods
724
- * (ie. `eth_sendTransaction`, `eth_requestAccounts`, etc).
725
- *
726
- * @example
727
- * import { createWalletClient, custom } from 'viem'
728
- * const client = createWalletClient(
729
- * custom(window.ethereum)
730
- * )
731
741
  */
732
742
  declare function createWalletClient<TTransport extends Transport, TChain extends Chain>({ transport, key, name, pollingInterval, }: WalletClientConfig<TTransport, TChain>): WalletClient<TTransport, TChain, true>;
733
743
 
734
744
  type WalletActions<TChain extends Chain = Chain> = {
735
745
  addChain: (args: AddChainArgs) => Promise<void>;
736
746
  deployContract: <TAbi extends Abi | readonly unknown[]>(args: DeployContractArgs<TChain, TAbi>) => Promise<DeployContractResponse>;
737
- getAccounts: () => Promise<GetAccountsResponse>;
747
+ getAddresses: () => Promise<GetAddressesResponse>;
738
748
  getChainId: () => Promise<GetChainIdResponse>;
739
749
  getPermissions: () => Promise<GetPermissionsResponse>;
740
- requestAccounts: () => Promise<RequestAccountsResponse>;
750
+ requestAddresses: () => Promise<RequestAddressesResponse>;
741
751
  requestPermissions: (args: RequestPermissionsArgs) => Promise<RequestPermissionsResponse>;
742
- sendTransaction: (args: SendTransactionArgs<TChain>) => Promise<SendTransactionResponse>;
752
+ sendTransaction: <TChainOverride extends Chain>(args: SendTransactionArgs<TChainOverride>) => Promise<SendTransactionResponse>;
743
753
  signMessage: (args: SignMessageArgs) => Promise<SignMessageResponse>;
744
754
  switchChain: (args: SwitchChainArgs) => Promise<void>;
745
755
  watchAsset: (args: WatchAssetArgs) => Promise<WatchAssetResponse>;
746
- writeContract: <TAbi extends Abi | readonly unknown[], TFunctionName extends string>(args: WriteContractArgs<TChain, TAbi, TFunctionName>) => Promise<WriteContractResponse>;
756
+ writeContract: <TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainOverride extends Chain>(args: WriteContractArgs<TChainOverride, TAbi, TFunctionName>) => Promise<WriteContractResponse>;
747
757
  };
748
758
 
749
759
  type PublicClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain> = Pick<ClientConfig<TTransport, TChain>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'transport'>;
750
760
  type PublicClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain, PublicRequests> & (TIncludeActions extends true ? PublicActions<TChain> : {});
751
761
  /**
752
762
  * @description Creates a public client with a given transport.
753
- *
754
- * - Only has access to "public" EIP-1474 RPC methods (ie. `eth_blockNumber`, etc).
755
- *
756
- * @example
757
- * import { mainnet } from 'viem/chains'
758
- * import { createPublicClient, http } from 'viem/clients'
759
- * const client = createPublicClient({ transport: http('https://...') })
760
763
  */
761
764
  declare function createPublicClient<TTransport extends Transport, TChain extends Chain>({ chain, key, name, transport, pollingInterval, }: PublicClientConfig<TTransport, TChain>): PublicClient<TTransport, TChain, true>;
762
765
 
763
- export { getEnsAddress as $, estimateContractGas as A, BlockFormatter as B, CallArgs as C, getBytecode as D, EstimateGasArgs as E, FormattedBlock as F, GetBytecodeArgs as G, getStorageAt as H, multicall as I, readContract as J, simulateContract as K, watchContractEvent as L, MulticallArgs as M, DeployContractArgs as N, OnLogs as O, PublicClient as P, DeployContractResponse as Q, ReadContractArgs as R, SendTransactionArgs as S, TransactionReceiptFormatter as T, WriteContractArgs as U, WriteContractResponse as V, WalletClient as W, deployContract as X, writeContract as Y, GetEnsAddressArgs as Z, GetEnsNameArgs as _, PublicClientConfig as a, WaitForTransactionReceiptArgs 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, GetBlockNumberResponse as aA, GetBlockResponse as aB, GetBlockTransactionCountArgs as aC, GetBlockTransactionCountResponse as aD, GetFeeHistoryArgs as aE, GetFeeHistoryResponse as aF, GetFilterChangesArgs as aG, GetFilterChangesResponse as aH, GetFilterLogsArgs as aI, GetFilterLogsResponse as aJ, GetGasPriceResponse as aK, GetTransactionArgs as aL, GetTransactionConfirmationsArgs as aM, GetTransactionConfirmationsResponse as aN, GetTransactionReceiptArgs as aO, GetTransactionReceiptResponse as aP, GetTransactionResponse as aQ, OnBlock as aR, OnBlockNumber as aS, OnBlockNumberResponse as aT, OnBlockResponse as aU, OnTransactions as aV, OnTransactionsResponse as aW, ReplacementReason as aX, ReplacementResponse as aY, UninstallFilterArgs as aZ, UninstallFilterResponse 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, getTransactionReceipt as aj, uninstallFilter as ak, waitForTransactionReceipt as al, watchBlockNumber as am, watchBlocks as an, watchEvent as ao, watchPendingTransactions as ap, CallResponse as aq, CreateBlockFilterResponse as ar, CreateEventFilterArgs as as, CreateEventFilterResponse as at, CreatePendingTransactionFilterResponse as au, EstimateGasResponse as av, GetBalanceArgs as aw, GetBalanceResponse as ax, GetBlockArgs as ay, GetBlockNumberArgs as az, WalletClientConfig as b, WaitForTransactionReceiptResponse as b0, WatchBlockNumberArgs as b1, WatchBlocksArgs as b2, WatchPendingTransactionsArgs as b3, addChain as b4, getAccounts as b5, getPermissions as b6, requestAccounts as b7, requestPermissions as b8, sendTransaction as b9, signMessage as ba, switchChain as bb, watchAsset as bc, AddChainArgs as bd, FormattedTransactionRequest as be, GetPermissionsResponse as bf, GetAccountsResponse as bg, RequestAccountsResponse as bh, RequestPermissionsResponse as bi, SendTransactionResponse as bj, SignMessageArgs as bk, SignMessageResponse as bl, SwitchChainArgs as bm, WatchAssetArgs as bn, WatchAssetResponse as bo, 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, CreateContractEventFilterArgs as m, CreateContractEventFilterResponse as n, EstimateContractGasArgs as o, EstimateContractGasResponse as p, GetBytecodeResponse as q, GetStorageAtArgs as r, GetStorageAtResponse as s, MulticallResponse as t, OnLogsResponse as u, ReadContractResponse as v, SimulateContractArgs as w, SimulateContractResponse as x, WatchContractEventArgs as y, createContractEventFilter as z };
766
+ export { GetEnsAddressArgs as $, Account as A, BlockFormatter as B, CallArgs as C, createContractEventFilter as D, ExternallyOwnedAccount as E, FormattedBlock as F, GetBytecodeArgs as G, estimateContractGas as H, getBytecode as I, getStorageAt as J, multicall as K, readContract as L, MulticallArgs as M, simulateContract as N, OnLogs as O, PublicClient as P, watchContractEvent as Q, ReadContractArgs as R, SendTransactionArgs as S, TransactionReceiptFormatter as T, DeployContractArgs as U, DeployContractResponse as V, WalletClient as W, WriteContractArgs as X, WriteContractResponse as Y, deployContract as Z, writeContract as _, PublicClientConfig as a, UninstallFilterArgs as a$, GetEnsNameArgs as a0, getEnsAddress as a1, getEnsName as a2, call as a3, createBlockFilter as a4, createEventFilter as a5, createPendingTransactionFilter as a6, estimateGas as a7, getBalance as a8, getBlock as a9, GetBlockArgs as aA, GetBlockNumberArgs as aB, GetBlockNumberResponse as aC, GetBlockResponse as aD, GetBlockTransactionCountArgs as aE, GetBlockTransactionCountResponse as aF, GetFeeHistoryArgs as aG, GetFeeHistoryResponse as aH, GetFilterChangesArgs as aI, GetFilterChangesResponse as aJ, GetFilterLogsArgs as aK, GetFilterLogsResponse as aL, GetGasPriceResponse as aM, GetTransactionArgs as aN, GetTransactionConfirmationsArgs as aO, GetTransactionConfirmationsResponse as aP, GetTransactionReceiptArgs as aQ, GetTransactionReceiptResponse as aR, GetTransactionResponse as aS, OnBlock as aT, OnBlockNumber as aU, OnBlockNumberResponse as aV, OnBlockResponse as aW, OnTransactions as aX, OnTransactionsResponse as aY, ReplacementReason as aZ, ReplacementResponse as a_, getBlockNumber as aa, getBlockNumberCache as ab, getBlockTransactionCount as ac, getChainId as ad, getFeeHistory as ae, getFilterChanges as af, getFilterLogs as ag, getLogs as ah, getGasPrice as ai, getTransaction as aj, getTransactionConfirmations as ak, getTransactionReceipt as al, uninstallFilter as am, waitForTransactionReceipt as an, watchBlockNumber as ao, watchBlocks as ap, watchEvent as aq, watchPendingTransactions as ar, CallResponse as as, CreateBlockFilterResponse as at, CreateEventFilterArgs as au, CreateEventFilterResponse as av, CreatePendingTransactionFilterResponse as aw, EstimateGasResponse as ax, GetBalanceArgs as ay, GetBalanceResponse as az, WalletClientConfig as b, UninstallFilterResponse as b0, WaitForTransactionReceiptArgs as b1, WaitForTransactionReceiptResponse as b2, WatchBlockNumberArgs as b3, WatchBlocksArgs as b4, WatchPendingTransactionsArgs as b5, addChain as b6, getAddresses as b7, getPermissions as b8, requestAddresses as b9, requestPermissions as ba, sendTransaction as bb, signMessage as bc, switchChain as bd, watchAsset as be, AddChainArgs as bf, FormattedTransactionRequest as bg, GetPermissionsResponse as bh, GetAddressesResponse as bi, RequestAddressesResponse as bj, RequestPermissionsResponse as bk, SendTransactionResponse as bl, SignMessageArgs as bm, SignMessageResponse as bn, SwitchChainArgs as bo, WatchAssetArgs as bp, WatchAssetResponse as bq, 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, EstimateGasArgs as m, CreateContractEventFilterArgs as n, CreateContractEventFilterResponse as o, EstimateContractGasArgs as p, EstimateContractGasResponse as q, GetBytecodeResponse as r, GetStorageAtArgs as s, GetStorageAtResponse as t, MulticallResponse as u, OnLogsResponse as v, ReadContractResponse as w, SimulateContractArgs as x, SimulateContractResponse as y, WatchContractEventArgs as z };
@@ -1,4 +1,4 @@
1
- import { A as Address, a as Hash, a4 as Quantity, s as RpcTransactionRequest, m as RpcBlockNumber, g as BlockTag, l as RpcBlockIdentifier, H as Hex, n as RpcFeeHistory, R as RpcBlock, p as RpcLog, a8 as LogTopic, q as RpcTransaction, r as RpcTransactionReceipt, t as RpcUncle } from './chain-7b7ac245.js';
1
+ import { c as Address, a as Hash, a4 as Quantity, s as RpcTransactionRequest, m as RpcBlockNumber, g as BlockTag, l as RpcBlockIdentifier, H as Hex, n as RpcFeeHistory, R as RpcBlock, p as RpcLog, a8 as LogTopic, q as RpcTransaction, r as RpcTransactionReceipt, t as RpcUncle } from './chain-a34aa9a2.js';
2
2
 
3
3
  declare class RpcError extends Error {
4
4
  code: number;
@@ -997,4 +997,4 @@ type WalletRequests = {
997
997
  };
998
998
  type Requests = PublicRequests & SignableRequests & WalletRequests;
999
999
 
1000
- export { Events as E, PublicRequests as P, Requests as R, SignableRequests as S, TestRequests as T, WalletPermission as W, WatchAssetParams as a, WalletRequests as b };
1000
+ export { Events as E, PublicRequests as P, Requests as R, TestRequests as T, WalletPermission as W, WatchAssetParams as a };
@@ -1,5 +1,5 @@
1
1
  import { Abi, Narrow } from 'abitype';
2
- import { H as Hex, b as AbiItem, a8 as LogTopic, a1 as ExtractEventNameFromAbi, a9 as ExtractEventArgsFromTopics, aa as ExtractFunctionNameFromAbi, a7 as ExtractArgsFromAbi, _ as ExtractResultFromAbi, Y as ExtractConstructorArgsFromAbi, ab as ExtractErrorNameFromAbi, ac as ExtractErrorArgsFromAbi, a2 as ExtractEventArgsFromAbi } from './chain-7b7ac245.js';
2
+ import { H as Hex, A as AbiItem, a8 as LogTopic, a1 as ExtractEventNameFromAbi, a9 as ExtractEventArgsFromTopics, aa as ExtractFunctionNameFromAbi, a7 as ExtractArgsFromAbi, _ as ExtractResultFromAbi, Y as ExtractConstructorArgsFromAbi, ab as ExtractErrorNameFromAbi, ac as ExtractErrorArgsFromAbi, a2 as ExtractEventArgsFromAbi } from './chain-a34aa9a2.js';
3
3
 
4
4
  type DecodeErrorResultArgs = {
5
5
  abi?: Abi;
package/dist/ens.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { Z as GetEnsAddressArgs, _ as GetEnsNameArgs, $ as getEnsAddress, a0 as getEnsName } from './createPublicClient-4d24afb2.js';
1
+ export { $ as GetEnsAddressArgs, a0 as GetEnsNameArgs, a1 as getEnsAddress, a2 as getEnsName } from './createPublicClient-f283b09d.js';
2
2
  export { l as labelhash, n as namehash } from './namehash-88f4639d.js';
3
- import './eip1193-d538ae6d.js';
4
- import './chain-7b7ac245.js';
3
+ import './eip1193-a4f254d2.js';
4
+ import './chain-a34aa9a2.js';
5
5
  import '@wagmi/chains';
6
6
  import 'abitype';
7
7
  import 'ethers@6/types/providers';
8
- import './createClient-7c715e2c.js';
8
+ import './createClient-8024655d.js';
9
9
 
10
10
  /**
11
11
  * @description Normalizes ENS name
package/dist/ens.js CHANGED
@@ -3,9 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk57YM6E7Ijs = require('./chunk-57YM6E7I.js');
7
- require('./chunk-3FT7UKPT.js');
8
- require('./chunk-HQCSH22G.js');
6
+ var _chunkJXFHSHM6js = require('./chunk-JXFHSHM6.js');
7
+ require('./chunk-534U2FZG.js');
9
8
 
10
9
  // src/utils/ens/normalize.ts
11
10
  var _idnauts46hx = require('idna-uts46-hx');
@@ -18,5 +17,5 @@ function normalize(name) {
18
17
 
19
18
 
20
19
 
21
- exports.getEnsAddress = _chunk57YM6E7Ijs.getEnsAddress; exports.getEnsName = _chunk57YM6E7Ijs.getEnsName; exports.labelhash = _chunk57YM6E7Ijs.labelhash; exports.namehash = _chunk57YM6E7Ijs.namehash; exports.normalize = normalize;
20
+ exports.getEnsAddress = _chunkJXFHSHM6js.getEnsAddress; exports.getEnsName = _chunkJXFHSHM6js.getEnsName; exports.labelhash = _chunkJXFHSHM6js.labelhash; exports.namehash = _chunkJXFHSHM6js.namehash; exports.normalize = normalize;
22
21
  //# sourceMappingURL=ens.js.map
package/dist/ens.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/ens/normalize.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,SAAS,iBAAiB;AAWnB,SAAS,UAAU,MAAc;AACtC,SAAO,UAAU,MAAM,EAAE,cAAc,KAAK,CAAC;AAC/C","sourcesContent":["import { toUnicode } from 'idna-uts46-hx'\n\n/**\n * @description Normalizes ENS name\n *\n * @example\n * normalize('wagmi-dev.eth')\n * 'wagmi-dev.eth'\n *\n * @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names\n */\nexport function normalize(name: string) {\n return toUnicode(name, { useStd3ASCII: true })\n}\n"]}
1
+ {"version":3,"sources":["../src/utils/ens/normalize.ts"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,iBAAiB;AAWnB,SAAS,UAAU,MAAc;AACtC,SAAO,UAAU,MAAM,EAAE,cAAc,KAAK,CAAC;AAC/C","sourcesContent":["import { toUnicode } from 'idna-uts46-hx'\n\n/**\n * @description Normalizes ENS name\n *\n * @example\n * normalize('wagmi-dev.eth')\n * 'wagmi-dev.eth'\n *\n * @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names\n */\nexport function normalize(name: string) {\n return toUnicode(name, { useStd3ASCII: true })\n}\n"]}
package/dist/ens.mjs CHANGED
@@ -3,9 +3,8 @@ import {
3
3
  getEnsName,
4
4
  labelhash,
5
5
  namehash
6
- } from "./chunk-5NDMORWZ.mjs";
7
- import "./chunk-WQDVW7EJ.mjs";
8
- import "./chunk-PBW4YL37.mjs";
6
+ } from "./chunk-AS2YWIFN.mjs";
7
+ import "./chunk-WVZFIDQ5.mjs";
9
8
 
10
9
  // src/utils/ens/normalize.ts
11
10
  import { toUnicode } from "idna-uts46-hx";
package/dist/ens.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/ens/normalize.ts"],"sourcesContent":["import { toUnicode } from 'idna-uts46-hx'\n\n/**\n * @description Normalizes ENS name\n *\n * @example\n * normalize('wagmi-dev.eth')\n * 'wagmi-dev.eth'\n *\n * @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names\n */\nexport function normalize(name: string) {\n return toUnicode(name, { useStd3ASCII: true })\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,iBAAiB;AAWnB,SAAS,UAAU,MAAc;AACtC,SAAO,UAAU,MAAM,EAAE,cAAc,KAAK,CAAC;AAC/C;","names":[]}
1
+ {"version":3,"sources":["../src/utils/ens/normalize.ts"],"sourcesContent":["import { toUnicode } from 'idna-uts46-hx'\n\n/**\n * @description Normalizes ENS name\n *\n * @example\n * normalize('wagmi-dev.eth')\n * 'wagmi-dev.eth'\n *\n * @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names\n */\nexport function normalize(name: string) {\n return toUnicode(name, { useStd3ASCII: true })\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,iBAAiB;AAWnB,SAAS,UAAU,MAAc;AACtC,SAAO,UAAU,MAAM,EAAE,cAAc,KAAK,CAAC;AAC/C;","names":[]}
@@ -1,4 +1,4 @@
1
- import { b as AbiItem } from './chain-7b7ac245.js';
1
+ import { A as AbiItem } from './chain-a34aa9a2.js';
2
2
 
3
3
  declare function formatAbiItemWithArgs({ abiItem, args, includeFunctionName, includeName, }: {
4
4
  abiItem: AbiItem;
@@ -1,5 +1,5 @@
1
1
  import { AbiParameter, AbiParametersToPrimitiveTypes, Narrow, Abi } from 'abitype';
2
- import { H as Hex, a6 as ExtractNameFromAbi, a7 as ExtractArgsFromAbi } from './chain-7b7ac245.js';
2
+ import { H as Hex, a6 as ExtractNameFromAbi, a7 as ExtractArgsFromAbi } from './chain-a34aa9a2.js';
3
3
 
4
4
  type DecodeAbiParametersResponse<TParams extends readonly AbiParameter[] | readonly unknown[] = readonly AbiParameter[]> = AbiParametersToPrimitiveTypes<TParams extends readonly AbiParameter[] ? TParams : AbiParameter[]>;
5
5
  declare function decodeAbiParameters<TParams extends readonly AbiParameter[] | readonly unknown[]>(params: Narrow<TParams>, data: Hex): DecodeAbiParametersResponse<TParams>;