viem 0.0.1-alpha.0 → 0.0.1-alpha.2
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/README.md +16 -0
- package/dist/actions/index.d.ts +3 -7
- package/dist/actions/index.js +4 -2
- package/dist/chains.d.ts +2 -2
- package/dist/chains.js +1 -1
- package/dist/{chunk-GI67STNV.js → chunk-3EOU525X.js} +603 -26
- package/dist/{chunk-JSYJDK4W.js → chunk-4HNVS7AM.js} +99 -33
- package/dist/{chunk-OPR6LKYX.js → chunk-YQRTXQ2G.js} +56 -36
- package/dist/clients/index.d.ts +2 -2
- package/dist/clients/index.js +6 -4
- package/dist/{createWalletClient-c40fef16.d.ts → createWalletClient-915223f3.d.ts} +5 -5
- package/dist/index.d.ts +5 -4
- package/dist/index.js +19 -5
- package/dist/{parseGwei-a7d0bcb2.d.ts → parseGwei-fd7a0f7d.d.ts} +83 -10
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +7 -1
- package/dist/{watchAsset-bb30848d.d.ts → watchAsset-04ab8db5.d.ts} +20 -22
- package/dist/{webSocket-14584a7e.d.ts → webSocket-c6e0d26f.d.ts} +25 -14
- package/package.json +61 -10
package/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
<p align="center">
|
2
|
+
<picture>
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/wagmi-dev/viem/blob/main/.github/viem-dark.svg">
|
4
|
+
<img alt="wagmi logo" src="https://github.com/wagmi-dev/viem/blob/main/.github/viem-light.svg" width="auto" height="60">
|
5
|
+
</picture>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p align="center">
|
9
|
+
TypeScript Interface for Ethereum
|
10
|
+
<p>
|
11
|
+
|
12
|
+
<p align="center">
|
13
|
+
<a href="https://codecov.io/github/wagmi-dev/viem" >
|
14
|
+
<img src="https://codecov.io/github/wagmi-dev/viem/branch/main/graph/badge.svg?token=iUTN9R4Qfg"/>
|
15
|
+
</a>
|
16
|
+
</p>
|
package/dist/actions/index.d.ts
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
-
export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, d as EstimateGasResponse,
|
2
|
-
import { W as WalletClient } from '../createWalletClient-c40fef16.js';
|
1
|
+
export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, d as EstimateGasResponse, bf as FormattedTransactionRequest, G as GetBalanceArgs, e as GetBalanceResponse, f as GetBlockArgs, g as GetBlockNumberArgs, h as GetBlockNumberResponse, i as GetBlockResponse, j as GetBlockTransactionCountArgs, k as GetBlockTransactionCountResponse, l as GetFeeHistoryArgs, m as GetFeeHistoryResponse, n as GetFilterChangesArgs, o as GetFilterChangesResponse, p as GetFilterLogsArgs, q as GetFilterLogsResponse, r as GetGasPriceResponse, s as GetPermissionsResponse, t as GetTransactionArgs, u as GetTransactionConfirmationsArgs, v as GetTransactionConfirmationsResponse, w as GetTransactionCountArgs, x as GetTransactionCountResponse, z as GetTransactionReceiptArgs, A as GetTransactionReceiptResponse, y as GetTransactionResponse, I as ImpersonateAccountArgs, B as IncreaseTimeArgs, bg as InvalidGasArgumentsError, M as MineArgs, O as OnBlock, F as OnBlockNumber, H as OnBlockNumberResponse, J as OnBlockResponse, K as OnTransactions, L as OnTransactionsResponse, bc as ReplacementReason, bd as ReplacementResponse, N as RequestPermissionsResponse, R as ResetArgs, P as RevertArgs, S as SendTransactionArgs, Q as SendTransactionResponse, T as SendUnsignedTransactionArgs, U as SendUnsignedTransactionResponse, V as SetBalanceArgs, W as SetBlockGasLimitArgs, $ as SetBlockTimestampIntervalArgs, X as SetCodeArgs, Y as SetCoinbaseArgs, Z as SetIntervalMiningArgs, _ as SetMinGasPriceArgs, a1 as SetNextBlockBaseFeePerGasArgs, a0 as SetNextBlockTimestampArgs, a2 as SetNonceArgs, a3 as SetStorageAtArgs, a4 as SignMessageArgs, a5 as SignMessageResponse, a6 as StopImpersonatingAccountArgs, a7 as SwitchChainArgs, a8 as UninstallFilterArgs, a9 as UninstallFilterResponse, aa as WaitForTransactionReceiptArgs, ab as WaitForTransactionReceiptResponse, be as WaitForTransactionReceiptTimeoutError, ac as WatchAssetArgs, ad as WatchAssetResponse, ae as WatchBlockNumberArgs, af as WatchBlocksArgs, ag as WatchPendingTransactionsArgs, ah as addChain, ai as call, aj as createBlockFilter, ak as createPendingTransactionFilter, am as dropTransaction, al as estimateGas, an as getAccounts, ao as getAutomine, ap as getBalance, aq as getBlock, ar as getBlockNumber, bb as getBlockNumberCache, as as getBlockTransactionCount, at as getChainId, au as getFeeHistory, av as getFilterChanges, aw as getFilterLogs, ax as getGasPrice, ay as getPermissions, az as getTransaction, aA as getTransactionConfirmations, aB as getTransactionCount, aC as getTransactionReceipt, aD as getTxpoolContent, aE as getTxpoolStatus, aF as impersonateAccount, aG as increaseTime, aH as inspectTxpool, aI as mine, aJ as removeBlockTimestampInterval, aL as requestAccounts, aM as requestPermissions, aK as reset, aN as revert, aO as sendTransaction, aP as sendUnsignedTransaction, aQ as setAutomine, aR as setBalance, aS as setBlockGasLimit, aT as setBlockTimestampInterval, aU as setCode, aV as setCoinbase, aW as setIntervalMining, aX as setLoggingEnabled, aY as setMinGasPrice, aZ as setNextBlockBaseFeePerGas, a_ as setNextBlockTimestamp, a$ as setNonce, b0 as setStorageAt, b1 as signMessage, b2 as snapshot, b3 as stopImpersonatingAccount, b4 as switchChain, b5 as uninstallFilter, b6 as waitForTransactionReceipt, b7 as watchAsset, b8 as watchBlockNumber, b9 as watchBlocks, ba as watchPendingTransactions } from '../watchAsset-04ab8db5.js';
|
3
2
|
import '../chains.js';
|
4
3
|
import '../rpc-655c0ba4.js';
|
5
4
|
import '@wagmi/chains';
|
6
5
|
import '../transactionRequest-ade896ac.js';
|
7
|
-
import '../
|
6
|
+
import '../createWalletClient-915223f3.js';
|
8
7
|
import '../eip1193-8f7c22ce.js';
|
9
|
-
|
10
|
-
declare function getAccounts(client: WalletClient): Promise<`0x${string}`[]>;
|
11
|
-
|
12
|
-
export { getAccounts };
|
8
|
+
import '../BaseError-7688f84e.js';
|
package/dist/actions/index.js
CHANGED
@@ -15,6 +15,7 @@ import {
|
|
15
15
|
getChainId,
|
16
16
|
getFeeHistory,
|
17
17
|
getFilterChanges,
|
18
|
+
getFilterLogs,
|
18
19
|
getGasPrice,
|
19
20
|
getPermissions,
|
20
21
|
getTransaction,
|
@@ -57,8 +58,8 @@ import {
|
|
57
58
|
watchBlockNumber,
|
58
59
|
watchBlocks,
|
59
60
|
watchPendingTransactions
|
60
|
-
} from "../chunk-
|
61
|
-
import "../chunk-
|
61
|
+
} from "../chunk-4HNVS7AM.js";
|
62
|
+
import "../chunk-3EOU525X.js";
|
62
63
|
export {
|
63
64
|
addChain,
|
64
65
|
call,
|
@@ -76,6 +77,7 @@ export {
|
|
76
77
|
getChainId,
|
77
78
|
getFeeHistory,
|
78
79
|
getFilterChanges,
|
80
|
+
getFilterLogs,
|
79
81
|
getGasPrice,
|
80
82
|
getPermissions,
|
81
83
|
getTransaction,
|
package/dist/chains.d.ts
CHANGED
@@ -24,7 +24,7 @@ declare const defineBlock: <TFormat extends Formatter<Partial<RpcBlock>, Partial
|
|
24
24
|
}) => Block<bigint, Transaction<bigint, number>> & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
25
25
|
declare const defineTransaction: <TFormat extends Formatter<Partial<RpcTransaction>, Partial<Transaction<bigint, number>> & {
|
26
26
|
[key: string]: unknown;
|
27
|
-
}>, TExclude extends ("type" | "
|
27
|
+
}>, TExclude extends ("gas" | "type" | "value" | "blockHash" | "blockNumber" | "from" | "hash" | "input" | "nonce" | "r" | "s" | "to" | "transactionIndex" | "v" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "accessList")[] = []>({ exclude, format: formatOverride, }: {
|
28
28
|
exclude?: TExclude | undefined;
|
29
29
|
format?: TFormat | undefined;
|
30
30
|
}) => (data: Partial<RpcTransaction> & {
|
@@ -32,7 +32,7 @@ declare const defineTransaction: <TFormat extends Formatter<Partial<RpcTransacti
|
|
32
32
|
}) => Transaction<bigint, number> & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
33
33
|
declare const defineTransactionRequest: <TFormat extends Formatter<Partial<TransactionRequest<bigint, number>>, Partial<RpcTransactionRequest> & {
|
34
34
|
[key: string]: unknown;
|
35
|
-
}>, TExclude extends ("
|
35
|
+
}>, TExclude extends ("gas" | "data" | "value" | "from" | "nonce" | "to" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "accessList")[] = []>({ exclude, format: formatOverride, }: {
|
36
36
|
exclude?: TExclude | undefined;
|
37
37
|
format?: TFormat | undefined;
|
38
38
|
}) => (data: Partial<TransactionRequest<bigint, number>> & {
|