viem 0.2.0-jxom-local-accounts.20230321T212822 → 0.2.0-main.20230323T084936
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/{chain-75b0942e.d.ts → chain-1b53ef88.d.ts} +48 -53
- package/dist/{chain-f8db473f.d.ts → chain-ec8c485d.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-NJSAEA2H.js → chunk-BHAAXXGO.js} +154 -461
- package/dist/chunk-BHAAXXGO.js.map +1 -0
- package/dist/{chunk-IVRML3IK.mjs → chunk-FOJL5WVL.mjs} +85 -392
- package/dist/chunk-FOJL5WVL.mjs.map +1 -0
- package/dist/{chunk-6UKHPIXX.mjs → chunk-R7WEI5MQ.mjs} +2 -2
- package/dist/chunk-R7WEI5MQ.mjs.map +1 -0
- package/dist/{chunk-LYQKHD7R.js → chunk-ZIT7BMZO.js} +19 -19
- package/dist/{chunk-LYQKHD7R.js.map → chunk-ZIT7BMZO.js.map} +1 -1
- package/dist/contract.d.ts +7 -9
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createClient-f87255c1.d.ts → createClient-a28317a9.d.ts} +6 -6
- package/dist/{createPublicClient-d2c37c92.d.ts → createPublicClient-75540130.d.ts} +206 -160
- package/dist/{eip1193-ae706fd8.d.ts → eip1193-4f4e240c.d.ts} +1 -1
- package/dist/{encodeFunctionResult-4792a6a3.d.ts → encodeFunctionResult-1f324375.d.ts} +1 -1
- package/dist/{encodePacked-3fcdd54b.d.ts → encodePacked-d5d5264a.d.ts} +1 -1
- package/dist/ens.d.ts +4 -6
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/ethers.d.ts +6 -5
- package/dist/ethers.js +5 -7
- package/dist/ethers.js.map +1 -1
- package/dist/ethers.mjs +5 -7
- package/dist/ethers.mjs.map +1 -1
- package/dist/{formatAbiItem-765ebc53.d.ts → formatAbiItem-15e8817d.d.ts} +1 -1
- package/dist/{getAbiItem-693e6e1b.d.ts → getAbiItem-3e809ff9.d.ts} +1 -1
- package/dist/index.d.ts +13 -15
- package/dist/index.js +91 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -13
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-377678bc.d.ts → parseGwei-6fff7cbe.d.ts} +13 -49
- package/dist/public.d.ts +4 -6
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/{test-98c0b642.d.ts → test-2bd23d7e.d.ts} +32 -33
- 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 +18 -30
- package/dist/utils/index.js +2 -10
- package/dist/utils/index.mjs +5 -13
- package/dist/wallet.d.ts +4 -6
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/window.d.ts +2 -2
- package/package.json +1 -9
- package/accounts/package.json +0 -4
- package/dist/accounts/index.d.ts +0 -33
- package/dist/accounts/index.js +0 -89
- package/dist/accounts/index.js.map +0 -1
- package/dist/accounts/index.mjs +0 -89
- package/dist/accounts/index.mjs.map +0 -1
- package/dist/chunk-6UKHPIXX.mjs.map +0 -1
- package/dist/chunk-FNVFGFWN.mjs +0 -31
- package/dist/chunk-FNVFGFWN.mjs.map +0 -1
- package/dist/chunk-FQM5MF6U.js +0 -31
- package/dist/chunk-FQM5MF6U.js.map +0 -1
- package/dist/chunk-IVRML3IK.mjs.map +0 -1
- package/dist/chunk-NJSAEA2H.js.map +0 -1
- package/dist/parseAccount-2d7ea01d.d.ts +0 -6
- package/dist/typedData-ade018d6.d.ts +0 -93
@@ -1,10 +1,11 @@
|
|
1
|
-
import { Address, Abi
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { a as DecodeErrorResultReturnType } from './encodeFunctionResult-4792a6a3.js';
|
1
|
+
import { Address, Abi } from 'abitype';
|
2
|
+
import { L as LocalAccount, A as Account, C as CallParameters, E as EstimateGasParameters, S as SendTransactionParameters } from './createPublicClient-75540130.js';
|
3
|
+
import { B as ByteArray, H as Hex, C as Chain, a as Hash, f as BlockTag, aa as EventDefinition } from './chain-1b53ef88.js';
|
4
|
+
import { a as DecodeErrorResultReturnType } from './encodeFunctionResult-1f324375.js';
|
6
5
|
import WebSocket from 'isomorphic-ws';
|
7
6
|
|
7
|
+
declare function getAccount(account: Address | Omit<LocalAccount, 'type'>): Account;
|
8
|
+
|
8
9
|
declare function getAddress(address: string): Address;
|
9
10
|
|
10
11
|
type GetCreateAddressOptions = {
|
@@ -193,7 +194,6 @@ declare function fromRlp<TTo extends 'bytes' | 'hex'>(value: ByteArray | Hex, to
|
|
193
194
|
|
194
195
|
type BaseErrorParameters = {
|
195
196
|
docsPath?: string;
|
196
|
-
docsSlug?: string;
|
197
197
|
metaMessages?: string[];
|
198
198
|
} & ({
|
199
199
|
cause?: never;
|
@@ -214,7 +214,7 @@ declare class BaseError extends Error {
|
|
214
214
|
declare class CallExecutionError extends BaseError {
|
215
215
|
cause: BaseError;
|
216
216
|
name: string;
|
217
|
-
constructor(cause: BaseError, { account
|
217
|
+
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: CallParameters & {
|
218
218
|
chain?: Chain;
|
219
219
|
docsPath?: string;
|
220
220
|
});
|
@@ -267,8 +267,7 @@ declare class RawContractError extends BaseError {
|
|
267
267
|
declare class EstimateGasExecutionError extends BaseError {
|
268
268
|
cause: BaseError;
|
269
269
|
name: string;
|
270
|
-
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }:
|
271
|
-
account?: Account;
|
270
|
+
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: EstimateGasParameters & {
|
272
271
|
chain?: Chain;
|
273
272
|
docsPath?: string;
|
274
273
|
});
|
@@ -381,9 +380,7 @@ declare class UnknownNodeError extends BaseError {
|
|
381
380
|
declare class TransactionExecutionError extends BaseError {
|
382
381
|
cause: BaseError;
|
383
382
|
name: string;
|
384
|
-
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }:
|
385
|
-
account: Account;
|
386
|
-
chain?: Chain;
|
383
|
+
constructor(cause: BaseError, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }: SendTransactionParameters & {
|
387
384
|
docsPath?: string;
|
388
385
|
});
|
389
386
|
}
|
@@ -492,37 +489,19 @@ type To = 'hex' | 'bytes';
|
|
492
489
|
type HashMessage<TTo extends To> = (TTo extends 'bytes' ? ByteArray : never) | (TTo extends 'hex' ? Hex : never);
|
493
490
|
declare function hashMessage<TTo extends To = 'hex'>(message: string, to_?: TTo): HashMessage<TTo>;
|
494
491
|
|
495
|
-
type HashTypedDataParameters<TTypedData extends TypedData | {
|
496
|
-
[key: string]: unknown;
|
497
|
-
} = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType>;
|
498
|
-
type HashTypedDataReturnType = Hex;
|
499
|
-
declare function hashTypedData<TTypedData extends TypedData | {
|
500
|
-
[key: string]: unknown;
|
501
|
-
}, TPrimaryType extends string = string>({ domain: domain_, message, primaryType, types: types_, }: HashTypedDataParameters<TTypedData, TPrimaryType>): HashTypedDataReturnType;
|
502
|
-
|
503
492
|
type RecoverAddressParameters = {
|
504
493
|
hash: Hex | ByteArray;
|
505
494
|
signature: Hex | ByteArray;
|
506
495
|
};
|
507
496
|
type RecoverAddressReturnType = Address;
|
508
|
-
declare function recoverAddress({ hash, signature, }: RecoverAddressParameters):
|
497
|
+
declare function recoverAddress({ hash, signature, }: RecoverAddressParameters): RecoverAddressReturnType;
|
509
498
|
|
510
499
|
type RecoverMessageAddressParameters = {
|
511
500
|
message: string;
|
512
501
|
signature: Hex | ByteArray;
|
513
502
|
};
|
514
503
|
type RecoverMessageAddressReturnType = Address;
|
515
|
-
declare function recoverMessageAddress({ message, signature, }: RecoverMessageAddressParameters):
|
516
|
-
|
517
|
-
type RecoverTypedDataAddressParameters<TTypedData extends TypedData | {
|
518
|
-
[key: string]: unknown;
|
519
|
-
} = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType> & {
|
520
|
-
signature: Hex | ByteArray;
|
521
|
-
};
|
522
|
-
type RecoverTypedDataAddressReturnType = Address;
|
523
|
-
declare function recoverTypedDataAddress<TTypedData extends TypedData | {
|
524
|
-
[key: string]: unknown;
|
525
|
-
}, TPrimaryType extends string = string>({ domain, message, primaryType, signature, types, }: RecoverTypedDataAddressParameters<TTypedData, TPrimaryType>): Promise<RecoverTypedDataAddressReturnType>;
|
504
|
+
declare function recoverMessageAddress({ message, signature, }: RecoverMessageAddressParameters): RecoverMessageAddressReturnType;
|
526
505
|
|
527
506
|
type VerifyMessageParameters = {
|
528
507
|
address: Address;
|
@@ -530,25 +509,10 @@ type VerifyMessageParameters = {
|
|
530
509
|
signature: Hex | ByteArray;
|
531
510
|
};
|
532
511
|
type VerifyMessageReturnType = boolean;
|
533
|
-
declare function verifyMessage({ address, message, signature, }: VerifyMessageParameters):
|
534
|
-
|
535
|
-
type VerifyTypedDataParameters<TTypedData extends TypedData | {
|
536
|
-
[key: string]: unknown;
|
537
|
-
} = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType> & {
|
538
|
-
address: Address;
|
539
|
-
signature: Hex | ByteArray;
|
540
|
-
};
|
541
|
-
type VerifyTypedDataReturnType = boolean;
|
542
|
-
declare function verifyTypedData<TTypedData extends TypedData | {
|
543
|
-
[key: string]: unknown;
|
544
|
-
}, TPrimaryType extends string = string>({ address, domain, message, primaryType, signature, types, }: VerifyTypedDataParameters<TTypedData, TPrimaryType>): Promise<VerifyTypedDataReturnType>;
|
512
|
+
declare function verifyMessage({ address, message, signature, }: VerifyMessageParameters): VerifyMessageReturnType;
|
545
513
|
|
546
514
|
declare const stringify: typeof JSON.stringify;
|
547
515
|
|
548
|
-
declare function validateTypedData<TTypedData extends TypedData | {
|
549
|
-
[key: string]: unknown;
|
550
|
-
}, TPrimaryType extends string = string>({ domain, message, primaryType, types: types_, }: TypedDataDefinition<TTypedData, TPrimaryType>): void;
|
551
|
-
|
552
516
|
declare function formatEther(wei: bigint, unit?: 'wei' | 'gwei'): string;
|
553
517
|
|
554
518
|
declare function formatGwei(wei: bigint, unit?: 'wei'): string;
|
@@ -561,4 +525,4 @@ declare function parseEther(ether: `${number}`, unit?: 'wei' | 'gwei'): bigint;
|
|
561
525
|
|
562
526
|
declare function parseGwei(ether: `${number}`, unit?: 'wei'): bigint;
|
563
527
|
|
564
|
-
export {
|
528
|
+
export { hashMessage as $, concatHex as A, BaseError as B, CallExecutionError as C, formatEther as D, EstimateGasExecutionError as E, FeeCapTooHighError as F, GetContractAddressOptions as G, HttpOptions as H, InsufficientFundsError as I, formatGwei as J, formatUnits as K, fromBytes as L, fromHex as M, NonceMaxValueError as N, fromRlp as O, getAccount as P, getAddress as Q, RpcResponse as R, getContractAddress as S, TipAboveFeeCapError as T, UnknownNodeError as U, getContractError as V, WaitForTransactionReceiptTimeoutError as W, getCreate2Address as X, getCreateAddress as Y, getEventSelector as Z, getFunctionSelector as _, ContractFunctionExecutionError as a, hexToBigInt as a0, hexToBool as a1, hexToBytes as a2, hexToNumber as a3, hexToString as a4, isAddress as a5, isAddressEqual as a6, isBytes as a7, isHex as a8, keccak256 as a9, RecoverAddressReturnType as aA, RecoverMessageAddressParameters as aB, RecoverMessageAddressReturnType as aC, VerifyMessageParameters as aD, VerifyMessageReturnType as aE, numberToBytes as aa, numberToHex as ab, pad as ac, padBytes as ad, padHex as ae, parseEther as af, parseGwei as ag, parseUnits as ah, recoverAddress as ai, recoverMessageAddress as aj, size as ak, slice as al, sliceBytes as am, sliceHex as an, stringToBytes as ao, stringToHex as ap, stringify as aq, toBytes as ar, toHex as as, toRlp as at, trim as au, verifyMessage as av, Socket as aw, getSocket as ax, rpc as ay, RecoverAddressParameters 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, ToRlpReturnType as q, boolToBytes as r, boolToHex as s, bytesToBigint as t, bytesToBool as u, bytesToHex as v, bytesToNumber as w, bytesToString as x, concat as y, concatBytes as z };
|
package/dist/public.d.ts
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
export { C as CallParameters,
|
2
|
-
import './eip1193-
|
1
|
+
export { C as CallParameters, au as CallReturnType, av as CreateBlockFilterReturnType, aw as CreateEventFilterParameters, ax as CreateEventFilterReturnType, ay as CreatePendingTransactionFilterReturnType, E as EstimateGasParameters, az as EstimateGasReturnType, aA as GetBalanceParameters, aB as GetBalanceReturnType, aD as GetBlockNumberParameters, aE as GetBlockNumberReturnType, aC as GetBlockParameters, aF as GetBlockReturnType, aG as GetBlockTransactionCountParameters, aH as GetBlockTransactionCountReturnType, G as GetBytecodeParameters, q as GetBytecodeReturnType, aI as GetFeeHistoryParameters, aJ as GetFeeHistoryReturnType, aK as GetFilterChangesParameters, aL as GetFilterChangesReturnType, aM as GetFilterLogsParameters, aN as GetFilterLogsReturnType, aO as GetGasPriceReturnType, aQ as GetTransactionConfirmationsParameters, aR as GetTransactionConfirmationsReturnType, aS as GetTransactionCountParameters, aT as GetTransactionCountReturnType, aP as GetTransactionParameters, aU as GetTransactionReceiptParameters, aV as GetTransactionReceiptReturnType, aW as GetTransactionReturnType, aX as OnBlock, aY as OnBlockNumberFn, aZ as OnBlockNumberParameter, a_ as OnBlockParameter, O as OnLogsFn, u as OnLogsParameter, a$ as OnTransactionsFn, b0 as OnTransactionsParameter, b1 as ReplacementReason, b2 as ReplacementReturnType, b3 as UninstallFilterParameters, b4 as UninstallFilterReturnType, b5 as WaitForTransactionReceiptParameters, b6 as WaitForTransactionReceiptReturnType, b7 as WatchBlockNumberParameters, b8 as WatchBlocksParameters, b9 as WatchPendingTransactionsParameters, a4 as call, a5 as createBlockFilter, a6 as createEventFilter, a7 as createPendingTransactionFilter, a8 as estimateGas, a9 as getBalance, aa as getBlock, ab as getBlockNumber, ac as getBlockNumberCache, ad as getBlockTransactionCount, H as getBytecode, ae as getChainId, af as getFeeHistory, ag as getFilterChanges, ah as getFilterLogs, aj as getGasPrice, ai as getLogs, ak as getTransaction, al as getTransactionConfirmations, am as getTransactionCount, an as getTransactionReceipt, ao as uninstallFilter, ap as waitForTransactionReceipt, aq as watchBlockNumber, ar as watchBlocks, as as watchEvent, at as watchPendingTransactions } from './createPublicClient-75540130.js';
|
2
|
+
import './eip1193-4f4e240c.js';
|
3
3
|
import 'abitype';
|
4
|
-
import './chain-
|
4
|
+
import './chain-1b53ef88.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import './createClient-
|
7
|
-
import './typedData-ade018d6.js';
|
8
|
-
import '@scure/bip32';
|
6
|
+
import './createClient-a28317a9.js';
|
package/dist/public.js
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
var
|
29
|
+
var _chunkBHAAXXGOjs = require('./chunk-BHAAXXGO.js');
|
30
30
|
|
31
31
|
|
32
32
|
|
@@ -55,5 +55,5 @@ var _chunkNJSAEA2Hjs = require('./chunk-NJSAEA2H.js');
|
|
55
55
|
|
56
56
|
|
57
57
|
|
58
|
-
exports.call =
|
58
|
+
exports.call = _chunkBHAAXXGOjs.call; exports.createBlockFilter = _chunkBHAAXXGOjs.createBlockFilter; exports.createEventFilter = _chunkBHAAXXGOjs.createEventFilter; exports.createPendingTransactionFilter = _chunkBHAAXXGOjs.createPendingTransactionFilter; exports.estimateGas = _chunkBHAAXXGOjs.estimateGas; exports.getBalance = _chunkBHAAXXGOjs.getBalance; exports.getBlock = _chunkBHAAXXGOjs.getBlock; exports.getBlockNumber = _chunkBHAAXXGOjs.getBlockNumber; exports.getBlockNumberCache = _chunkBHAAXXGOjs.getBlockNumberCache; exports.getBlockTransactionCount = _chunkBHAAXXGOjs.getBlockTransactionCount; exports.getBytecode = _chunkBHAAXXGOjs.getBytecode; exports.getChainId = _chunkBHAAXXGOjs.getChainId; exports.getFeeHistory = _chunkBHAAXXGOjs.getFeeHistory; exports.getFilterChanges = _chunkBHAAXXGOjs.getFilterChanges; exports.getFilterLogs = _chunkBHAAXXGOjs.getFilterLogs; exports.getGasPrice = _chunkBHAAXXGOjs.getGasPrice; exports.getLogs = _chunkBHAAXXGOjs.getLogs; exports.getTransaction = _chunkBHAAXXGOjs.getTransaction; exports.getTransactionConfirmations = _chunkBHAAXXGOjs.getTransactionConfirmations; exports.getTransactionCount = _chunkBHAAXXGOjs.getTransactionCount; exports.getTransactionReceipt = _chunkBHAAXXGOjs.getTransactionReceipt; exports.uninstallFilter = _chunkBHAAXXGOjs.uninstallFilter; exports.waitForTransactionReceipt = _chunkBHAAXXGOjs.waitForTransactionReceipt; exports.watchBlockNumber = _chunkBHAAXXGOjs.watchBlockNumber; exports.watchBlocks = _chunkBHAAXXGOjs.watchBlocks; exports.watchEvent = _chunkBHAAXXGOjs.watchEvent; exports.watchPendingTransactions = _chunkBHAAXXGOjs.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, a9 as Quantity, I as TransactionRequest, H as Hex, C as Chain } from './chain-1b53ef88.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-a28317a9.js';
|
3
|
+
import { T as TestRequests } from './eip1193-4f4e240c.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: TestClient, { hash }: DropTransactionParameters): Promise<void>;
|
11
11
|
|
12
12
|
type GetAutomineReturnType = boolean;
|
13
|
-
declare function getAutomine(client:
|
13
|
+
declare function getAutomine(client: TestClient): 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: TestClient): 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: TestClient): 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: TestClient, { 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: TestClient, { 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: TestClient): 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { 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: TestClient, { address }: StopImpersonatingAccountParameters): Promise<void>;
|
152
152
|
|
153
153
|
type TestClientModes = 'anvil' | 'hardhat';
|
154
|
-
type TestClientConfig<TTransport extends Transport = Transport, TChain extends Chain
|
154
|
+
type TestClientConfig<TTransport extends Transport = Transport, TChain extends Chain = 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,16 +163,15 @@ 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
|
166
|
+
type TestClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TMode extends TestClientModes = TestClientModes, TIncludeActions extends boolean = true> = Client<TTransport, TChain, TestRequests<TMode>> & {
|
167
167
|
mode: TMode;
|
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>;
|
168
|
+
} & (TIncludeActions extends true ? TestActions<TChain> : {});
|
170
169
|
/**
|
171
170
|
* @description Creates a test client with a given transport.
|
172
171
|
*/
|
173
|
-
declare function createTestClient<TTransport extends Transport, TChain extends Chain
|
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>;
|
174
173
|
|
175
|
-
type TestActions = {
|
174
|
+
type TestActions<TChain extends Chain = Chain> = {
|
176
175
|
dropTransaction: (args: DropTransactionParameters) => Promise<void>;
|
177
176
|
getAutomine: () => Promise<GetAutomineReturnType>;
|
178
177
|
getTxpoolContent: () => Promise<GetTxpoolContentReturnType>;
|
@@ -203,4 +202,4 @@ type TestActions = {
|
|
203
202
|
stopImpersonatingAccount: (args: StopImpersonatingAccountParameters) => Promise<void>;
|
204
203
|
};
|
205
204
|
|
206
|
-
export {
|
205
|
+
export { RevertParameters as A, SendUnsignedTransactionReturnType as B, SetBalanceParameters as C, DropTransactionParameters as D, SetBlockGasLimitParameters as E, SetBlockTimestampIntervalParameters as F, SetCodeParameters as G, SetCoinbaseParameters as H, ImpersonateAccountParameters as I, SetIntervalMiningParameters as J, SetMinGasPriceParameters as K, SetNextBlockBaseFeePerGasParameters as L, MineParameters as M, SetNextBlockTimestampParameters as N, SetNonceParameters as O, SetStorageAtParameters as P, StopImpersonatingAccountParameters as Q, ResetParameters as R, SendUnsignedTransactionParameters as S, TestClient as T, TestClientConfig as a, getTxpoolContent as b, createTestClient as c, dropTransaction as d, getTxpoolStatus as e, increaseTime as f, getAutomine as g, inspectTxpool as h, impersonateAccount as i, revert as j, setBalance as k, setBlockGasLimit as l, mine as m, setBlockTimestampInterval as n, setCode as o, setCoinbase as p, setIntervalMining as q, reset as r, sendUnsignedTransaction as s, setMinGasPrice as t, setNextBlockBaseFeePerGas as u, setNextBlockTimestamp as v, setNonce as w, setStorageAt as x, stopImpersonatingAccount as y, IncreaseTimeParameters 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 { T as TestClient } from './test-2bd23d7e.js';
|
2
|
+
export { D as DropTransactionParameters, I as ImpersonateAccountParameters, z as IncreaseTimeParameters, M as MineParameters, R as ResetParameters, A as RevertParameters, S as SendUnsignedTransactionParameters, B as SendUnsignedTransactionReturnType, C as SetBalanceParameters, E as SetBlockGasLimitParameters, F as SetBlockTimestampIntervalParameters, G as SetCodeParameters, H as SetCoinbaseParameters, J as SetIntervalMiningParameters, K as SetMinGasPriceParameters, L as SetNextBlockBaseFeePerGasParameters, N as SetNextBlockTimestampParameters, O as SetNonceParameters, P as SetStorageAtParameters, Q as StopImpersonatingAccountParameters, d as dropTransaction, g as getAutomine, b as getTxpoolContent, e as getTxpoolStatus, i as impersonateAccount, f as increaseTime, h as inspectTxpool, m as mine, r as reset, j as revert, s as sendUnsignedTransaction, k as setBalance, l as setBlockGasLimit, n as setBlockTimestampInterval, o as setCode, p as setCoinbase, q as setIntervalMining, t as setMinGasPrice, u as setNextBlockBaseFeePerGas, v as setNextBlockTimestamp, w as setNonce, x as setStorageAt, y as stopImpersonatingAccount } from './test-2bd23d7e.js';
|
3
|
+
import './chain-1b53ef88.js';
|
4
4
|
import '@wagmi/chains';
|
5
5
|
import 'abitype';
|
6
|
-
import './createClient-
|
7
|
-
import './eip1193-
|
6
|
+
import './createClient-a28317a9.js';
|
7
|
+
import './eip1193-4f4e240c.js';
|
8
8
|
|
9
|
-
declare function removeBlockTimestampInterval(client:
|
9
|
+
declare function removeBlockTimestampInterval(client: TestClient): Promise<void>;
|
10
10
|
|
11
|
-
declare function setAutomine(client:
|
11
|
+
declare function setAutomine(client: TestClient, enabled: boolean): Promise<void>;
|
12
12
|
|
13
|
-
declare function setLoggingEnabled(client:
|
13
|
+
declare function setLoggingEnabled(client: TestClient, enabled: boolean): Promise<void>;
|
14
14
|
|
15
|
-
declare function setRpcUrl(client:
|
15
|
+
declare function setRpcUrl(client: TestClient, jsonRpcUrl: string): Promise<void>;
|
16
16
|
|
17
|
-
declare function snapshot(client:
|
17
|
+
declare function snapshot(client: TestClient): 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 _chunkBHAAXXGOjs = require('./chunk-BHAAXXGO.js');
|
31
31
|
|
32
32
|
|
33
33
|
|
@@ -57,5 +57,5 @@ var _chunkNJSAEA2Hjs = require('./chunk-NJSAEA2H.js');
|
|
57
57
|
|
58
58
|
|
59
59
|
|
60
|
-
exports.dropTransaction =
|
60
|
+
exports.dropTransaction = _chunkBHAAXXGOjs.dropTransaction; exports.getAutomine = _chunkBHAAXXGOjs.getAutomine; exports.getTxpoolContent = _chunkBHAAXXGOjs.getTxpoolContent; exports.getTxpoolStatus = _chunkBHAAXXGOjs.getTxpoolStatus; exports.impersonateAccount = _chunkBHAAXXGOjs.impersonateAccount; exports.increaseTime = _chunkBHAAXXGOjs.increaseTime; exports.inspectTxpool = _chunkBHAAXXGOjs.inspectTxpool; exports.mine = _chunkBHAAXXGOjs.mine; exports.removeBlockTimestampInterval = _chunkBHAAXXGOjs.removeBlockTimestampInterval; exports.reset = _chunkBHAAXXGOjs.reset; exports.revert = _chunkBHAAXXGOjs.revert; exports.sendUnsignedTransaction = _chunkBHAAXXGOjs.sendUnsignedTransaction; exports.setAutomine = _chunkBHAAXXGOjs.setAutomine; exports.setBalance = _chunkBHAAXXGOjs.setBalance; exports.setBlockGasLimit = _chunkBHAAXXGOjs.setBlockGasLimit; exports.setBlockTimestampInterval = _chunkBHAAXXGOjs.setBlockTimestampInterval; exports.setCode = _chunkBHAAXXGOjs.setCode; exports.setCoinbase = _chunkBHAAXXGOjs.setCoinbase; exports.setIntervalMining = _chunkBHAAXXGOjs.setIntervalMining; exports.setLoggingEnabled = _chunkBHAAXXGOjs.setLoggingEnabled; exports.setMinGasPrice = _chunkBHAAXXGOjs.setMinGasPrice; exports.setNextBlockBaseFeePerGas = _chunkBHAAXXGOjs.setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = _chunkBHAAXXGOjs.setNextBlockTimestamp; exports.setNonce = _chunkBHAAXXGOjs.setNonce; exports.setRpcUrl = _chunkBHAAXXGOjs.setRpcUrl; exports.setStorageAt = _chunkBHAAXXGOjs.setStorageAt; exports.snapshot = _chunkBHAAXXGOjs.snapshot; exports.stopImpersonatingAccount = _chunkBHAAXXGOjs.stopImpersonatingAccount;
|
61
61
|
//# sourceMappingURL=test.js.map
|
package/dist/test.mjs
CHANGED
package/dist/utils/index.d.ts
CHANGED
@@ -1,23 +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
|
-
|
8
|
-
|
9
|
-
export {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
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-75b0942e.js';
|
15
|
-
import { A as Account } from '../typedData-ade018d6.js';
|
16
|
-
import { a as Transport } from '../createClient-f87255c1.js';
|
3
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from '../getAbiItem-3e809ff9.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-1f324375.js';
|
5
|
+
export { e as encodePacked } from '../encodePacked-d5d5264a.js';
|
6
|
+
export { a as formatAbiItem, f as formatAbiItemWithArgs } from '../formatAbiItem-15e8817d.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-6fff7cbe.js';
|
8
|
+
export { G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, H as HttpOptions, az as RecoverAddressParameters, aA as RecoverAddressReturnType, aB as RecoverMessageAddressParameters, aC as RecoverMessageAddressReturnType, R as RpcResponse, aw as Socket, q as ToRlpReturnType, aD as VerifyMessageParameters, aE as VerifyMessageReturnType, r as boolToBytes, s as boolToHex, t as bytesToBigint, u as bytesToBool, v as bytesToHex, w as bytesToNumber, x as bytesToString, y as concat, z as concatBytes, A as concatHex, D as formatEther, J as formatGwei, K as formatUnits, L as fromBytes, M as fromHex, O as fromRlp, P as getAccount, Q as getAddress, S as getContractAddress, V as getContractError, X as getCreate2Address, Y as getCreateAddress, Z as getEventSelector, _ as getFunctionSelector, ax as getSocket, $ as hashMessage, a0 as hexToBigInt, a1 as hexToBool, a2 as hexToBytes, a3 as hexToNumber, a4 as hexToString, a5 as isAddress, a6 as isAddressEqual, a7 as isBytes, a8 as isHex, a9 as keccak256, aa as numberToBytes, ab as numberToHex, ac as pad, ad as padBytes, ae as padHex, af as parseEther, ag as parseGwei, ah as parseUnits, ai as recoverAddress, aj as recoverMessageAddress, ay as rpc, ak as size, al as slice, am as sliceBytes, an as sliceHex, ao as stringToBytes, ap as stringToHex, aq as stringify, ar as toBytes, as as toHex, at as toRlp, au as trim, av as verifyMessage } from '../parseGwei-6fff7cbe.js';
|
9
|
+
export { d as defineChain, g as getChainContractAddress } from '../chain-ec8c485d.js';
|
10
|
+
import { C as CallParameters, E as EstimateGasParameters, S as SendTransactionParameters, W as WalletClient, P as PublicClient } from '../createPublicClient-75540130.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-75540130.js';
|
12
|
+
import { a2 as Formatter, C as Chain } from '../chain-1b53ef88.js';
|
13
|
+
export { W as ExtractFormatter, X as Formatted, Y as FormattedTransaction, Z as TransactionFormatter, ac as defineFormatter, _ as defineTransaction, ad as format, $ as formatTransaction, a0 as transactionType } from '../chain-1b53ef88.js';
|
17
14
|
import 'isomorphic-ws';
|
18
|
-
import '../eip1193-
|
15
|
+
import '../eip1193-4f4e240c.js';
|
16
|
+
import '../createClient-a28317a9.js';
|
19
17
|
import '@wagmi/chains';
|
20
|
-
import '@scure/bip32';
|
21
18
|
|
22
19
|
declare function buildRequest<TRequest extends (args: any) => Promise<any>>(request: TRequest, { retryDelay, retryCount, }?: {
|
23
20
|
retryDelay?: number;
|
@@ -49,8 +46,7 @@ declare function getCallError(err: BaseError, { docsPath, ...args }: CallParamet
|
|
49
46
|
docsPath?: string;
|
50
47
|
}): CallExecutionError;
|
51
48
|
|
52
|
-
declare function getEstimateGasError(err: BaseError, { docsPath, ...args }:
|
53
|
-
account?: Account;
|
49
|
+
declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: EstimateGasParameters & {
|
54
50
|
chain?: Chain;
|
55
51
|
docsPath?: string;
|
56
52
|
}): EstimateGasExecutionError;
|
@@ -58,9 +54,7 @@ declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: Omit
|
|
58
54
|
declare function containsNodeError(err: BaseError): boolean;
|
59
55
|
declare function getNodeError(err: BaseError, args: Partial<SendTransactionParameters<any>>): ExecutionRevertedError | FeeCapTooHighError | FeeCapTooLowError | NonceTooHighError | NonceTooLowError | NonceMaxValueError | InsufficientFundsError | IntrinsicGasTooHighError | IntrinsicGasTooLowError | TransactionTypeNotSupportedError | TipAboveFeeCapError | UnknownNodeError;
|
60
56
|
|
61
|
-
declare function getTransactionError(err: BaseError, { docsPath, ...args }:
|
62
|
-
account: Account;
|
63
|
-
chain?: Chain;
|
57
|
+
declare function getTransactionError(err: BaseError, { docsPath, ...args }: SendTransactionParameters & {
|
64
58
|
docsPath?: string;
|
65
59
|
}): TransactionExecutionError;
|
66
60
|
|
@@ -70,14 +64,8 @@ declare const integerRegex: RegExp;
|
|
70
64
|
|
71
65
|
declare function assertRequest(args: Partial<SendTransactionParameters<Chain>>): void;
|
72
66
|
|
73
|
-
type PrepareRequestParameters<
|
74
|
-
|
75
|
-
gasPrice?: SendTransactionParameters['gasPrice'];
|
76
|
-
maxFeePerGas?: SendTransactionParameters['maxFeePerGas'];
|
77
|
-
maxPriorityFeePerGas?: SendTransactionParameters['maxPriorityFeePerGas'];
|
78
|
-
nonce?: SendTransactionParameters['nonce'];
|
79
|
-
};
|
80
|
-
type PrepareRequestReturnType<TAccount extends Account | undefined = undefined, TParameters extends PrepareRequestParameters<TAccount> = PrepareRequestParameters<TAccount>> = TParameters & {
|
67
|
+
type PrepareRequestParameters<TParameters extends SendTransactionParameters = SendTransactionParameters> = TParameters;
|
68
|
+
type PrepareRequestReturnType<TParameters extends SendTransactionParameters = SendTransactionParameters> = TParameters & {
|
81
69
|
from: Address;
|
82
70
|
gas: SendTransactionParameters['gas'];
|
83
71
|
gasPrice?: SendTransactionParameters['gasPrice'];
|
@@ -85,6 +73,6 @@ type PrepareRequestReturnType<TAccount extends Account | undefined = undefined,
|
|
85
73
|
maxPriorityFeePerGas?: SendTransactionParameters['maxPriorityFeePerGas'];
|
86
74
|
nonce: SendTransactionParameters['nonce'];
|
87
75
|
};
|
88
|
-
declare function prepareRequest<
|
76
|
+
declare function prepareRequest<TParameters extends SendTransactionParameters>(client: WalletClient<any, any> | PublicClient<any, any>, args: PrepareRequestParameters<TParameters>): Promise<PrepareRequestReturnType<TParameters>>;
|
89
77
|
|
90
78
|
export { arrayRegex, assertRequest, buildRequest, bytesRegex, containsNodeError, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType, getCallError, getEstimateGasError, getNodeError, getTransactionError, integerRegex, prepareRequest };
|