viem 0.0.1-alpha.0 → 0.0.1-alpha.2

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.
@@ -16,7 +16,7 @@ import {
16
16
  numberToHex,
17
17
  wait,
18
18
  withCache
19
- } from "./chunk-GI67STNV.js";
19
+ } from "./chunk-3EOU525X.js";
20
20
 
21
21
  // src/actions/wallet/addChain.ts
22
22
  async function addChain(client, chain) {
@@ -62,17 +62,45 @@ async function requestPermissions(client, permissions) {
62
62
  }
63
63
 
64
64
  // src/actions/wallet/sendTransaction.ts
65
- async function sendTransaction(client, { chain, request }) {
66
- if (request.maxFeePerGas !== void 0 && request.maxPriorityFeePerGas !== void 0 && request.maxFeePerGas < request.maxPriorityFeePerGas)
65
+ async function sendTransaction(client, {
66
+ chain,
67
+ from,
68
+ accessList,
69
+ data,
70
+ gas,
71
+ gasPrice,
72
+ maxFeePerGas,
73
+ maxPriorityFeePerGas,
74
+ nonce,
75
+ to,
76
+ value,
77
+ ...rest
78
+ }) {
79
+ if (maxFeePerGas !== void 0 && maxPriorityFeePerGas !== void 0 && maxFeePerGas < maxPriorityFeePerGas)
67
80
  throw new InvalidGasArgumentsError();
68
- const request_ = format(request, {
69
- formatter: chain?.formatters?.transactionRequest || formatTransactionRequest
70
- });
81
+ const request_ = format(
82
+ {
83
+ from,
84
+ accessList,
85
+ data,
86
+ gas,
87
+ gasPrice,
88
+ maxFeePerGas,
89
+ maxPriorityFeePerGas,
90
+ nonce,
91
+ to,
92
+ value,
93
+ ...rest
94
+ },
95
+ {
96
+ formatter: chain?.formatters?.transactionRequest || formatTransactionRequest
97
+ }
98
+ );
71
99
  const hash = await client.request({
72
100
  method: "eth_sendTransaction",
73
101
  params: [request_]
74
102
  });
75
- return { hash };
103
+ return hash;
76
104
  }
77
105
  var InvalidGasArgumentsError = class extends BaseError {
78
106
  constructor() {
@@ -125,20 +153,50 @@ async function watchAsset(client, params) {
125
153
  }
126
154
 
127
155
  // src/actions/public/call.ts
128
- async function call(client, { blockNumber, blockTag = "latest", chain, request }) {
129
- if (request.maxFeePerGas !== void 0 && request.maxPriorityFeePerGas !== void 0 && request.maxFeePerGas < request.maxPriorityFeePerGas)
156
+ async function call(client, {
157
+ blockNumber,
158
+ blockTag = "latest",
159
+ chain,
160
+ from,
161
+ accessList,
162
+ data,
163
+ gas,
164
+ gasPrice,
165
+ maxFeePerGas,
166
+ maxPriorityFeePerGas,
167
+ nonce,
168
+ to,
169
+ value,
170
+ ...rest
171
+ }) {
172
+ if (maxFeePerGas !== void 0 && maxPriorityFeePerGas !== void 0 && maxFeePerGas < maxPriorityFeePerGas)
130
173
  throw new InvalidGasArgumentsError();
131
174
  const blockNumberHex = blockNumber ? numberToHex(blockNumber) : void 0;
132
- const request_ = format(request, {
133
- formatter: chain?.formatters?.transactionRequest || formatTransactionRequest
134
- });
135
- const data = await client.request({
175
+ const request_ = format(
176
+ {
177
+ from,
178
+ accessList,
179
+ data,
180
+ gas,
181
+ gasPrice,
182
+ maxFeePerGas,
183
+ maxPriorityFeePerGas,
184
+ nonce,
185
+ to,
186
+ value,
187
+ ...rest
188
+ },
189
+ {
190
+ formatter: chain?.formatters?.transactionRequest || formatTransactionRequest
191
+ }
192
+ );
193
+ const response = await client.request({
136
194
  method: "eth_call",
137
195
  params: [request_, blockNumberHex || blockTag]
138
196
  });
139
- if (data === "0x")
197
+ if (response === "0x")
140
198
  return { data: void 0 };
141
- return { data };
199
+ return { data: response };
142
200
  }
143
201
 
144
202
  // src/actions/public/createPendingTransactionFilter.ts
@@ -161,16 +219,14 @@ async function createBlockFilter(client) {
161
219
  async function estimateGas(client, {
162
220
  blockNumber,
163
221
  blockTag = "latest",
164
- request: {
165
- data,
166
- from,
167
- gas,
168
- gasPrice,
169
- maxFeePerGas,
170
- maxPriorityFeePerGas,
171
- to,
172
- value
173
- }
222
+ data,
223
+ from,
224
+ gas,
225
+ gasPrice,
226
+ maxFeePerGas,
227
+ maxPriorityFeePerGas,
228
+ to,
229
+ value
174
230
  }) {
175
231
  const blockNumberHex = blockNumber ? numberToHex(blockNumber) : void 0;
176
232
  const parameters = {
@@ -314,6 +370,15 @@ async function getFilterChanges(client, { filter }) {
314
370
  );
315
371
  }
316
372
 
373
+ // src/actions/public/getFilterLogs.ts
374
+ async function getFilterLogs(client, { filter }) {
375
+ const logs = await client.request({
376
+ method: "eth_getFilterLogs",
377
+ params: [filter.id]
378
+ });
379
+ return logs.map(formatLog);
380
+ }
381
+
317
382
  // src/actions/public/getGasPrice.ts
318
383
  async function getGasPrice(client) {
319
384
  const gasPrice = await client.request({
@@ -768,14 +833,14 @@ async function getAutomine(client) {
768
833
  // src/actions/test/getTxpoolContent.ts
769
834
  async function getTxpoolContent(client) {
770
835
  return await client.request({
771
- method: `txpool_content`
836
+ method: "txpool_content"
772
837
  });
773
838
  }
774
839
 
775
840
  // src/actions/test/getTxpoolStatus.ts
776
841
  async function getTxpoolStatus(client) {
777
842
  const { pending, queued } = await client.request({
778
- method: `txpool_status`
843
+ method: "txpool_status"
779
844
  });
780
845
  return {
781
846
  pending: hexToNumber(pending),
@@ -802,7 +867,7 @@ async function increaseTime(client, { seconds }) {
802
867
  // src/actions/test/inspectTxpool.ts
803
868
  async function inspectTxpool(client) {
804
869
  return await client.request({
805
- method: `txpool_inspect`
870
+ method: "txpool_inspect"
806
871
  });
807
872
  }
808
873
 
@@ -832,19 +897,19 @@ async function reset(client, { blockNumber, jsonRpcUrl } = {}) {
832
897
  // src/actions/test/revert.ts
833
898
  async function revert(client, { id }) {
834
899
  return await client.request({
835
- method: `evm_revert`,
900
+ method: "evm_revert",
836
901
  params: [id]
837
902
  });
838
903
  }
839
904
 
840
905
  // src/actions/test/sendUnsignedTransaction.ts
841
- async function sendUnsignedTransaction(client, { request }) {
906
+ async function sendUnsignedTransaction(client, request) {
842
907
  const request_ = formatTransactionRequest(request);
843
908
  const hash = await client.request({
844
909
  method: "eth_sendUnsignedTransaction",
845
910
  params: [request_]
846
911
  });
847
- return { hash };
912
+ return hash;
848
913
  }
849
914
 
850
915
  // src/actions/test/setAutomine.ts
@@ -930,7 +995,7 @@ async function setNextBlockBaseFeePerGas(client, { baseFeePerGas }) {
930
995
  // src/actions/test/setNextBlockTimestamp.ts
931
996
  async function setNextBlockTimestamp(client, { timestamp }) {
932
997
  return await client.request({
933
- method: `evm_setNextBlockTimestamp`,
998
+ method: "evm_setNextBlockTimestamp",
934
999
  params: [numberToHex(timestamp)]
935
1000
  });
936
1001
  }
@@ -958,7 +1023,7 @@ async function setStorageAt(client, { address, index, value }) {
958
1023
  // src/actions/test/snapshot.ts
959
1024
  async function snapshot(client) {
960
1025
  return await client.request({
961
- method: `evm_snapshot`
1026
+ method: "evm_snapshot"
962
1027
  });
963
1028
  }
964
1029
 
@@ -992,6 +1057,7 @@ export {
992
1057
  getChainId,
993
1058
  getFeeHistory,
994
1059
  getFilterChanges,
1060
+ getFilterLogs,
995
1061
  getGasPrice,
996
1062
  getTransaction,
997
1063
  getTransactionConfirmations,
@@ -3,7 +3,7 @@ import {
3
3
  buildRequest,
4
4
  getSocket,
5
5
  rpc
6
- } from "./chunk-GI67STNV.js";
6
+ } from "./chunk-3EOU525X.js";
7
7
 
8
8
  // src/clients/transports/createTransport.ts
9
9
  function createTransport(config, value) {
@@ -25,26 +25,50 @@ var UrlRequiredError = class extends BaseError {
25
25
  }
26
26
  };
27
27
 
28
- // src/clients/transports/ethereumProvider.ts
29
- function ethereumProvider({
30
- key = "ethereumProvider",
31
- name = "Ethereum Provider",
32
- provider
33
- }) {
28
+ // src/clients/transports/custom.ts
29
+ function custom(provider, { key = "custom", name = "Custom Provider" } = {}) {
34
30
  return () => createTransport({
35
31
  key,
36
32
  name,
37
33
  request: provider.request.bind(provider),
38
- type: "ethereumProvider"
34
+ type: "custom"
39
35
  });
40
36
  }
41
37
 
38
+ // src/clients/transports/fallback.ts
39
+ function fallback(transports, { key = "fallback", name = "Fallback" } = {}) {
40
+ return ({ chain }) => createTransport(
41
+ {
42
+ key,
43
+ name,
44
+ async request({ method, params }) {
45
+ const fetch = async (i = 0) => {
46
+ const transport = transports[i]({ chain });
47
+ try {
48
+ return await transport.config.request({
49
+ method,
50
+ params
51
+ });
52
+ } catch (err) {
53
+ if (i < transports.length - 1)
54
+ return fetch(i + 1);
55
+ throw err;
56
+ }
57
+ };
58
+ return fetch();
59
+ },
60
+ type: "fallback"
61
+ },
62
+ {
63
+ transports: transports.map(
64
+ (fn) => fn({ chain })
65
+ )
66
+ }
67
+ );
68
+ }
69
+
42
70
  // src/clients/transports/http.ts
43
- function http({
44
- key = "http",
45
- name = "HTTP JSON-RPC",
46
- url
47
- } = {}) {
71
+ function http(url, { key = "http", name = "HTTP JSON-RPC" } = {}) {
48
72
  return ({ chain }) => {
49
73
  const url_ = url || chain?.rpcUrls.default.http[0];
50
74
  if (!url_)
@@ -72,10 +96,9 @@ function http({
72
96
  }
73
97
 
74
98
  // src/clients/transports/webSocket.ts
75
- function webSocket({
99
+ function webSocket(url, {
76
100
  key = "webSocket",
77
- name = "WebSocket JSON-RPC",
78
- url
101
+ name = "WebSocket JSON-RPC"
79
102
  } = {}) {
80
103
  return ({ chain }) => {
81
104
  const url_ = url || chain?.rpcUrls.default.webSocket?.[0];
@@ -186,16 +209,14 @@ function createPublicClient({
186
209
  pollingInterval
187
210
  }) {
188
211
  chain;
189
- return {
190
- ...createClient({
191
- chain,
192
- key,
193
- name,
194
- pollingInterval,
195
- transport,
196
- type: "publicClient"
197
- })
198
- };
212
+ return createClient({
213
+ chain,
214
+ key,
215
+ name,
216
+ pollingInterval,
217
+ transport,
218
+ type: "publicClient"
219
+ });
199
220
  }
200
221
 
201
222
  // src/clients/createTestClient.ts
@@ -227,21 +248,20 @@ function createWalletClient({
227
248
  name = "Wallet Client",
228
249
  pollingInterval
229
250
  }) {
230
- return {
231
- ...createClient({
232
- key,
233
- name,
234
- pollingInterval,
235
- transport,
236
- type: "walletClient"
237
- })
238
- };
251
+ return createClient({
252
+ key,
253
+ name,
254
+ pollingInterval,
255
+ transport,
256
+ type: "walletClient"
257
+ });
239
258
  }
240
259
 
241
260
  export {
242
261
  createTransport,
243
262
  UrlRequiredError,
244
- ethereumProvider,
263
+ custom,
264
+ fallback,
245
265
  http,
246
266
  webSocket,
247
267
  createClient,
@@ -1,5 +1,5 @@
1
- export { C as Client, a as ClientConfig, P as PublicClient, b as PublicClientConfig, T as TestClient, c as TestClientConfig, d as Transport, e as TransportConfig, W as WalletClient, f as WalletClientConfig, g as createClient, h as createPublicClient, i as createTestClient, j as createTransport, k as createWalletClient } from '../createWalletClient-c40fef16.js';
2
- export { E as EthereumProviderTransport, a as EthereumProviderTransportConfig, H as HttpTransport, b as HttpTransportConfig, U as UrlRequiredError, W as WebSocketTransport, c as WebSocketTransportConfig, e as ethereumProvider, h as http, w as webSocket } from '../webSocket-14584a7e.js';
1
+ export { C as Client, a as ClientConfig, P as PublicClient, b as PublicClientConfig, T as TestClient, c as TestClientConfig, d as Transport, e as TransportConfig, W as WalletClient, f as WalletClientConfig, g as createClient, h as createPublicClient, i as createTestClient, j as createTransport, k as createWalletClient } from '../createWalletClient-915223f3.js';
2
+ export { C as CustomTransport, a as CustomTransportConfig, F as FallbackTransport, b as FallbackTransportConfig, H as HttpTransport, c as HttpTransportConfig, U as UrlRequiredError, W as WebSocketTransport, d as WebSocketTransportConfig, e as custom, f as fallback, h as http, w as webSocket } from '../webSocket-c6e0d26f.js';
3
3
  import '../chains.js';
4
4
  import '../rpc-655c0ba4.js';
5
5
  import '@wagmi/chains';
@@ -5,11 +5,12 @@ import {
5
5
  createTestClient,
6
6
  createTransport,
7
7
  createWalletClient,
8
- ethereumProvider,
8
+ custom,
9
+ fallback,
9
10
  http,
10
11
  webSocket
11
- } from "../chunk-OPR6LKYX.js";
12
- import "../chunk-GI67STNV.js";
12
+ } from "../chunk-YQRTXQ2G.js";
13
+ import "../chunk-3EOU525X.js";
13
14
  export {
14
15
  UrlRequiredError,
15
16
  createClient,
@@ -17,7 +18,8 @@ export {
17
18
  createTestClient,
18
19
  createTransport,
19
20
  createWalletClient,
20
- ethereumProvider,
21
+ custom,
22
+ fallback,
21
23
  http,
22
24
  webSocket
23
25
  };
@@ -36,7 +36,7 @@ type Client<TTransport extends Transport = Transport, TChain extends Chain = Cha
36
36
  pollingInterval: number;
37
37
  /** Request function wrapped with friendly error handling */
38
38
  request: TRequests['request'];
39
- /** The RPC transport (http, webSocket, ethereumProvider, etc) */
39
+ /** The RPC transport (http, webSocket, custom, etc) */
40
40
  transport: ReturnType<TTransport>['config'] & ReturnType<TTransport>['value'];
41
41
  /** The type of client. */
42
42
  type: string;
@@ -96,9 +96,9 @@ type TestClient<TTransport extends Transport = Transport, TChain extends Chain =
96
96
  * `evm_mine`, etc).
97
97
  *
98
98
  * @example
99
+ * import { createTestClient, http } from 'viem'
99
100
  * import { local } from 'viem/chains'
100
- * import { createTestClient, http } from 'viem/clients'
101
- * const client = createTestClient(http({ chain: local }), { mode: 'anvil' })
101
+ * const client = createTestClient({ chain: local, mode: 'anvil', transport: http() })
102
102
  */
103
103
  declare function createTestClient<TTransport extends Transport, TChain extends Chain, TMode extends TestClientModes>({ chain, key, name, mode, pollingInterval, transport, }: TestClientConfig<TTransport, TChain, TMode>): TestClient<TTransport, TChain, TMode>;
104
104
 
@@ -120,9 +120,9 @@ type WalletClient<TTransport extends Transport = Transport, TChain extends Chain
120
120
  * (ie. `eth_sendTransaction`, `eth_requestAccounts`, etc).
121
121
  *
122
122
  * @example
123
- * import { createWalletClient, ethereumProvider } from 'viem/clients'
123
+ * import { createWalletClient, custom } from 'viem'
124
124
  * const client = createWalletClient(
125
- * ethereumProvider({ provider: window.ethereum })
125
+ * custom(window.ethereum)
126
126
  * )
127
127
  */
128
128
  declare function createWalletClient<TTransport extends Transport, TChain extends Chain>({ transport, key, name, pollingInterval, }: WalletClientConfig<TTransport, TChain>): WalletClient<TTransport, TChain>;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, d as EstimateGasResponse, G as GetBalanceArgs, e as GetBalanceResponse, f as GetBlockArgs, g as GetBlockNumberArgs, h as GetBlockNumberResponse, i as GetBlockResponse, j as GetBlockTransactionCountArgs, k as GetBlockTransactionCountResponse, l as GetFeeHistoryArgs, m as GetFeeHistoryResponse, n as GetFilterChangesArgs, o as GetFilterChangesResponse, p as GetGasPriceResponse, q as GetPermissionsResponse, r as GetTransactionArgs, s as GetTransactionConfirmationsArgs, t as GetTransactionConfirmationsResponse, u as GetTransactionCountArgs, v as GetTransactionCountResponse, x as GetTransactionReceiptArgs, y as GetTransactionReceiptResponse, w as GetTransactionResponse, I as ImpersonateAccountArgs, z as IncreaseTimeArgs, M as MineArgs, O as OnBlock, A as OnBlockNumber, B as OnBlockNumberResponse, F as OnBlockResponse, H as OnTransactions, J as OnTransactionsResponse, K as RequestPermissionsResponse, R as ResetArgs, L as RevertArgs, S as SendTransactionArgs, N as SendTransactionResponse, P as SendUnsignedTransactionArgs, Q as SendUnsignedTransactionResponse, T as SetBalanceArgs, U as SetBlockGasLimitArgs, Z as SetBlockTimestampIntervalArgs, V as SetCodeArgs, W as SetCoinbaseArgs, X as SetIntervalMiningArgs, Y as SetMinGasPriceArgs, $ as SetNextBlockBaseFeePerGasArgs, _ as SetNextBlockTimestampArgs, a0 as SetNonceArgs, a1 as SetStorageAtArgs, a2 as SignMessageArgs, a3 as SignMessageResponse, a4 as StopImpersonatingAccountArgs, a5 as SwitchChainArgs, a6 as UninstallFilterArgs, a7 as UninstallFilterResponse, a8 as WaitForTransactionReceiptArgs, a9 as WaitForTransactionReceiptResponse, aa as WatchAssetArgs, ab as WatchAssetResponse, ac as WatchBlockNumberArgs, ad as WatchBlocksArgs, ae as WatchPendingTransactionsArgs, af as addChain, ag as call, ah as createBlockFilter, ai as createPendingTransactionFilter, ak as dropTransaction, aj as estimateGas, al as getAutomine, am as getBalance, an as getBlock, ao as getBlockNumber, ap as getBlockTransactionCount, aq as getChainId, ar as getFeeHistory, as as getGasPrice, at as getPermissions, au as getTransaction, av as getTransactionConfirmations, aw as getTransactionCount, ax as getTransactionReceipt, ay as getTxpoolContent, az as getTxpoolStatus, aA as impersonateAccount, aB as increaseTime, aC as inspectTxpool, aD as mine, aE as removeBlockTimestampInterval, aG as requestAccounts, aH as requestPermissions, aF as reset, aI as revert, aJ as sendTransaction, aK as sendUnsignedTransaction, aL as setAutomine, aM as setBalance, aN as setBlockGasLimit, aO as setBlockTimestampInterval, aP as setCode, aQ as setCoinbase, aR as setIntervalMining, aS as setLoggingEnabled, aT as setMinGasPrice, aU as setNextBlockBaseFeePerGas, aV as setNextBlockTimestamp, aW as setNonce, aX as setStorageAt, aY as signMessage, aZ as snapshot, a_ as stopImpersonatingAccount, a$ as switchChain, b0 as uninstallFilter, b1 as waitForTransactionReceipt, b2 as watchAsset, b3 as watchBlockNumber, b4 as watchBlocks, b5 as watchPendingTransactions } from './watchAsset-bb30848d.js';
2
- export { C as Client, a as ClientConfig, P as PublicClient, b as PublicClientConfig, T as TestClient, c as TestClientConfig, d as Transport, e as TransportConfig, W as WalletClient, f as WalletClientConfig, g as createClient, h as createPublicClient, i as createTestClient, j as createTransport, k as createWalletClient } from './createWalletClient-c40fef16.js';
3
- export { E as EthereumProviderTransport, a as EthereumProviderTransportConfig, H as HttpTransport, b as HttpTransportConfig, U as UrlRequiredError, W as WebSocketTransport, c as WebSocketTransportConfig, e as ethereumProvider, h as http, w as webSocket } from './webSocket-14584a7e.js';
1
+ export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, d as EstimateGasResponse, G as GetBalanceArgs, e as GetBalanceResponse, f as GetBlockArgs, g as GetBlockNumberArgs, h as GetBlockNumberResponse, i as GetBlockResponse, j as GetBlockTransactionCountArgs, k as GetBlockTransactionCountResponse, l as GetFeeHistoryArgs, m as GetFeeHistoryResponse, n as GetFilterChangesArgs, o as GetFilterChangesResponse, p as GetFilterLogsArgs, q as GetFilterLogsResponse, r as GetGasPriceResponse, s as GetPermissionsResponse, t as GetTransactionArgs, u as GetTransactionConfirmationsArgs, v as GetTransactionConfirmationsResponse, w as GetTransactionCountArgs, x as GetTransactionCountResponse, z as GetTransactionReceiptArgs, A as GetTransactionReceiptResponse, y as GetTransactionResponse, I as ImpersonateAccountArgs, B as IncreaseTimeArgs, M as MineArgs, O as OnBlock, F as OnBlockNumber, H as OnBlockNumberResponse, J as OnBlockResponse, K as OnTransactions, L as OnTransactionsResponse, N as RequestPermissionsResponse, R as ResetArgs, P as RevertArgs, S as SendTransactionArgs, Q as SendTransactionResponse, T as SendUnsignedTransactionArgs, U as SendUnsignedTransactionResponse, V as SetBalanceArgs, W as SetBlockGasLimitArgs, $ as SetBlockTimestampIntervalArgs, X as SetCodeArgs, Y as SetCoinbaseArgs, Z as SetIntervalMiningArgs, _ as SetMinGasPriceArgs, a1 as SetNextBlockBaseFeePerGasArgs, a0 as SetNextBlockTimestampArgs, a2 as SetNonceArgs, a3 as SetStorageAtArgs, a4 as SignMessageArgs, a5 as SignMessageResponse, a6 as StopImpersonatingAccountArgs, a7 as SwitchChainArgs, a8 as UninstallFilterArgs, a9 as UninstallFilterResponse, aa as WaitForTransactionReceiptArgs, ab as WaitForTransactionReceiptResponse, ac as WatchAssetArgs, ad as WatchAssetResponse, ae as WatchBlockNumberArgs, af as WatchBlocksArgs, ag as WatchPendingTransactionsArgs, ah as addChain, ai as call, aj as createBlockFilter, ak as createPendingTransactionFilter, am as dropTransaction, al as estimateGas, an as getAccounts, ao as getAutomine, ap as getBalance, aq as getBlock, ar as getBlockNumber, as as getBlockTransactionCount, at as getChainId, au as getFeeHistory, av as getFilterChanges, aw as getFilterLogs, ax as getGasPrice, ay as getPermissions, az as getTransaction, aA as getTransactionConfirmations, aB as getTransactionCount, aC as getTransactionReceipt, aD as getTxpoolContent, aE as getTxpoolStatus, aF as impersonateAccount, aG as increaseTime, aH as inspectTxpool, aI as mine, aJ as removeBlockTimestampInterval, aL as requestAccounts, aM as requestPermissions, aK as reset, aN as revert, aO as sendTransaction, aP as sendUnsignedTransaction, aQ as setAutomine, aR as setBalance, aS as setBlockGasLimit, aT as setBlockTimestampInterval, aU as setCode, aV as setCoinbase, aW as setIntervalMining, aX as setLoggingEnabled, aY as setMinGasPrice, aZ as setNextBlockBaseFeePerGas, a_ as setNextBlockTimestamp, a$ as setNonce, b0 as setStorageAt, b1 as signMessage, b2 as snapshot, b3 as stopImpersonatingAccount, b4 as switchChain, b5 as uninstallFilter, b6 as waitForTransactionReceipt, b7 as watchAsset, b8 as watchBlockNumber, b9 as watchBlocks, ba as watchPendingTransactions } from './watchAsset-04ab8db5.js';
2
+ export { C as Client, a as ClientConfig, P as PublicClient, b as PublicClientConfig, T as TestClient, c as TestClientConfig, d as Transport, e as TransportConfig, W as WalletClient, f as WalletClientConfig, g as createClient, h as createPublicClient, i as createTestClient, j as createTransport, k as createWalletClient } from './createWalletClient-915223f3.js';
3
+ export { C as CustomTransport, a as CustomTransportConfig, F as FallbackTransport, b as FallbackTransportConfig, H as HttpTransport, c as HttpTransportConfig, U as UrlRequiredError, W as WebSocketTransport, d as WebSocketTransportConfig, e as custom, f as fallback, h as http, w as webSocket } from './webSocket-c6e0d26f.js';
4
4
  export { a as AccessList, A as Address, B as Block, b as BlockIdentifier, c as BlockNumber, d as BlockTag, f as ByteArray, F as FeeHistory, h as FeeValues, i as FeeValuesEIP1559, j as FeeValuesLegacy, k as Hash, H as Hex, L as Log, R as RpcBlock, l as RpcBlockIdentifier, m as RpcBlockNumber, n as RpcFeeHistory, o as RpcFeeValues, p as RpcLog, q as RpcTransaction, r as RpcTransactionReceipt, s as RpcTransactionRequest, u as RpcUncle, D as Transaction, E as TransactionBase, G as TransactionEIP1559, I as TransactionEIP2930, J as TransactionLegacy, T as TransactionReceipt, v as TransactionRequest, x as TransactionRequestBase, y as TransactionRequestEIP1559, z as TransactionRequestEIP2930, C as TransactionRequestLegacy, U as Uncle, e as etherUnits, g as gweiUnits, t as transactionType, w as weiUnits } from './rpc-655c0ba4.js';
5
- export { E as EncodeRlpResponse, G as GetContractAddressOptions, b as GetCreate2AddressOptions, a as GetCreateAddressOptions, I as InternalRpcError, c as InvalidInputRpcError, d as InvalidParamsRpcError, e as InvalidRequestRpcError, J as JsonRpcVersionUnsupportedError, L as LimitExceededRpcError, M as MethodNotFoundRpcError, f as MethodNotSupportedRpcError, P as ParseRpcError, R as ResourceNotFoundRpcError, g as ResourceUnavailableRpcError, h as RpcRequestError, T as TransactionRejectedRpcError, k as boolToBytes, l as boolToHex, m as bytesToBigint, n as bytesToBool, i as bytesToHex, o as bytesToNumber, j as bytesToString, p as decodeBytes, q as decodeHex, r as decodeRlp, s as encodeBytes, t as encodeHex, u as encodeRlp, B as formatEther, $ as formatGwei, a0 as formatUnit, v as getAddress, w as getContractAddress, y as getCreate2Address, x as getCreateAddress, z as getEventSignature, A as getFunctionSignature, K as hexToBigInt, N as hexToBool, O as hexToBytes, a1 as hexToNumber, Q as hexToString, C as isAddress, D as isAddressEqual, F as isBytes, H as isHex, S as keccak256, U as numberToBytes, a2 as numberToHex, V as pad, W as padBytes, X as padHex, Y as parseEther, Z as parseGwei, _ as parseUnit, a3 as size, a4 as slice, a5 as sliceBytes, a6 as sliceHex, a7 as stringToBytes, a8 as stringToHex, a9 as trim } from './parseGwei-a7d0bcb2.js';
5
+ export { A as AbiDecodingDataSizeInvalidError, a as AbiEncodingArrayLengthMismatchError, b as AbiEncodingLengthMismatchError, E as EncodeRlpResponse, G as GetContractAddressOptions, d as GetCreate2AddressOptions, c as GetCreateAddressOptions, g as InternalRpcError, I as InvalidAbiDecodingTypeError, e as InvalidAbiEncodingTypeError, f as InvalidArrayError, h as InvalidInputRpcError, i as InvalidParamsRpcError, j as InvalidRequestRpcError, J as JsonRpcVersionUnsupportedError, L as LimitExceededRpcError, M as MethodNotFoundRpcError, k as MethodNotSupportedRpcError, P as ParseRpcError, R as ResourceNotFoundRpcError, l as ResourceUnavailableRpcError, m as RpcRequestError, T as TransactionRejectedRpcError, p as boolToBytes, q as boolToHex, r as bytesToBigint, s as bytesToBool, n as bytesToHex, t as bytesToNumber, o as bytesToString, u as decodeAbi, v as decodeBytes, w as decodeHex, x as decodeRlp, y as encodeAbi, z as encodeBytes, B as encodeFunctionParams, C as encodeHex, D as encodeRlp, S as formatEther, a8 as formatGwei, a9 as formatUnit, F as getAddress, H as getContractAddress, N as getCreate2Address, K as getCreateAddress, O as getEventSignature, Q as getFunctionSignature, Y as hexToBigInt, Z as hexToBool, _ as hexToBytes, aa as hexToNumber, $ as hexToString, U as isAddress, V as isAddressEqual, W as isBytes, X as isHex, a0 as keccak256, a1 as numberToBytes, ab as numberToHex, a2 as pad, a3 as padBytes, a4 as padHex, a5 as parseEther, a6 as parseGwei, a7 as parseUnit, ac as size, ad as slice, ae as sliceBytes, af as sliceHex, ag as stringToBytes, ah as stringToHex, ai as trim } from './parseGwei-fd7a0f7d.js';
6
6
  export { B as BaseError } from './BaseError-7688f84e.js';
7
7
  export { F as FormattedBlock, a as FormattedTransaction, b as FormattedTransactionRequest, f as formatBlock, c as formatTransaction, d as formatTransactionRequest } from './transactionRequest-ade896ac.js';
8
8
  export { H as HttpRequestError, R as RpcError, T as TimeoutError } from './rpc-3c0e3985.js';
9
9
  import './chains.js';
10
10
  import '@wagmi/chains';
11
11
  import './eip1193-8f7c22ce.js';
12
+ import 'abitype';
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  createPendingTransactionFilter,
6
6
  dropTransaction,
7
7
  estimateGas,
8
+ getAccounts,
8
9
  getAutomine,
9
10
  getBalance,
10
11
  getBlock,
@@ -12,6 +13,8 @@ import {
12
13
  getBlockTransactionCount,
13
14
  getChainId,
14
15
  getFeeHistory,
16
+ getFilterChanges,
17
+ getFilterLogs,
15
18
  getGasPrice,
16
19
  getPermissions,
17
20
  getTransaction,
@@ -54,7 +57,7 @@ import {
54
57
  watchBlockNumber,
55
58
  watchBlocks,
56
59
  watchPendingTransactions
57
- } from "./chunk-JSYJDK4W.js";
60
+ } from "./chunk-4HNVS7AM.js";
58
61
  import {
59
62
  UrlRequiredError,
60
63
  createClient,
@@ -62,10 +65,11 @@ import {
62
65
  createTestClient,
63
66
  createTransport,
64
67
  createWalletClient,
65
- ethereumProvider,
68
+ custom,
69
+ fallback,
66
70
  http,
67
71
  webSocket
68
- } from "./chunk-OPR6LKYX.js";
72
+ } from "./chunk-YQRTXQ2G.js";
69
73
  import {
70
74
  BaseError,
71
75
  HttpRequestError,
@@ -91,10 +95,13 @@ import {
91
95
  bytesToHex,
92
96
  bytesToNumber,
93
97
  bytesToString,
98
+ decodeAbi,
94
99
  decodeBytes,
95
100
  decodeHex,
96
101
  decodeRlp,
102
+ encodeAbi,
97
103
  encodeBytes,
104
+ encodeFunctionParams,
98
105
  encodeHex,
99
106
  encodeRlp,
100
107
  etherUnits,
@@ -138,7 +145,7 @@ import {
138
145
  transactionType,
139
146
  trim,
140
147
  weiUnits
141
- } from "./chunk-GI67STNV.js";
148
+ } from "./chunk-3EOU525X.js";
142
149
  export {
143
150
  BaseError,
144
151
  HttpRequestError,
@@ -174,22 +181,27 @@ export {
174
181
  createTestClient,
175
182
  createTransport,
176
183
  createWalletClient,
184
+ custom,
185
+ decodeAbi,
177
186
  decodeBytes,
178
187
  decodeHex,
179
188
  decodeRlp,
180
189
  dropTransaction,
190
+ encodeAbi,
181
191
  encodeBytes,
192
+ encodeFunctionParams,
182
193
  encodeHex,
183
194
  encodeRlp,
184
195
  estimateGas,
185
196
  etherUnits,
186
- ethereumProvider,
197
+ fallback,
187
198
  formatBlock,
188
199
  formatEther,
189
200
  formatGwei,
190
201
  formatTransaction,
191
202
  formatTransactionRequest,
192
203
  formatUnit,
204
+ getAccounts,
193
205
  getAddress,
194
206
  getAutomine,
195
207
  getBalance,
@@ -202,6 +214,8 @@ export {
202
214
  getCreateAddress,
203
215
  getEventSignature,
204
216
  getFeeHistory,
217
+ getFilterChanges,
218
+ getFilterLogs,
205
219
  getFunctionSignature,
206
220
  getGasPrice,
207
221
  getPermissions,