viem 0.1.23 → 0.2.0-0-2-0.20230328T054201
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.
- package/accounts/package.json +4 -0
- package/dist/abi.d.ts +3 -3
- package/dist/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/accounts/index.d.ts +90 -0
- package/dist/accounts/index.js +152 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/index.mjs +152 -0
- package/dist/accounts/index.mjs.map +1 -0
- package/dist/{chain-ec8c485d.d.ts → chain-40443542.d.ts} +1 -1
- package/dist/{chain-1b53ef88.d.ts → chain-4af995bf.d.ts} +77 -36
- package/dist/chains.d.ts +3 -3
- package/dist/chains.js +63 -63
- package/dist/chains.mjs +1 -1
- package/dist/chunk-43HQD3IL.js +31 -0
- package/dist/chunk-43HQD3IL.js.map +1 -0
- package/dist/{chunk-HRVPAYH7.mjs → chunk-DFMQLPHS.mjs} +2 -2
- package/dist/chunk-DFMQLPHS.mjs.map +1 -0
- package/dist/{chunk-66PXETQB.js → chunk-FZPFAAOJ.js} +19 -19
- package/dist/chunk-FZPFAAOJ.js.map +1 -0
- package/dist/{chunk-JG6MI5ZV.mjs → chunk-HYEOQX7O.mjs} +1106 -199
- package/dist/chunk-HYEOQX7O.mjs.map +1 -0
- package/dist/{chunk-Z54YSSBJ.js → chunk-OW7TKT7L.js} +1168 -261
- package/dist/chunk-OW7TKT7L.js.map +1 -0
- package/dist/chunk-UK6FAD4V.mjs +31 -0
- package/dist/chunk-UK6FAD4V.mjs.map +1 -0
- package/dist/contract.d.ts +9 -7
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createClient-a28317a9.d.ts → createClient-1f19be8d.d.ts} +24 -10
- package/dist/{createPublicClient-b250a534.d.ts → createPublicClient-fd8b1349.d.ts} +229 -242
- package/dist/{eip1193-4f4e240c.d.ts → eip1193-210ab776.d.ts} +1 -1
- package/dist/{encodeFunctionResult-1f324375.d.ts → encodeFunctionResult-a252fba1.d.ts} +1 -1
- package/dist/{encodePacked-d5d5264a.d.ts → encodePacked-a9464e97.d.ts} +1 -1
- package/dist/ens.d.ts +6 -4
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/ethers.d.ts +5 -6
- package/dist/ethers.js +7 -5
- package/dist/ethers.js.map +1 -1
- package/dist/ethers.mjs +7 -5
- package/dist/ethers.mjs.map +1 -1
- package/dist/{formatAbiItem-15e8817d.d.ts → formatAbiItem-6ed70dbd.d.ts} +1 -1
- package/dist/{getAbiItem-3e809ff9.d.ts → getAbiItem-1ff0f41a.d.ts} +1 -1
- package/dist/index.d.ts +22 -14
- package/dist/index.js +136 -101
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +78 -43
- package/dist/index.mjs.map +1 -1
- package/dist/parseAccount-8e131c73.d.ts +6 -0
- package/dist/{parseGwei-bd0eea6c.d.ts → parseGwei-5e2a8e87.d.ts} +95 -15
- package/dist/public.d.ts +6 -4
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/test-e28db435.d.ts +198 -0
- package/dist/test.d.ts +11 -11
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/typedData-848139b1.d.ts +93 -0
- package/dist/utils/index.d.ts +22 -30
- package/dist/utils/index.js +26 -2
- package/dist/utils/index.mjs +29 -5
- package/dist/wallet.d.ts +6 -4
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/window.d.ts +2 -2
- package/package.json +10 -2
- package/dist/chunk-66PXETQB.js.map +0 -1
- package/dist/chunk-HRVPAYH7.mjs.map +0 -1
- package/dist/chunk-JG6MI5ZV.mjs.map +0 -1
- package/dist/chunk-Z54YSSBJ.js.map +0 -1
- package/dist/test-2bd23d7e.d.ts +0 -205
@@ -0,0 +1,198 @@
|
|
1
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-1f19be8d.js';
|
2
|
+
import { a as Hash, C as Chain, y as RpcTransaction, ak as Quantity, P as TransactionRequest, H as Hex } from './chain-4af995bf.js';
|
3
|
+
import { T as TestRequests } from './eip1193-210ab776.js';
|
4
|
+
import { Address } from 'abitype';
|
5
|
+
import { Chain as Chain$1 } from '@wagmi/chains';
|
6
|
+
|
7
|
+
type DropTransactionParameters = {
|
8
|
+
/** The hash of the transaction to drop. */
|
9
|
+
hash: Hash;
|
10
|
+
};
|
11
|
+
declare function dropTransaction<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { hash }: DropTransactionParameters): Promise<void>;
|
12
|
+
|
13
|
+
type GetAutomineReturnType = boolean;
|
14
|
+
declare function getAutomine<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<GetAutomineReturnType>;
|
15
|
+
|
16
|
+
type GetTxpoolContentReturnType = {
|
17
|
+
pending: Record<Address, Record<string, RpcTransaction>>;
|
18
|
+
queued: Record<Address, Record<string, RpcTransaction>>;
|
19
|
+
};
|
20
|
+
declare function getTxpoolContent<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<GetTxpoolContentReturnType>;
|
21
|
+
|
22
|
+
type GetTxpoolStatusReturnType = {
|
23
|
+
pending: number;
|
24
|
+
queued: number;
|
25
|
+
};
|
26
|
+
declare function getTxpoolStatus<TChain extends Chain$1 | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<GetTxpoolStatusReturnType>;
|
27
|
+
|
28
|
+
type ImpersonateAccountParameters = {
|
29
|
+
/** The account to impersonate. */
|
30
|
+
address: Address;
|
31
|
+
};
|
32
|
+
declare function impersonateAccount<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address }: ImpersonateAccountParameters): Promise<void>;
|
33
|
+
|
34
|
+
type IncreaseTimeParameters = {
|
35
|
+
/** The amount of seconds to jump forward in time. */
|
36
|
+
seconds: number;
|
37
|
+
};
|
38
|
+
declare function increaseTime<TChain extends Chain$1 | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { seconds }: IncreaseTimeParameters): Promise<`0x${string}`>;
|
39
|
+
|
40
|
+
type InspectTxpoolReturnType = {
|
41
|
+
pending: Record<Address, Record<string, string>>;
|
42
|
+
queued: Record<Address, Record<string, string>>;
|
43
|
+
};
|
44
|
+
declare function inspectTxpool<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<InspectTxpoolReturnType>;
|
45
|
+
|
46
|
+
type MineParameters = {
|
47
|
+
/** Number of blocks to mine. */
|
48
|
+
blocks: number;
|
49
|
+
/** Interval between each block in seconds. */
|
50
|
+
interval?: number;
|
51
|
+
};
|
52
|
+
declare function mine<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { blocks, interval }: MineParameters): Promise<void>;
|
53
|
+
|
54
|
+
type ResetParameters = {
|
55
|
+
/** The block number to reset from. */
|
56
|
+
blockNumber?: bigint;
|
57
|
+
/** The JSON RPC URL. */
|
58
|
+
jsonRpcUrl?: string;
|
59
|
+
};
|
60
|
+
declare function reset<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { blockNumber, jsonRpcUrl }?: ResetParameters): Promise<void>;
|
61
|
+
|
62
|
+
type RevertParameters = {
|
63
|
+
/** The snapshot ID to revert to. */
|
64
|
+
id: Quantity;
|
65
|
+
};
|
66
|
+
declare function revert<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { id }: RevertParameters): Promise<void>;
|
67
|
+
|
68
|
+
type SendUnsignedTransactionParameters = TransactionRequest;
|
69
|
+
type SendUnsignedTransactionReturnType = Hash;
|
70
|
+
declare function sendUnsignedTransaction<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, request: SendUnsignedTransactionParameters): Promise<SendUnsignedTransactionReturnType>;
|
71
|
+
|
72
|
+
type SetBalanceParameters = {
|
73
|
+
/** The account address. */
|
74
|
+
address: Address;
|
75
|
+
/** Amount (in wei) to set */
|
76
|
+
value: bigint;
|
77
|
+
};
|
78
|
+
declare function setBalance<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address, value }: SetBalanceParameters): Promise<void>;
|
79
|
+
|
80
|
+
type SetBlockGasLimitParameters = {
|
81
|
+
/** Gas limit (in wei). */
|
82
|
+
gasLimit: bigint;
|
83
|
+
};
|
84
|
+
declare function setBlockGasLimit<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { gasLimit }: SetBlockGasLimitParameters): Promise<void>;
|
85
|
+
|
86
|
+
type SetBlockTimestampIntervalParameters = {
|
87
|
+
/** The interval (in seconds). */
|
88
|
+
interval: number;
|
89
|
+
};
|
90
|
+
declare function setBlockTimestampInterval<TChain extends Chain$1 | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { interval }: SetBlockTimestampIntervalParameters): Promise<void>;
|
91
|
+
|
92
|
+
type SetCodeParameters = {
|
93
|
+
/** The account address. */
|
94
|
+
address: Address;
|
95
|
+
/** The bytecode to set */
|
96
|
+
bytecode: Hex;
|
97
|
+
};
|
98
|
+
declare function setCode<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address, bytecode }: SetCodeParameters): Promise<void>;
|
99
|
+
|
100
|
+
type SetCoinbaseParameters = {
|
101
|
+
/** The coinbase address. */
|
102
|
+
address: Address;
|
103
|
+
};
|
104
|
+
declare function setCoinbase<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address }: SetCoinbaseParameters): Promise<void>;
|
105
|
+
|
106
|
+
type SetIntervalMiningParameters = {
|
107
|
+
/** The mining interval. */
|
108
|
+
interval: number;
|
109
|
+
};
|
110
|
+
declare function setIntervalMining<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { interval }: SetIntervalMiningParameters): Promise<void>;
|
111
|
+
|
112
|
+
type SetMinGasPriceParameters = {
|
113
|
+
/** The gas price. */
|
114
|
+
gasPrice: bigint;
|
115
|
+
};
|
116
|
+
declare function setMinGasPrice<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { gasPrice }: SetMinGasPriceParameters): Promise<void>;
|
117
|
+
|
118
|
+
type SetNextBlockBaseFeePerGasParameters = {
|
119
|
+
/** Base fee per gas (in wei). */
|
120
|
+
baseFeePerGas: bigint;
|
121
|
+
};
|
122
|
+
declare function setNextBlockBaseFeePerGas<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { baseFeePerGas }: SetNextBlockBaseFeePerGasParameters): Promise<void>;
|
123
|
+
|
124
|
+
type SetNextBlockTimestampParameters = {
|
125
|
+
/** The timestamp (in seconds). */
|
126
|
+
timestamp: bigint;
|
127
|
+
};
|
128
|
+
declare function setNextBlockTimestamp<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { timestamp }: SetNextBlockTimestampParameters): Promise<void>;
|
129
|
+
|
130
|
+
type SetNonceParameters = {
|
131
|
+
/** The account address. */
|
132
|
+
address: Address;
|
133
|
+
/** The nonce to set. */
|
134
|
+
nonce: number;
|
135
|
+
};
|
136
|
+
declare function setNonce<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address, nonce }: SetNonceParameters): Promise<void>;
|
137
|
+
|
138
|
+
type SetStorageAtParameters = {
|
139
|
+
/** The account address. */
|
140
|
+
address: Address;
|
141
|
+
/** The storage slot (index). Can either be a number or hash value. */
|
142
|
+
index: number | Hash;
|
143
|
+
/** The value to store as a 32 byte hex string. */
|
144
|
+
value: Hex;
|
145
|
+
};
|
146
|
+
declare function setStorageAt<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address, index, value }: SetStorageAtParameters): Promise<void>;
|
147
|
+
|
148
|
+
type StopImpersonatingAccountParameters = {
|
149
|
+
/** The account to impersonate. */
|
150
|
+
address: Address;
|
151
|
+
};
|
152
|
+
declare function stopImpersonatingAccount<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address }: StopImpersonatingAccountParameters): Promise<void>;
|
153
|
+
|
154
|
+
type TestClientMode = 'anvil' | 'hardhat';
|
155
|
+
type TestClientConfig<TMode extends TestClientMode = TestClientMode, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined> = Pick<ClientConfig<TTransport, TChain>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'transport'> & {
|
156
|
+
/** Mode of the test client. Available: "anvil" | "hardhat" */
|
157
|
+
mode: TMode;
|
158
|
+
};
|
159
|
+
type TestClient<TMode extends TestClientMode = TestClientMode, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TIncludeActions extends boolean = true> = Client<TTransport, TestRequests<TMode>, TChain> & (TIncludeActions extends true ? TestActions : unknown) & {
|
160
|
+
mode: TMode;
|
161
|
+
};
|
162
|
+
/**
|
163
|
+
* @description Creates a test client with a given transport.
|
164
|
+
*/
|
165
|
+
declare function createTestClient<TMode extends TestClientMode, TTransport extends Transport, TChain extends Chain | undefined = undefined>({ chain, key, name, mode, pollingInterval, transport, }: TestClientConfig<TMode, TTransport, TChain>): TestClient<TMode, TTransport, TChain, true>;
|
166
|
+
|
167
|
+
type TestActions = {
|
168
|
+
dropTransaction: (args: DropTransactionParameters) => Promise<void>;
|
169
|
+
getAutomine: () => Promise<GetAutomineReturnType>;
|
170
|
+
getTxpoolContent: () => Promise<GetTxpoolContentReturnType>;
|
171
|
+
getTxpoolStatus: () => Promise<GetTxpoolStatusReturnType>;
|
172
|
+
impersonateAccount: (args: ImpersonateAccountParameters) => Promise<void>;
|
173
|
+
increaseTime: (args: IncreaseTimeParameters) => Promise<Quantity>;
|
174
|
+
inspectTxpool: () => Promise<InspectTxpoolReturnType>;
|
175
|
+
mine: (args: MineParameters) => Promise<void>;
|
176
|
+
removeBlockTimestampInterval: () => Promise<void>;
|
177
|
+
reset: (args?: ResetParameters) => Promise<void>;
|
178
|
+
revert: (args: RevertParameters) => Promise<void>;
|
179
|
+
sendUnsignedTransaction: (args: SendUnsignedTransactionParameters) => Promise<SendUnsignedTransactionReturnType>;
|
180
|
+
setAutomine: (args: boolean) => Promise<void>;
|
181
|
+
setBalance: (args: SetBalanceParameters) => Promise<void>;
|
182
|
+
setBlockGasLimit: (args: SetBlockGasLimitParameters) => Promise<void>;
|
183
|
+
setBlockTimestampInterval: (args: SetBlockTimestampIntervalParameters) => Promise<void>;
|
184
|
+
setCode: (args: SetCodeParameters) => Promise<void>;
|
185
|
+
setCoinbase: (args: SetCoinbaseParameters) => Promise<void>;
|
186
|
+
setIntervalMining: (args: SetIntervalMiningParameters) => Promise<void>;
|
187
|
+
setLoggingEnabled: (args: boolean) => Promise<void>;
|
188
|
+
setMinGasPrice: (args: SetMinGasPriceParameters) => Promise<void>;
|
189
|
+
setNextBlockBaseFeePerGas: (args: SetNextBlockBaseFeePerGasParameters) => Promise<void>;
|
190
|
+
setNextBlockTimestamp: (args: SetNextBlockTimestampParameters) => Promise<void>;
|
191
|
+
setNonce: (args: SetNonceParameters) => Promise<void>;
|
192
|
+
setRpcUrl: (args: string) => Promise<void>;
|
193
|
+
setStorageAt: (args: SetStorageAtParameters) => Promise<void>;
|
194
|
+
snapshot: () => Promise<Quantity>;
|
195
|
+
stopImpersonatingAccount: (args: StopImpersonatingAccountParameters) => Promise<void>;
|
196
|
+
};
|
197
|
+
|
198
|
+
export { IncreaseTimeParameters as A, RevertParameters as B, SendUnsignedTransactionReturnType as C, DropTransactionParameters as D, SetBalanceParameters as E, SetBlockGasLimitParameters as F, SetBlockTimestampIntervalParameters as G, SetCodeParameters as H, ImpersonateAccountParameters as I, SetCoinbaseParameters as J, SetIntervalMiningParameters as K, SetMinGasPriceParameters as L, MineParameters as M, SetNextBlockBaseFeePerGasParameters as N, SetNextBlockTimestampParameters as O, SetNonceParameters as P, SetStorageAtParameters as Q, ResetParameters as R, SendUnsignedTransactionParameters as S, TestClient as T, StopImpersonatingAccountParameters as U, TestClientConfig as a, TestClientMode as b, createTestClient as c, dropTransaction as d, getTxpoolContent as e, getTxpoolStatus as f, getAutomine as g, increaseTime as h, impersonateAccount as i, inspectTxpool as j, revert as k, setBalance as l, mine as m, setBlockGasLimit as n, setBlockTimestampInterval as o, setCode as p, setCoinbase as q, reset as r, sendUnsignedTransaction as s, setIntervalMining as t, setMinGasPrice as u, setNextBlockBaseFeePerGas as v, setNextBlockTimestamp as w, setNonce as x, setStorageAt as y, stopImpersonatingAccount as z };
|
package/dist/test.d.ts
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
import { T as TestClient } from './test-
|
2
|
-
export { D as DropTransactionParameters, I as ImpersonateAccountParameters,
|
3
|
-
import '
|
4
|
-
import '
|
1
|
+
import { T as TestClient, b as TestClientMode } from './test-e28db435.js';
|
2
|
+
export { D as DropTransactionParameters, I as ImpersonateAccountParameters, A as IncreaseTimeParameters, M as MineParameters, R as ResetParameters, B as RevertParameters, S as SendUnsignedTransactionParameters, C as SendUnsignedTransactionReturnType, E as SetBalanceParameters, F as SetBlockGasLimitParameters, G as SetBlockTimestampIntervalParameters, H as SetCodeParameters, J as SetCoinbaseParameters, K as SetIntervalMiningParameters, L as SetMinGasPriceParameters, N as SetNextBlockBaseFeePerGasParameters, O as SetNextBlockTimestampParameters, P as SetNonceParameters, Q as SetStorageAtParameters, U as StopImpersonatingAccountParameters, d as dropTransaction, g as getAutomine, e as getTxpoolContent, f as getTxpoolStatus, i as impersonateAccount, h as increaseTime, j as inspectTxpool, m as mine, r as reset, k as revert, s as sendUnsignedTransaction, l as setBalance, n as setBlockGasLimit, o as setBlockTimestampInterval, p as setCode, q as setCoinbase, t as setIntervalMining, u as setMinGasPrice, v as setNextBlockBaseFeePerGas, w as setNextBlockTimestamp, x as setNonce, y as setStorageAt, z as stopImpersonatingAccount } from './test-e28db435.js';
|
3
|
+
import { Chain } from '@wagmi/chains';
|
4
|
+
import { a as Transport } from './createClient-1f19be8d.js';
|
5
|
+
import { C as Chain$1 } from './chain-4af995bf.js';
|
6
|
+
import './eip1193-210ab776.js';
|
5
7
|
import 'abitype';
|
6
|
-
import './createClient-a28317a9.js';
|
7
|
-
import './eip1193-4f4e240c.js';
|
8
8
|
|
9
|
-
declare function removeBlockTimestampInterval(client: TestClient): Promise<void>;
|
9
|
+
declare function removeBlockTimestampInterval<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<void>;
|
10
10
|
|
11
|
-
declare function setAutomine(client: TestClient, enabled: boolean): Promise<void>;
|
11
|
+
declare function setAutomine<TChain extends Chain$1 | undefined>(client: TestClient<TestClientMode, Transport, TChain>, enabled: boolean): Promise<void>;
|
12
12
|
|
13
|
-
declare function setLoggingEnabled(client: TestClient, enabled: boolean): Promise<void>;
|
13
|
+
declare function setLoggingEnabled<TChain extends Chain$1 | undefined>(client: TestClient<TestClientMode, Transport, TChain>, enabled: boolean): Promise<void>;
|
14
14
|
|
15
|
-
declare function setRpcUrl(client: TestClient, jsonRpcUrl: string): Promise<void>;
|
15
|
+
declare function setRpcUrl<TChain extends Chain$1 | undefined>(client: TestClient<TestClientMode, Transport, TChain>, jsonRpcUrl: string): Promise<void>;
|
16
16
|
|
17
|
-
declare function snapshot(client: TestClient): Promise<`0x${string}`>;
|
17
|
+
declare function snapshot<TChain extends Chain$1 | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<`0x${string}`>;
|
18
18
|
|
19
19
|
export { removeBlockTimestampInterval, setAutomine, setLoggingEnabled, setRpcUrl, snapshot };
|
package/dist/test.js
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
|
29
29
|
|
30
|
-
var
|
30
|
+
var _chunkOW7TKT7Ljs = require('./chunk-OW7TKT7L.js');
|
31
31
|
|
32
32
|
|
33
33
|
|
@@ -57,5 +57,5 @@ var _chunkZ54YSSBJjs = require('./chunk-Z54YSSBJ.js');
|
|
57
57
|
|
58
58
|
|
59
59
|
|
60
|
-
exports.dropTransaction =
|
60
|
+
exports.dropTransaction = _chunkOW7TKT7Ljs.dropTransaction; exports.getAutomine = _chunkOW7TKT7Ljs.getAutomine; exports.getTxpoolContent = _chunkOW7TKT7Ljs.getTxpoolContent; exports.getTxpoolStatus = _chunkOW7TKT7Ljs.getTxpoolStatus; exports.impersonateAccount = _chunkOW7TKT7Ljs.impersonateAccount; exports.increaseTime = _chunkOW7TKT7Ljs.increaseTime; exports.inspectTxpool = _chunkOW7TKT7Ljs.inspectTxpool; exports.mine = _chunkOW7TKT7Ljs.mine; exports.removeBlockTimestampInterval = _chunkOW7TKT7Ljs.removeBlockTimestampInterval; exports.reset = _chunkOW7TKT7Ljs.reset; exports.revert = _chunkOW7TKT7Ljs.revert; exports.sendUnsignedTransaction = _chunkOW7TKT7Ljs.sendUnsignedTransaction; exports.setAutomine = _chunkOW7TKT7Ljs.setAutomine; exports.setBalance = _chunkOW7TKT7Ljs.setBalance; exports.setBlockGasLimit = _chunkOW7TKT7Ljs.setBlockGasLimit; exports.setBlockTimestampInterval = _chunkOW7TKT7Ljs.setBlockTimestampInterval; exports.setCode = _chunkOW7TKT7Ljs.setCode; exports.setCoinbase = _chunkOW7TKT7Ljs.setCoinbase; exports.setIntervalMining = _chunkOW7TKT7Ljs.setIntervalMining; exports.setLoggingEnabled = _chunkOW7TKT7Ljs.setLoggingEnabled; exports.setMinGasPrice = _chunkOW7TKT7Ljs.setMinGasPrice; exports.setNextBlockBaseFeePerGas = _chunkOW7TKT7Ljs.setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = _chunkOW7TKT7Ljs.setNextBlockTimestamp; exports.setNonce = _chunkOW7TKT7Ljs.setNonce; exports.setRpcUrl = _chunkOW7TKT7Ljs.setRpcUrl; exports.setStorageAt = _chunkOW7TKT7Ljs.setStorageAt; exports.snapshot = _chunkOW7TKT7Ljs.snapshot; exports.stopImpersonatingAccount = _chunkOW7TKT7Ljs.stopImpersonatingAccount;
|
61
61
|
//# sourceMappingURL=test.js.map
|
package/dist/test.mjs
CHANGED
@@ -0,0 +1,93 @@
|
|
1
|
+
import { HDKey } from '@scure/bip32';
|
2
|
+
import { Address, TypedData, TypedDataToPrimitiveTypes, TypedDataDomain, Narrow } from 'abitype';
|
3
|
+
import { a as Hash, W as TransactionSerializable, H as Hex } from './chain-4af995bf.js';
|
4
|
+
|
5
|
+
type Account<TAddress extends Address = Address> = JsonRpcAccount<TAddress> | LocalAccount<string, TAddress>;
|
6
|
+
type AccountSource = Address | CustomSource;
|
7
|
+
type CustomSource = {
|
8
|
+
address: Address;
|
9
|
+
signMessage: ({ message }: {
|
10
|
+
message: string;
|
11
|
+
}) => Promise<Hash>;
|
12
|
+
signTransaction: (transaction: TransactionSerializable) => Promise<Hash>;
|
13
|
+
signTypedData: <TTypedData extends TypedData | {
|
14
|
+
[key: string]: unknown;
|
15
|
+
}, TPrimaryType extends string = string>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hash>;
|
16
|
+
};
|
17
|
+
type JsonRpcAccount<TAddress extends Address = Address> = {
|
18
|
+
address: TAddress;
|
19
|
+
type: 'json-rpc';
|
20
|
+
};
|
21
|
+
type LocalAccount<TSource extends string = 'custom', TAddress extends Address = Address> = CustomSource & {
|
22
|
+
address: TAddress;
|
23
|
+
publicKey: Hex;
|
24
|
+
source: TSource;
|
25
|
+
type: 'local';
|
26
|
+
};
|
27
|
+
type HDAccount = LocalAccount<'hd'> & {
|
28
|
+
getHdKey(): HDKey;
|
29
|
+
};
|
30
|
+
type HDOptions = {
|
31
|
+
/** The account index to use in the path (`"m/44'/60'/${accountIndex}'/0/0"`). */
|
32
|
+
accountIndex?: number;
|
33
|
+
/** The address index to use in the path (`"m/44'/60'/0'/0/${addressIndex}"`). */
|
34
|
+
addressIndex?: number;
|
35
|
+
/** The change index to use in the path (`"m/44'/60'/0'/${changeIndex}/0"`). */
|
36
|
+
changeIndex?: number;
|
37
|
+
path?: never;
|
38
|
+
} | {
|
39
|
+
accountIndex?: never;
|
40
|
+
addressIndex?: never;
|
41
|
+
changeIndex?: never;
|
42
|
+
/** The HD path. */
|
43
|
+
path: `m/44'/60'/${string}`;
|
44
|
+
};
|
45
|
+
type PrivateKeyAccount = LocalAccount<'privateKey'>;
|
46
|
+
|
47
|
+
type TypedDataDefinition<TTypedData extends TypedData | {
|
48
|
+
[key: string]: unknown;
|
49
|
+
} = TypedData, TPrimaryType extends string = string> = {
|
50
|
+
primaryType: GetTypedDataPrimaryType<TTypedData, TPrimaryType>;
|
51
|
+
} & GetTypedDataMessage<TTypedData, TPrimaryType> & GetTypedDataTypes<TTypedData, TPrimaryType> & GetTypedDataDomain<TTypedData, TPrimaryType>;
|
52
|
+
type GetTypedDataDomain<TTypedData extends TypedData | {
|
53
|
+
[key: string]: unknown;
|
54
|
+
} = TypedData, TPrimaryType extends string = string, TSchema = TTypedData extends TypedData ? TypedDataToPrimitiveTypes<TTypedData> : {
|
55
|
+
[key: string]: any;
|
56
|
+
}, TDomain = TSchema extends {
|
57
|
+
EIP712Domain: infer Domain;
|
58
|
+
} ? Domain : TypedDataDomain> = TPrimaryType extends 'EIP712Domain' ? {
|
59
|
+
domain: TDomain;
|
60
|
+
} : {
|
61
|
+
domain?: TDomain;
|
62
|
+
};
|
63
|
+
type GetTypedDataMessage<TTypedData extends TypedData | {
|
64
|
+
[key: string]: unknown;
|
65
|
+
} = TypedData, TPrimaryType extends string = string, TSchema = TTypedData extends TypedData ? TypedDataToPrimitiveTypes<TTypedData> : {
|
66
|
+
[key: string]: any;
|
67
|
+
}, TMessage = TSchema[TPrimaryType extends keyof TSchema ? TPrimaryType : keyof TSchema]> = TPrimaryType extends 'EIP712Domain' ? {} : {
|
68
|
+
[key: string]: any;
|
69
|
+
} extends TMessage ? {
|
70
|
+
/**
|
71
|
+
* Data to sign
|
72
|
+
*
|
73
|
+
* Use a [const assertion](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) on {@link types} for type inference.
|
74
|
+
*/
|
75
|
+
message: {
|
76
|
+
[key: string]: unknown;
|
77
|
+
};
|
78
|
+
} : {
|
79
|
+
/** Data to sign */
|
80
|
+
message: TMessage;
|
81
|
+
};
|
82
|
+
type GetTypedDataPrimaryType<TTypedData extends TypedData | {
|
83
|
+
[key: string]: unknown;
|
84
|
+
} = TypedData, TPrimaryType extends string = string> = TTypedData extends TypedData ? keyof TTypedData extends infer AbiFunctionNames ? AbiFunctionNames | (TPrimaryType extends AbiFunctionNames ? TPrimaryType : never) | (TypedData extends TTypedData ? string : never) | 'EIP712Domain' : never : TPrimaryType;
|
85
|
+
type GetTypedDataTypes<TTypedData extends TypedData | {
|
86
|
+
[key: string]: unknown;
|
87
|
+
} = TypedData, TPrimaryType extends string = string> = TPrimaryType extends 'EIP712Domain' ? {
|
88
|
+
types?: Narrow<TTypedData>;
|
89
|
+
} : {
|
90
|
+
types: Narrow<TTypedData>;
|
91
|
+
};
|
92
|
+
|
93
|
+
export { Account as A, CustomSource as C, HDAccount as H, JsonRpcAccount as J, LocalAccount as L, PrivateKeyAccount as P, TypedDataDefinition as T, AccountSource as a, HDOptions as b };
|
package/dist/utils/index.d.ts
CHANGED
@@ -1,20 +1,22 @@
|
|
1
|
-
import { Address } from 'abitype';
|
2
1
|
export { ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
|
3
|
-
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from '../getAbiItem-
|
4
|
-
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from '../encodeFunctionResult-
|
5
|
-
export { e as encodePacked } from '../encodePacked-
|
6
|
-
export { a as formatAbiItem, f as formatAbiItemWithArgs } from '../formatAbiItem-
|
7
|
-
|
8
|
-
|
9
|
-
export {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from '../getAbiItem-1ff0f41a.js';
|
3
|
+
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from '../encodeFunctionResult-a252fba1.js';
|
4
|
+
export { e as encodePacked } from '../encodePacked-a9464e97.js';
|
5
|
+
export { a as formatAbiItem, f as formatAbiItemWithArgs } from '../formatAbiItem-6ed70dbd.js';
|
6
|
+
export { p as parseAccount } from '../parseAccount-8e131c73.js';
|
7
|
+
import { B as BaseError, C as CallExecutionError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, i as NonceTooHighError, j as NonceTooLowError, N as NonceMaxValueError, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, m as TransactionTypeNotSupportedError, T as TipAboveFeeCapError, U as UnknownNodeError, l as TransactionExecutionError } from '../parseGwei-5e2a8e87.js';
|
8
|
+
export { G as GetContractAddressOptions, p as GetCreate2AddressOptions, q as GetCreateAddressOptions, r as GetSerializedTransactionType, s as GetTransactionType, t as HashTypedDataParameters, u as HashTypedDataReturnType, H as HttpOptions, v as RecoverAddressParameters, w as RecoverAddressReturnType, x as RecoverMessageAddressParameters, y as RecoverMessageAddressReturnType, z as RecoverTypedDataAddressParameters, A as RecoverTypedDataAddressReturnType, R as RpcResponse, aW as Socket, D as ToRlpReturnType, V as VerifyMessageParameters, J as VerifyMessageReturnType, K as VerifyTypedDataParameters, L as VerifyTypedDataReturnType, M as assertRequest, O as assertTransactionEIP1559, P as assertTransactionEIP2930, Q as assertTransactionLegacy, S as boolToBytes, X as boolToHex, Y as bytesToBigint, Z as bytesToBool, _ as bytesToHex, $ as bytesToNumber, a0 as bytesToString, a1 as concat, a2 as concatBytes, a3 as concatHex, a4 as formatEther, a5 as formatGwei, a6 as formatUnits, a7 as fromBytes, a8 as fromHex, a9 as fromRlp, aa as getAddress, ab as getContractAddress, ac as getContractError, ad as getCreate2Address, ae as getCreateAddress, af as getEventSelector, ag as getFunctionSelector, ah as getSerializedTransactionType, aX as getSocket, ai as getTransactionType, aj as hashMessage, ak as hashTypedData, al as hexToBigInt, am as hexToBool, an as hexToBytes, ao as hexToNumber, ap as hexToString, aq as isAddress, ar as isAddressEqual, as as isBytes, at as isHash, au as isHex, av as keccak256, aw as numberToBytes, ax as numberToHex, ay as pad, az as padBytes, aA as padHex, aB as parseEther, aC as parseGwei, aD as parseTransaction, aE as parseUnits, aF as prepareRequest, aG as recoverAddress, aH as recoverMessageAddress, aZ as recoverTypedDataAddress, aY as rpc, aI as serializeTransaction, aJ as size, aK as slice, aL as sliceBytes, aM as sliceHex, aN as stringToBytes, aO as stringToHex, aP as stringify, aQ as toBytes, aR as toHex, aS as toRlp, aT as trim, aU as validateTypedData, aV as verifyMessage, a_ as verifyTypedData } from '../parseGwei-5e2a8e87.js';
|
9
|
+
export { d as defineChain, g as getChainContractAddress } from '../chain-40443542.js';
|
10
|
+
import { C as CallParameters, E as EstimateGasParameters, S as SendTransactionParameters } from '../createPublicClient-fd8b1349.js';
|
11
|
+
export { B as BlockFormatter, F as FormattedBlock, f as FormattedTransactionReceipt, g as FormattedTransactionRequest, T as TransactionReceiptFormatter, h as TransactionRequestFormatter, i as defineBlock, j as defineTransactionReceipt, k as defineTransactionRequest, l as formatBlock, m as formatTransactionRequest } from '../createPublicClient-fd8b1349.js';
|
12
|
+
import { ac as Formatter, C as Chain } from '../chain-4af995bf.js';
|
13
|
+
export { a4 as ExtractFormatter, a5 as Formatted, a6 as FormattedTransaction, a7 as TransactionFormatter, ao as defineFormatter, a8 as defineTransaction, ap as format, a9 as formatTransaction, aa as transactionType } from '../chain-4af995bf.js';
|
14
|
+
import { A as Account } from '../typedData-848139b1.js';
|
14
15
|
import 'isomorphic-ws';
|
15
|
-
import '../
|
16
|
-
import '../
|
16
|
+
import '../createClient-1f19be8d.js';
|
17
|
+
import '../eip1193-210ab776.js';
|
17
18
|
import '@wagmi/chains';
|
19
|
+
import '@scure/bip32';
|
18
20
|
|
19
21
|
declare function buildRequest<TRequest extends (args: any) => Promise<any>>(request: TRequest, { retryDelay, retryCount, }?: {
|
20
22
|
retryDelay?: number;
|
@@ -46,7 +48,8 @@ declare function getCallError(err: BaseError, { docsPath, ...args }: CallParamet
|
|
46
48
|
docsPath?: string;
|
47
49
|
}): CallExecutionError;
|
48
50
|
|
49
|
-
declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: EstimateGasParameters & {
|
51
|
+
declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: Omit<EstimateGasParameters, 'account'> & {
|
52
|
+
account?: Account;
|
50
53
|
chain?: Chain;
|
51
54
|
docsPath?: string;
|
52
55
|
}): EstimateGasExecutionError;
|
@@ -54,7 +57,9 @@ declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: Esti
|
|
54
57
|
declare function containsNodeError(err: BaseError): boolean;
|
55
58
|
declare function getNodeError(err: BaseError, args: Partial<SendTransactionParameters<any>>): ExecutionRevertedError | FeeCapTooHighError | FeeCapTooLowError | NonceTooHighError | NonceTooLowError | NonceMaxValueError | InsufficientFundsError | IntrinsicGasTooHighError | IntrinsicGasTooLowError | TransactionTypeNotSupportedError | TipAboveFeeCapError | UnknownNodeError;
|
56
59
|
|
57
|
-
declare function getTransactionError(err: BaseError, { docsPath, ...args }: SendTransactionParameters & {
|
60
|
+
declare function getTransactionError(err: BaseError, { docsPath, ...args }: Omit<SendTransactionParameters, 'account' | 'chain'> & {
|
61
|
+
account: Account;
|
62
|
+
chain?: Chain;
|
58
63
|
docsPath?: string;
|
59
64
|
}): TransactionExecutionError;
|
60
65
|
|
@@ -62,17 +67,4 @@ declare const arrayRegex: RegExp;
|
|
62
67
|
declare const bytesRegex: RegExp;
|
63
68
|
declare const integerRegex: RegExp;
|
64
69
|
|
65
|
-
|
66
|
-
|
67
|
-
type PrepareRequestParameters<TParameters extends SendTransactionParameters = SendTransactionParameters> = TParameters;
|
68
|
-
type PrepareRequestReturnType<TParameters extends SendTransactionParameters = SendTransactionParameters> = TParameters & {
|
69
|
-
from: Address;
|
70
|
-
gas: SendTransactionParameters['gas'];
|
71
|
-
gasPrice?: SendTransactionParameters['gasPrice'];
|
72
|
-
maxFeePerGas?: SendTransactionParameters['maxFeePerGas'];
|
73
|
-
maxPriorityFeePerGas?: SendTransactionParameters['maxPriorityFeePerGas'];
|
74
|
-
nonce: SendTransactionParameters['nonce'];
|
75
|
-
};
|
76
|
-
declare function prepareRequest<TParameters extends SendTransactionParameters>(client: WalletClient<any, any> | PublicClient<any, any>, args: PrepareRequestParameters<TParameters>): Promise<PrepareRequestReturnType<TParameters>>;
|
77
|
-
|
78
|
-
export { arrayRegex, assertRequest, buildRequest, bytesRegex, containsNodeError, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType, getCallError, getEstimateGasError, getNodeError, getTransactionError, integerRegex, prepareRequest };
|
70
|
+
export { arrayRegex, buildRequest, bytesRegex, containsNodeError, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType, getCallError, getEstimateGasError, getNodeError, getTransactionError, integerRegex };
|
package/dist/utils/index.js
CHANGED
@@ -105,7 +105,6 @@
|
|
105
105
|
|
106
106
|
|
107
107
|
|
108
|
-
var _chunkZ54YSSBJjs = require('../chunk-Z54YSSBJ.js');
|
109
108
|
|
110
109
|
|
111
110
|
|
@@ -118,6 +117,7 @@ var _chunkZ54YSSBJjs = require('../chunk-Z54YSSBJ.js');
|
|
118
117
|
|
119
118
|
|
120
119
|
|
120
|
+
var _chunkOW7TKT7Ljs = require('../chunk-OW7TKT7L.js');
|
121
121
|
|
122
122
|
|
123
123
|
|
@@ -213,5 +213,29 @@ var _chunkZ54YSSBJjs = require('../chunk-Z54YSSBJ.js');
|
|
213
213
|
|
214
214
|
|
215
215
|
|
216
|
-
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
exports.arrayRegex = _chunkOW7TKT7Ljs.arrayRegex; exports.assertRequest = _chunkOW7TKT7Ljs.assertRequest; exports.assertTransactionEIP1559 = _chunkOW7TKT7Ljs.assertTransactionEIP1559; exports.assertTransactionEIP2930 = _chunkOW7TKT7Ljs.assertTransactionEIP2930; exports.assertTransactionLegacy = _chunkOW7TKT7Ljs.assertTransactionLegacy; exports.boolToBytes = _chunkOW7TKT7Ljs.boolToBytes; exports.boolToHex = _chunkOW7TKT7Ljs.boolToHex; exports.buildRequest = _chunkOW7TKT7Ljs.buildRequest; exports.bytesRegex = _chunkOW7TKT7Ljs.bytesRegex; exports.bytesToBigint = _chunkOW7TKT7Ljs.bytesToBigint; exports.bytesToBool = _chunkOW7TKT7Ljs.bytesToBool; exports.bytesToHex = _chunkOW7TKT7Ljs.bytesToHex; exports.bytesToNumber = _chunkOW7TKT7Ljs.bytesToNumber; exports.bytesToString = _chunkOW7TKT7Ljs.bytesToString; exports.concat = _chunkOW7TKT7Ljs.concat; exports.concatBytes = _chunkOW7TKT7Ljs.concatBytes; exports.concatHex = _chunkOW7TKT7Ljs.concatHex; exports.containsNodeError = _chunkOW7TKT7Ljs.containsNodeError; exports.decodeAbiParameters = _chunkOW7TKT7Ljs.decodeAbiParameters; exports.decodeErrorResult = _chunkOW7TKT7Ljs.decodeErrorResult; exports.decodeEventLog = _chunkOW7TKT7Ljs.decodeEventLog; exports.decodeFunctionData = _chunkOW7TKT7Ljs.decodeFunctionData; exports.decodeFunctionResult = _chunkOW7TKT7Ljs.decodeFunctionResult; exports.defineBlock = _chunkOW7TKT7Ljs.defineBlock; exports.defineChain = _chunkOW7TKT7Ljs.defineChain; exports.defineFormatter = _chunkOW7TKT7Ljs.defineFormatter; exports.defineTransaction = _chunkOW7TKT7Ljs.defineTransaction; exports.defineTransactionReceipt = _chunkOW7TKT7Ljs.defineTransactionReceipt; exports.defineTransactionRequest = _chunkOW7TKT7Ljs.defineTransactionRequest; exports.encodeAbiParameters = _chunkOW7TKT7Ljs.encodeAbiParameters; exports.encodeDeployData = _chunkOW7TKT7Ljs.encodeDeployData; exports.encodeErrorResult = _chunkOW7TKT7Ljs.encodeErrorResult; exports.encodeEventTopics = _chunkOW7TKT7Ljs.encodeEventTopics; exports.encodeFunctionData = _chunkOW7TKT7Ljs.encodeFunctionData; exports.encodeFunctionResult = _chunkOW7TKT7Ljs.encodeFunctionResult; exports.encodePacked = _chunkOW7TKT7Ljs.encodePacked; exports.extract = _chunkOW7TKT7Ljs.extract; exports.extractFunctionName = _chunkOW7TKT7Ljs.extractFunctionName; exports.extractFunctionParams = _chunkOW7TKT7Ljs.extractFunctionParams; exports.extractFunctionParts = _chunkOW7TKT7Ljs.extractFunctionParts; exports.extractFunctionType = _chunkOW7TKT7Ljs.extractFunctionType; exports.format = _chunkOW7TKT7Ljs.format; exports.formatAbiItem = _chunkOW7TKT7Ljs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkOW7TKT7Ljs.formatAbiItemWithArgs; exports.formatBlock = _chunkOW7TKT7Ljs.formatBlock; exports.formatEther = _chunkOW7TKT7Ljs.formatEther; exports.formatGwei = _chunkOW7TKT7Ljs.formatGwei; exports.formatTransaction = _chunkOW7TKT7Ljs.formatTransaction; exports.formatTransactionRequest = _chunkOW7TKT7Ljs.formatTransactionRequest; exports.formatUnits = _chunkOW7TKT7Ljs.formatUnits; exports.fromBytes = _chunkOW7TKT7Ljs.fromBytes; exports.fromHex = _chunkOW7TKT7Ljs.fromHex; exports.fromRlp = _chunkOW7TKT7Ljs.fromRlp; exports.getAbiItem = _chunkOW7TKT7Ljs.getAbiItem; exports.getAddress = _chunkOW7TKT7Ljs.getAddress; exports.getCallError = _chunkOW7TKT7Ljs.getCallError; exports.getChainContractAddress = _chunkOW7TKT7Ljs.getChainContractAddress; exports.getContractAddress = _chunkOW7TKT7Ljs.getContractAddress; exports.getContractError = _chunkOW7TKT7Ljs.getContractError; exports.getCreate2Address = _chunkOW7TKT7Ljs.getCreate2Address; exports.getCreateAddress = _chunkOW7TKT7Ljs.getCreateAddress; exports.getEstimateGasError = _chunkOW7TKT7Ljs.getEstimateGasError; exports.getEventSelector = _chunkOW7TKT7Ljs.getEventSelector; exports.getFunctionSelector = _chunkOW7TKT7Ljs.getFunctionSelector; exports.getNodeError = _chunkOW7TKT7Ljs.getNodeError; exports.getSerializedTransactionType = _chunkOW7TKT7Ljs.getSerializedTransactionType; exports.getSocket = _chunkOW7TKT7Ljs.getSocket; exports.getTransactionError = _chunkOW7TKT7Ljs.getTransactionError; exports.getTransactionType = _chunkOW7TKT7Ljs.getTransactionType; exports.hashMessage = _chunkOW7TKT7Ljs.hashMessage; exports.hashTypedData = _chunkOW7TKT7Ljs.hashTypedData; exports.hexToBigInt = _chunkOW7TKT7Ljs.hexToBigInt; exports.hexToBool = _chunkOW7TKT7Ljs.hexToBool; exports.hexToBytes = _chunkOW7TKT7Ljs.hexToBytes; exports.hexToNumber = _chunkOW7TKT7Ljs.hexToNumber; exports.hexToString = _chunkOW7TKT7Ljs.hexToString; exports.integerRegex = _chunkOW7TKT7Ljs.integerRegex; exports.isAddress = _chunkOW7TKT7Ljs.isAddress; exports.isAddressEqual = _chunkOW7TKT7Ljs.isAddressEqual; exports.isBytes = _chunkOW7TKT7Ljs.isBytes; exports.isHash = _chunkOW7TKT7Ljs.isHash; exports.isHex = _chunkOW7TKT7Ljs.isHex; exports.keccak256 = _chunkOW7TKT7Ljs.keccak256; exports.numberToBytes = _chunkOW7TKT7Ljs.numberToBytes; exports.numberToHex = _chunkOW7TKT7Ljs.numberToHex; exports.pad = _chunkOW7TKT7Ljs.pad; exports.padBytes = _chunkOW7TKT7Ljs.padBytes; exports.padHex = _chunkOW7TKT7Ljs.padHex; exports.parseAbi = _chunkOW7TKT7Ljs.parseAbi; exports.parseAbiItem = _chunkOW7TKT7Ljs.parseAbiItem; exports.parseAbiParameter = _chunkOW7TKT7Ljs.parseAbiParameter; exports.parseAbiParameters = _chunkOW7TKT7Ljs.parseAbiParameters; exports.parseAccount = _chunkOW7TKT7Ljs.parseAccount; exports.parseEther = _chunkOW7TKT7Ljs.parseEther; exports.parseGwei = _chunkOW7TKT7Ljs.parseGwei; exports.parseTransaction = _chunkOW7TKT7Ljs.parseTransaction; exports.parseUnits = _chunkOW7TKT7Ljs.parseUnits; exports.prepareRequest = _chunkOW7TKT7Ljs.prepareRequest; exports.recoverAddress = _chunkOW7TKT7Ljs.recoverAddress; exports.recoverMessageAddress = _chunkOW7TKT7Ljs.recoverMessageAddress; exports.recoverTypedDataAddress = _chunkOW7TKT7Ljs.recoverTypedDataAddress; exports.rpc = _chunkOW7TKT7Ljs.rpc; exports.serializeTransaction = _chunkOW7TKT7Ljs.serializeTransaction; exports.size = _chunkOW7TKT7Ljs.size; exports.slice = _chunkOW7TKT7Ljs.slice; exports.sliceBytes = _chunkOW7TKT7Ljs.sliceBytes; exports.sliceHex = _chunkOW7TKT7Ljs.sliceHex; exports.stringToBytes = _chunkOW7TKT7Ljs.stringToBytes; exports.stringToHex = _chunkOW7TKT7Ljs.stringToHex; exports.stringify = _chunkOW7TKT7Ljs.stringify; exports.toBytes = _chunkOW7TKT7Ljs.toBytes; exports.toHex = _chunkOW7TKT7Ljs.toHex; exports.toRlp = _chunkOW7TKT7Ljs.toRlp; exports.transactionType = _chunkOW7TKT7Ljs.transactionType; exports.trim = _chunkOW7TKT7Ljs.trim; exports.validateTypedData = _chunkOW7TKT7Ljs.validateTypedData; exports.verifyMessage = _chunkOW7TKT7Ljs.verifyMessage; exports.verifyTypedData = _chunkOW7TKT7Ljs.verifyTypedData;
|
217
241
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.mjs
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
arrayRegex,
|
3
3
|
assertRequest,
|
4
|
+
assertTransactionEIP1559,
|
5
|
+
assertTransactionEIP2930,
|
6
|
+
assertTransactionLegacy,
|
4
7
|
boolToBytes,
|
5
8
|
boolToHex,
|
6
9
|
buildRequest,
|
@@ -50,7 +53,6 @@ import {
|
|
50
53
|
fromHex,
|
51
54
|
fromRlp,
|
52
55
|
getAbiItem,
|
53
|
-
getAccount,
|
54
56
|
getAddress,
|
55
57
|
getCallError,
|
56
58
|
getChainContractAddress,
|
@@ -62,9 +64,12 @@ import {
|
|
62
64
|
getEventSelector,
|
63
65
|
getFunctionSelector,
|
64
66
|
getNodeError,
|
67
|
+
getSerializedTransactionType,
|
65
68
|
getSocket,
|
66
69
|
getTransactionError,
|
70
|
+
getTransactionType,
|
67
71
|
hashMessage,
|
72
|
+
hashTypedData,
|
68
73
|
hexToBigInt,
|
69
74
|
hexToBool,
|
70
75
|
hexToBytes,
|
@@ -74,6 +79,7 @@ import {
|
|
74
79
|
isAddress,
|
75
80
|
isAddressEqual,
|
76
81
|
isBytes,
|
82
|
+
isHash,
|
77
83
|
isHex,
|
78
84
|
keccak256,
|
79
85
|
numberToBytes,
|
@@ -85,13 +91,17 @@ import {
|
|
85
91
|
parseAbiItem,
|
86
92
|
parseAbiParameter,
|
87
93
|
parseAbiParameters,
|
94
|
+
parseAccount,
|
88
95
|
parseEther,
|
89
96
|
parseGwei,
|
97
|
+
parseTransaction,
|
90
98
|
parseUnits,
|
91
99
|
prepareRequest,
|
92
100
|
recoverAddress,
|
93
101
|
recoverMessageAddress,
|
102
|
+
recoverTypedDataAddress,
|
94
103
|
rpc,
|
104
|
+
serializeTransaction,
|
95
105
|
size,
|
96
106
|
slice,
|
97
107
|
sliceBytes,
|
@@ -104,11 +114,16 @@ import {
|
|
104
114
|
toRlp,
|
105
115
|
transactionType,
|
106
116
|
trim,
|
107
|
-
|
108
|
-
|
117
|
+
validateTypedData,
|
118
|
+
verifyMessage,
|
119
|
+
verifyTypedData
|
120
|
+
} from "../chunk-HYEOQX7O.mjs";
|
109
121
|
export {
|
110
122
|
arrayRegex,
|
111
123
|
assertRequest,
|
124
|
+
assertTransactionEIP1559,
|
125
|
+
assertTransactionEIP2930,
|
126
|
+
assertTransactionLegacy,
|
112
127
|
boolToBytes,
|
113
128
|
boolToHex,
|
114
129
|
buildRequest,
|
@@ -158,7 +173,6 @@ export {
|
|
158
173
|
fromHex,
|
159
174
|
fromRlp,
|
160
175
|
getAbiItem,
|
161
|
-
getAccount,
|
162
176
|
getAddress,
|
163
177
|
getCallError,
|
164
178
|
getChainContractAddress,
|
@@ -170,9 +184,12 @@ export {
|
|
170
184
|
getEventSelector,
|
171
185
|
getFunctionSelector,
|
172
186
|
getNodeError,
|
187
|
+
getSerializedTransactionType,
|
173
188
|
getSocket,
|
174
189
|
getTransactionError,
|
190
|
+
getTransactionType,
|
175
191
|
hashMessage,
|
192
|
+
hashTypedData,
|
176
193
|
hexToBigInt,
|
177
194
|
hexToBool,
|
178
195
|
hexToBytes,
|
@@ -182,6 +199,7 @@ export {
|
|
182
199
|
isAddress,
|
183
200
|
isAddressEqual,
|
184
201
|
isBytes,
|
202
|
+
isHash,
|
185
203
|
isHex,
|
186
204
|
keccak256,
|
187
205
|
numberToBytes,
|
@@ -193,13 +211,17 @@ export {
|
|
193
211
|
parseAbiItem,
|
194
212
|
parseAbiParameter,
|
195
213
|
parseAbiParameters,
|
214
|
+
parseAccount,
|
196
215
|
parseEther,
|
197
216
|
parseGwei,
|
217
|
+
parseTransaction,
|
198
218
|
parseUnits,
|
199
219
|
prepareRequest,
|
200
220
|
recoverAddress,
|
201
221
|
recoverMessageAddress,
|
222
|
+
recoverTypedDataAddress,
|
202
223
|
rpc,
|
224
|
+
serializeTransaction,
|
203
225
|
size,
|
204
226
|
slice,
|
205
227
|
sliceBytes,
|
@@ -212,6 +234,8 @@ export {
|
|
212
234
|
toRlp,
|
213
235
|
transactionType,
|
214
236
|
trim,
|
215
|
-
|
237
|
+
validateTypedData,
|
238
|
+
verifyMessage,
|
239
|
+
verifyTypedData
|
216
240
|
};
|
217
241
|
//# sourceMappingURL=index.mjs.map
|