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/public.js ADDED
@@ -0,0 +1,60 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+ var _chunkZX4U6QKQjs = require('./chunk-ZX4U6QKQ.js');
30
+ require('./chunk-EAD66IDC.js');
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+ exports.call = _chunkZX4U6QKQjs.call; exports.createBlockFilter = _chunkZX4U6QKQjs.createBlockFilter; exports.createEventFilter = _chunkZX4U6QKQjs.createEventFilter; exports.createPendingTransactionFilter = _chunkZX4U6QKQjs.createPendingTransactionFilter; exports.estimateGas = _chunkZX4U6QKQjs.estimateGas; exports.getBalance = _chunkZX4U6QKQjs.getBalance; exports.getBlock = _chunkZX4U6QKQjs.getBlock; exports.getBlockNumber = _chunkZX4U6QKQjs.getBlockNumber; exports.getBlockNumberCache = _chunkZX4U6QKQjs.getBlockNumberCache; exports.getBlockTransactionCount = _chunkZX4U6QKQjs.getBlockTransactionCount; exports.getBytecode = _chunkZX4U6QKQjs.getBytecode; exports.getChainId = _chunkZX4U6QKQjs.getChainId; exports.getFeeHistory = _chunkZX4U6QKQjs.getFeeHistory; exports.getFilterChanges = _chunkZX4U6QKQjs.getFilterChanges; exports.getFilterLogs = _chunkZX4U6QKQjs.getFilterLogs; exports.getGasPrice = _chunkZX4U6QKQjs.getGasPrice; exports.getLogs = _chunkZX4U6QKQjs.getLogs; exports.getTransaction = _chunkZX4U6QKQjs.getTransaction; exports.getTransactionConfirmations = _chunkZX4U6QKQjs.getTransactionConfirmations; exports.getTransactionCount = _chunkZX4U6QKQjs.getTransactionCount; exports.getTransactionReceipt = _chunkZX4U6QKQjs.getTransactionReceipt; exports.uninstallFilter = _chunkZX4U6QKQjs.uninstallFilter; exports.waitForTransactionReceipt = _chunkZX4U6QKQjs.waitForTransactionReceipt; exports.watchBlockNumber = _chunkZX4U6QKQjs.watchBlockNumber; exports.watchBlocks = _chunkZX4U6QKQjs.watchBlocks; exports.watchEvent = _chunkZX4U6QKQjs.watchEvent; exports.watchPendingTransactions = _chunkZX4U6QKQjs.watchPendingTransactions;
60
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,60 @@
1
+ import {
2
+ call,
3
+ createBlockFilter,
4
+ createEventFilter,
5
+ createPendingTransactionFilter,
6
+ estimateGas,
7
+ getBalance,
8
+ getBlock,
9
+ getBlockNumber,
10
+ getBlockNumberCache,
11
+ getBlockTransactionCount,
12
+ getBytecode,
13
+ getChainId,
14
+ getFeeHistory,
15
+ getFilterChanges,
16
+ getFilterLogs,
17
+ getGasPrice,
18
+ getLogs,
19
+ getTransaction,
20
+ getTransactionConfirmations,
21
+ getTransactionCount,
22
+ getTransactionReceipt,
23
+ uninstallFilter,
24
+ waitForTransactionReceipt,
25
+ watchBlockNumber,
26
+ watchBlocks,
27
+ watchEvent,
28
+ watchPendingTransactions
29
+ } from "./chunk-EYRMK2SV.mjs";
30
+ import "./chunk-25AJVKAT.mjs";
31
+ export {
32
+ call,
33
+ createBlockFilter,
34
+ createEventFilter,
35
+ createPendingTransactionFilter,
36
+ estimateGas,
37
+ getBalance,
38
+ getBlock,
39
+ getBlockNumber,
40
+ getBlockNumberCache,
41
+ getBlockTransactionCount,
42
+ getBytecode,
43
+ getChainId,
44
+ getFeeHistory,
45
+ getFilterChanges,
46
+ getFilterLogs,
47
+ getGasPrice,
48
+ getLogs,
49
+ getTransaction,
50
+ getTransactionConfirmations,
51
+ getTransactionCount,
52
+ getTransactionReceipt,
53
+ uninstallFilter,
54
+ waitForTransactionReceipt,
55
+ watchBlockNumber,
56
+ watchBlocks,
57
+ watchEvent,
58
+ watchPendingTransactions
59
+ };
60
+ //# sourceMappingURL=public.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,213 @@
1
+ import { a as Hash, q as RpcTransaction, A as Address$1, a3 as Quantity, u as TransactionRequest, H as Hex, C as Chain } from './chain-00b37e4e.js';
2
+ import { T as TestRequests } from './eip1193-fcdeee04.js';
3
+ import { a as Transport, b as ClientConfig, C as Client } from './createClient-5258d590.js';
4
+ import { Address } from 'abitype';
5
+
6
+ type DropTransactionArgs = {
7
+ /** The hash of the transaction to drop. */
8
+ hash: Hash;
9
+ };
10
+ declare function dropTransaction(client: TestClient, { hash }: DropTransactionArgs): Promise<void>;
11
+
12
+ type GetAutomineResponse = boolean;
13
+ declare function getAutomine(client: TestClient): Promise<GetAutomineResponse>;
14
+
15
+ type GetTxPoolContentResponse = {
16
+ pending: Record<Address, Record<string, RpcTransaction>>;
17
+ queued: Record<Address, Record<string, RpcTransaction>>;
18
+ };
19
+ declare function getTxpoolContent(client: TestClient): Promise<GetTxPoolContentResponse>;
20
+
21
+ type GetTxPoolStatusResponse = {
22
+ pending: number;
23
+ queued: number;
24
+ };
25
+ declare function getTxpoolStatus(client: TestClient): Promise<GetTxPoolStatusResponse>;
26
+
27
+ type ImpersonateAccountArgs = {
28
+ /** The account to impersonate. */
29
+ address: Address$1;
30
+ };
31
+ declare function impersonateAccount(client: TestClient, { address }: ImpersonateAccountArgs): Promise<void>;
32
+
33
+ type IncreaseTimeArgs = {
34
+ /** The amount of seconds to jump forward in time. */
35
+ seconds: number;
36
+ };
37
+ declare function increaseTime(client: TestClient, { seconds }: IncreaseTimeArgs): Promise<`0x${string}`>;
38
+
39
+ type InspectTxpoolResponse = {
40
+ pending: Record<Address$1, Record<string, string>>;
41
+ queued: Record<Address$1, Record<string, string>>;
42
+ };
43
+ declare function inspectTxpool(client: TestClient): Promise<InspectTxpoolResponse>;
44
+
45
+ type MineArgs = {
46
+ /** Number of blocks to mine. */
47
+ blocks: number;
48
+ /** Interval between each block in seconds. */
49
+ interval?: number;
50
+ };
51
+ declare function mine(client: TestClient, { blocks, interval }: MineArgs): Promise<void>;
52
+
53
+ type ResetArgs = {
54
+ /** The block number to reset from. */
55
+ blockNumber?: bigint;
56
+ /** The JSON RPC URL. */
57
+ jsonRpcUrl?: string;
58
+ };
59
+ declare function reset(client: TestClient, { blockNumber, jsonRpcUrl }?: ResetArgs): Promise<void>;
60
+
61
+ type RevertArgs = {
62
+ /** The snapshot ID to revert to. */
63
+ id: Quantity;
64
+ };
65
+ declare function revert(client: TestClient, { id }: RevertArgs): Promise<void>;
66
+
67
+ type SendUnsignedTransactionArgs = TransactionRequest;
68
+ type SendUnsignedTransactionResponse = Hash;
69
+ declare function sendUnsignedTransaction(client: TestClient, request: SendUnsignedTransactionArgs): Promise<SendUnsignedTransactionResponse>;
70
+
71
+ type SetBalanceArgs = {
72
+ /** The account address. */
73
+ address: Address$1;
74
+ /** Amount (in wei) to set */
75
+ value: bigint;
76
+ };
77
+ declare function setBalance(client: TestClient, { address, value }: SetBalanceArgs): Promise<void>;
78
+
79
+ type SetBlockGasLimitArgs = {
80
+ /** Gas limit (in wei). */
81
+ gasLimit: bigint;
82
+ };
83
+ declare function setBlockGasLimit(client: TestClient, { gasLimit }: SetBlockGasLimitArgs): Promise<void>;
84
+
85
+ type SetBlockTimestampIntervalArgs = {
86
+ /** The interval (in seconds). */
87
+ interval: number;
88
+ };
89
+ declare function setBlockTimestampInterval(client: TestClient, { interval }: SetBlockTimestampIntervalArgs): Promise<void>;
90
+
91
+ type SetCodeArgs = {
92
+ /** The account address. */
93
+ address: Address$1;
94
+ /** The bytecode to set */
95
+ bytecode: Hex;
96
+ };
97
+ declare function setCode(client: TestClient, { address, bytecode }: SetCodeArgs): Promise<void>;
98
+
99
+ type SetCoinbaseArgs = {
100
+ /** The coinbase address. */
101
+ address: Address$1;
102
+ };
103
+ declare function setCoinbase(client: TestClient, { address }: SetCoinbaseArgs): Promise<void>;
104
+
105
+ type SetIntervalMiningArgs = {
106
+ /** The mining interval. */
107
+ interval: number;
108
+ };
109
+ declare function setIntervalMining(client: TestClient, { interval }: SetIntervalMiningArgs): Promise<void>;
110
+
111
+ type SetMinGasPriceArgs = {
112
+ /** The gas price. */
113
+ gasPrice: bigint;
114
+ };
115
+ declare function setMinGasPrice(client: TestClient, { gasPrice }: SetMinGasPriceArgs): Promise<void>;
116
+
117
+ type SetNextBlockBaseFeePerGasArgs = {
118
+ /** Base fee per gas (in wei). */
119
+ baseFeePerGas: bigint;
120
+ };
121
+ declare function setNextBlockBaseFeePerGas(client: TestClient, { baseFeePerGas }: SetNextBlockBaseFeePerGasArgs): Promise<void>;
122
+
123
+ type SetNextBlockTimestampArgs = {
124
+ /** The timestamp (in seconds). */
125
+ timestamp: bigint;
126
+ };
127
+ declare function setNextBlockTimestamp(client: TestClient, { timestamp }: SetNextBlockTimestampArgs): Promise<void>;
128
+
129
+ type SetNonceArgs = {
130
+ /** The account address. */
131
+ address: Address$1;
132
+ /** The nonce to set. */
133
+ nonce: number;
134
+ };
135
+ declare function setNonce(client: TestClient, { address, nonce }: SetNonceArgs): Promise<void>;
136
+
137
+ type SetStorageAtArgs = {
138
+ /** The account address. */
139
+ address: Address$1;
140
+ /** The storage slot (index). Can either be a number or hash value. */
141
+ index: number | Hash;
142
+ /** The value to store as a 32 byte hex string. */
143
+ value: Hex;
144
+ };
145
+ declare function setStorageAt(client: TestClient, { address, index, value }: SetStorageAtArgs): Promise<void>;
146
+
147
+ type StopImpersonatingAccountArgs = {
148
+ /** The account to impersonate. */
149
+ address: Address$1;
150
+ };
151
+ declare function stopImpersonatingAccount(client: TestClient, { address }: StopImpersonatingAccountArgs): Promise<void>;
152
+
153
+ type TestClientModes = 'anvil' | 'hardhat';
154
+ type TestClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain, TMode extends TestClientModes = TestClientModes> = {
155
+ chain?: ClientConfig<TTransport, TChain>['chain'];
156
+ /** The key of the client. */
157
+ key?: ClientConfig['key'];
158
+ /** Mode of the test client. Available: "anvil" | "hardhat" */
159
+ mode: TMode;
160
+ /** The name of the client. */
161
+ name?: ClientConfig['name'];
162
+ /** Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. */
163
+ pollingInterval?: ClientConfig['pollingInterval'];
164
+ transport: ClientConfig<TTransport, TChain>['transport'];
165
+ };
166
+ type TestClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TMode extends TestClientModes = TestClientModes, TIncludeActions extends boolean = true> = Client<TTransport, TChain, TestRequests<TMode>> & {
167
+ mode: TMode;
168
+ } & (TIncludeActions extends true ? TestActions<TChain> : {});
169
+ /**
170
+ * @description Creates a test client with a given transport.
171
+ *
172
+ * - Only has access to "test" RPC methods (ie. `anvil_setBalance`,
173
+ * `evm_mine`, etc).
174
+ *
175
+ * @example
176
+ * import { createTestClient, http } from 'viem'
177
+ * import { local } from 'viem/chains'
178
+ * const client = createTestClient({ chain: local, mode: 'anvil', transport: http() })
179
+ */
180
+ 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, true>;
181
+
182
+ type TestActions<TChain extends Chain = Chain> = {
183
+ dropTransaction: (args: DropTransactionArgs) => Promise<void>;
184
+ getAutomine: () => Promise<GetAutomineResponse>;
185
+ getTxPoolContent: () => Promise<GetTxPoolContentResponse>;
186
+ getTxPoolStatus: () => Promise<GetTxPoolStatusResponse>;
187
+ impersonateAccount: (args: ImpersonateAccountArgs) => Promise<void>;
188
+ increaseTime: (args: IncreaseTimeArgs) => Promise<Quantity>;
189
+ inspectTxpool: () => Promise<InspectTxpoolResponse>;
190
+ mine: (args: MineArgs) => Promise<void>;
191
+ removeBlockTimestampInterval: () => Promise<void>;
192
+ reset: (args: ResetArgs) => Promise<void>;
193
+ revert: (args: RevertArgs) => Promise<void>;
194
+ sendUnsignedTransaction: (args: SendUnsignedTransactionArgs) => Promise<SendUnsignedTransactionResponse>;
195
+ setAutomine: (args: boolean) => Promise<void>;
196
+ setBalance: (args: SetBalanceArgs) => Promise<void>;
197
+ setBlockGasLimit: (args: SetBlockGasLimitArgs) => Promise<void>;
198
+ setBlockTimestampInterval: (args: SetBlockTimestampIntervalArgs) => Promise<void>;
199
+ setCode: (args: SetCodeArgs) => Promise<void>;
200
+ setCoinbase: (args: SetCoinbaseArgs) => Promise<void>;
201
+ setIntervalMining: (args: SetIntervalMiningArgs) => Promise<void>;
202
+ setLoggingEnabled: (args: boolean) => Promise<void>;
203
+ setMinGasPrice: (args: SetMinGasPriceArgs) => Promise<void>;
204
+ setNextBlockBaseFeePerGas: (args: SetNextBlockBaseFeePerGasArgs) => Promise<void>;
205
+ setNextBlockTimestamp: (args: SetNextBlockTimestampArgs) => Promise<void>;
206
+ setNonce: (args: SetNonceArgs) => Promise<void>;
207
+ setRpcUrl: (args: string) => Promise<void>;
208
+ setStorageAt: (args: SetStorageAtArgs) => Promise<void>;
209
+ snapshot: () => Promise<Quantity>;
210
+ stopImpersonatingAccount: (args: StopImpersonatingAccountArgs) => Promise<void>;
211
+ };
212
+
213
+ export { RevertArgs as A, SendUnsignedTransactionResponse as B, SetBalanceArgs as C, DropTransactionArgs as D, SetBlockGasLimitArgs as E, SetBlockTimestampIntervalArgs as F, SetCodeArgs as G, SetCoinbaseArgs as H, ImpersonateAccountArgs as I, SetIntervalMiningArgs as J, SetMinGasPriceArgs as K, SetNextBlockBaseFeePerGasArgs as L, MineArgs as M, SetNextBlockTimestampArgs as N, SetNonceArgs as O, SetStorageAtArgs as P, StopImpersonatingAccountArgs as Q, ResetArgs as R, SendUnsignedTransactionArgs as S, TestClient as T, TestClientConfig as a, getTxpoolContent as b, createTestClient as c, dropTransaction as d, getTxpoolStatus as e, increaseTime as f, getAutomine as g, inspectTxpool as h, impersonateAccount as i, revert as j, setBalance as k, setBlockGasLimit as l, mine as m, setBlockTimestampInterval as n, setCode as o, setCoinbase as p, setIntervalMining as q, reset as r, sendUnsignedTransaction as s, setMinGasPrice as t, setNextBlockBaseFeePerGas as u, setNextBlockTimestamp as v, setNonce as w, setStorageAt as x, stopImpersonatingAccount as y, IncreaseTimeArgs as z };
package/dist/test.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { T as TestClient } from './test-79ec416c.js';
2
+ export { D as DropTransactionArgs, I as ImpersonateAccountArgs, z as IncreaseTimeArgs, M as MineArgs, R as ResetArgs, A as RevertArgs, S as SendUnsignedTransactionArgs, B as SendUnsignedTransactionResponse, C as SetBalanceArgs, E as SetBlockGasLimitArgs, F as SetBlockTimestampIntervalArgs, G as SetCodeArgs, H as SetCoinbaseArgs, J as SetIntervalMiningArgs, K as SetMinGasPriceArgs, L as SetNextBlockBaseFeePerGasArgs, N as SetNextBlockTimestampArgs, O as SetNonceArgs, P as SetStorageAtArgs, Q as StopImpersonatingAccountArgs, d as dropTransaction, g as getAutomine, b as getTxpoolContent, e as getTxpoolStatus, i as impersonateAccount, f as increaseTime, h as inspectTxpool, m as mine, r as reset, j as revert, s as sendUnsignedTransaction, k as setBalance, l as setBlockGasLimit, n as setBlockTimestampInterval, o as setCode, p as setCoinbase, q as setIntervalMining, t as setMinGasPrice, u as setNextBlockBaseFeePerGas, v as setNextBlockTimestamp, w as setNonce, x as setStorageAt, y as stopImpersonatingAccount } from './test-79ec416c.js';
3
+ import './chain-00b37e4e.js';
4
+ import '@wagmi/chains';
5
+ import 'abitype';
6
+ import 'ethers@6/types/providers';
7
+ import './eip1193-fcdeee04.js';
8
+ import './createClient-5258d590.js';
9
+
10
+ declare function removeBlockTimestampInterval(client: TestClient): Promise<void>;
11
+
12
+ declare function setAutomine(client: TestClient, enabled: boolean): Promise<void>;
13
+
14
+ declare function setLoggingEnabled(client: TestClient, enabled: boolean): Promise<void>;
15
+
16
+ declare function setRpcUrl(client: TestClient, jsonRpcUrl: string): Promise<void>;
17
+
18
+ declare function snapshot(client: TestClient): Promise<`0x${string}`>;
19
+
20
+ export { removeBlockTimestampInterval, setAutomine, setLoggingEnabled, setRpcUrl, snapshot };
package/dist/test.js ADDED
@@ -0,0 +1,62 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ var _chunkBHMSFL4Wjs = require('./chunk-BHMSFL4W.js');
31
+ require('./chunk-EAD66IDC.js');
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ exports.dropTransaction = _chunkBHMSFL4Wjs.dropTransaction; exports.getAutomine = _chunkBHMSFL4Wjs.getAutomine; exports.getTxpoolContent = _chunkBHMSFL4Wjs.getTxpoolContent; exports.getTxpoolStatus = _chunkBHMSFL4Wjs.getTxpoolStatus; exports.impersonateAccount = _chunkBHMSFL4Wjs.impersonateAccount; exports.increaseTime = _chunkBHMSFL4Wjs.increaseTime; exports.inspectTxpool = _chunkBHMSFL4Wjs.inspectTxpool; exports.mine = _chunkBHMSFL4Wjs.mine; exports.removeBlockTimestampInterval = _chunkBHMSFL4Wjs.removeBlockTimestampInterval; exports.reset = _chunkBHMSFL4Wjs.reset; exports.revert = _chunkBHMSFL4Wjs.revert; exports.sendUnsignedTransaction = _chunkBHMSFL4Wjs.sendUnsignedTransaction; exports.setAutomine = _chunkBHMSFL4Wjs.setAutomine; exports.setBalance = _chunkBHMSFL4Wjs.setBalance; exports.setBlockGasLimit = _chunkBHMSFL4Wjs.setBlockGasLimit; exports.setBlockTimestampInterval = _chunkBHMSFL4Wjs.setBlockTimestampInterval; exports.setCode = _chunkBHMSFL4Wjs.setCode; exports.setCoinbase = _chunkBHMSFL4Wjs.setCoinbase; exports.setIntervalMining = _chunkBHMSFL4Wjs.setIntervalMining; exports.setLoggingEnabled = _chunkBHMSFL4Wjs.setLoggingEnabled; exports.setMinGasPrice = _chunkBHMSFL4Wjs.setMinGasPrice; exports.setNextBlockBaseFeePerGas = _chunkBHMSFL4Wjs.setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = _chunkBHMSFL4Wjs.setNextBlockTimestamp; exports.setNonce = _chunkBHMSFL4Wjs.setNonce; exports.setRpcUrl = _chunkBHMSFL4Wjs.setRpcUrl; exports.setStorageAt = _chunkBHMSFL4Wjs.setStorageAt; exports.snapshot = _chunkBHMSFL4Wjs.snapshot; exports.stopImpersonatingAccount = _chunkBHMSFL4Wjs.stopImpersonatingAccount;
62
+ //# sourceMappingURL=test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
package/dist/test.mjs ADDED
@@ -0,0 +1,62 @@
1
+ import {
2
+ dropTransaction,
3
+ getAutomine,
4
+ getTxpoolContent,
5
+ getTxpoolStatus,
6
+ impersonateAccount,
7
+ increaseTime,
8
+ inspectTxpool,
9
+ mine,
10
+ removeBlockTimestampInterval,
11
+ reset,
12
+ revert,
13
+ sendUnsignedTransaction,
14
+ setAutomine,
15
+ setBalance,
16
+ setBlockGasLimit,
17
+ setBlockTimestampInterval,
18
+ setCode,
19
+ setCoinbase,
20
+ setIntervalMining,
21
+ setLoggingEnabled,
22
+ setMinGasPrice,
23
+ setNextBlockBaseFeePerGas,
24
+ setNextBlockTimestamp,
25
+ setNonce,
26
+ setRpcUrl,
27
+ setStorageAt,
28
+ snapshot,
29
+ stopImpersonatingAccount
30
+ } from "./chunk-AO7KQBK3.mjs";
31
+ import "./chunk-25AJVKAT.mjs";
32
+ export {
33
+ dropTransaction,
34
+ getAutomine,
35
+ getTxpoolContent,
36
+ getTxpoolStatus,
37
+ impersonateAccount,
38
+ increaseTime,
39
+ inspectTxpool,
40
+ mine,
41
+ removeBlockTimestampInterval,
42
+ reset,
43
+ revert,
44
+ sendUnsignedTransaction,
45
+ setAutomine,
46
+ setBalance,
47
+ setBlockGasLimit,
48
+ setBlockTimestampInterval,
49
+ setCode,
50
+ setCoinbase,
51
+ setIntervalMining,
52
+ setLoggingEnabled,
53
+ setMinGasPrice,
54
+ setNextBlockBaseFeePerGas,
55
+ setNextBlockTimestamp,
56
+ setNonce,
57
+ setRpcUrl,
58
+ setStorageAt,
59
+ snapshot,
60
+ stopImpersonatingAccount
61
+ };
62
+ //# sourceMappingURL=test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,13 +1,32 @@
1
- export { E as EncodeRlpResponse, G as GetContractAddressOptions, b as GetCreate2AddressOptions, a as GetCreateAddressOptions, e as boolToBytes, f as boolToHex, g as bytesToBigint, h as bytesToBool, c as bytesToHex, i as bytesToNumber, d as bytesToString, j as decodeAbi, k as decodeBytes, l as decodeFunctionData, m as decodeHex, n as decodeRlp, o as encodeAbi, p as encodeBytes, q as encodeFunctionData, r as encodeHex, s as encodeRlp, z as formatEther, S as formatGwei, T as formatUnit, t as getAddress, u as getContractAddress, w as getCreate2Address, v as getCreateAddress, x as getEventSignature, y as getFunctionSignature, F as hexToBigInt, H as hexToBool, I as hexToBytes, U as hexToNumber, J as hexToString, A as isAddress, B as isAddressEqual, C as isBytes, D as isHex, K as keccak256, L as numberToBytes, V as numberToHex, M as pad, N as padBytes, O as padHex, P as parseEther, Q as parseGwei, R as parseUnit, W as size, X as slice, Y as sliceBytes, Z as sliceHex, _ as stringToBytes, $ as stringToHex, a0 as trim } from '../parseGwei-0f85e8ca.js';
2
- export { B as BlockFormatter, E as ExtractFormatter, e as Formatted, F as FormattedBlock, a as FormattedTransaction, h as FormattedTransactionReceipt, b as FormattedTransactionRequest, g as TransactionFormatter, i as TransactionReceiptFormatter, T as TransactionRequestFormatter, j as format, f as formatBlock, c as formatTransaction, d as formatTransactionRequest } from '../transactionRequest-f538ea86.js';
3
- export { r as rpc } from '../rpc-26932bae.js';
1
+ export { D as DecodeAbiArgs, a as DecodeErrorResultArgs, b as DecodeErrorResultResponse, c as DecodeEventLogArgs, d as DecodeEventLogResponse, e as DecodeFunctionDataArgs, f as DecodeFunctionResultArgs, g as DecodeFunctionResultResponse, E as EncodeAbiArgs, h as EncodeDeployDataArgs, i as EncodeErrorResultArgs, j as EncodeEventTopicsArgs, k as EncodeFunctionDataArgs, l as EncodeFunctionResultArgs, G as GetAbiItemArgs, m as decodeAbi, n as decodeErrorResult, o as decodeEventLog, p as decodeFunctionData, q as decodeFunctionResult, r as encodeAbi, s as encodeDeployData, t as encodeErrorResult, u as encodeEventTopics, v as encodeFunctionData, w as encodeFunctionResult, x as getAbiItem } from '../getAbiItem-6d4f64d2.js';
2
+ export { a as formatAbiItem, f as formatAbiItemWithArgs } from '../formatAbiItem-50cb39d8.js';
3
+ import { B as BaseError, C as CallExecutionError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, h as NonceTooHighError, i as NonceTooLowError, N as NonceMaxValueError, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, l as TransactionTypeNotSupportedError, T as TipAboveFeeCapError, U as UnknownNodeError, k as TransactionExecutionError } from '../parseGwei-e299cf13.js';
4
+ export { G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, q as ToRlpResponse, r as boolToBytes, s as boolToHex, t as bytesToBigint, u as bytesToBool, v as bytesToHex, w as bytesToNumber, x as bytesToString, y as etherUnits, z as formatEther, A as formatGwei, D as formatUnit, H as fromBytes, J as fromHex, K as fromRlp, L as getAddress, M as getContractAddress, O as getContractError, P as getCreate2Address, Q as getCreateAddress, S as getEventSignature, V as getFunctionSignature, X as gweiUnits, Y as hexToBigInt, Z as hexToBool, _ as hexToBytes, $ as hexToNumber, a0 as hexToString, a1 as isAddress, a2 as isAddressEqual, a3 as isBytes, a4 as isHex, a5 as keccak256, a6 as numberToBytes, a7 as numberToHex, a8 as pad, a9 as padBytes, aa as padHex, ab as parseEther, ac as parseGwei, ad as parseUnit, aq as rpc, ae as size, af as slice, ag as sliceBytes, ah as sliceHex, ai as stringToBytes, aj as stringToHex, ak as stringify, al as toBytes, am as toHex, an as toRlp, ao as trim, ap as weiUnits } from '../parseGwei-e299cf13.js';
5
+ export { d as defineChain } from '../chain-38182d92.js';
6
+ import { C as CallArgs, E as EstimateGasArgs } from '../createPublicClient-99be385b.js';
7
+ export { B as BlockFormatter, F as FormattedBlock, b as FormattedTransactionReceipt, T as TransactionReceiptFormatter, d as defineBlock, e as defineTransactionReceipt, f as formatBlock } from '../createPublicClient-99be385b.js';
8
+ import { V as Formatter, C as Chain } from '../chain-00b37e4e.js';
9
+ export { J as ExtractFormatter, K as Formatted, M as FormattedTransaction, N as TransactionFormatter, ad as defineFormatter, O as defineTransaction, ae as format, P as formatTransaction, Q as transactionType } from '../chain-00b37e4e.js';
10
+ import { S as SendTransactionArgs } from '../wallet-cf5c8351.js';
11
+ export { F as FormattedTransactionRequest, T as TransactionRequestFormatter, d as defineTransactionRequest, f as formatTransactionRequest } from '../wallet-cf5c8351.js';
4
12
  import 'abitype';
