viem 0.0.1-alpha.3 → 0.0.1-alpha.31

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-5STAX3WF.js +265 -0
  11. package/dist/chunk-5STAX3WF.js.map +1 -0
  12. package/dist/chunk-6ZFIUYGC.mjs +3436 -0
  13. package/dist/chunk-6ZFIUYGC.mjs.map +1 -0
  14. package/dist/chunk-APXHGB76.mjs +197 -0
  15. package/dist/chunk-APXHGB76.mjs.map +1 -0
  16. package/dist/chunk-C54QK7K3.mjs +210 -0
  17. package/dist/chunk-C54QK7K3.mjs.map +1 -0
  18. package/dist/{chunk-YZEQFYZ3.js → chunk-IBWRBL2I.mjs} +725 -556
  19. package/dist/chunk-IBWRBL2I.mjs.map +1 -0
  20. package/dist/chunk-J7QHQ26Y.js +3436 -0
  21. package/dist/chunk-J7QHQ26Y.js.map +1 -0
  22. package/dist/chunk-MYFKW55L.js +210 -0
  23. package/dist/chunk-MYFKW55L.js.map +1 -0
  24. package/dist/chunk-NCPBWOQA.js +1216 -0
  25. package/dist/chunk-NCPBWOQA.js.map +1 -0
  26. package/dist/chunk-QBB3DFIB.mjs +265 -0
  27. package/dist/chunk-QBB3DFIB.mjs.map +1 -0
  28. package/dist/chunk-UUULPQHV.js +197 -0
  29. package/dist/chunk-UUULPQHV.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 +251 -67
  46. package/dist/index.js +769 -344
  47. package/dist/index.js.map +1 -0
  48. package/dist/index.mjs +769 -0
  49. package/dist/index.mjs.map +1 -0
  50. package/dist/namehash-88f4639d.d.ts +22 -0
  51. package/dist/parseGwei-8af7a0a6.d.ts +509 -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 +187 -126
  65. package/dist/utils/index.js.map +1 -0
  66. package/dist/utils/index.mjs +187 -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,769 @@
