viem 0.0.1-alpha.9 → 0.0.1-cjs.10
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/actions/package.json +1 -1
- package/chains/package.json +1 -1
- package/clients/package.json +1 -1
- package/dist/actions/index.d.ts +3 -2
- package/dist/actions/index.js +125 -124
- package/dist/actions/index.mjs +125 -0
- package/dist/chains.d.ts +2 -2
- package/dist/chains.js +75 -76
- package/dist/chains.mjs +133 -0
- package/dist/{chunk-26WUARDL.js → chunk-2FDH6XP5.mjs} +1314 -72
- package/dist/chunk-46ZFLVHC.js +1084 -0
- package/dist/chunk-5ZBNF5WM.js +2616 -0
- package/dist/{chunk-375SRM5R.js → chunk-CWCWWGBC.mjs} +1 -1
- package/dist/{chunk-6BXRN6CQ.js → chunk-HLVCJ7RV.mjs} +48 -11
- package/dist/chunk-SGTIBKHG.js +258 -0
- package/dist/clients/index.js +23 -23
- package/dist/clients/index.mjs +23 -0
- package/dist/index.d.ts +5 -7
- package/dist/index.js +374 -374
- package/dist/index.mjs +374 -0
- package/dist/{parseGwei-64031f5e.d.ts → parseGwei-7c87ff41.d.ts} +40 -118
- package/dist/transactionRequest-08d30731.d.ts +132 -0
- package/dist/utils/index.d.ts +38 -5
- package/dist/utils/index.js +148 -138
- package/dist/utils/index.mjs +148 -0
- package/dist/{watchAsset-dc7dcdd9.d.ts → watchAsset-bc6373f4.d.ts} +15 -3
- package/dist/window.js +1 -0
- package/dist/window.mjs +0 -0
- package/package.json +9 -3
- package/utils/package.json +1 -1
- package/window/package.json +1 -1
- package/dist/chunk-7H5SPKXN.js +0 -1113
- package/dist/transactionRequest-3e463099.d.ts +0 -44
@@ -1,7 +1,8 @@
|
|
1
|
+
import { Abi } from 'abitype';
|
1
2
|
import { Chain, Formatter } from './chains.js';
|
2
|
-
import { H as Hex, b as BlockTag, M as MergeIntersectionProperties, v as TransactionRequest, K as EstimateGasParameters,
|
3
|
+
import { H as Hex, A as Address, b as BlockTag, M as MergeIntersectionProperties, v as TransactionRequest, K as EstimateGasParameters, a as Hash, F as FeeHistory, L as Log, r as RpcTransactionReceipt, T as TransactionReceipt, N as TransactionType, D as Transaction, q as RpcTransaction, Q as Quantity, B as ByteArray } from './rpc-b77c5aee.js';
|
4
|
+
import { T as TransactionRequestFormatter, e as Formatted, E as ExtractFunctionNameFromAbi, G as GetValue, g as ExtractArgsFromAbi, h as ExtractResultFromAbi, F as FormattedBlock, B as BlockFormatter, a as FormattedTransaction, i as TransactionFormatter, j as FormattedTransactionReceipt, k as TransactionReceiptFormatter, l as ExtractFormatter } from './transactionRequest-08d30731.js';
|
3
5
|
import { P as PublicClient, T as TestClient, W as WalletClient } from './createWalletClient-d612fe08.js';
|
4
|
-
import { T as TransactionRequestFormatter, e as Formatted, F as FormattedBlock, B as BlockFormatter, a as FormattedTransaction, g as TransactionFormatter, h as FormattedTransactionReceipt, i as TransactionReceiptFormatter, E as ExtractFormatter } from './transactionRequest-3e463099.js';
|
5
6
|
import { W as WalletPermission, a as WatchAssetParams } from './eip1193-020a6f13.js';
|
6
7
|
|
7
8
|
type FilterType = 'transaction' | 'block' | 'event';
|
@@ -13,6 +14,7 @@ type Filter<TFilterType extends FilterType = 'event'> = {
|
|
13
14
|
type FormattedCall<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
|
14
15
|
type CallArgs<TChain extends Chain = Chain> = FormattedCall<TransactionRequestFormatter<TChain>> & {
|
15
16
|
chain?: TChain;
|
17
|
+
from?: Address;
|
16
18
|
} & ({
|
17
19
|
/** The balance of the account at a block number. */
|
18
20
|
blockNumber?: bigint;
|
@@ -27,6 +29,16 @@ type CallResponse = {
|
|
27
29
|
};
|
28
30
|
declare function call<TChain extends Chain>(client: PublicClient, { blockNumber, blockTag, chain, from, accessList, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, ...rest }: CallArgs<TChain>): Promise<CallResponse>;
|
29
31
|
|
32
|
+
type CallContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<CallArgs<TChain>, 'from' | 'to' | 'data' | 'value'> & {
|
33
|
+
address: Address;
|
34
|
+
abi: TAbi;
|
35
|
+
from?: Address;
|
36
|
+
functionName: ExtractFunctionNameFromAbi<TAbi, TFunctionName>;
|
37
|
+
value?: GetValue<TAbi, TFunctionName, CallArgs<TChain>['value']>;
|
38
|
+
} & ExtractArgsFromAbi<TAbi, TFunctionName>;
|
39
|
+
type CallContractResponse<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = ExtractResultFromAbi<TAbi, TFunctionName>;
|
40
|
+
declare function callContract<TChain extends Chain, TAbi extends Abi = Abi, TFunctionName extends string = any>(client: PublicClient, { abi, address, args, functionName, ...callRequest }: CallContractArgs<TChain, TAbi, TFunctionName>): Promise<CallContractResponse<TAbi, TFunctionName>>;
|
41
|
+
|
30
42
|
type CreatePendingTransactionFilterResponse = Filter<'transaction'>;
|
31
43
|
declare function createPendingTransactionFilter(client: PublicClient): Promise<CreatePendingTransactionFilterResponse>;
|
32
44
|
|
@@ -519,4 +531,4 @@ type WatchAssetArgs = WatchAssetParams;
|
|
519
531
|
type WatchAssetResponse = boolean;
|
520
532
|
declare function watchAsset(client: WalletClient, params: WatchAssetParams): Promise<WatchAssetResponse>;
|
521
533
|
|
522
|
-
export {
|
534
|
+
export { SetIntervalMiningArgs as $, GetTransactionResponse as A, GetTransactionReceiptArgs as B, CallArgs as C, DropTransactionArgs as D, EstimateGasArgs as E, GetTransactionReceiptResponse as F, GetBalanceArgs as G, IncreaseTimeArgs as H, ImpersonateAccountArgs as I, OnBlockNumber as J, OnBlockNumberResponse as K, OnBlockResponse as L, MineArgs as M, OnTransactions as N, OnBlock as O, OnTransactionsResponse as P, RequestPermissionsResponse as Q, ResetArgs as R, RevertArgs as S, SendTransactionArgs as T, SendTransactionResponse as U, SendUnsignedTransactionArgs as V, SendUnsignedTransactionResponse as W, SetBalanceArgs as X, SetBlockGasLimitArgs as Y, SetCodeArgs as Z, SetCoinbaseArgs as _, CallContractArgs as a, setMinGasPrice as a$, SetMinGasPriceArgs as a0, SetBlockTimestampIntervalArgs as a1, SetNextBlockTimestampArgs as a2, SetNextBlockBaseFeePerGasArgs as a3, SetNonceArgs as a4, SetStorageAtArgs as a5, SignMessageArgs as a6, SignMessageResponse as a7, StopImpersonatingAccountArgs as a8, SwitchChainArgs as a9, getGasPrice as aA, getPermissions as aB, getTransaction as aC, getTransactionConfirmations as aD, getTransactionCount as aE, getTransactionReceipt as aF, getTxpoolContent as aG, getTxpoolStatus as aH, impersonateAccount as aI, increaseTime as aJ, inspectTxpool as aK, mine as aL, removeBlockTimestampInterval as aM, reset as aN, requestAccounts as aO, requestPermissions as aP, revert as aQ, sendTransaction as aR, sendUnsignedTransaction as aS, setAutomine as aT, setBalance as aU, setBlockGasLimit as aV, setBlockTimestampInterval as aW, setCode as aX, setCoinbase as aY, setIntervalMining as aZ, setLoggingEnabled as a_, UninstallFilterArgs as aa, UninstallFilterResponse as ab, WaitForTransactionReceiptArgs as ac, WaitForTransactionReceiptResponse as ad, WatchAssetArgs as ae, WatchAssetResponse as af, WatchBlockNumberArgs as ag, WatchBlocksArgs as ah, WatchPendingTransactionsArgs as ai, addChain as aj, call as ak, callContract as al, createBlockFilter as am, createPendingTransactionFilter as an, estimateGas as ao, dropTransaction as ap, getAccounts as aq, getAutomine as ar, getBalance as as, getBlock as at, getBlockNumber as au, getBlockTransactionCount as av, getChainId as aw, getFeeHistory as ax, getFilterChanges as ay, getFilterLogs as az, CallContractResponse as b, setNextBlockBaseFeePerGas as b0, setNextBlockTimestamp as b1, setNonce as b2, setStorageAt as b3, signMessage as b4, snapshot as b5, stopImpersonatingAccount as b6, switchChain as b7, uninstallFilter as b8, waitForTransactionReceipt as b9, watchAsset as ba, watchBlockNumber as bb, watchBlocks as bc, watchPendingTransactions as bd, getBlockNumberCache as be, ReplacementReason as bf, ReplacementResponse as bg, FormattedTransactionRequest as bh, CallResponse as c, CreateBlockFilterResponse as d, CreatePendingTransactionFilterResponse as e, EstimateGasResponse as f, GetBalanceResponse as g, GetBlockArgs as h, GetBlockNumberArgs as i, GetBlockNumberResponse as j, GetBlockResponse as k, GetBlockTransactionCountArgs as l, GetBlockTransactionCountResponse as m, GetFeeHistoryArgs as n, GetFeeHistoryResponse as o, GetFilterChangesArgs as p, GetFilterChangesResponse as q, GetFilterLogsArgs as r, GetFilterLogsResponse as s, GetGasPriceResponse as t, GetPermissionsResponse as u, GetTransactionArgs as v, GetTransactionConfirmationsArgs as w, GetTransactionConfirmationsResponse as x, GetTransactionCountArgs as y, GetTransactionCountResponse as z };
|
package/dist/window.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";
|
package/dist/window.mjs
ADDED
File without changes
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "viem",
|
3
3
|
"description": "TypeScript (& JavaScript) Interface for Ethereum",
|
4
|
-
"version": "0.0.1-
|
4
|
+
"version": "0.0.1-cjs.10",
|
5
5
|
"files": [
|
6
6
|
"/actions",
|
7
7
|
"/chains",
|
@@ -14,32 +14,38 @@
|
|
14
14
|
"exports": {
|
15
15
|
".": {
|
16
16
|
"types": "./dist/index.d.ts",
|
17
|
+
"module": "./dist/index.mjs",
|
17
18
|
"default": "./dist/index.js"
|
18
19
|
},
|
19
20
|
"./actions": {
|
20
21
|
"types": "./dist/actions/index.d.ts",
|
22
|
+
"module": "./dist/actions/index.mjs",
|
21
23
|
"default": "./dist/actions/index.js"
|
22
24
|
},
|
23
25
|
"./chains": {
|
24
26
|
"types": "./dist/chains.d.ts",
|
27
|
+
"module": "./dist/chains.mjs",
|
25
28
|
"default": "./dist/chains.js"
|
26
29
|
},
|
27
30
|
"./clients": {
|
28
31
|
"types": "./dist/clients/index.d.ts",
|
32
|
+
"module": "./dist/clients/index.mjs",
|
29
33
|
"default": "./dist/clients/index.js"
|
30
34
|
},
|
31
35
|
"./utils": {
|
32
36
|
"types": "./dist/utils/index.d.ts",
|
37
|
+
"module": "./dist/utils/index.mjs",
|
33
38
|
"default": "./dist/utils/index.js"
|
34
39
|
},
|
35
40
|
"./window": {
|
36
41
|
"types": "./dist/window.d.ts",
|
42
|
+
"module": "./dist/window.mjs",
|
37
43
|
"default": "./dist/window.js"
|
38
44
|
},
|
39
45
|
"./package.json": "./package.json"
|
40
46
|
},
|
41
|
-
"type": "module",
|
42
47
|
"main": "dist/index.js",
|
48
|
+
"module": "dist/index.mjs",
|
43
49
|
"types": "dist/index.d.ts",
|
44
50
|
"sideEffects": false,
|
45
51
|
"dependencies": {
|
@@ -92,7 +98,7 @@
|
|
92
98
|
"pre-commit": "pnpm format & pnpm lint:fix"
|
93
99
|
},
|
94
100
|
"scripts": {
|
95
|
-
"anvil": "source .env && anvil --fork-url $
|
101
|
+
"anvil": "source .env && anvil --fork-url $VITE_ANVIL_FORK_URL --fork-block-number $VITE_ANVIL_BLOCK_NUMBER --block-time $VITE_ANVIL_BLOCK_TIME",
|
96
102
|
"bench": "vitest bench --no-threads",
|
97
103
|
"bench:ci": "CI=true vitest bench --no-threads",
|
98
104
|
"build": "tsup",
|
package/utils/package.json
CHANGED
package/window/package.json
CHANGED