5
- import '../rpc-15b85963.js';
6
- import '../chains.js';
13
+ import 'abitype/dist/abi-78346466';
14
+ import 'isomorphic-ws';
15
+ import '../eip1193-fcdeee04.js';
16
+ import '../createClient-5258d590.js';
7
17
  import '@wagmi/chains';
18
+ import 'ethers@6/types/providers';
8
19
 
9
- declare function buildRequest<TRequest extends (args: any) => Promise<any>>(request: TRequest): TRequest;
20
+ declare function buildRequest<TRequest extends (args: any) => Promise<any>>(request: TRequest, { retryDelay, retryCount, }?: {
21
+ retryDelay?: number;
22
+ retryCount?: number;
23
+ }): TRequest;
10
24
 
25
+ declare function extractFunctionParts(def: string): {
26
+ type: string | undefined;
27
+ name: string | undefined;
28
+ params: string | undefined;
29
+ };
11
30
  declare function extractFunctionName(def: string): string | undefined;
12
31
  declare function extractFunctionParams(def: string): {
13
32
  indexed?: boolean | undefined;
@@ -16,4 +35,30 @@ declare function extractFunctionParams(def: string): {
16
35
  }[] | undefined;
17
36
  declare function extractFunctionType(def: string): string | undefined;
18
37
 
19
- export { buildRequest, extractFunctionName, extractFunctionParams, extractFunctionType };
38
+ /**
39
+ * @description Picks out the keys from `value` that exist in the formatter.
40
+ */
41
+ declare function extract(value: Record<string, unknown>, { formatter }: {
42
+ formatter?: Formatter;
43
+ }): {};
44
+
45
+ declare function assertRequest(args: SendTransactionArgs<any>): void;
46
+
47
+ declare function getCallError(err: BaseError, { docsPath, ...args }: CallArgs & {
48
+ chain?: Chain;
49
+ docsPath?: string;
50
+ }): CallExecutionError;
51
+
52
+ declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: EstimateGasArgs & {
53
+ chain?: Chain;
54
+ docsPath?: string;
55
+ }): EstimateGasExecutionError;
56
+
57
+ declare function containsNodeError(err: BaseError): boolean;
58
+ declare function getNodeError(err: BaseError, args?: SendTransactionArgs<any>): ExecutionRevertedError | FeeCapTooHighError | FeeCapTooLowError | NonceTooHighError | NonceTooLowError | NonceMaxValueError | InsufficientFundsError | IntrinsicGasTooHighError | IntrinsicGasTooLowError | TransactionTypeNotSupportedError | TipAboveFeeCapError | UnknownNodeError;
59
+
60
+ declare function getTransactionError(err: BaseError, { docsPath, ...args }: SendTransactionArgs & {
61
+ docsPath?: string;
62
+ }): TransactionExecutionError;
63
+
64
+ export { assertRequest, buildRequest, containsNodeError, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType, getCallError, getEstimateGasError, getNodeError, getTransactionError };