viem 0.0.1-alpha.1 → 0.0.1-alpha.11

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 (40) hide show
  1. package/actions/package.json +1 -1
  2. package/chains/package.json +1 -1
  3. package/clients/package.json +1 -1
  4. package/dist/actions/index.d.ts +6 -6
  5. package/dist/actions/index.js +125 -123
  6. package/dist/actions/index.mjs +125 -0
  7. package/dist/chains.d.ts +651 -21
  8. package/dist/chains.js +76 -75
  9. package/dist/chains.mjs +134 -0
  10. package/dist/chunk-35OJIFIW.js +2619 -0
  11. package/dist/{chunk-Z6LRV6XI.js → chunk-DY4MSK2M.mjs} +1052 -411
  12. package/dist/chunk-GXCYE2PD.js +258 -0
  13. package/dist/{chunk-LLYFXUSV.js → chunk-JXGK2LUM.mjs} +184 -198
  14. package/dist/chunk-PEAG3TIC.js +1084 -0
  15. package/dist/{chunk-OQTFTQTO.js → chunk-TP542F7H.mjs} +44 -63
  16. package/dist/clients/index.d.ts +5 -6
  17. package/dist/clients/index.js +23 -25
  18. package/dist/clients/index.mjs +23 -0
  19. package/dist/{createWalletClient-915223f3.d.ts → createWalletClient-3f9fa8b6.d.ts} +1 -1
  20. package/dist/{eip1193-8f7c22ce.d.ts → eip1193-c001fcd5.d.ts} +3 -3
  21. package/dist/index.d.ts +341 -10
  22. package/dist/index.js +374 -290
  23. package/dist/index.mjs +374 -0
  24. package/dist/{parseGwei-bbc055e4.d.ts → parseGwei-7c87ff41.d.ts} +70 -118
  25. package/dist/{rpc-3c0e3985.d.ts → rpc-26932bae.d.ts} +1 -38
  26. package/dist/{rpc-655c0ba4.d.ts → rpc-b77c5aee.d.ts} +1 -1
  27. package/dist/transactionRequest-08d30731.d.ts +132 -0
  28. package/dist/utils/index.d.ts +41 -7
  29. package/dist/utils/index.js +148 -154
  30. package/dist/utils/index.mjs +148 -0
  31. package/dist/{watchAsset-04ab8db5.d.ts → watchAsset-43255bfd.d.ts} +17 -16
  32. package/dist/{webSocket-c6e0d26f.d.ts → webSocket-3385e295.d.ts} +4 -9
  33. package/dist/window.d.ts +2 -2
  34. package/dist/window.js +1 -0
  35. package/dist/window.mjs +0 -0
  36. package/package.json +9 -62
  37. package/utils/package.json +1 -1
  38. package/window/package.json +1 -1
  39. package/dist/BaseError-7688f84e.d.ts +0 -18
  40. package/dist/transactionRequest-ade896ac.d.ts +0 -44
@@ -1,9 +1,9 @@
1
1
  import {
2
- BaseError,
2
+ UrlRequiredError,
3
3
  buildRequest,
4
4
  getSocket,
5
5
  rpc
6
- } from "./chunk-Z6LRV6XI.js";
6
+ } from "./chunk-DY4MSK2M.mjs";
7
7
 
8
8
  // src/clients/transports/createTransport.ts
9
9
  function createTransport(config, value) {
@@ -13,18 +13,6 @@ function createTransport(config, value) {
13
13
  };
14
14
  }
15
15
 
16
- // src/clients/transports/errors.ts
17
- var UrlRequiredError = class extends BaseError {
18
- constructor() {
19
- super(
20
- "No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",
21
- {
22
- docsPath: "/TODO"
23
- }
24
- );
25
- }
26
- };
27
-
28
16
  // src/clients/transports/custom.ts
