viem 0.0.1-alpha.3 → 0.0.1-alpha.30

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 (101) hide show
  1. package/chains/package.json +1 -1
  2. package/contract/package.json +4 -0
  3. package/dist/chain-00b37e4e.d.ts +543 -0
  4. package/dist/chain-38182d92.d.ts +5 -0
  5. package/dist/chains.d.ts +1305 -74
  6. package/dist/chains.js +125 -130
  7. package/dist/chains.js.map +1 -0
  8. package/dist/chains.mjs +129 -0
  9. package/dist/chains.mjs.map +1 -0
  10. package/dist/chunk-23UHN6UC.mjs +210 -0
  11. package/dist/chunk-23UHN6UC.mjs.map +1 -0
  12. package/dist/chunk-25AJVKAT.mjs +3436 -0
  13. package/dist/chunk-25AJVKAT.mjs.map +1 -0
  14. package/dist/chunk-AO7KQBK3.mjs +265 -0
  15. package/dist/chunk-AO7KQBK3.mjs.map +1 -0
  16. package/dist/chunk-BHMSFL4W.js +265 -0
  17. package/dist/chunk-BHMSFL4W.js.map +1 -0
  18. package/dist/chunk-EAD66IDC.js +3436 -0
  19. package/dist/chunk-EAD66IDC.js.map +1 -0
  20. package/dist/{chunk-YZEQFYZ3.js → chunk-EYRMK2SV.mjs} +725 -556
  21. package/dist/chunk-EYRMK2SV.mjs.map +1 -0
  22. package/dist/chunk-IP3NSE7H.mjs +197 -0
  23. package/dist/chunk-IP3NSE7H.mjs.map +1 -0
  24. package/dist/chunk-NPFW67BV.js +210 -0
  25. package/dist/chunk-NPFW67BV.js.map +1 -0
  26. package/dist/chunk-VOK5ALIT.js +197 -0
  27. package/dist/chunk-VOK5ALIT.js.map +1 -0
  28. package/dist/chunk-ZX4U6QKQ.js +1216 -0
  29. package/dist/chunk-ZX4U6QKQ.js.map +1 -0
  30. package/dist/contract.d.ts +11 -0
  31. package/dist/contract.js +57 -0
  32. package/dist/contract.js.map +1 -0
  33. package/dist/contract.mjs +57 -0
  34. package/dist/contract.mjs.map +1 -0
  35. package/dist/createClient-5258d590.d.ts +70 -0
  36. package/dist/createPublicClient-99be385b.d.ts +650 -0
  37. package/dist/{eip1193-8b4d90ce.d.ts → eip1193-fcdeee04.d.ts} +13 -10
  38. package/dist/ens.d.ts +22 -0
  39. package/dist/ens.js +22 -0
  40. package/dist/ens.js.map +1 -0
  41. package/dist/ens.mjs +22 -0
  42. package/dist/ens.mjs.map +1 -0
  43. package/dist/formatAbiItem-50cb39d8.d.ts +14 -0
  44. package/dist/getAbiItem-6d4f64d2.d.ts +97 -0
  45. package/dist/index.d.ts +245 -66
  46. package/dist/index.js +767 -344
  47. package/dist/index.js.map +1 -0
  48. package/dist/index.mjs +767 -0
  49. package/dist/index.mjs.map +1 -0
  50. package/dist/namehash-88f4639d.d.ts +22 -0
  51. package/dist/parseGwei-e299cf13.d.ts +506 -0
  52. package/dist/public.d.ts +29 -0
  53. package/dist/public.js +60 -0
  54. package/dist/public.js.map +1 -0
  55. package/dist/public.mjs +60 -0
  56. package/dist/public.mjs.map +1 -0
  57. package/dist/test-79ec416c.d.ts +213 -0
  58. package/dist/test.d.ts +20 -0
  59. package/dist/test.js +62 -0
  60. package/dist/test.js.map +1 -0
  61. package/dist/test.mjs +62 -0
  62. package/dist/test.mjs.map +1 -0
  63. package/dist/utils/index.d.ts +52 -7
  64. package/dist/utils/index.js +185 -126
  65. package/dist/utils/index.js.map +1 -0
  66. package/dist/utils/index.mjs +185 -0
  67. package/dist/utils/index.mjs.map +1 -0
  68. package/dist/wallet-cf5c8351.d.ts +115 -0
  69. package/dist/wallet.d.ts +7 -0
  70. package/dist/wallet.js +24 -0
  71. package/dist/wallet.js.map +1 -0
  72. package/dist/wallet.mjs +24 -0
  73. package/dist/wallet.mjs.map +1 -0
  74. package/dist/window.d.ts +5 -2
  75. package/dist/window.js +1 -0
  76. package/dist/window.js.map +1 -0
  77. package/dist/window.mjs +1 -0
  78. package/dist/window.mjs.map +1 -0
  79. package/ens/package.json +4 -0
  80. package/package.json +46 -73
  81. package/public/package.json +4 -0
  82. package/test/package.json +4 -0
  83. package/utils/package.json +1 -1
  84. package/wallet/package.json +4 -0
  85. package/window/package.json +1 -1
  86. package/actions/package.json +0 -4
  87. package/clients/package.json +0 -4
  88. package/dist/actions/index.d.ts +0 -7
  89. package/dist/actions/index.js +0 -124
  90. package/dist/chunk-SRDTRROA.js +0 -1214
  91. package/dist/chunk-TLEMV4T3.js +0 -258
  92. package/dist/chunk-WZITKXV3.js +0 -996
  93. package/dist/clients/index.d.ts +0 -7
  94. package/dist/clients/index.js +0 -23
  95. package/dist/createWalletClient-15ad1601.d.ts +0 -130
  96. package/dist/parseGwei-0f85e8ca.d.ts +0 -248
  97. package/dist/rpc-15b85963.d.ts +0 -292
  98. package/dist/rpc-26932bae.d.ts +0 -61
  99. package/dist/transactionRequest-f538ea86.d.ts +0 -44
  100. package/dist/watchAsset-0c9d01e2.d.ts +0 -522
  101. package/dist/webSocket-b55b0951.d.ts +0 -83
