viem 0.2.0-canary.20230316T020523 → 0.2.0-jxom-async-verify-message.20230321T000803
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/dist/abi.d.ts +3 -3
- package/dist/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/account-07d04222.d.ts +74 -0
- package/dist/{chain-1b53ef88.d.ts → chain-b2e88e30.d.ts} +113 -108
- package/dist/{chain-ec8c485d.d.ts → chain-c4f924cf.d.ts} +1 -1
- package/dist/chains.d.ts +3 -3
- package/dist/chains.js +63 -63
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-ZTHR4YS2.js → chunk-22BDIC7J.js} +406 -108
- package/dist/chunk-22BDIC7J.js.map +1 -0
- package/dist/{chunk-FDTKU2PS.js → chunk-2NJCP2DN.js} +19 -19
- package/dist/{chunk-FDTKU2PS.js.map → chunk-2NJCP2DN.js.map} +1 -1
- package/dist/{chunk-MWJLP6MO.mjs → chunk-FEPL5HFW.mjs} +336 -38
- package/dist/chunk-FEPL5HFW.mjs.map +1 -0
- package/dist/{chunk-7OP5XRWB.mjs → chunk-OZCG5IO7.mjs} +2 -2
- package/dist/chunk-OZCG5IO7.mjs.map +1 -0
- package/dist/contract.d.ts +8 -7
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createClient-a28317a9.d.ts → createClient-d4f1dea1.d.ts} +6 -6
- package/dist/{createPublicClient-0021fc35.d.ts → createPublicClient-3a714a8d.d.ts} +154 -207
- package/dist/{eip1193-4f4e240c.d.ts → eip1193-cd3e872a.d.ts} +1 -1
- package/dist/{encodeFunctionResult-1f324375.d.ts → encodeFunctionResult-750c9055.d.ts} +1 -1
- package/dist/{encodePacked-d5d5264a.d.ts → encodePacked-de74201f.d.ts} +1 -1
- package/dist/ens.d.ts +5 -4
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/ethers.d.ts +3 -5
- package/dist/ethers.js +3 -3
- package/dist/ethers.mjs +1 -1
- package/dist/{formatAbiItem-15e8817d.d.ts → formatAbiItem-fdbdda39.d.ts} +1 -1
- package/dist/{getAbiItem-3e809ff9.d.ts → getAbiItem-9d709e3b.d.ts} +1 -1
- package/dist/index.d.ts +14 -13
- package/dist/index.js +101 -91
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-c2fb9fa2.d.ts → parseGwei-b138c041.d.ts} +49 -12
- package/dist/public.d.ts +5 -4
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/{test-2bd23d7e.d.ts → test-c70126a6.d.ts} +33 -32
- package/dist/test.d.ts +10 -10
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/utils/index.d.ts +28 -18
- package/dist/utils/index.js +10 -2
- package/dist/utils/index.mjs +11 -3
- package/dist/wallet.d.ts +5 -4
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/window.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunk-7OP5XRWB.mjs.map +0 -1
- package/dist/chunk-MWJLP6MO.mjs.map +0 -1
- package/dist/chunk-ZTHR4YS2.js.map +0 -1
@@ -1,10 +1,14 @@
|
|
1
|
-
import { Address, Abi } from 'abitype';
|
2
|
-
import {
|
3
|
-
import { B as ByteArray, H as Hex, C as Chain, a as Hash, f as BlockTag,
|
4
|
-
import {
|
1
|
+
import { Address, Abi, TypedData } from 'abitype';
|
2
|
+
import { A as Account, L as LocalAccount, J as JsonRpcAccount, T as TypedDataDefinition } from './account-07d04222.js';
|
3
|
+
import { B as ByteArray, H as Hex, C as Chain, a as Hash, f as BlockTag, ab as EventDefinition } from './chain-b2e88e30.js';
|
4
|
+
import { C as CallParameters, E as EstimateGasParameters, S as SendTransactionParameters } from './createPublicClient-3a714a8d.js';
|
5
|
+
import { a as DecodeErrorResultReturnType } from './encodeFunctionResult-750c9055.js';
|
5
6
|
import WebSocket from 'isomorphic-ws';
|
6
7
|
|
7
|
-
|
8
|
+
type Source = Address | Omit<LocalAccount, 'type'>;
|
9
|
+
type GetAccountReturnType<TSource extends Source> = (TSource extends Address ? JsonRpcAccount : never) | (TSource extends Omit<LocalAccount, 'type'> ? LocalAccount : never);
|
10
|
+
declare function getAccount<TSource extends Source>(source: TSource): GetAccountReturnType<TSource>;
|
11
|
+
declare function parseAccount(account: Address | Account): Account;
|
8
12
|
|
9
13
|
declare function getAddress(address: string): Address;
|
10
14
|
|
@@ -194,6 +198,7 @@ declare function fromRlp<TTo extends 'bytes' | 'hex'>(value: ByteArray | Hex, to
|
|
194
198
|
|
195
199
|
type BaseErrorParameters = {
|
196
200
|
docsPath?: string;
|
201
|
+
docsSlug?: string;
|
197
202
|
metaMessages?: string[];
|
198
203
|
} & ({
|
199
204
|
cause?: never;
|
@@ -214,7 +219,7 @@ declare class BaseError extends Error {
|
|
214
219
|
declare class CallExecutionError extends BaseError {
|
215
220
|
cause: BaseError;
|
216
221
|
name: string;
|
217
|
-
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: CallParameters & {
|
222
|
+
constructor(cause: BaseError, { account: account_, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: CallParameters & {
|
218
223
|
chain?: Chain;
|
219
224
|
docsPath?: string;
|
220
225
|
});
|
@@ -267,7 +272,8 @@ declare class RawContractError extends BaseError {
|
|
267
272
|
declare class EstimateGasExecutionError extends BaseError {
|
268
273
|
cause: BaseError;
|
269
274
|
name: string;
|
270
|
-
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: EstimateGasParameters & {
|
275
|
+
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: Omit<EstimateGasParameters<any, any>, 'account'> & {
|
276
|
+
account?: Account;
|
271
277
|
chain?: Chain;
|
272
278
|
docsPath?: string;
|
273
279
|
});
|
@@ -380,7 +386,9 @@ declare class UnknownNodeError extends BaseError {
|
|
380
386
|
declare class TransactionExecutionError extends BaseError {
|
381
387
|
cause: BaseError;
|
382
388
|
name: string;
|
383
|
-
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: SendTransactionParameters & {
|
389
|
+
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: Omit<SendTransactionParameters, 'account' | 'chain'> & {
|
390
|
+
account: Account;
|
391
|
+
chain?: Chain;
|
384
392
|
docsPath?: string;
|
385
393
|
});
|
386
394
|
}
|
@@ -489,19 +497,37 @@ type To = 'hex' | 'bytes';
|
|
489
497
|
type HashMessage<TTo extends To> = (TTo extends 'bytes' ? ByteArray : never) | (TTo extends 'hex' ? Hex : never);
|
490
498
|
declare function hashMessage<TTo extends To = 'hex'>(message: string, to_?: TTo): HashMessage<TTo>;
|
491
499
|
|
500
|
+
type HashTypedDataParameters<TTypedData extends TypedData | {
|
501
|
+
[key: string]: unknown;
|
502
|
+
} = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType>;
|
503
|
+
type HashTypedDataReturnType = Hex;
|
504
|
+
declare function hashTypedData<TTypedData extends TypedData | {
|
505
|
+
[key: string]: unknown;
|
506
|
+
}, TPrimaryType extends string = string>({ domain, message, primaryType, types: types_, }: HashTypedDataParameters<TTypedData, TPrimaryType>): HashTypedDataReturnType;
|
507
|
+
|
492
508
|
type RecoverAddressParameters = {
|
493
509
|
hash: Hex | ByteArray;
|
494
510
|
signature: Hex | ByteArray;
|
495
511
|
};
|
496
512
|
type RecoverAddressReturnType = Address;
|
497
|
-
declare function recoverAddress({ hash, signature, }: RecoverAddressParameters): RecoverAddressReturnType
|
513
|
+
declare function recoverAddress({ hash, signature, }: RecoverAddressParameters): Promise<RecoverAddressReturnType>;
|
498
514
|
|
499
515
|
type RecoverMessageAddressParameters = {
|
500
516
|
message: string;
|
501
517
|
signature: Hex | ByteArray;
|
502
518
|
};
|
503
519
|
type RecoverMessageAddressReturnType = Address;
|
504
|
-
declare function recoverMessageAddress({ message, signature, }: RecoverMessageAddressParameters): RecoverMessageAddressReturnType
|
520
|
+
declare function recoverMessageAddress({ message, signature, }: RecoverMessageAddressParameters): Promise<RecoverMessageAddressReturnType>;
|
521
|
+
|
522
|
+
type RecoverTypedDataAddressParameters<TTypedData extends TypedData | {
|
523
|
+
[key: string]: unknown;
|
524
|
+
} = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType> & {
|
525
|
+
signature: Hex | ByteArray;
|
526
|
+
};
|
527
|
+
type RecoverTypedDataAddressReturnType = Address;
|
528
|
+
declare function recoverTypedDataAddress<TTypedData extends TypedData | {
|
529
|
+
[key: string]: unknown;
|
530
|
+
}, TPrimaryType extends string = string>({ domain, message, primaryType, signature, types, }: RecoverTypedDataAddressParameters<TTypedData, TPrimaryType>): Promise<RecoverTypedDataAddressReturnType>;
|
505
531
|
|
506
532
|
type VerifyMessageParameters = {
|
507
533
|
address: Address;
|
@@ -509,7 +535,18 @@ type VerifyMessageParameters = {
|
|
509
535
|
signature: Hex | ByteArray;
|
510
536
|
};
|
511
537
|
type VerifyMessageReturnType = boolean;
|
512
|
-
declare function verifyMessage({ address, message, signature, }: VerifyMessageParameters): VerifyMessageReturnType
|
538
|
+
declare function verifyMessage({ address, message, signature, }: VerifyMessageParameters): Promise<VerifyMessageReturnType>;
|
539
|
+
|
540
|
+
type VerifyTypedDataParameters<TTypedData extends TypedData | {
|
541
|
+
[key: string]: unknown;
|
542
|
+
} = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType> & {
|
543
|
+
address: Address;
|
544
|
+
signature: Hex | ByteArray;
|
545
|
+
};
|
546
|
+
type VerifyTypedDataReturnType = boolean;
|
547
|
+
declare function verifyTypedData<TTypedData extends TypedData | {
|
548
|
+
[key: string]: unknown;
|
549
|
+
}, TPrimaryType extends string = string>({ address, domain, message, primaryType, signature, types, }: VerifyTypedDataParameters<TTypedData, TPrimaryType>): Promise<VerifyTypedDataReturnType>;
|
513
550
|
|
514
551
|
declare const stringify: typeof JSON.stringify;
|
515
552
|
|
@@ -525,4 +562,4 @@ declare function parseEther(ether: `${number}`, unit?: 'wei' | 'gwei'): bigint;
|
|
525
562
|
|
526
563
|
declare function parseGwei(ether: `${number}`, unit?: 'wei'): bigint;
|
527
564
|
|
528
|
-
export {
|
565
|
+
export { formatUnits as $, VerifyTypedDataParameters as A, BaseError as B, CallExecutionError as C, VerifyTypedDataReturnType as D, EstimateGasExecutionError as E, FeeCapTooHighError as F, GetContractAddressOptions as G, HttpOptions as H, InsufficientFundsError as I, boolToBytes as J, boolToHex as K, bytesToBigint as L, bytesToBool as M, NonceMaxValueError as N, bytesToHex as O, bytesToNumber as P, bytesToString as Q, RpcResponse as R, concat as S, TipAboveFeeCapError as T, UnknownNodeError as U, VerifyMessageParameters as V, WaitForTransactionReceiptTimeoutError as W, concatBytes as X, concatHex as Y, formatEther as Z, formatGwei as _, ContractFunctionExecutionError as a, fromBytes as a0, fromHex as a1, fromRlp as a2, getAccount as a3, getAddress as a4, getContractAddress as a5, getContractError as a6, getCreate2Address as a7, getCreateAddress as a8, getEventSelector as a9, sliceHex as aA, stringToBytes as aB, stringToHex as aC, stringify as aD, toBytes as aE, toHex as aF, toRlp as aG, trim as aH, verifyMessage as aI, parseAccount as aJ, Socket as aK, getSocket as aL, rpc as aM, recoverTypedDataAddress as aN, verifyTypedData as aO, getFunctionSelector as aa, hashMessage as ab, hashTypedData as ac, hexToBigInt as ad, hexToBool as ae, hexToBytes as af, hexToNumber as ag, hexToString as ah, isAddress as ai, isAddressEqual as aj, isBytes as ak, isHex as al, keccak256 as am, numberToBytes as an, numberToHex as ao, pad as ap, padBytes as aq, padHex as ar, parseEther as as, parseGwei as at, parseUnits as au, recoverAddress as av, recoverMessageAddress as aw, size as ax, slice as ay, sliceBytes as az, ContractFunctionRevertedError as b, ContractFunctionZeroDataError as c, ExecutionRevertedError as d, FeeCapTooLowError as e, IntrinsicGasTooHighError as f, IntrinsicGasTooLowError as g, NonceTooHighError as h, NonceTooLowError as i, RawContractError as j, TransactionExecutionError as k, TransactionTypeNotSupportedError as l, TransactionNotFoundError as m, TransactionReceiptNotFoundError as n, GetCreate2AddressOptions as o, GetCreateAddressOptions as p, HashTypedDataParameters as q, HashTypedDataReturnType as r, RecoverAddressParameters as s, RecoverAddressReturnType as t, RecoverMessageAddressParameters as u, RecoverMessageAddressReturnType as v, RecoverTypedDataAddressParameters as w, RecoverTypedDataAddressReturnType as x, ToRlpReturnType as y, VerifyMessageReturnType as z };
|
package/dist/public.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
export { C as CallParameters,
|
2
|
-
import './eip1193-
|
1
|
+
export { C as CallParameters, ar as CallReturnType, as as CreateBlockFilterReturnType, at as CreateEventFilterParameters, au as CreateEventFilterReturnType, av as CreatePendingTransactionFilterReturnType, E as EstimateGasParameters, aw as EstimateGasReturnType, ax as GetBalanceParameters, ay as GetBalanceReturnType, aA as GetBlockNumberParameters, aB as GetBlockNumberReturnType, az as GetBlockParameters, aC as GetBlockReturnType, aD as GetBlockTransactionCountParameters, aE as GetBlockTransactionCountReturnType, G as GetBytecodeParameters, q as GetBytecodeReturnType, aF as GetFeeHistoryParameters, aG as GetFeeHistoryReturnType, aH as GetFilterChangesParameters, aI as GetFilterChangesReturnType, aJ as GetFilterLogsParameters, aK as GetFilterLogsReturnType, aL as GetGasPriceReturnType, aN as GetTransactionConfirmationsParameters, aO as GetTransactionConfirmationsReturnType, aP as GetTransactionCountParameters, aQ as GetTransactionCountReturnType, aM as GetTransactionParameters, aR as GetTransactionReceiptParameters, aS as GetTransactionReceiptReturnType, aT as GetTransactionReturnType, aU as OnBlock, aV as OnBlockNumberFn, aW as OnBlockNumberParameter, aX as OnBlockParameter, O as OnLogsFn, u as OnLogsParameter, aY as OnTransactionsFn, aZ as OnTransactionsParameter, a_ as ReplacementReason, a$ as ReplacementReturnType, b0 as UninstallFilterParameters, b1 as UninstallFilterReturnType, b2 as WaitForTransactionReceiptParameters, b3 as WaitForTransactionReceiptReturnType, b4 as WatchBlockNumberParameters, b5 as WatchBlocksParameters, b6 as WatchPendingTransactionsParameters, a1 as call, a2 as createBlockFilter, a3 as createEventFilter, a4 as createPendingTransactionFilter, a5 as estimateGas, a6 as getBalance, a7 as getBlock, a8 as getBlockNumber, a9 as getBlockNumberCache, aa as getBlockTransactionCount, D as getBytecode, ab as getChainId, ac as getFeeHistory, ad as getFilterChanges, ae as getFilterLogs, ag as getGasPrice, af as getLogs, ah as getTransaction, ai as getTransactionConfirmations, aj as getTransactionCount, ak as getTransactionReceipt, al as uninstallFilter, am as waitForTransactionReceipt, an as watchBlockNumber, ao as watchBlocks, ap as watchEvent, aq as watchPendingTransactions } from './createPublicClient-3a714a8d.js';
|
2
|
+
import './eip1193-cd3e872a.js';
|
3
3
|
import 'abitype';
|
4
|
-
import './chain-
|
4
|
+
import './chain-b2e88e30.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import './createClient-
|
6
|
+
import './createClient-d4f1dea1.js';
|
7
|
+
import './account-07d04222.js';
|
package/dist/public.js
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
var
|
29
|
+
var _chunk22BDIC7Jjs = require('./chunk-22BDIC7J.js');
|
30
30
|
|
31
31
|
|
32
32
|
|
@@ -55,5 +55,5 @@ var _chunkZTHR4YS2js = require('./chunk-ZTHR4YS2.js');
|
|
55
55
|
|
56
56
|
|
57
57
|
|
58
|
-
exports.call =
|
58
|
+
exports.call = _chunk22BDIC7Jjs.call; exports.createBlockFilter = _chunk22BDIC7Jjs.createBlockFilter; exports.createEventFilter = _chunk22BDIC7Jjs.createEventFilter; exports.createPendingTransactionFilter = _chunk22BDIC7Jjs.createPendingTransactionFilter; exports.estimateGas = _chunk22BDIC7Jjs.estimateGas; exports.getBalance = _chunk22BDIC7Jjs.getBalance; exports.getBlock = _chunk22BDIC7Jjs.getBlock; exports.getBlockNumber = _chunk22BDIC7Jjs.getBlockNumber; exports.getBlockNumberCache = _chunk22BDIC7Jjs.getBlockNumberCache; exports.getBlockTransactionCount = _chunk22BDIC7Jjs.getBlockTransactionCount; exports.getBytecode = _chunk22BDIC7Jjs.getBytecode; exports.getChainId = _chunk22BDIC7Jjs.getChainId; exports.getFeeHistory = _chunk22BDIC7Jjs.getFeeHistory; exports.getFilterChanges = _chunk22BDIC7Jjs.getFilterChanges; exports.getFilterLogs = _chunk22BDIC7Jjs.getFilterLogs; exports.getGasPrice = _chunk22BDIC7Jjs.getGasPrice; exports.getLogs = _chunk22BDIC7Jjs.getLogs; exports.getTransaction = _chunk22BDIC7Jjs.getTransaction; exports.getTransactionConfirmations = _chunk22BDIC7Jjs.getTransactionConfirmations; exports.getTransactionCount = _chunk22BDIC7Jjs.getTransactionCount; exports.getTransactionReceipt = _chunk22BDIC7Jjs.getTransactionReceipt; exports.uninstallFilter = _chunk22BDIC7Jjs.uninstallFilter; exports.waitForTransactionReceipt = _chunk22BDIC7Jjs.waitForTransactionReceipt; exports.watchBlockNumber = _chunk22BDIC7Jjs.watchBlockNumber; exports.watchBlocks = _chunk22BDIC7Jjs.watchBlocks; exports.watchEvent = _chunk22BDIC7Jjs.watchEvent; exports.watchPendingTransactions = _chunk22BDIC7Jjs.watchPendingTransactions;
|
59
59
|
//# sourceMappingURL=public.js.map
|
package/dist/public.mjs
CHANGED
@@ -1,46 +1,46 @@
|
|
1
|
-
import { a as Hash, y as RpcTransaction,
|
2
|
-
import { a as Transport, b as ClientConfig, C as Client } from './createClient-
|
3
|
-
import { T as TestRequests } from './eip1193-
|
1
|
+
import { a as Hash, y as RpcTransaction, aa as Quantity, I as TransactionRequest, H as Hex, C as Chain } from './chain-b2e88e30.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-d4f1dea1.js';
|
3
|
+
import { T as TestRequests } from './eip1193-cd3e872a.js';
|
4
4
|
import { Address } from 'abitype';
|
5
5
|
|
6
6
|
type DropTransactionParameters = {
|
7
7
|
/** The hash of the transaction to drop. */
|
8
8
|
hash: Hash;
|
9
9
|
};
|
10
|
-
declare function dropTransaction(client:
|
10
|
+
declare function dropTransaction(client: TestClientArg, { hash }: DropTransactionParameters): Promise<void>;
|
11
11
|
|
12
12
|
type GetAutomineReturnType = boolean;
|
13
|
-
declare function getAutomine(client:
|
13
|
+
declare function getAutomine(client: TestClientArg): Promise<GetAutomineReturnType>;
|
14
14
|
|
15
15
|
type GetTxpoolContentReturnType = {
|
16
16
|
pending: Record<Address, Record<string, RpcTransaction>>;
|
17
17
|
queued: Record<Address, Record<string, RpcTransaction>>;
|
18
18
|
};
|
19
|
-
declare function getTxpoolContent(client:
|
19
|
+
declare function getTxpoolContent(client: TestClientArg): Promise<GetTxpoolContentReturnType>;
|
20
20
|
|
21
21
|
type GetTxpoolStatusReturnType = {
|
22
22
|
pending: number;
|
23
23
|
queued: number;
|
24
24
|
};
|
25
|
-
declare function getTxpoolStatus(client:
|
25
|
+
declare function getTxpoolStatus(client: TestClientArg): Promise<GetTxpoolStatusReturnType>;
|
26
26
|
|
27
27
|
type ImpersonateAccountParameters = {
|
28
28
|
/** The account to impersonate. */
|
29
29
|
address: Address;
|
30
30
|
};
|
31
|
-
declare function impersonateAccount(client:
|
31
|
+
declare function impersonateAccount(client: TestClientArg, { address }: ImpersonateAccountParameters): Promise<void>;
|
32
32
|
|
33
33
|
type IncreaseTimeParameters = {
|
34
34
|
/** The amount of seconds to jump forward in time. */
|
35
35
|
seconds: number;
|
36
36
|
};
|
37
|
-
declare function increaseTime(client:
|
37
|
+
declare function increaseTime(client: TestClientArg, { seconds }: IncreaseTimeParameters): Promise<`0x${string}`>;
|
38
38
|
|
39
39
|
type InspectTxpoolReturnType = {
|
40
40
|
pending: Record<Address, Record<string, string>>;
|
41
41
|
queued: Record<Address, Record<string, string>>;
|
42
42
|
};
|
43
|
-
declare function inspectTxpool(client:
|
43
|
+
declare function inspectTxpool(client: TestClientArg): Promise<InspectTxpoolReturnType>;
|
44
44
|
|
45
45
|
type MineParameters = {
|
46
46
|
/** Number of blocks to mine. */
|
@@ -48,7 +48,7 @@ type MineParameters = {
|
|
48
48
|
/** Interval between each block in seconds. */
|
49
49
|
interval?: number;
|
50
50
|
};
|
51
|
-
declare function mine(client:
|
51
|
+
declare function mine(client: TestClientArg, { blocks, interval }: MineParameters): Promise<void>;
|
52
52
|
|
53
53
|
type ResetParameters = {
|
54
54
|
/** The block number to reset from. */
|
@@ -56,17 +56,17 @@ type ResetParameters = {
|
|
56
56
|
/** The JSON RPC URL. */
|
57
57
|
jsonRpcUrl?: string;
|
58
58
|
};
|
59
|
-
declare function reset(client:
|
59
|
+
declare function reset(client: TestClientArg, { blockNumber, jsonRpcUrl }?: ResetParameters): Promise<void>;
|
60
60
|
|
61
61
|
type RevertParameters = {
|
62
62
|
/** The snapshot ID to revert to. */
|
63
63
|
id: Quantity;
|
64
64
|
};
|
65
|
-
declare function revert(client:
|
65
|
+
declare function revert(client: TestClientArg, { id }: RevertParameters): Promise<void>;
|
66
66
|
|
67
67
|
type SendUnsignedTransactionParameters = TransactionRequest;
|
68
68
|
type SendUnsignedTransactionReturnType = Hash;
|
69
|
-
declare function sendUnsignedTransaction(client:
|
69
|
+
declare function sendUnsignedTransaction(client: TestClientArg, request: SendUnsignedTransactionParameters): Promise<SendUnsignedTransactionReturnType>;
|
70
70
|
|
71
71
|
type SetBalanceParameters = {
|
72
72
|
/** The account address. */
|
@@ -74,19 +74,19 @@ type SetBalanceParameters = {
|
|
74
74
|
/** Amount (in wei) to set */
|
75
75
|
value: bigint;
|
76
76
|
};
|
77
|
-
declare function setBalance(client:
|
77
|
+
declare function setBalance(client: TestClientArg, { address, value }: SetBalanceParameters): Promise<void>;
|
78
78
|
|
79
79
|
type SetBlockGasLimitParameters = {
|
80
80
|
/** Gas limit (in wei). */
|
81
81
|
gasLimit: bigint;
|
82
82
|
};
|
83
|
-
declare function setBlockGasLimit(client:
|
83
|
+
declare function setBlockGasLimit(client: TestClientArg, { gasLimit }: SetBlockGasLimitParameters): Promise<void>;
|
84
84
|
|
85
85
|
type SetBlockTimestampIntervalParameters = {
|
86
86
|
/** The interval (in seconds). */
|
87
87
|
interval: number;
|
88
88
|
};
|
89
|
-
declare function setBlockTimestampInterval(client:
|
89
|
+
declare function setBlockTimestampInterval(client: TestClientArg, { interval }: SetBlockTimestampIntervalParameters): Promise<void>;
|
90
90
|
|
91
91
|
type SetCodeParameters = {
|
92
92
|
/** The account address. */
|
@@ -94,37 +94,37 @@ type SetCodeParameters = {
|
|
94
94
|
/** The bytecode to set */
|
95
95
|
bytecode: Hex;
|
96
96
|
};
|
97
|
-
declare function setCode(client:
|
97
|
+
declare function setCode(client: TestClientArg, { address, bytecode }: SetCodeParameters): Promise<void>;
|
98
98
|
|
99
99
|
type SetCoinbaseParameters = {
|
100
100
|
/** The coinbase address. */
|
101
101
|
address: Address;
|
102
102
|
};
|
103
|
-
declare function setCoinbase(client:
|
103
|
+
declare function setCoinbase(client: TestClientArg, { address }: SetCoinbaseParameters): Promise<void>;
|
104
104
|
|
105
105
|
type SetIntervalMiningParameters = {
|
106
106
|
/** The mining interval. */
|
107
107
|
interval: number;
|
108
108
|
};
|
109
|
-
declare function setIntervalMining(client:
|
109
|
+
declare function setIntervalMining(client: TestClientArg, { interval }: SetIntervalMiningParameters): Promise<void>;
|
110
110
|
|
111
111
|
type SetMinGasPriceParameters = {
|
112
112
|
/** The gas price. */
|
113
113
|
gasPrice: bigint;
|
114
114
|
};
|
115
|
-
declare function setMinGasPrice(client:
|
115
|
+
declare function setMinGasPrice(client: TestClientArg, { gasPrice }: SetMinGasPriceParameters): Promise<void>;
|
116
116
|
|
117
117
|
type SetNextBlockBaseFeePerGasParameters = {
|
118
118
|
/** Base fee per gas (in wei). */
|
119
119
|
baseFeePerGas: bigint;
|
120
120
|
};
|
121
|
-
declare function setNextBlockBaseFeePerGas(client:
|
121
|
+
declare function setNextBlockBaseFeePerGas(client: TestClientArg, { baseFeePerGas }: SetNextBlockBaseFeePerGasParameters): Promise<void>;
|
122
122
|
|
123
123
|
type SetNextBlockTimestampParameters = {
|
124
124
|
/** The timestamp (in seconds). */
|
125
125
|
timestamp: bigint;
|
126
126
|
};
|
127
|
-
declare function setNextBlockTimestamp(client:
|
127
|
+
declare function setNextBlockTimestamp(client: TestClientArg, { timestamp }: SetNextBlockTimestampParameters): Promise<void>;
|
128
128
|
|
129
129
|
type SetNonceParameters = {
|
130
130
|
/** The account address. */
|
@@ -132,7 +132,7 @@ type SetNonceParameters = {
|
|
132
132
|
/** The nonce to set. */
|
133
133
|
nonce: number;
|
134
134
|
};
|
135
|
-
declare function setNonce(client:
|
135
|
+
declare function setNonce(client: TestClientArg, { address, nonce }: SetNonceParameters): Promise<void>;
|
136
136
|
|
137
137
|
type SetStorageAtParameters = {
|
138
138
|
/** The account address. */
|
@@ -142,16 +142,16 @@ type SetStorageAtParameters = {
|
|
142
142
|
/** The value to store as a 32 byte hex string. */
|
143
143
|
value: Hex;
|
144
144
|
};
|
145
|
-
declare function setStorageAt(client:
|
145
|
+
declare function setStorageAt(client: TestClientArg, { address, index, value }: SetStorageAtParameters): Promise<void>;
|
146
146
|
|
147
147
|
type StopImpersonatingAccountParameters = {
|
148
148
|
/** The account to impersonate. */
|
149
149
|
address: Address;
|
150
150
|
};
|
151
|
-
declare function stopImpersonatingAccount(client:
|
151
|
+
declare function stopImpersonatingAccount(client: TestClientArg, { address }: StopImpersonatingAccountParameters): Promise<void>;
|
152
152
|
|
153
153
|
type TestClientModes = 'anvil' | 'hardhat';
|
154
|
-
type TestClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain, TMode extends TestClientModes = TestClientModes> = {
|
154
|
+
type TestClientConfig<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain, TMode extends TestClientModes = TestClientModes> = {
|
155
155
|
chain?: ClientConfig<TTransport, TChain>['chain'];
|
156
156
|
/** The key of the client. */
|
157
157
|
key?: ClientConfig['key'];
|
@@ -163,15 +163,16 @@ type TestClientConfig<TTransport extends Transport = Transport, TChain extends C
|
|
163
163
|
pollingInterval?: ClientConfig['pollingInterval'];
|
164
164
|
transport: ClientConfig<TTransport, TChain>['transport'];
|
165
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>> & {
|
166
|
+
type TestClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain, TMode extends TestClientModes = TestClientModes, TIncludeActions extends boolean = true> = Client<TTransport, TChain, TestRequests<TMode>> & {
|
167
167
|
mode: TMode;
|
168
|
-
} & (TIncludeActions extends true ? TestActions
|
168
|
+
} & (TIncludeActions extends true ? TestActions : {});
|
169
|
+
type TestClientArg<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TMode extends TestClientModes = TestClientModes, TIncludeActions extends boolean = boolean> = TestClient<TTransport, TChain, TMode, TIncludeActions>;
|
169
170
|
/**
|
170
171
|
* @description Creates a test client with a given transport.
|
171
172
|
*/
|
172
|
-
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>;
|
173
|
+
declare function createTestClient<TTransport extends Transport, TChain extends Chain | undefined, TMode extends TestClientModes>({ chain, key, name, mode, pollingInterval, transport, }: TestClientConfig<TTransport, TChain, TMode>): TestClient<TTransport, TChain, TMode, true>;
|
173
174
|
|
174
|
-
type TestActions
|
175
|
+
type TestActions = {
|
175
176
|
dropTransaction: (args: DropTransactionParameters) => Promise<void>;
|
176
177
|
getAutomine: () => Promise<GetAutomineReturnType>;
|
177
178
|
getTxpoolContent: () => Promise<GetTxpoolContentReturnType>;
|
@@ -202,4 +203,4 @@ type TestActions<TChain extends Chain = Chain> = {
|
|
202
203
|
stopImpersonatingAccount: (args: StopImpersonatingAccountParameters) => Promise<void>;
|
203
204
|
};
|
204
205
|
|
205
|
-
export {
|
206
|
+
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, TestClientArg 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 {
|
2
|
-
export { D as DropTransactionParameters, I as ImpersonateAccountParameters,
|
3
|
-
import './chain-
|
1
|
+
import { b as TestClientArg } from './test-c70126a6.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-c70126a6.js';
|
3
|
+
import './chain-b2e88e30.js';
|
4
4
|
import '@wagmi/chains';
|
5
5
|
import 'abitype';
|
6
|
-
import './createClient-
|
7
|
-
import './eip1193-
|
6
|
+
import './createClient-d4f1dea1.js';
|
7
|
+
import './eip1193-cd3e872a.js';
|
8
8
|
|
9
|
-
declare function removeBlockTimestampInterval(client:
|
9
|
+
declare function removeBlockTimestampInterval(client: TestClientArg): Promise<void>;
|
10
10
|
|
11
|
-
declare function setAutomine(client:
|
11
|
+
declare function setAutomine(client: TestClientArg, enabled: boolean): Promise<void>;
|
12
12
|
|
13
|
-
declare function setLoggingEnabled(client:
|
13
|
+
declare function setLoggingEnabled(client: TestClientArg, enabled: boolean): Promise<void>;
|
14
14
|
|
15
|
-
declare function setRpcUrl(client:
|
15
|
+
declare function setRpcUrl(client: TestClientArg, jsonRpcUrl: string): Promise<void>;
|
16
16
|
|
17
|
-
declare function snapshot(client:
|
17
|
+
declare function snapshot(client: TestClientArg): 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 _chunk22BDIC7Jjs = require('./chunk-22BDIC7J.js');
|
31
31
|
|
32
32
|
|
33
33
|
|
@@ -57,5 +57,5 @@ var _chunkZTHR4YS2js = require('./chunk-ZTHR4YS2.js');
|
|
57
57
|
|
58
58
|
|
59
59
|
|
60
|
-
exports.dropTransaction =
|
60
|
+
exports.dropTransaction = _chunk22BDIC7Jjs.dropTransaction; exports.getAutomine = _chunk22BDIC7Jjs.getAutomine; exports.getTxpoolContent = _chunk22BDIC7Jjs.getTxpoolContent; exports.getTxpoolStatus = _chunk22BDIC7Jjs.getTxpoolStatus; exports.impersonateAccount = _chunk22BDIC7Jjs.impersonateAccount; exports.increaseTime = _chunk22BDIC7Jjs.increaseTime; exports.inspectTxpool = _chunk22BDIC7Jjs.inspectTxpool; exports.mine = _chunk22BDIC7Jjs.mine; exports.removeBlockTimestampInterval = _chunk22BDIC7Jjs.removeBlockTimestampInterval; exports.reset = _chunk22BDIC7Jjs.reset; exports.revert = _chunk22BDIC7Jjs.revert; exports.sendUnsignedTransaction = _chunk22BDIC7Jjs.sendUnsignedTransaction; exports.setAutomine = _chunk22BDIC7Jjs.setAutomine; exports.setBalance = _chunk22BDIC7Jjs.setBalance; exports.setBlockGasLimit = _chunk22BDIC7Jjs.setBlockGasLimit; exports.setBlockTimestampInterval = _chunk22BDIC7Jjs.setBlockTimestampInterval; exports.setCode = _chunk22BDIC7Jjs.setCode; exports.setCoinbase = _chunk22BDIC7Jjs.setCoinbase; exports.setIntervalMining = _chunk22BDIC7Jjs.setIntervalMining; exports.setLoggingEnabled = _chunk22BDIC7Jjs.setLoggingEnabled; exports.setMinGasPrice = _chunk22BDIC7Jjs.setMinGasPrice; exports.setNextBlockBaseFeePerGas = _chunk22BDIC7Jjs.setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = _chunk22BDIC7Jjs.setNextBlockTimestamp; exports.setNonce = _chunk22BDIC7Jjs.setNonce; exports.setRpcUrl = _chunk22BDIC7Jjs.setRpcUrl; exports.setStorageAt = _chunk22BDIC7Jjs.setStorageAt; exports.snapshot = _chunk22BDIC7Jjs.snapshot; exports.stopImpersonatingAccount = _chunk22BDIC7Jjs.stopImpersonatingAccount;
|
61
61
|
//# sourceMappingURL=test.js.map
|
package/dist/test.mjs
CHANGED
package/dist/utils/index.d.ts
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
import { Address } from 'abitype';
|
2
2
|
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
|
-
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-
|
8
|
-
export { G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, H as HttpOptions,
|
9
|
-
export { d as defineChain, g as getChainContractAddress } from '../chain-
|
10
|
-
import { C as CallParameters, E as EstimateGasParameters, S as SendTransactionParameters,
|
11
|
-
export { B as BlockFormatter, F as FormattedBlock, e as FormattedTransactionReceipt, f as FormattedTransactionRequest, T as TransactionReceiptFormatter, g as TransactionRequestFormatter, h as defineBlock, i as defineTransactionReceipt, j as defineTransactionRequest, k as formatBlock, l as formatTransactionRequest } from '../createPublicClient-
|
12
|
-
import { a2 as Formatter, C as Chain } from '../chain-
|
13
|
-
export { W as ExtractFormatter, X as Formatted, Y as FormattedTransaction, Z as TransactionFormatter,
|
3
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from '../getAbiItem-9d709e3b.js';
|
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-750c9055.js';
|
5
|
+
export { e as encodePacked } from '../encodePacked-de74201f.js';
|
6
|
+
export { a as formatAbiItem, f as formatAbiItemWithArgs } from '../formatAbiItem-fdbdda39.js';
|
7
|
+
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-b138c041.js';
|
8
|
+
export { G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, q as HashTypedDataParameters, r as HashTypedDataReturnType, H as HttpOptions, s as RecoverAddressParameters, t as RecoverAddressReturnType, u as RecoverMessageAddressParameters, v as RecoverMessageAddressReturnType, w as RecoverTypedDataAddressParameters, x as RecoverTypedDataAddressReturnType, R as RpcResponse, aK as Socket, y as ToRlpReturnType, V as VerifyMessageParameters, z as VerifyMessageReturnType, A as VerifyTypedDataParameters, D as VerifyTypedDataReturnType, J as boolToBytes, K as boolToHex, L as bytesToBigint, M as bytesToBool, O as bytesToHex, P as bytesToNumber, Q as bytesToString, S as concat, X as concatBytes, Y as concatHex, Z as formatEther, _ as formatGwei, $ as formatUnits, a0 as fromBytes, a1 as fromHex, a2 as fromRlp, a3 as getAccount, a4 as getAddress, a5 as getContractAddress, a6 as getContractError, a7 as getCreate2Address, a8 as getCreateAddress, a9 as getEventSelector, aa as getFunctionSelector, aL as getSocket, ab as hashMessage, ac as hashTypedData, ad as hexToBigInt, ae as hexToBool, af as hexToBytes, ag as hexToNumber, ah as hexToString, ai as isAddress, aj as isAddressEqual, ak as isBytes, al as isHex, am as keccak256, an as numberToBytes, ao as numberToHex, ap as pad, aq as padBytes, ar as padHex, aJ as parseAccount, as as parseEther, at as parseGwei, au as parseUnits, av as recoverAddress, aw as recoverMessageAddress, aN as recoverTypedDataAddress, aM as rpc, ax as size, ay as slice, az as sliceBytes, aA as sliceHex, aB as stringToBytes, aC as stringToHex, aD as stringify, aE as toBytes, aF as toHex, aG as toRlp, aH as trim, aI as verifyMessage, aO as verifyTypedData } from '../parseGwei-b138c041.js';
|
9
|
+
export { d as defineChain, g as getChainContractAddress } from '../chain-c4f924cf.js';
|
10
|
+
import { C as CallParameters, E as EstimateGasParameters, S as SendTransactionParameters, b7 as WalletClientArg, b8 as PublicClientArg } from '../createPublicClient-3a714a8d.js';
|
11
|
+
export { B as BlockFormatter, F as FormattedBlock, e as FormattedTransactionReceipt, f as FormattedTransactionRequest, T as TransactionReceiptFormatter, g as TransactionRequestFormatter, h as defineBlock, i as defineTransactionReceipt, j as defineTransactionRequest, k as formatBlock, l as formatTransactionRequest } from '../createPublicClient-3a714a8d.js';
|
12
|
+
import { a2 as Formatter, C as Chain } from '../chain-b2e88e30.js';
|
13
|
+
export { W as ExtractFormatter, X as Formatted, Y as FormattedTransaction, Z as TransactionFormatter, ad as defineFormatter, _ as defineTransaction, ae as format, $ as formatTransaction, a0 as transactionType } from '../chain-b2e88e30.js';
|
14
|
+
import { A as Account, G as GetAccountParameter } from '../account-07d04222.js';
|
15
|
+
import { a as Transport } from '../createClient-d4f1dea1.js';
|
14
16
|
import 'isomorphic-ws';
|
15
|
-
import '../eip1193-
|
16
|
-
import '../createClient-a28317a9.js';
|
17
|
+
import '../eip1193-cd3e872a.js';
|
17
18
|
import '@wagmi/chains';
|
18
19
|
|
19
20
|
declare function buildRequest<TRequest extends (args: any) => Promise<any>>(request: TRequest, { retryDelay, retryCount, }?: {
|
@@ -46,7 +47,8 @@ declare function getCallError(err: BaseError, { docsPath, ...args }: CallParamet
|
|
46
47
|
docsPath?: string;
|
47
48
|
}): CallExecutionError;
|
48
49
|
|
49
|
-
declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: EstimateGasParameters & {
|
50
|
+
declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: Omit<EstimateGasParameters, 'account'> & {
|
51
|
+
account?: Account;
|
50
52
|
chain?: Chain;
|
51
53
|
docsPath?: string;
|
52
54
|
}): EstimateGasExecutionError;
|
@@ -54,7 +56,9 @@ declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: Esti
|
|
54
56
|
declare function containsNodeError(err: BaseError): boolean;
|
55
57
|
declare function getNodeError(err: BaseError, args: Partial<SendTransactionParameters<any>>): ExecutionRevertedError | FeeCapTooHighError | FeeCapTooLowError | NonceTooHighError | NonceTooLowError | NonceMaxValueError | InsufficientFundsError | IntrinsicGasTooHighError | IntrinsicGasTooLowError | TransactionTypeNotSupportedError | TipAboveFeeCapError | UnknownNodeError;
|
56
58
|
|
57
|
-
declare function getTransactionError(err: BaseError, { docsPath, ...args }: SendTransactionParameters & {
|
59
|
+
declare function getTransactionError(err: BaseError, { docsPath, ...args }: Omit<SendTransactionParameters, 'account' | 'chain'> & {
|
60
|
+
account: Account;
|
61
|
+
chain?: Chain;
|
58
62
|
docsPath?: string;
|
59
63
|
}): TransactionExecutionError;
|
60
64
|
|
@@ -64,8 +68,14 @@ declare const integerRegex: RegExp;
|
|
64
68
|
|
65
69
|
declare function assertRequest(args: Partial<SendTransactionParameters<Chain>>): void;
|
66
70
|
|
67
|
-
type PrepareRequestParameters<
|
68
|
-
|
71
|
+
type PrepareRequestParameters<TAccount extends Account | undefined = undefined> = GetAccountParameter<TAccount> & {
|
72
|
+
gas?: SendTransactionParameters['gas'];
|
73
|
+
gasPrice?: SendTransactionParameters['gasPrice'];
|
74
|
+
maxFeePerGas?: SendTransactionParameters['maxFeePerGas'];
|
75
|
+
maxPriorityFeePerGas?: SendTransactionParameters['maxPriorityFeePerGas'];
|
76
|
+
nonce?: SendTransactionParameters['nonce'];
|
77
|
+
};
|
78
|
+
type PrepareRequestReturnType<TAccount extends Account | undefined = undefined, TParameters extends PrepareRequestParameters<TAccount> = PrepareRequestParameters<TAccount>> = TParameters & {
|
69
79
|
from: Address;
|
70
80
|
gas: SendTransactionParameters['gas'];
|
71
81
|
gasPrice?: SendTransactionParameters['gasPrice'];
|
@@ -73,6 +83,6 @@ type PrepareRequestReturnType<TParameters extends SendTransactionParameters = Se
|
|
73
83
|
maxPriorityFeePerGas?: SendTransactionParameters['maxPriorityFeePerGas'];
|
74
84
|
nonce: SendTransactionParameters['nonce'];
|
75
85
|
};
|
76
|
-
declare function prepareRequest<TParameters extends
|
86
|
+
declare function prepareRequest<TAccount extends Account | undefined, TParameters extends PrepareRequestParameters<TAccount>, TChain extends Chain | undefined>(client: WalletClientArg<Transport, TChain, TAccount> | PublicClientArg<Transport, TChain>, args: TParameters): Promise<PrepareRequestReturnType<TAccount, TParameters>>;
|
77
87
|
|
78
88
|
export { arrayRegex, assertRequest, buildRequest, bytesRegex, containsNodeError, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType, getCallError, getEstimateGasError, getNodeError, getTransactionError, integerRegex, prepareRequest };
|