29
17
  function custom(provider, { key = "custom", name = "Custom Provider" } = {}) {
30
18
  return () => createTransport({
@@ -37,36 +25,34 @@ function custom(provider, { key = "custom", name = "Custom Provider" } = {}) {
37
25
 
38
26
  // src/clients/transports/fallback.ts
39
27
  function fallback(transports, { key = "fallback", name = "Fallback" } = {}) {
40
- return ({ chain }) => {
41
- return createTransport(
42
- {
43
- key,
44
- name,
45
- async request({ method, params }) {
46
- const fetch = async (i = 0) => {
47
- const transport = transports[i]({ chain });
48
- try {
49
- return await transport.config.request({
50
- method,
51
- params
52
- });
53
- } catch (err) {
54
- if (i < transports.length - 1)
55
- return fetch(i + 1);
56
- throw err;
57
- }
58
- };
59
- return fetch();
60
- },
61
- type: "fallback"
28
+ return ({ chain }) => createTransport(
29
+ {
30
+ key,
31
+ name,
32
+ async request({ method, params }) {
33
+ const fetch = async (i = 0) => {
34
+ const transport = transports[i]({ chain });
35
+ try {
36
+ return await transport.config.request({
37
+ method,
38
+ params
39
+ });
40
+ } catch (err) {
41
+ if (i < transports.length - 1)
42
+ return fetch(i + 1);
43
+ throw err;
44
+ }
45
+ };
46
+ return fetch();
62
47
  },
63
- {
64
- transports: transports.map(
65
- (fn) => fn({ chain })
66
- )
67
- }
68
- );
69
- };
48
+ type: "fallback"
49
+ },
50
+ {
51
+ transports: transports.map(
52
+ (fn) => fn({ chain })
53
+ )
54
+ }
55
+ );
70
56
  }
71
57
 
72
58
  // src/clients/transports/http.ts
@@ -211,16 +197,14 @@ function createPublicClient({
211
197
  pollingInterval
212
198
  }) {
213
199
  chain;
214
- return {
215
- ...createClient({
216
- chain,
217
- key,
218
- name,
219
- pollingInterval,
220
- transport,
221
- type: "publicClient"
222
- })
223
- };
200
+ return createClient({
201
+ chain,
202
+ key,
203
+ name,
204
+ pollingInterval,
205
+ transport,
206
+ type: "publicClient"
207
+ });
224
208
  }
225
209
 
226
210
  // src/clients/createTestClient.ts
@@ -252,20 +236,17 @@ function createWalletClient({
252
236
  name = "Wallet Client",
253
237
  pollingInterval
254
238
  }) {
255
- return {
256
- ...createClient({
257
- key,
258
- name,
259
- pollingInterval,
260
- transport,
261
- type: "walletClient"
262
- })
263
- };
239
+ return createClient({
240
+ key,
241
+ name,
242
+ pollingInterval,
243
+ transport,
244
+ type: "walletClient"
245
+ });
264
246
  }
265
247
 
266
248
  export {
267
249
  createTransport,
268
- UrlRequiredError,
269
250
  custom,
270
251
  fallback,
271
252
  http,
@@ -1,8 +1,7 @@
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';
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-3f9fa8b6.js';
2
+ export { C as CustomTransport, a as CustomTransportConfig, F as FallbackTransport, b as FallbackTransportConfig, H as HttpTransport, c as HttpTransportConfig, W as WebSocketTransport, d as WebSocketTransportConfig, e as custom, f as fallback, h as http, w as webSocket } from '../webSocket-3385e295.js';
3
3
  import '../chains.js';
4
- import '../rpc-655c0ba4.js';
4
+ import '../rpc-b77c5aee.js';
5
5
  import '@wagmi/chains';
6
- import '../eip1193-8f7c22ce.js';
7
- import '../BaseError-7688f84e.js';
8
- import '../rpc-3c0e3985.js';
6
+ import '../eip1193-c001fcd5.js';
7
+ import '../rpc-26932bae.js';
@@ -1,25 +1,23 @@
1
- import {
2
- UrlRequiredError,
3
- createClient,
4
- createPublicClient,
5
- createTestClient,
6
- createTransport,
7
- createWalletClient,
8
- custom,
9
- fallback,
10
- http,
11
- webSocket
12
- } from "../chunk-OQTFTQTO.js";
13
- import "../chunk-Z6LRV6XI.js";
14
- export {
15
- UrlRequiredError,
16
- createClient,
17
- createPublicClient,
18
- createTestClient,
19
- createTransport,
20
- createWalletClient,
21
- custom,
22
- fallback,
23
- http,
24
- webSocket
25
- };
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ var _chunkGXCYE2PDjs = require('../chunk-GXCYE2PD.js');
12
+ require('../chunk-35OJIFIW.js');
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+ exports.createClient = _chunkGXCYE2PDjs.createClient; exports.createPublicClient = _chunkGXCYE2PDjs.createPublicClient; exports.createTestClient = _chunkGXCYE2PDjs.createTestClient; exports.createTransport = _chunkGXCYE2PDjs.createTransport; exports.createWalletClient = _chunkGXCYE2PDjs.createWalletClient; exports.custom = _chunkGXCYE2PDjs.custom; exports.fallback = _chunkGXCYE2PDjs.fallback; exports.http = _chunkGXCYE2PDjs.http; exports.webSocket = _chunkGXCYE2PDjs.webSocket;
@@ -0,0 +1,23 @@
1
+ import {
2
+ createClient,
3
+ createPublicClient,
4
+ createTestClient,
5
+ createTransport,
6
+ createWalletClient,
7
+ custom,
8
+ fallback,
9
+ http,
10
+ webSocket
11
+ } from "../chunk-TP542F7H.mjs";
12
+ import "../chunk-DY4MSK2M.mjs";
13
+ export {
14
+ createClient,
15
+ createPublicClient,
16
+ createTestClient,
17
+ createTransport,
18
+ createWalletClient,
19
+ custom,
20
+ fallback,
21
+ http,
22
+ webSocket
23
+ };
@@ -1,5 +1,5 @@
1
1
  import { Chain } from './chains.js';
2
- import { R as Requests, P as PublicRequests, T as TestRequests, S as SignableRequests, b as WalletRequests } from './eip1193-8f7c22ce.js';
2
+ import { R as Requests, P as PublicRequests, T as TestRequests, S as SignableRequests, b as WalletRequests } from './eip1193-c001fcd5.js';
3
3
 
4
4
  type BaseRpcRequests = {
5
5
  request(...args: any): Promise<any>;
@@ -1,4 +1,4 @@
1
- import { A as Address, k as Hash, Q as Quantity, s as RpcTransactionRequest, m as RpcBlockNumber, d as BlockTag, l as RpcBlockIdentifier, H as Hex, P as RpcEstimateGasParameters, n as RpcFeeHistory, R as RpcBlock, p as RpcLog, q as RpcTransaction, r as RpcTransactionReceipt, u as RpcUncle } from './rpc-655c0ba4.js';
1
+ import { A as Address, a as Hash, Q as Quantity, s as RpcTransactionRequest, m as RpcBlockNumber, b as BlockTag, l as RpcBlockIdentifier, H as Hex, P as RpcEstimateGasParameters, n as RpcFeeHistory, R as RpcBlock, p as RpcLog, q as RpcTransaction, r as RpcTransactionReceipt, u as RpcUncle } from './rpc-b77c5aee.js';
2
2
 
3
3
  declare class RpcError extends Error {
4
4
  code: number;
@@ -35,7 +35,7 @@ type Chain = {
35
35
  symbol: string;
36
36
  decimals: number;
37
37
  };
38
- rpcUrls: string[];
38
+ rpcUrls: readonly string[];
39
39
  blockExplorerUrls?: string[];
40
40
  iconUrls?: string[];
41
41
  };
@@ -405,7 +405,7 @@ type PublicRequests = {
405
405
  * */
406
406
  method: 'eth_getTransactionCount';
407
407
  params: [address: Address, block: RpcBlockNumber | BlockTag | RpcBlockIdentifier];
408
- }): Promise<Quantity | null>;
408
+ }): Promise<Quantity>;
409
409
  request(args: {
410
410
  /**
411
411
  * @description Returns the receipt of a transaction specified by hash
package/dist/index.d.ts CHANGED
@@ -1,12 +1,343 @@
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
- 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 { 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 encodeHex, C as encodeRlp, Q as formatEther, a7 as formatGwei, a8 as formatUnit, D as getAddress, F as getContractAddress, K as getCreate2Address, H as getCreateAddress, N as getEventSignature, O as getFunctionSignature, X as hexToBigInt, Y as hexToBool, Z as hexToBytes, a9 as hexToNumber, _ as hexToString, S as isAddress, U as isAddressEqual, V as isBytes, W as isHex, $ as keccak256, a0 as numberToBytes, aa as numberToHex, a1 as pad, a2 as padBytes, a3 as padHex, a4 as parseEther, a5 as parseGwei, a6 as parseUnit, ab as size, ac as slice, ad as sliceBytes, ae as sliceHex, af as stringToBytes, ag as stringToHex, ah as trim } from './parseGwei-bbc055e4.js';
6
- export { B as BaseError } from './BaseError-7688f84e.js';
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
- export { H as HttpRequestError, R as RpcError, T as TimeoutError } from './rpc-3c0e3985.js';
1
+ export { C as CallArgs, a as CallContractArgs, b as CallContractResponse, c as CallResponse, d as CreateBlockFilterResponse, e as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, f as EstimateGasResponse, G as GetBalanceArgs, g as GetBalanceResponse, h as GetBlockArgs, i as GetBlockNumberArgs, j as GetBlockNumberResponse, k as GetBlockResponse, l as GetBlockTransactionCountArgs, m as GetBlockTransactionCountResponse, n as GetFeeHistoryArgs, o as GetFeeHistoryResponse, p as GetFilterChangesArgs, q as GetFilterChangesResponse, r as GetFilterLogsArgs, s as GetFilterLogsResponse, t as GetGasPriceResponse, u as GetPermissionsResponse, v as GetTransactionArgs, w as GetTransactionConfirmationsArgs, x as GetTransactionConfirmationsResponse, y as GetTransactionCountArgs, z as GetTransactionCountResponse, B as GetTransactionReceiptArgs, F as GetTransactionReceiptResponse, A as GetTransactionResponse, I as ImpersonateAccountArgs, H as IncreaseTimeArgs, M as MineArgs, O as OnBlock, J as OnBlockNumber, K as OnBlockNumberResponse, L as OnBlockResponse, N as OnTransactions, P as OnTransactionsResponse, Q as RequestPermissionsResponse, R as ResetArgs, S as RevertArgs, T as SendTransactionArgs, U as SendTransactionResponse, V as SendUnsignedTransactionArgs, W as SendUnsignedTransactionResponse, X as SetBalanceArgs, Y as SetBlockGasLimitArgs, a1 as SetBlockTimestampIntervalArgs, Z as SetCodeArgs, _ as SetCoinbaseArgs, $ as SetIntervalMiningArgs, a0 as SetMinGasPriceArgs, a3 as SetNextBlockBaseFeePerGasArgs, a2 as SetNextBlockTimestampArgs, a4 as SetNonceArgs, a5 as SetStorageAtArgs, a6 as SignMessageArgs, a7 as SignMessageResponse, a8 as StopImpersonatingAccountArgs, a9 as SwitchChainArgs, aa as UninstallFilterArgs, ab as UninstallFilterResponse, ac as WaitForTransactionReceiptArgs, ad as WaitForTransactionReceiptResponse, ae as WatchAssetArgs, af as WatchAssetResponse, ag as WatchBlockNumberArgs, ah as WatchBlocksArgs, ai as WatchPendingTransactionsArgs, aj as addChain, ak as call, al as callContract, am as createBlockFilter, an as createPendingTransactionFilter, ap as dropTransaction, ao as estimateGas, aq as getAccounts, ar as getAutomine, as as getBalance, at as getBlock, au as getBlockNumber, av as getBlockTransactionCount, aw as getChainId, ax as getFeeHistory, ay as getFilterChanges, az as getFilterLogs, aA as getGasPrice, aB as getPermissions, aC as getTransaction, aD as getTransactionConfirmations, aE as getTransactionCount, aF as getTransactionReceipt, aG as getTxpoolContent, aH as getTxpoolStatus, aI as impersonateAccount, aJ as increaseTime, aK as inspectTxpool, aL as mine, aM as removeBlockTimestampInterval, aO as requestAccounts, aP as requestPermissions, aN as reset, aQ as revert, aR as sendTransaction, aS as sendUnsignedTransaction, aT as setAutomine, aU as setBalance, aV as setBlockGasLimit, aW as setBlockTimestampInterval, aX as setCode, aY as setCoinbase, aZ as setIntervalMining, a_ as setLoggingEnabled, a$ as setMinGasPrice, b0 as setNextBlockBaseFeePerGas, b1 as setNextBlockTimestamp, b2 as setNonce, b3 as setStorageAt, b4 as signMessage, b5 as snapshot, b6 as stopImpersonatingAccount, b7 as switchChain, b8 as uninstallFilter, b9 as waitForTransactionReceipt, ba as watchAsset, bb as watchBlockNumber, bc as watchBlocks, bd as watchPendingTransactions } from './watchAsset-43255bfd.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-3f9fa8b6.js';
3
+ export { C as CustomTransport, a as CustomTransportConfig, F as FallbackTransport, b as FallbackTransportConfig, H as HttpTransport, c as HttpTransportConfig, W as WebSocketTransport, d as WebSocketTransportConfig, e as custom, f as fallback, h as http, w as webSocket } from './webSocket-3385e295.js';
4
+ import { H as Hex, A as Address, a as Hash, B as ByteArray, b as BlockTag } from './rpc-b77c5aee.js';
5
+ export { c as AccessList, A as Address, d as Block, f as BlockIdentifier, h as BlockNumber, b as BlockTag, B as ByteArray, F as FeeHistory, i as FeeValues, j as FeeValuesEIP1559, k as FeeValuesLegacy, a 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-b77c5aee.js';
6
+ export { A as AbiItem, F as FormattedBlock, a as FormattedTransaction, b as FormattedTransactionRequest, f as formatBlock, c as formatTransaction, d as formatTransactionRequest } from './transactionRequest-08d30731.js';
7
+ export { D as DecodeAbiArgs, a as DecodeErrorResultArgs, b as DecodeFunctionDataArgs, c as DecodeFunctionResultArgs, d as DecodeFunctionResultResponse, E as EncodeAbiArgs, e as EncodeDeployDataArgs, f as EncodeErrorResultArgs, g as EncodeEventTopicsArgs, h as EncodeFunctionDataArgs, i as EncodeFunctionResultArgs, l as EncodeRlpResponse, G as GetContractAddressOptions, k as GetCreate2AddressOptions, j as GetCreateAddressOptions, o as boolToBytes, p as boolToHex, q as bytesToBigint, r as bytesToBool, m as bytesToHex, s as bytesToNumber, n as bytesToString, t as decodeAbi, u as decodeBytes, v as decodeErrorResult, w as decodeFunctionData, x as decodeFunctionResult, y as decodeHex, z as decodeRlp, A as encodeAbi, B as encodeBytes, C as encodeDeployData, F as encodeErrorResult, H as encodeEventTopics, I as encodeFunctionData, J as encodeFunctionResult, K as encodeHex, L as encodeRlp, S as formatEther, a7 as formatGwei, a8 as formatUnit, M as getAddress, N as getContractAddress, P as getCreate2Address, O as getCreateAddress, Q as getEventSignature, R as getFunctionSignature, X as hexToBigInt, Y as hexToBool, Z as hexToBytes, a9 as hexToNumber, _ as hexToString, T as isAddress, U as isAddressEqual, V as isBytes, W as isHex, $ as keccak256, a0 as numberToBytes, aa as numberToHex, a1 as pad, a2 as padBytes, a3 as padHex, a4 as parseEther, a5 as parseGwei, a6 as parseUnit, ab as size, ac as slice, ad as sliceBytes, ae as sliceHex, af as stringToBytes, ag as stringToHex, ah as trim } from './parseGwei-7c87ff41.js';
8
+ import 'abitype';
9
9
  import './chains.js';
10
10
  import '@wagmi/chains';
11
- import './eip1193-8f7c22ce.js';
12
- import 'abitype';
11
+ import './eip1193-c001fcd5.js';
12
+ import './rpc-26932bae.js';
13
+
14
+ type BaseErrorArgs = {
15
+ docsPath?: string;
16
+ } & ({
17
+ cause?: never;
18
+ details?: string;
19
+ } | {
20
+ cause: BaseError | Error;
21
+ details?: never;
22
+ });
23
+ declare class BaseError extends Error {
24
+ humanMessage: string;
25
+ details: string;
26
+ docsPath?: string;
27
+ name: string;
28
+ constructor(humanMessage: string, args?: BaseErrorArgs);
29
+ }
30
+
31
+ declare class AbiConstructorNotFoundError extends BaseError {
32
+ name: string;
33
+ constructor({ docsPath }: {
34
+ docsPath: string;
35
+ });
36
+ }
37
+ declare class AbiConstructorParamsNotFoundError extends BaseError {
38
+ name: string;
39
+ constructor({ docsPath }: {
40
+ docsPath: string;
41
+ });
42
+ }
43
+ declare class AbiDecodingDataSizeInvalidError extends BaseError {
44
+ name: string;
45
+ constructor(size: number);
46
+ }
47
+ declare class AbiEncodingArrayLengthMismatchError extends BaseError {
48
+ name: string;
49
+ constructor({ expectedLength, givenLength, type, }: {
50
+ expectedLength: number;
51
+ givenLength: number;
52
+ type: string;
53
+ });
54
+ }
55
+ declare class AbiEncodingLengthMismatchError extends BaseError {
56
+ name: string;
57
+ constructor({ expectedLength, givenLength, }: {
58
+ expectedLength: number;
59
+ givenLength: number;
60
+ });
61
+ }
62
+ declare class AbiErrorInputsNotFoundError extends BaseError {
63
+ name: string;
64
+ constructor(errorName: string, { docsPath }: {
65
+ docsPath: string;
66
+ });
67
+ }
68
+ declare class AbiErrorNotFoundError extends BaseError {
69
+ name: string;
70
+ constructor(errorName: string, { docsPath }: {
71
+ docsPath: string;
72
+ });
73
+ }
74
+ declare class AbiErrorSignatureNotFoundError extends BaseError {
75
+ name: string;
76
+ constructor(signature: Hex, { docsPath }: {
77
+ docsPath: string;
78
+ });
79
+ }
80
+ declare class AbiEventNotFoundError extends BaseError {
81
+ name: string;
82
+ constructor(eventName: string, { docsPath }: {
83
+ docsPath: string;
84
+ });
85
+ }
86
+ declare class AbiFunctionNotFoundError extends BaseError {
87
+ name: string;
88
+ constructor(functionName: string, { docsPath }: {
89
+ docsPath: string;
90
+ });
91
+ }
92
+ declare class AbiFunctionOutputsNotFoundError extends BaseError {
93
+ name: string;
94
+ constructor(functionName: string, { docsPath }: {
95
+ docsPath: string;
96
+ });
97
+ }
98
+ declare class AbiFunctionSignatureNotFoundError extends BaseError {
99
+ name: string;
100
+ constructor(signature: Hex, { docsPath }: {
101
+ docsPath: string;
102
+ });
103
+ }
104
+ declare class InvalidAbiEncodingTypeError extends BaseError {
105
+ name: string;
106
+ constructor(type: string, { docsPath }: {
107
+ docsPath: string;
108
+ });
109
+ }
110
+ declare class InvalidAbiDecodingTypeError extends BaseError {
111
+ name: string;
112
+ constructor(type: string, { docsPath }: {
113
+ docsPath: string;
114
+ });
115
+ }
116
+ declare class InvalidArrayError extends BaseError {
117
+ name: string;
118
+ constructor(value: unknown);
119
+ }
120
+ declare class InvalidDefinitionTypeError extends BaseError {
121
+ name: string;
122
+ constructor(type: string);
123
+ }
124
+
125
+ declare class InvalidAddressError extends BaseError {
126
+ name: string;
127
+ constructor({ address }: {
128
+ address: Address;
129
+ });
130
+ }
131
+
132
+ declare class BlockNotFoundError extends BaseError {
133
+ name: string;
134
+ constructor({ blockHash, blockNumber, }: {
135
+ blockHash?: Hash;
136
+ blockNumber?: bigint;
137
+ });
138
+ }
139
+
140
+ declare class SizeExceedsPaddingSizeError extends BaseError {
141
+ name: string;
142
+ constructor({ size, targetSize, type, }: {
143
+ size: number;
144
+ targetSize: number;
145
+ type: 'hex' | 'bytes';
146
+ });
147
+ }
148
+
149
+ declare class DataLengthTooLongError extends BaseError {
150
+ name: string;
151
+ constructor({ consumed, length }: {
152
+ consumed: number;
153
+ length: number;
154
+ });
155
+ }
156
+ declare class DataLengthTooShortError extends BaseError {
157
+ name: string;
158
+ constructor({ length, dataLength }: {
159
+ length: number;
160
+ dataLength: number;
161
+ });
162
+ }
163
+ declare class InvalidBytesBooleanError extends BaseError {
164
+ name: string;
165
+ constructor(bytes: ByteArray);
166
+ }
167
+ declare class InvalidHexBooleanError extends BaseError {
168
+ name: string;
169
+ constructor(hex: Hex);
170
+ }
171
+ declare class InvalidHexValueError extends BaseError {
172
+ name: string;
173
+ constructor(value: Hex);
174
+ }
175
+ declare class OffsetOutOfBoundsError extends BaseError {
176
+ name: string;
177
+ constructor({ nextOffset, offset }: {
178
+ nextOffset: number;
179
+ offset: number;
180
+ });
181
+ }
182
+
183
+ declare class FilterTypeNotSupportedError extends BaseError {
184
+ name: string;
185
+ constructor(type: string);
186
+ }
187
+
188
+ declare class HttpRequestError extends BaseError {
189
+ name: string;
190
+ status: number;
191
+ constructor({ body, details, status, url, }: {
192
+ body: {
193
+ [key: string]: unknown;
194
+ };
195
+ details: string;
196
+ status: number;
197
+ url: string;
198
+ });
199
+ }
200
+ declare class WebSocketRequestError extends BaseError {
201
+ name: string;
202
+ constructor({ body, details, url, }: {
203
+ body: {
204
+ [key: string]: unknown;
205
+ };
206
+ details: string;
207
+ url: string;
208
+ });
209
+ }
210
+ declare class RpcError extends BaseError {
211
+ code: number;
212
+ name: string;
213
+ constructor({ body, error, url, }: {
214
+ body: {
215
+ [key: string]: unknown;
216
+ };
217
+ error: {
218
+ code: number;
219
+ message: string;
220
+ };
221
+ url: string;
222
+ });
223
+ }
224
+ declare class TimeoutError extends BaseError {
225
+ name: string;
226
+ constructor({ body, url, }: {
227
+ body: {
228
+ [key: string]: unknown;
229
+ };
230
+ url: string;
231
+ });
232
+ }
233
+
234
+ declare class RequestError extends BaseError {
235
+ constructor(err: Error, { docsPath, humanMessage }: {
236
+ docsPath?: string;
237
+ humanMessage: string;
238
+ });
239
+ }
240
+ declare class RpcRequestError extends RequestError {
241
+ code: number;
242
+ constructor(err: RpcError, { docsPath, humanMessage }: {
243
+ docsPath?: string;
244
+ humanMessage: string;
245
+ });
246
+ }
247
+ declare class ParseRpcError extends RpcRequestError {
248
+ name: string;
249
+ code: number;
250
+ constructor(err: RpcError);
251
+ }
252
+ declare class InvalidRequestRpcError extends RpcRequestError {
253
+ name: string;
254
+ code: number;
255
+ constructor(err: RpcError);
256
+ }
257
+ declare class MethodNotFoundRpcError extends RpcRequestError {
258
+ name: string;
259
+ code: number;
260
+ constructor(err: RpcError);
261
+ }
262
+ declare class InvalidParamsRpcError extends RpcRequestError {
263
+ name: string;
264
+ code: number;
265
+ constructor(err: RpcError);
266
+ }
267
+ declare class InternalRpcError extends RpcRequestError {
268
+ name: string;
269
+ code: number;
270
+ constructor(err: RpcError);
271
+ }
272
+ declare class InvalidInputRpcError extends RpcRequestError {
273
+ name: string;
274
+ code: number;
275
+ constructor(err: RpcError);
276
+ }
277
+ declare class ResourceNotFoundRpcError extends RpcRequestError {
278
+ name: string;
279
+ code: number;
280
+ constructor(err: RpcError);
281
+ }
282
+ declare class ResourceUnavailableRpcError extends RpcRequestError {
283
+ name: string;
284
+ code: number;
285
+ constructor(err: RpcError);
286
+ }
287
+ declare class TransactionRejectedRpcError extends RpcRequestError {
288
+ name: string;
289
+ code: number;
290
+ constructor(err: RpcError);
291
+ }
292
+ declare class MethodNotSupportedRpcError extends RpcRequestError {
293
+ name: string;
294
+ code: number;
295
+ constructor(err: RpcError);
296
+ }
297
+ declare class LimitExceededRpcError extends RpcRequestError {
298
+ name: string;
299
+ code: number;
300
+ constructor(err: RpcError);
301
+ }
302
+ declare class JsonRpcVersionUnsupportedError extends RpcRequestError {
303
+ name: string;
304
+ code: number;
305
+ constructor(err: RpcError);
306
+ }
307
+ declare class UnknownRpcError extends RequestError {
308
+ name: string;
309
+ constructor(err: Error);
310
+ }
311
+
312
+ declare class InvalidGasArgumentsError extends BaseError {
313
+ name: string;
314
+ constructor();
315
+ }
316
+ declare class TransactionNotFoundError extends BaseError {
317
+ name: string;
318
+ constructor({ blockHash, blockNumber, blockTag, hash, index, }: {
319
+ blockHash?: Hash;
320
+ blockNumber?: bigint;
321
+ blockTag?: BlockTag;
322
+ hash?: Hash;
323
+ index?: number;
324
+ });
325
+ }
326
+ declare class TransactionReceiptNotFoundError extends BaseError {
327
+ name: string;
328
+ constructor({ hash }: {
329
+ hash: Hash;
330
+ });
331
+ }
332
+ declare class WaitForTransactionReceiptTimeoutError extends BaseError {
333
+ name: string;
334
+ constructor({ hash }: {
335
+ hash: Hash;
336
+ });
337
+ }
338
+
339
+ declare class UrlRequiredError extends BaseError {
340
+ constructor();
341
+ }
342
+
343
+ export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, BaseError, BlockNotFoundError, DataLengthTooLongError, DataLengthTooShortError, FilterTypeNotSupportedError, HttpRequestError, InternalRpcError, InvalidAbiDecodingTypeError, InvalidAbiEncodingTypeError, InvalidAddressError, InvalidArrayError, InvalidBytesBooleanError, InvalidDefinitionTypeError, InvalidGasArgumentsError, InvalidHexBooleanError, InvalidHexValueError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, OffsetOutOfBoundsError, ParseRpcError, RequestError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, RpcError, RpcRequestError, SizeExceedsPaddingSizeError, TimeoutError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionRejectedRpcError, UnknownRpcError, UrlRequiredError, WaitForTransactionReceiptTimeoutError, WebSocketRequestError };