package/dist/index.mjs ADDED
@@ -0,0 +1,767 @@
1
+ import {
2
+ getEnsAddress,
3
+ getEnsName,
4
+ labelhash,
5
+ namehash
6
+ } from "./chunk-23UHN6UC.mjs";
7
+ import {
8
+ call,
9
+ createBlockFilter,
10
+ createContractEventFilter,
11
+ createEventFilter,
12
+ createPendingTransactionFilter,
13
+ estimateContractGas,
14
+ estimateGas,
15
+ getBalance,
16
+ getBlock,
17
+ getBlockNumber,
18
+ getBlockTransactionCount,
19
+ getBytecode,
20
+ getChainId,
21
+ getFeeHistory,
22
+ getFilterChanges,
23
+ getFilterLogs,
24
+ getGasPrice,
25
+ getLogs,
26
+ getStorageAt,
27
+ getTransaction,
28
+ getTransactionConfirmations,
29
+ getTransactionReceipt,
30
+ multicall,
31
+ readContract,
32
+ simulateContract,
33
+ uninstallFilter,
34
+ waitForTransactionReceipt,
35
+ watchBlockNumber,
36
+ watchBlocks,
37
+ watchContractEvent,
38
+ watchEvent,
39
+ watchPendingTransactions
40
+ } from "./chunk-EYRMK2SV.mjs";
41
+ import {
42
+ dropTransaction,
43
+ getAutomine,
44
+ getTxpoolContent,
45
+ getTxpoolStatus,
46
+ impersonateAccount,
47
+ increaseTime,
48
+ inspectTxpool,
49
+ mine,
50
+ removeBlockTimestampInterval,
51
+ reset,
52
+ revert,
53
+ sendUnsignedTransaction,
54
+ setAutomine,
55
+ setBalance,
56
+ setBlockGasLimit,
57
+ setBlockTimestampInterval,
58
+ setCode,
59
+ setCoinbase,
60
+ setIntervalMining,
61
+ setLoggingEnabled,
62
+ setMinGasPrice,
63
+ setNextBlockBaseFeePerGas,
64
+ setNextBlockTimestamp,
65
+ setNonce,
66
+ setRpcUrl,
67
+ setStorageAt,
68
+ snapshot,
69
+ stopImpersonatingAccount
70
+ } from "./chunk-AO7KQBK3.mjs";
71
+ import {
72
+ addChain,
73
+ deployContract,
74
+ getAccounts,
75
+ getPermissions,
76
+ requestAccounts,
77
+ requestPermissions,
78
+ sendTransaction,
79
+ signMessage,
80
+ switchChain,
81
+ watchAsset,
82
+ writeContract
83
+ } from "./chunk-IP3NSE7H.mjs";
84
+ import {
85
+ AbiConstructorNotFoundError,
86
+ AbiConstructorParamsNotFoundError,
87
+ AbiDecodingDataSizeInvalidError,
88
+ AbiDecodingZeroDataError,
89
+ AbiEncodingArrayLengthMismatchError,
90
+ AbiEncodingLengthMismatchError,
91
+ AbiErrorInputsNotFoundError,
92
+ AbiErrorNotFoundError,
93
+ AbiErrorSignatureNotFoundError,
94
+ AbiEventNotFoundError,
95
+ AbiEventSignatureNotFoundError,
96
+ AbiFunctionNotFoundError,
97
+ AbiFunctionOutputsNotFoundError,
98
+ AbiFunctionSignatureNotFoundError,
99
+ BaseError,
100
+ BlockNotFoundError,
101
+ CallExecutionError,
102
+ ChainDoesNotSupportContract,
103
+ ContractFunctionExecutionError,
104
+ ContractFunctionRevertedError,
105
+ ContractFunctionZeroDataError,
106
+ DataLengthTooLongError,
107
+ DataLengthTooShortError,
108
+ EstimateGasExecutionError,
109
+ ExecutionRevertedError,
110
+ FeeCapTooHighError,
111
+ FeeCapTooLowError,
112
+ FilterTypeNotSupportedError,
113
+ HttpRequestError,
114
+ InsufficientFundsError,
115
+ InternalRpcError,
116
+ IntrinsicGasTooHighError,
117
+ IntrinsicGasTooLowError,
118
+ InvalidAbiDecodingTypeError,
119
+ InvalidAbiEncodingTypeError,
120
+ InvalidAddressError,
121
+ InvalidArrayError,
122
+ InvalidBytesBooleanError,
123
+ InvalidDefinitionTypeError,
124
+ InvalidHexBooleanError,
125
+ InvalidHexValueError,
126
+ InvalidInputRpcError,
127
+ InvalidParamsRpcError,
128
+ InvalidRequestRpcError,
129
+ JsonRpcVersionUnsupportedError,
130
+ LimitExceededRpcError,
131
+ MethodNotFoundRpcError,
132
+ MethodNotSupportedRpcError,
133
+ NonceMaxValueError,
134
+ NonceTooHighError,
135
+ NonceTooLowError,
136
+ OffsetOutOfBoundsError,
137
+ ParseRpcError,
138
+ RawContractError,
139
+ RequestError,
140
+ ResourceNotFoundRpcError,
141
+ ResourceUnavailableRpcError,
142
+ RpcError,
143
+ RpcRequestError,
144
+ SizeExceedsPaddingSizeError,
145
+ TimeoutError,
146
+ TipAboveFeeCapError,
147
+ TransactionExecutionError,
148
+ TransactionNotFoundError,
149
+ TransactionReceiptNotFoundError,
150
+ TransactionRejectedRpcError,
151
+ TransactionTypeNotSupportedError,
152
+ UnknownNodeError,
153
+ UnknownRpcError,
154
+ UrlRequiredError,
155
+ WaitForTransactionReceiptTimeoutError,
156
+ WebSocketRequestError,
157
+ boolToBytes,
158
+ boolToHex,
159
+ buildRequest,
160
+ bytesToBigint,
161
+ bytesToBool,
162
+ bytesToHex,
163
+ bytesToNumber,
164
+ bytesToString,
165
+ decodeAbi,
166
+ decodeErrorResult,
167
+ decodeEventLog,
168
+ decodeFunctionData,
169
+ decodeFunctionResult,
170
+ defineBlock,
171
+ defineChain,
172
+ defineTransaction,
173
+ defineTransactionReceipt,
174
+ defineTransactionRequest,
175
+ encodeAbi,
176
+ encodeDeployData,
177
+ encodeErrorResult,
178
+ encodeEventTopics,
179
+ encodeFunctionData,
180
+ encodeFunctionResult,
181
+ etherUnits,
182
+ formatBlock,
183
+ formatEther,
184
+ formatGwei,
185
+ formatTransaction,
186
+ formatTransactionRequest,
187
+ formatUnit,
188
+ fromBytes,
189
+ fromHex,
190
+ fromRlp,
191
+ getAbiItem,
192
+ getAddress,
193
+ getContractAddress,
194
+ getContractError,
195
+ getCreate2Address,
196
+ getCreateAddress,
197
+ getEventSignature,
198
+ getFunctionSignature,
199
+ getSocket,
200
+ gweiUnits,
201
+ hexToBigInt,
202
+ hexToBool,
203
+ hexToBytes,
204
+ hexToNumber,
205
+ hexToString,
206
+ isAddress,
207
+ isAddressEqual,
208
+ isBytes,
209
+ isDeterministicError,
210
+ isHex,
211
+ keccak256,
212
+ multicall3Abi,
213
+ numberToBytes,
214
+ numberToHex,
215
+ pad,
216
+ padBytes,
217
+ padHex,
218
+ parseEther,
219
+ parseGwei,
220
+ parseUnit,
221
+ rpc,
222
+ size,
223
+ slice,
224
+ sliceBytes,
225
+ sliceHex,
226
+ stringToBytes,
227
+ stringToHex,
228
+ stringify,
229
+ toBytes,
230
+ toHex,
231
+ toRlp,
232
+ transactionType,
233
+ trim,
234
+ weiUnits
235
+ } from "./chunk-25AJVKAT.mjs";
236
+
237
+ // src/clients/transports/createTransport.ts
238
+ function createTransport({
239
+ key,
240
+ name,
241
+ request,
242
+ retryCount = 3,
243
+ retryDelay = 150,
244
+ timeout,
245
+ type
246
+ }, value) {
247
+ return {
248
+ config: { key, name, request, retryCount, retryDelay, timeout, type },
249
+ request: buildRequest(request, { retryCount, retryDelay }),
250
+ value
251
+ };
252
+ }
253
+
254
+ // src/clients/transports/custom.ts
255
+ function custom(provider, config = {}) {
256
+ const { key = "custom", name = "Custom Provider", retryDelay } = config;
257
+ return ({ retryCount: defaultRetryCount }) => createTransport({
258
+ key,
259
+ name,
260
+ request: provider.request.bind(provider),
261
+ retryCount: config.retryCount ?? defaultRetryCount,
262
+ retryDelay,
263
+ type: "custom"
264
+ });
265
+ }
266
+
267
+ // src/clients/transports/fallback.ts
268
+ function fallback(transports, config = {}) {
269
+ const { key = "fallback", name = "Fallback", retryCount, retryDelay } = config;
270
+ return ({ chain }) => createTransport(
271
+ {
272
+ key,
273
+ name,
274
+ async request({ method, params }) {
275
+ const fetch = async (i = 0) => {
276
+ const transport = transports[i]({ chain, retryCount: 0 });
277
+ try {
278
+ return await transport.request({
279
+ method,
280
+ params
281
+ });
282
+ } catch (err) {
283
+ if (isDeterministicError(err))
284
+ throw err;
285
+ if (i === transports.length - 1)
286
+ throw err;
287
+ return fetch(i + 1);
288
+ }
289
+ };
290
+ return fetch();
291
+ },
292
+ retryCount,
293
+ retryDelay,
294
+ type: "fallback"
295
+ },
296
+ {
297
+ transports: transports.map(
298
+ (fn) => fn({ chain, retryCount: 0 })
299
+ )
300
+ }
301
+ );
302
+ }
303
+
304
+ // src/clients/transports/http.ts
305
+ function http(url, config = {}) {
306
+ const {
307
+ key = "http",
308
+ name = "HTTP JSON-RPC",
309
+ retryDelay,
310
+ timeout = 1e4
311
+ } = config;
312
+ return ({ chain, retryCount: defaultRetryCount }) => {
313
+ const retryCount = config.retryCount ?? defaultRetryCount;
314
+ const url_ = url || chain?.rpcUrls.default.http[0];
315
+ if (!url_)
316
+ throw new UrlRequiredError();
317
+ return createTransport(
318
+ {
319
+ key,
320
+ name,
321
+ async request({ method, params }) {
322
+ const { result } = await rpc.http(url_, {
323
+ body: {
324
+ method,
325
+ params
326
+ },
327
+ timeout
328
+ });
329
+ return result;
330
+ },
331
+ retryCount,
332
+ retryDelay,
333
+ timeout,
334
+ type: "http"
335
+ },
336
+ {
337
+ url
338
+ }
339
+ );
340
+ };
341
+ }
342
+
343
+ // src/clients/transports/webSocket.ts
344
+ function webSocket(url, config = {}) {
345
+ const {
346
+ key = "webSocket",
347
+ name = "WebSocket JSON-RPC",
348
+ retryDelay,
349
+ timeout = 1e4
350
+ } = config;
351
+ return ({ chain, retryCount: defaultRetryCount }) => {
352
+ const retryCount = config.retryCount ?? defaultRetryCount;
353
+ const url_ = url || chain?.rpcUrls.default.webSocket?.[0];
354
+ if (!url_)
355
+ throw new UrlRequiredError();
356
+ return createTransport(
357
+ {
358
+ key,
359
+ name,
360
+ async request({ method, params }) {
361
+ const socket = await getSocket(url_);
362
+ const { result } = await rpc.webSocketAsync(socket, {
363
+ body: { method, params },
364
+ timeout
365
+ });
366
+ return result;
367
+ },
368
+ retryCount,
369
+ retryDelay,
370
+ timeout,
371
+ type: "webSocket"
372
+ },
373
+ {
374
+ getSocket() {
375
+ return getSocket(url_);
376
+ },
377
+ async subscribe({ params, onData, onError }) {
378
+ const socket = await getSocket(url_);
379
+ const { result: subscriptionId } = await new Promise(
380
+ (resolve, reject) => rpc.webSocket(socket, {
381
+ body: {
382
+ method: "eth_subscribe",
383
+ params
384
+ },
385
+ onData: (data) => {
386
+ if (typeof data.id === "number") {
387
+ resolve(data);
388
+ return;
389
+ }
390
+ onData(data);
391
+ },
392
+ onError: (error) => {
393
+ reject(error);
394
+ onError?.(error);
395
+ }
396
+ })
397
+ );
398
+ return {
399
+ subscriptionId,
400
+ async unsubscribe() {
401
+ return new Promise(
402
+ (resolve, reject) => rpc.webSocket(socket, {
403
+ body: {
404
+ method: "eth_unsubscribe",
405
+ params: [subscriptionId]
406
+ },
407
+ onData: resolve,
408
+ onError: reject
409
+ })
410
+ );
411
+ }
412
+ };
413
+ }
414
+ }
415
+ );
416
+ };
417
+ }
418
+
419
+ // src/utils/uid.ts
420
+ var size2 = 256;
421
+ var index = size2;
422
+ var buffer;
423
+ function uid(length = 11) {
424
+ if (!buffer || index + length > size2 * 2) {
425
+ buffer = "";
426
+ index = 0;
427
+ for (let i = 0; i < size2; i++) {
428
+ buffer += (256 + Math.random() * 256 | 0).toString(16).substring(1);
429
+ }
430
+ }
431
+ return buffer.substring(index, index++ + length);
432
+ }
433
+
434
+ // src/clients/createClient.ts
435
+ function createClient({
436
+ chain,
437
+ key = "base",
438
+ name = "Base Client",
439
+ pollingInterval = 4e3,
440
+ transport,
441
+ type = "base"
442
+ }) {
443
+ const { config, request, value } = transport({ chain });
444
+ return {
445
+ chain,
446
+ key,
447
+ name,
448
+ pollingInterval,
449
+ request,
450
+ transport: { ...config, ...value },
451
+ type,
452
+ uid: uid()
453
+ };
454
+ }
455
+
456
+ // src/clients/decorators/public.ts
457
+ var publicActions = (client) => ({
458
+ call: (args) => call(client, args),
459
+ createBlockFilter: () => createBlockFilter(client),
460
+ createContractEventFilter: (args) => createContractEventFilter(client, args),
461
+ createEventFilter: (args) => createEventFilter(client, args),
462
+ createPendingTransactionFilter: () => createPendingTransactionFilter(client),
463
+ estimateContractGas: (args) => estimateContractGas(client, args),
464
+ estimateGas: (args) => estimateGas(client, args),
465
+ getBalance: (args) => getBalance(client, args),
466
+ getBlock: (args) => getBlock(client, args),
467
+ getBlockNumber: (args) => getBlockNumber(client, args),
468
+ getBlockTransactionCount: (args) => getBlockTransactionCount(client, args),
469
+ getBytecode: (args) => getBytecode(client, args),
470
+ getChainId: () => getChainId(client),
471
+ getEnsAddress: (args) => getEnsAddress(client, args),
472
+ getEnsName: (args) => getEnsName(client, args),
473
+ getFeeHistory: (args) => getFeeHistory(client, args),
474
+ getFilterChanges: (args) => getFilterChanges(client, args),
475
+ getFilterLogs: (args) => getFilterLogs(client, args),
476
+ getGasPrice: () => getGasPrice(client),
477
+ getLogs: (args) => getLogs(client, args),
478
+ getStorageAt: (args) => getStorageAt(client, args),
479
+ getTransaction: (args) => getTransaction(client, args),
480
+ getTransactionConfirmations: (args) => getTransactionConfirmations(client, args),
481
+ getTransactionReceipt: (args) => getTransactionReceipt(client, args),
482
+ multicall: (args) => multicall(client, args),
483
+ readContract: (args) => readContract(client, args),
484
+ simulateContract: (args) => simulateContract(client, args),
485
+ uninstallFilter: (args) => uninstallFilter(client, args),
486
+ waitForTransactionReceipt: (args) => waitForTransactionReceipt(client, args),
487
+ watchBlocks: (args) => watchBlocks(client, args),
488
+ watchBlockNumber: (args) => watchBlockNumber(client, args),
489
+ watchContractEvent: (args) => watchContractEvent(client, args),
490
+ watchEvent: (args) => watchEvent(client, args),
491
+ watchPendingTransactions: (args) => watchPendingTransactions(client, args)
492
+ });
493
+
494
+ // src/clients/decorators/test.ts
495
+ var testActions = (client) => ({
496
+ dropTransaction: (args) => dropTransaction(client, args),
497
+ getAutomine: () => getAutomine(client),
498
+ getTxPoolContent: () => getTxpoolContent(client),
499
+ getTxPoolStatus: () => getTxpoolStatus(client),
500
+ impersonateAccount: (args) => impersonateAccount(client, args),
501
+ increaseTime: (args) => increaseTime(client, args),
502
+ inspectTxpool: () => inspectTxpool(client),
503
+ mine: (args) => mine(client, args),
504
+ removeBlockTimestampInterval: () => removeBlockTimestampInterval(client),
505
+ reset: (args) => reset(client, args),
506
+ revert: (args) => revert(client, args),
507
+ sendUnsignedTransaction: (args) => sendUnsignedTransaction(client, args),
508
+ setAutomine: (args) => setAutomine(client, args),
509
+ setBalance: (args) => setBalance(client, args),
510
+ setBlockGasLimit: (args) => setBlockGasLimit(client, args),
511
+ setBlockTimestampInterval: (args) => setBlockTimestampInterval(client, args),
512
+ setCode: (args) => setCode(client, args),
513
+ setCoinbase: (args) => setCoinbase(client, args),
514
+ setIntervalMining: (args) => setIntervalMining(client, args),
515
+ setLoggingEnabled: (args) => setLoggingEnabled(client, args),
516
+ setMinGasPrice: (args) => setMinGasPrice(client, args),
517
+ setNextBlockBaseFeePerGas: (args) => setNextBlockBaseFeePerGas(client, args),
518
+ setNextBlockTimestamp: (args) => setNextBlockTimestamp(client, args),
519
+ setNonce: (args) => setNonce(client, args),
520
+ setRpcUrl: (args) => setRpcUrl(client, args),
521
+ setStorageAt: (args) => setStorageAt(client, args),
522
+ snapshot: () => snapshot(client),
523
+ stopImpersonatingAccount: (args) => stopImpersonatingAccount(client, args)
524
+ });
525
+
526
+ // src/clients/decorators/wallet.ts
527
+ var walletActions = (client) => ({
528
+ addChain: (args) => addChain(client, args),
529
+ deployContract: (args) => deployContract(client, args),
530
+ getAccounts: () => getAccounts(client),
531
+ getPermissions: () => getPermissions(client),
532
+ requestAccounts: () => requestAccounts(client),
533
+ requestPermissions: (args) => requestPermissions(client, args),
534
+ sendTransaction: (args) => sendTransaction(client, args),
535
+ signMessage: (args) => signMessage(client, args),
536
+ switchChain: (args) => switchChain(client, args),
537
+ watchAsset: (args) => watchAsset(client, args),
538
+ writeContract: (args) => writeContract(client, args)
539
+ });
540
+
541
+ // src/clients/createPublicClient.ts
542
+ function createPublicClient({
543
+ chain,
544
+ key = "public",
545
+ name = "Public Client",
546
+ transport,
547
+ pollingInterval
548
+ }) {
549
+ const client = createClient({
550
+ chain,
551
+ key,
552
+ name,
553
+ pollingInterval,
554
+ transport,
555
+ type: "publicClient"
556
+ });
557
+ return {
558
+ ...client,
559
+ ...publicActions(client)
560
+ };
561
+ }
562
+
563
+ // src/clients/createTestClient.ts
564
+ function createTestClient({
565
+ chain,
566
+ key = "test",
567
+ name = "Test Client",
568
+ mode,
569
+ pollingInterval,
570
+ transport
571
+ }) {
572
+ const client = {
573
+ ...createClient({
574
+ chain,
575
+ key,
576
+ name,
577
+ pollingInterval,
578
+ transport,
579
+ type: "testClient"
580
+ }),
581
+ mode
582
+ };
583
+ return {
584
+ ...client,
585
+ ...testActions(client)
586
+ };
587
+ }
588
+
589
+ // src/clients/createWalletClient.ts
590
+ function createWalletClient({
591
+ transport,
592
+ key = "wallet",
593
+ name = "Wallet Client",
594
+ pollingInterval
595
+ }) {
596
+ const client = createClient({
597
+ key,
598
+ name,
599
+ pollingInterval,
600
+ transport,
601
+ type: "walletClient"
602
+ });
603
+ return {
604
+ ...client,
605
+ ...walletActions(client)
606
+ };
607
+ }
608
+ export {
609
+ AbiConstructorNotFoundError,
610
+ AbiConstructorParamsNotFoundError,
611
+ AbiDecodingDataSizeInvalidError,
612
+ AbiDecodingZeroDataError,
613
+ AbiEncodingArrayLengthMismatchError,
614
+ AbiEncodingLengthMismatchError,
615
+ AbiErrorInputsNotFoundError,
616
+ AbiErrorNotFoundError,
617
+ AbiErrorSignatureNotFoundError,
618
+ AbiEventNotFoundError,
619
+ AbiEventSignatureNotFoundError,
620
+ AbiFunctionNotFoundError,
621
+ AbiFunctionOutputsNotFoundError,
622
+ AbiFunctionSignatureNotFoundError,
623
+ BaseError,
624
+ BlockNotFoundError,
625
+ CallExecutionError,
626
+ ChainDoesNotSupportContract,
627
+ ContractFunctionExecutionError,
628
+ ContractFunctionRevertedError,
629
+ ContractFunctionZeroDataError,
630
+ DataLengthTooLongError,
631
+ DataLengthTooShortError,
632
+ EstimateGasExecutionError,
633
+ ExecutionRevertedError,
634
+ FeeCapTooHighError,
635
+ FeeCapTooLowError,
636
+ FilterTypeNotSupportedError,
637
+ HttpRequestError,
638
+ InsufficientFundsError,
639
+ InternalRpcError,
640
+ IntrinsicGasTooHighError,
641
+ IntrinsicGasTooLowError,
642
+ InvalidAbiDecodingTypeError,
643
+ InvalidAbiEncodingTypeError,
644
+ InvalidAddressError,
645
+ InvalidArrayError,
646
+ InvalidBytesBooleanError,
647
+ InvalidDefinitionTypeError,
648
+ InvalidHexBooleanError,
649
+ InvalidHexValueError,
650
+ InvalidInputRpcError,
651
+ InvalidParamsRpcError,
652
+ InvalidRequestRpcError,
653
+ JsonRpcVersionUnsupportedError,
654
+ LimitExceededRpcError,
655
+ MethodNotFoundRpcError,
656
+ MethodNotSupportedRpcError,
657
+ NonceMaxValueError,
658
+ NonceTooHighError,
659
+ NonceTooLowError,
660
+ OffsetOutOfBoundsError,
661
+ ParseRpcError,
662
+ RawContractError,
663
+ RequestError,
664
+ ResourceNotFoundRpcError,
665
+ ResourceUnavailableRpcError,
666
+ RpcError,
667
+ RpcRequestError,
668
+ SizeExceedsPaddingSizeError,
669
+ TimeoutError,
670
+ TipAboveFeeCapError,
671
+ TransactionExecutionError,
672
+ TransactionNotFoundError,
673
+ TransactionReceiptNotFoundError,
674
+ TransactionRejectedRpcError,
675
+ TransactionTypeNotSupportedError,
676
+ UnknownNodeError,
677
+ UnknownRpcError,
678
+ UrlRequiredError,
679
+ WaitForTransactionReceiptTimeoutError,
680
+ WebSocketRequestError,
681
+ boolToBytes,
682
+ boolToHex,
683
+ bytesToBigint,
684
+ bytesToBool,
685
+ bytesToHex,
686
+ bytesToNumber,
687
+ bytesToString,
688
+ createClient,
689
+ createPublicClient,
690
+ createTestClient,
691
+ createTransport,
692
+ createWalletClient,
693
+ custom,
694
+ decodeAbi,
695
+ decodeErrorResult,
696
+ decodeEventLog,
697
+ decodeFunctionData,
698
+ decodeFunctionResult,
699
+ defineBlock,
700
+ defineChain,
701
+ defineTransaction,
702
+ defineTransactionReceipt,
703
+ defineTransactionRequest,
704
+ encodeAbi,
705
+ encodeDeployData,
706
+ encodeErrorResult,
707
+ encodeEventTopics,
708
+ encodeFunctionData,
709
+ encodeFunctionResult,
710
+ etherUnits,
711
+ fallback,
712
+ formatBlock,
713
+ formatEther,
714
+ formatGwei,
715
+ formatTransaction,
716
+ formatTransactionRequest,
717
+ formatUnit,
718
+ fromBytes,
719
+ fromHex,
720
+ fromRlp,
721
+ getAbiItem,
722
+ getAddress,
723
+ getContractAddress,
724
+ getContractError,
725
+ getCreate2Address,
726
+ getCreateAddress,
727
+ getEventSignature,
728
+ getFunctionSignature,
729
+ gweiUnits,
730
+ hexToBigInt,
731
+ hexToBool,
732
+ hexToBytes,
733
+ hexToNumber,
734
+ hexToString,
735
+ http,
736
+ isAddress,
737
+ isAddressEqual,
738
+ isBytes,
739
+ isHex,
740
+ keccak256,
741
+ labelhash,
742
+ multicall3Abi,
743
+ namehash,
744
+ numberToBytes,
745
+ numberToHex,
746
+ pad,
747
+ padBytes,
748
+ padHex,
749
+ parseEther,
750
+ parseGwei,
751
+ parseUnit,
752
+ size,
753
+ slice,
754
+ sliceBytes,
755
+ sliceHex,
756
+ stringToBytes,
757
+ stringToHex,
758
+ stringify,
759
+ toBytes,
760
+ toHex,
761
+ toRlp,
762
+ transactionType,
763
+ trim,
764
+ webSocket,
765
+ weiUnits
766
+ };
767
+ //# sourceMappingURL=index.mjs.map