1
+ import {
2
+ getEnsAddress,
3
+ getEnsName,
4
+ labelhash,
5
+ namehash
6
+ } from "./chunk-C54QK7K3.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-IBWRBL2I.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-QBB3DFIB.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-APXHGB76.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
+ getEventSelector,
198
+ getFunctionSelector,
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-6ZFIUYGC.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
+ fetchOptions,
308
+ key = "http",
309
+ name = "HTTP JSON-RPC",
310
+ retryDelay,
311
+ timeout = 1e4
312
+ } = config;
313
+ return ({ chain, retryCount: defaultRetryCount }) => {
314
+ const retryCount = config.retryCount ?? defaultRetryCount;
315
+ const url_ = url || chain?.rpcUrls.default.http[0];
316
+ if (!url_)
317
+ throw new UrlRequiredError();
318
+ return createTransport(
319
+ {
320
+ key,
321
+ name,
322
+ async request({ method, params }) {
323
+ const { result } = await rpc.http(url_, {
324
+ body: {
325
+ method,
326
+ params
327
+ },
328
+ fetchOptions,
329
+ timeout
330
+ });
331
+ return result;
332
+ },
333
+ retryCount,
334
+ retryDelay,
335
+ timeout,
336
+ type: "http"
337
+ },
338
+ {
339
+ url
340
+ }
341
+ );
342
+ };
343
+ }
344
+
345
+ // src/clients/transports/webSocket.ts
346
+ function webSocket(url, config = {}) {
347
+ const {
348
+ key = "webSocket",
349
+ name = "WebSocket JSON-RPC",
350
+ retryDelay,
351
+ timeout = 1e4
352
+ } = config;
353
+ return ({ chain, retryCount: defaultRetryCount }) => {
354
+ const retryCount = config.retryCount ?? defaultRetryCount;
355
+ const url_ = url || chain?.rpcUrls.default.webSocket?.[0];
356
+ if (!url_)
357
+ throw new UrlRequiredError();
358
+ return createTransport(
359
+ {
360
+ key,
361
+ name,
362
+ async request({ method, params }) {
363
+ const socket = await getSocket(url_);
364
+ const { result } = await rpc.webSocketAsync(socket, {
365
+ body: { method, params },
366
+ timeout
367
+ });
368
+ return result;
369
+ },
370
+ retryCount,
371
+ retryDelay,
372
+ timeout,
373
+ type: "webSocket"
374
+ },
375
+ {
376
+ getSocket() {
377
+ return getSocket(url_);
378
+ },
379
+ async subscribe({ params, onData, onError }) {
380
+ const socket = await getSocket(url_);
381
+ const { result: subscriptionId } = await new Promise(
382
+ (resolve, reject) => rpc.webSocket(socket, {
383
+ body: {
384
+ method: "eth_subscribe",
385
+ params
386
+ },
387
+ onData: (data) => {
388
+ if (typeof data.id === "number") {
389
+ resolve(data);
390
+ return;
391
+ }
392
+ onData(data);
393
+ },
394
+ onError: (error) => {
395
+ reject(error);
396
+ onError?.(error);
397
+ }
398
+ })
399
+ );
400
+ return {
401
+ subscriptionId,
402
+ async unsubscribe() {
403
+ return new Promise(
404
+ (resolve, reject) => rpc.webSocket(socket, {
405
+ body: {
406
+ method: "eth_unsubscribe",
407
+ params: [subscriptionId]
408
+ },
409
+ onData: resolve,
410
+ onError: reject
411
+ })
412
+ );
413
+ }
414
+ };
415
+ }
416
+ }
417
+ );
418
+ };
419
+ }
420
+
421
+ // src/utils/uid.ts
422
+ var size2 = 256;
423
+ var index = size2;
424
+ var buffer;
425
+ function uid(length = 11) {
426
+ if (!buffer || index + length > size2 * 2) {
427
+ buffer = "";
428
+ index = 0;
429
+ for (let i = 0; i < size2; i++) {
430
+ buffer += (256 + Math.random() * 256 | 0).toString(16).substring(1);
431
+ }
432
+ }
433
+ return buffer.substring(index, index++ + length);
434
+ }
435
+
436
+ // src/clients/createClient.ts
437
+ function createClient({
438
+ chain,
439
+ key = "base",
440
+ name = "Base Client",
441
+ pollingInterval = 4e3,
442
+ transport,
443
+ type = "base"
444
+ }) {
445
+ const { config, request, value } = transport({ chain });
446
+ return {
447
+ chain,
448
+ key,
449
+ name,
450
+ pollingInterval,
451
+ request,
452
+ transport: { ...config, ...value },
453
+ type,
454
+ uid: uid()
455
+ };
456
+ }
457
+
458
+ // src/clients/decorators/public.ts
459
+ var publicActions = (client) => ({
460
+ call: (args) => call(client, args),
461
+ createBlockFilter: () => createBlockFilter(client),
462
+ createContractEventFilter: (args) => createContractEventFilter(client, args),
463
+ createEventFilter: (args) => createEventFilter(client, args),
464
+ createPendingTransactionFilter: () => createPendingTransactionFilter(client),
465
+ estimateContractGas: (args) => estimateContractGas(client, args),
466
+ estimateGas: (args) => estimateGas(client, args),
467
+ getBalance: (args) => getBalance(client, args),
468
+ getBlock: (args) => getBlock(client, args),
469
+ getBlockNumber: (args) => getBlockNumber(client, args),
470
+ getBlockTransactionCount: (args) => getBlockTransactionCount(client, args),
471
+ getBytecode: (args) => getBytecode(client, args),
472
+ getChainId: () => getChainId(client),
473
+ getEnsAddress: (args) => getEnsAddress(client, args),
474
+ getEnsName: (args) => getEnsName(client, args),
475
+ getFeeHistory: (args) => getFeeHistory(client, args),
476
+ getFilterChanges: (args) => getFilterChanges(client, args),
477
+ getFilterLogs: (args) => getFilterLogs(client, args),
478
+ getGasPrice: () => getGasPrice(client),
479
+ getLogs: (args) => getLogs(client, args),
480
+ getStorageAt: (args) => getStorageAt(client, args),
481
+ getTransaction: (args) => getTransaction(client, args),
482
+ getTransactionConfirmations: (args) => getTransactionConfirmations(client, args),
483
+ getTransactionReceipt: (args) => getTransactionReceipt(client, args),
484
+ multicall: (args) => multicall(client, args),
485
+ readContract: (args) => readContract(client, args),
486
+ simulateContract: (args) => simulateContract(client, args),
487
+ uninstallFilter: (args) => uninstallFilter(client, args),
488
+ waitForTransactionReceipt: (args) => waitForTransactionReceipt(client, args),
489
+ watchBlocks: (args) => watchBlocks(client, args),
490
+ watchBlockNumber: (args) => watchBlockNumber(client, args),
491
+ watchContractEvent: (args) => watchContractEvent(client, args),
492
+ watchEvent: (args) => watchEvent(client, args),
493
+ watchPendingTransactions: (args) => watchPendingTransactions(client, args)
494
+ });
495
+
496
+ // src/clients/decorators/test.ts
497
+ var testActions = (client) => ({
498
+ dropTransaction: (args) => dropTransaction(client, args),
499
+ getAutomine: () => getAutomine(client),
500
+ getTxPoolContent: () => getTxpoolContent(client),
501
+ getTxPoolStatus: () => getTxpoolStatus(client),
502
+ impersonateAccount: (args) => impersonateAccount(client, args),
503
+ increaseTime: (args) => increaseTime(client, args),
504
+ inspectTxpool: () => inspectTxpool(client),
505
+ mine: (args) => mine(client, args),
506
+ removeBlockTimestampInterval: () => removeBlockTimestampInterval(client),
507
+ reset: (args) => reset(client, args),
508
+ revert: (args) => revert(client, args),
509
+ sendUnsignedTransaction: (args) => sendUnsignedTransaction(client, args),
510
+ setAutomine: (args) => setAutomine(client, args),
511
+ setBalance: (args) => setBalance(client, args),
512
+ setBlockGasLimit: (args) => setBlockGasLimit(client, args),
513
+ setBlockTimestampInterval: (args) => setBlockTimestampInterval(client, args),
514
+ setCode: (args) => setCode(client, args),
515
+ setCoinbase: (args) => setCoinbase(client, args),
516
+ setIntervalMining: (args) => setIntervalMining(client, args),
517
+ setLoggingEnabled: (args) => setLoggingEnabled(client, args),
518
+ setMinGasPrice: (args) => setMinGasPrice(client, args),
519
+ setNextBlockBaseFeePerGas: (args) => setNextBlockBaseFeePerGas(client, args),
520
+ setNextBlockTimestamp: (args) => setNextBlockTimestamp(client, args),
521
+ setNonce: (args) => setNonce(client, args),
522
+ setRpcUrl: (args) => setRpcUrl(client, args),
523
+ setStorageAt: (args) => setStorageAt(client, args),
524
+ snapshot: () => snapshot(client),
525
+ stopImpersonatingAccount: (args) => stopImpersonatingAccount(client, args)
526
+ });
527
+
528
+ // src/clients/decorators/wallet.ts
529
+ var walletActions = (client) => ({
530
+ addChain: (args) => addChain(client, args),
531
+ deployContract: (args) => deployContract(client, args),
532
+ getAccounts: () => getAccounts(client),
533
+ getPermissions: () => getPermissions(client),
534
+ requestAccounts: () => requestAccounts(client),
535
+ requestPermissions: (args) => requestPermissions(client, args),
536
+ sendTransaction: (args) => sendTransaction(client, args),
537
+ signMessage: (args) => signMessage(client, args),
538
+ switchChain: (args) => switchChain(client, args),
539
+ watchAsset: (args) => watchAsset(client, args),
540
+ writeContract: (args) => writeContract(client, args)
541
+ });
542
+
543
+ // src/clients/createPublicClient.ts
544
+ function createPublicClient({
545
+ chain,
546
+ key = "public",
547
+ name = "Public Client",
548
+ transport,
549
+ pollingInterval
550
+ }) {
551
+ const client = createClient({
552
+ chain,
553
+ key,
554
+ name,
555
+ pollingInterval,
556
+ transport,
557
+ type: "publicClient"
558
+ });
559
+ return {
560
+ ...client,
561
+ ...publicActions(client)
562
+ };
563
+ }
564
+
565
+ // src/clients/createTestClient.ts
566
+ function createTestClient({
567
+ chain,
568
+ key = "test",
569
+ name = "Test Client",
570
+ mode,
571
+ pollingInterval,
572
+ transport
573
+ }) {
574
+ const client = {
575
+ ...createClient({
576
+ chain,
577
+ key,
578
+ name,
579
+ pollingInterval,
580
+ transport,
581
+ type: "testClient"
582
+ }),
583
+ mode
584
+ };
585
+ return {
586
+ ...client,
587
+ ...testActions(client)
588
+ };
589
+ }
590
+
591
+ // src/clients/createWalletClient.ts
592
+ function createWalletClient({
593
+ transport,
594
+ key = "wallet",
595
+ name = "Wallet Client",
596
+ pollingInterval
597
+ }) {
598
+ const client = createClient({
599
+ key,
600
+ name,
601
+ pollingInterval,
602
+ transport,
603
+ type: "walletClient"
604
+ });
605
+ return {
606
+ ...client,
607
+ ...walletActions(client)
608
+ };
609
+ }
610
+ export {
611
+ AbiConstructorNotFoundError,
612
+ AbiConstructorParamsNotFoundError,
613
+ AbiDecodingDataSizeInvalidError,
614
+ AbiDecodingZeroDataError,
615
+ AbiEncodingArrayLengthMismatchError,
616
+ AbiEncodingLengthMismatchError,
617
+ AbiErrorInputsNotFoundError,
618
+ AbiErrorNotFoundError,
619
+ AbiErrorSignatureNotFoundError,
620
+ AbiEventNotFoundError,
621
+ AbiEventSignatureNotFoundError,
622
+ AbiFunctionNotFoundError,
623
+ AbiFunctionOutputsNotFoundError,
624
+ AbiFunctionSignatureNotFoundError,
625
+ BaseError,
626
+ BlockNotFoundError,
627
+ CallExecutionError,
628
+ ChainDoesNotSupportContract,
629
+ ContractFunctionExecutionError,
630
+ ContractFunctionRevertedError,
631
+ ContractFunctionZeroDataError,
632
+ DataLengthTooLongError,
633
+ DataLengthTooShortError,
634
+ EstimateGasExecutionError,
635
+ ExecutionRevertedError,
636
+ FeeCapTooHighError,
637
+ FeeCapTooLowError,
638
+ FilterTypeNotSupportedError,
639
+ HttpRequestError,
640
+ InsufficientFundsError,
641
+ InternalRpcError,
642
+ IntrinsicGasTooHighError,
643
+ IntrinsicGasTooLowError,
644
+ InvalidAbiDecodingTypeError,
645
+ InvalidAbiEncodingTypeError,
646
+ InvalidAddressError,
647
+ InvalidArrayError,
648
+ InvalidBytesBooleanError,
649
+ InvalidDefinitionTypeError,
650
+ InvalidHexBooleanError,
651
+ InvalidHexValueError,
652
+ InvalidInputRpcError,
653
+ InvalidParamsRpcError,
654
+ InvalidRequestRpcError,
655
+ JsonRpcVersionUnsupportedError,
656
+ LimitExceededRpcError,
657
+ MethodNotFoundRpcError,
658
+ MethodNotSupportedRpcError,
659
+ NonceMaxValueError,
660
+ NonceTooHighError,
661
+ NonceTooLowError,
662
+ OffsetOutOfBoundsError,
663
+ ParseRpcError,
664
+ RawContractError,
665
+ RequestError,
666
+ ResourceNotFoundRpcError,
667
+ ResourceUnavailableRpcError,
668
+ RpcError,
669
+ RpcRequestError,
670
+ SizeExceedsPaddingSizeError,
671
+ TimeoutError,
672
+ TipAboveFeeCapError,
673
+ TransactionExecutionError,
674
+ TransactionNotFoundError,
675
+ TransactionReceiptNotFoundError,
676
+ TransactionRejectedRpcError,
677
+ TransactionTypeNotSupportedError,
678
+ UnknownNodeError,
679
+ UnknownRpcError,
680
+ UrlRequiredError,
681
+ WaitForTransactionReceiptTimeoutError,
682
+ WebSocketRequestError,
683
+ boolToBytes,
684
+ boolToHex,
685
+ bytesToBigint,
686
+ bytesToBool,
687
+ bytesToHex,
688
+ bytesToNumber,
689
+ bytesToString,
690
+ createClient,
691
+ createPublicClient,
692
+ createTestClient,
693
+ createTransport,
694
+ createWalletClient,
695
+ custom,
696
+ decodeAbi,
697
+ decodeErrorResult,
698
+ decodeEventLog,
699
+ decodeFunctionData,
700
+ decodeFunctionResult,
701
+ defineBlock,
702
+ defineChain,
703
+ defineTransaction,
704
+ defineTransactionReceipt,
705
+ defineTransactionRequest,
706
+ encodeAbi,
707
+ encodeDeployData,
708
+ encodeErrorResult,
709
+ encodeEventTopics,
710
+ encodeFunctionData,
711
+ encodeFunctionResult,
712
+ etherUnits,
713
+ fallback,
714
+ formatBlock,
715
+ formatEther,
716
+ formatGwei,
717
+ formatTransaction,
718
+ formatTransactionRequest,
719
+ formatUnit,
720
+ fromBytes,
721
+ fromHex,
722
+ fromRlp,
723
+ getAbiItem,
724
+ getAddress,
725
+ getContractAddress,
726
+ getContractError,
727
+ getCreate2Address,
728
+ getCreateAddress,
729
+ getEventSelector,
730
+ getFunctionSelector,
731
+ gweiUnits,
732
+ hexToBigInt,
733
+ hexToBool,
734
+ hexToBytes,
735
+ hexToNumber,
736
+ hexToString,
737
+ http,
738
+ isAddress,
739
+ isAddressEqual,
740
+ isBytes,
741
+ isHex,
742
+ keccak256,
743
+ labelhash,
744
+ multicall3Abi,
745
+ namehash,
746
+ numberToBytes,
747
+ numberToHex,
748
+ pad,
749
+ padBytes,
750
+ padHex,
751
+ parseEther,
752
+ parseGwei,
753
+ parseUnit,
754
+ size,
755
+ slice,
756
+ sliceBytes,
757
+ sliceHex,
758
+ stringToBytes,
759
+ stringToHex,
760
+ stringify,
761
+ toBytes,
762
+ toHex,
763
+ toRlp,
764
+ transactionType,
765
+ trim,
766
+ webSocket,
767
+ weiUnits
768
+ };
769
+ //# sourceMappingURL=index.mjs.map