viem 0.0.1-alpha.19 → 0.0.1-alpha.20
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/{rpc-858670f1.d.ts → chain-32f56cfa.d.ts} +68 -18
- package/dist/chain-f12cdc7f.d.ts +5 -0
- package/dist/chains.d.ts +757 -170
- package/dist/chains.js +80 -86
- package/dist/chains.js.map +1 -1
- package/dist/chains.mjs +120 -126
- package/dist/chains.mjs.map +1 -1
- package/dist/{chunk-PHSAQQGZ.mjs → chunk-5Q6FSUU2.mjs} +75 -37
- package/dist/chunk-5Q6FSUU2.mjs.map +1 -0
- package/dist/{chunk-24EKKMUO.js → chunk-FHXXG7I6.js} +12 -12
- package/dist/chunk-FHXXG7I6.js.map +1 -0
- package/dist/{chunk-HRE6LYF3.js → chunk-IAQPMSGJ.js} +13 -13
- package/dist/chunk-IAQPMSGJ.js.map +1 -0
- package/dist/{chunk-IVWG22RQ.mjs → chunk-MYQNZSWD.mjs} +69 -12
- package/dist/chunk-MYQNZSWD.mjs.map +1 -0
- package/dist/{chunk-NYMS65YI.js → chunk-NHAKUPTF.js} +124 -67
- package/dist/chunk-NHAKUPTF.js.map +1 -0
- package/dist/{chunk-BZFF747V.js → chunk-SF4I2NKC.js} +81 -43
- package/dist/chunk-SF4I2NKC.js.map +1 -0
- package/dist/{chunk-VAT5CEF7.mjs → chunk-T7CBAKLI.mjs} +2 -2
- package/dist/chunk-T7CBAKLI.mjs.map +1 -0
- package/dist/{chunk-CTU4PQLY.js → chunk-YFKR74XG.js} +14 -14
- package/dist/{chunk-CTU4PQLY.js.map → chunk-YFKR74XG.js.map} +0 -0
- package/dist/{chunk-NSRORL3O.mjs → chunk-YODUQCHJ.mjs} +2 -2
- package/dist/{chunk-NSRORL3O.mjs.map → chunk-YODUQCHJ.mjs.map} +0 -0
- package/dist/{chunk-E7LH5H76.mjs → chunk-ZVGTYLKU.mjs} +2 -2
- package/dist/chunk-ZVGTYLKU.mjs.map +1 -0
- package/dist/clients/index.d.ts +7 -8
- package/dist/clients/index.js +3 -3
- package/dist/clients/index.mjs +2 -2
- package/dist/{transactionReceipt-aed524b4.d.ts → contract-9af4608b.d.ts} +30 -18
- package/dist/{createClient-03ba79e8.d.ts → createClient-5d316c7e.d.ts} +2 -2
- package/dist/{createPublicClient-818241ba.d.ts → createPublicClient-9d2b42e1.d.ts} +3 -3
- package/dist/{createTestClient-24eb7be8.d.ts → createTestClient-79498dab.d.ts} +3 -3
- package/dist/{createWalletClient-7cbd6ad1.d.ts → createWalletClient-f69a5230.d.ts} +3 -3
- package/dist/{eip1193-71d8e27d.d.ts → eip1193-6c485d63.d.ts} +1 -1
- package/dist/index.d.ts +45 -23
- package/dist/index.js +10 -6
- package/dist/index.mjs +9 -5
- package/dist/{parseGwei-dbd12305.d.ts → parseGwei-4308ad80.d.ts} +17 -4
- package/dist/public.d.ts +9 -10
- package/dist/public.js +4 -4
- package/dist/public.mjs +3 -3
- package/dist/{sendTransaction-d09961a7.d.ts → sendTransaction-1c8290a9.d.ts} +3 -4
- package/dist/{stopImpersonatingAccount-c8a00be7.d.ts → stopImpersonatingAccount-7781842a.d.ts} +2 -2
- package/dist/test.d.ts +5 -6
- package/dist/test.js +3 -3
- package/dist/test.mjs +2 -2
- package/dist/transactionRequest-341b6ed2.d.ts +15 -0
- package/dist/utils/index.d.ts +9 -8
- package/dist/utils/index.js +22 -2
- package/dist/utils/index.mjs +25 -5
- package/dist/wallet.d.ts +7 -8
- package/dist/wallet.js +3 -3
- package/dist/wallet.mjs +2 -2
- package/dist/{watchAsset-c39645b7.d.ts → watchAsset-afaad3c7.d.ts} +3 -4
- package/dist/{watchPendingTransactions-01e6be4f.d.ts → watchPendingTransactions-3b722547.d.ts} +21 -16
- package/dist/{webSocket-3a00015b.d.ts → webSocket-b180e679.d.ts} +2 -2
- package/dist/window.d.ts +3 -2
- package/package.json +3 -3
- package/src/_test/abis.ts +188 -0
- package/src/_test/constants.ts +0 -3
- package/src/_test/index.ts +5 -2
- package/src/actions/index.test.ts +2 -0
- package/src/actions/index.ts +6 -0
- package/src/actions/public/call.ts +2 -1
- package/src/actions/public/createContractEventFilter.test.ts +119 -0
- package/src/actions/public/createContractEventFilter.ts +69 -0
- package/src/actions/public/createEventFilter.ts +5 -8
- package/src/actions/public/deployContract.ts +1 -2
- package/src/actions/public/getBlock.test.ts +3 -3
- package/src/actions/public/getBlock.ts +1 -2
- package/src/actions/public/getBlockTransactionCount.ts +1 -2
- package/src/actions/public/getFilterChanges.test.ts +9 -7
- package/src/actions/public/getFilterLogs.test.ts +7 -5
- package/src/actions/public/getLogs.test.ts +7 -5
- package/src/actions/public/getLogs.ts +3 -2
- package/src/actions/public/getTransaction.ts +1 -2
- package/src/actions/public/getTransactionConfirmations.ts +1 -2
- package/src/actions/public/getTransactionReceipt.test.ts +24 -62
- package/src/actions/public/getTransactionReceipt.ts +1 -2
- package/src/actions/public/index.test.ts +4 -0
- package/src/actions/public/index.ts +18 -0
- package/src/actions/public/readContract.ts +1 -1
- package/src/actions/public/simulateContract.ts +1 -1
- package/src/actions/public/waitForTransactionReceipt.ts +1 -2
- package/src/actions/public/watchBlocks.test.ts +27 -2
- package/src/actions/public/watchBlocks.ts +33 -14
- package/src/actions/public/watchContractEvent.test.ts +301 -0
- package/src/actions/public/watchContractEvent.ts +108 -0
- package/src/actions/public/watchEvent.test.ts +190 -0
- package/src/actions/public/watchEvent.ts +95 -0
- package/src/actions/public/watchPendingTransactions.ts +1 -0
- package/src/actions/wallet/addChain.ts +1 -1
- package/src/actions/wallet/sendTransaction.ts +2 -1
- package/src/actions/wallet/switchChain.ts +1 -1
- package/src/actions/wallet/writeContract.ts +1 -1
- package/src/chains.test.ts +830 -52
- package/src/chains.ts +90 -158
- package/src/clients/createClient.ts +1 -1
- package/src/clients/createPublicClient.ts +1 -1
- package/src/clients/createTestClient.ts +1 -1
- package/src/clients/createWalletClient.ts +1 -1
- package/src/clients/transports/createTransport.ts +1 -1
- package/src/index.test.ts +2 -0
- package/src/index.ts +10 -2
- package/src/types/chain.ts +6 -0
- package/src/types/contract.ts +17 -2
- package/src/types/formatter.ts +23 -0
- package/src/types/index.ts +6 -0
- package/src/types/transaction.ts +1 -1
- package/src/utils/abi/decodeErrorResult.ts +2 -2
- package/src/utils/abi/decodeFunctionData.ts +2 -2
- package/src/utils/abi/encodeErrorResult.ts +2 -2
- package/src/utils/abi/encodeEventTopics.ts +4 -4
- package/src/utils/abi/encodeFunctionData.ts +2 -2
- package/src/utils/abi/{formatAbiItemWithParams.test.ts → formatAbiItem.test.ts} +11 -11
- package/src/utils/abi/{formatAbiItemWithParams.ts → formatAbiItem.ts} +1 -1
- package/src/utils/abi/index.test.ts +1 -1
- package/src/utils/abi/index.ts +1 -1
- package/src/utils/chain.test.ts +43 -0
- package/src/utils/chain.ts +8 -0
- package/src/utils/contract/getContractError.ts +2 -6
- package/src/utils/formatters/block.ts +4 -3
- package/src/utils/formatters/extract.ts +1 -1
- package/src/utils/formatters/format.ts +39 -2
- package/src/utils/formatters/index.test.ts +10 -0
- package/src/utils/formatters/index.ts +15 -5
- package/src/utils/formatters/transaction.ts +16 -4
- package/src/utils/formatters/transactionReceipt.ts +13 -4
- package/src/utils/formatters/transactionRequest.ts +12 -3
- package/src/utils/hash/getEventSignature.ts +2 -2
- package/src/utils/index.test.ts +24 -1
- package/src/utils/index.ts +12 -1
- package/src/{constants.test.ts → utils/unit/constants.test.ts} +0 -5
- package/src/{constants.ts → utils/unit/constants.ts} +0 -6
- package/src/utils/unit/formatEther.ts +1 -1
- package/src/utils/unit/formatGwei.ts +1 -1
- package/src/utils/unit/index.test.ts +12 -0
- package/src/utils/unit/index.ts +1 -0
- package/src/utils/unit/parseEther.ts +1 -1
- package/src/utils/unit/parseGwei.ts +1 -1
- package/dist/chunk-24EKKMUO.js.map +0 -1
- package/dist/chunk-BZFF747V.js.map +0 -1
- package/dist/chunk-E7LH5H76.mjs.map +0 -1
- package/dist/chunk-HRE6LYF3.js.map +0 -1
- package/dist/chunk-IVWG22RQ.mjs.map +0 -1
- package/dist/chunk-NYMS65YI.js.map +0 -1
- package/dist/chunk-PHSAQQGZ.mjs.map +0 -1
- package/dist/chunk-VAT5CEF7.mjs.map +0 -1
- package/dist/transactionRequest-8e970b0e.d.ts +0 -33
package/dist/public.d.ts
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DeployContractArgs, e as DeployContractResponse, E as EstimateGasArgs, d as EstimateGasResponse, G as GetBalanceArgs, f as GetBalanceResponse, g as GetBlockArgs, h as GetBlockNumberArgs, i as GetBlockNumberResponse, j as GetBlockResponse, k as GetBlockTransactionCountArgs, l as GetBlockTransactionCountResponse, m as GetBytecodeArgs, n as GetBytecodeResponse, o as GetFeeHistoryArgs, p as GetFeeHistoryResponse, q as GetFilterChangesArgs, r as GetFilterChangesResponse, s as GetFilterLogsArgs, t as GetFilterLogsResponse, u as GetGasPriceResponse, v as GetTransactionArgs, w as GetTransactionConfirmationsArgs, x as GetTransactionConfirmationsResponse, y as GetTransactionCountArgs, z as GetTransactionCountResponse, B as GetTransactionReceiptArgs,
|
1
|
+
export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DeployContractArgs, e as DeployContractResponse, E as EstimateGasArgs, d as EstimateGasResponse, G as GetBalanceArgs, f as GetBalanceResponse, g as GetBlockArgs, h as GetBlockNumberArgs, i as GetBlockNumberResponse, j as GetBlockResponse, k as GetBlockTransactionCountArgs, l as GetBlockTransactionCountResponse, m as GetBytecodeArgs, n as GetBytecodeResponse, o as GetFeeHistoryArgs, p as GetFeeHistoryResponse, q as GetFilterChangesArgs, r as GetFilterChangesResponse, s as GetFilterLogsArgs, t as GetFilterLogsResponse, u as GetGasPriceResponse, v as GetTransactionArgs, w as GetTransactionConfirmationsArgs, x as GetTransactionConfirmationsResponse, y as GetTransactionCountArgs, z as GetTransactionCountResponse, B as GetTransactionReceiptArgs, H as GetTransactionReceiptResponse, A as GetTransactionResponse, O as OnBlock, I as OnBlockNumber, J as OnBlockNumberResponse, K as OnBlockResponse, L as OnTransactions, M as OnTransactionsResponse, ao as ReplacementReason, ap as ReplacementResponse, S as SimulateContractArgs, N as SimulateContractResponse, U as UninstallFilterArgs, P as UninstallFilterResponse, W as WaitForTransactionReceiptArgs, Q as WaitForTransactionReceiptResponse, R as WatchBlockNumberArgs, T as WatchBlocksArgs, V as WatchPendingTransactionsArgs, Z as call, _ as createBlockFilter, $ as createPendingTransactionFilter, a0 as deployContract, a1 as estimateGas, a2 as getBalance, a3 as getBlock, a4 as getBlockNumber, an as getBlockNumberCache, a5 as getBlockTransactionCount, a6 as getBytecode, a7 as getChainId, a8 as getFeeHistory, a9 as getFilterChanges, aa as getFilterLogs, ab as getGasPrice, ac as getTransaction, ad as getTransactionConfirmations, ae as getTransactionCount, af as getTransactionReceipt, ag as simulateContract, ah as uninstallFilter, ai as waitForTransactionReceipt, aj as watchBlockNumber, ak as watchBlocks, al as watchPendingTransactions } from './watchPendingTransactions-3b722547.js';
|
2
2
|
import 'abitype';
|
3
|
-
import './
|
4
|
-
import './rpc-858670f1.js';
|
3
|
+
import './chain-32f56cfa.js';
|
5
4
|
import '@wagmi/chains';
|
6
|
-
import './
|
7
|
-
import './
|
8
|
-
import './
|
9
|
-
import './
|
10
|
-
import './
|
11
|
-
import './
|
12
|
-
import './
|
5
|
+
import './contract-9af4608b.js';
|
6
|
+
import './createPublicClient-9d2b42e1.js';
|
7
|
+
import './eip1193-6c485d63.js';
|
8
|
+
import './createClient-5d316c7e.js';
|
9
|
+
import './createWalletClient-f69a5230.js';
|
10
|
+
import './sendTransaction-1c8290a9.js';
|
11
|
+
import './transactionRequest-341b6ed2.js';
|
package/dist/public.js
CHANGED
@@ -25,9 +25,9 @@
|
|
25
25
|
|
26
26
|
|
27
27
|
|
28
|
-
var
|
29
|
-
require('./chunk-
|
30
|
-
require('./chunk-
|
28
|
+
var _chunkNHAKUPTFjs = require('./chunk-NHAKUPTF.js');
|
29
|
+
require('./chunk-IAQPMSGJ.js');
|
30
|
+
require('./chunk-SF4I2NKC.js');
|
31
31
|
|
32
32
|
|
33
33
|
|
@@ -55,5 +55,5 @@ require('./chunk-BZFF747V.js');
|
|
55
55
|
|
56
56
|
|
57
57
|
|
58
|
-
exports.call =
|
58
|
+
exports.call = _chunkNHAKUPTFjs.call; exports.createBlockFilter = _chunkNHAKUPTFjs.createBlockFilter; exports.createPendingTransactionFilter = _chunkNHAKUPTFjs.createPendingTransactionFilter; exports.deployContract = _chunkNHAKUPTFjs.deployContract; exports.estimateGas = _chunkNHAKUPTFjs.estimateGas; exports.getBalance = _chunkNHAKUPTFjs.getBalance; exports.getBlock = _chunkNHAKUPTFjs.getBlock; exports.getBlockNumber = _chunkNHAKUPTFjs.getBlockNumber; exports.getBlockNumberCache = _chunkNHAKUPTFjs.getBlockNumberCache; exports.getBlockTransactionCount = _chunkNHAKUPTFjs.getBlockTransactionCount; exports.getBytecode = _chunkNHAKUPTFjs.getBytecode; exports.getChainId = _chunkNHAKUPTFjs.getChainId; exports.getFeeHistory = _chunkNHAKUPTFjs.getFeeHistory; exports.getFilterChanges = _chunkNHAKUPTFjs.getFilterChanges; exports.getFilterLogs = _chunkNHAKUPTFjs.getFilterLogs; exports.getGasPrice = _chunkNHAKUPTFjs.getGasPrice; exports.getTransaction = _chunkNHAKUPTFjs.getTransaction; exports.getTransactionConfirmations = _chunkNHAKUPTFjs.getTransactionConfirmations; exports.getTransactionCount = _chunkNHAKUPTFjs.getTransactionCount; exports.getTransactionReceipt = _chunkNHAKUPTFjs.getTransactionReceipt; exports.simulateContract = _chunkNHAKUPTFjs.simulateContract; exports.uninstallFilter = _chunkNHAKUPTFjs.uninstallFilter; exports.waitForTransactionReceipt = _chunkNHAKUPTFjs.waitForTransactionReceipt; exports.watchBlockNumber = _chunkNHAKUPTFjs.watchBlockNumber; exports.watchBlocks = _chunkNHAKUPTFjs.watchBlocks; exports.watchPendingTransactions = _chunkNHAKUPTFjs.watchPendingTransactions;
|
59
59
|
//# sourceMappingURL=public.js.map
|
package/dist/public.mjs
CHANGED
@@ -25,9 +25,9 @@ import {
|
|
25
25
|
watchBlockNumber,
|
26
26
|
watchBlocks,
|
27
27
|
watchPendingTransactions
|
28
|
-
} from "./chunk-
|
29
|
-
import "./chunk-
|
30
|
-
import "./chunk-
|
28
|
+
} from "./chunk-MYQNZSWD.mjs";
|
29
|
+
import "./chunk-T7CBAKLI.mjs";
|
30
|
+
import "./chunk-5Q6FSUU2.mjs";
|
31
31
|
export {
|
32
32
|
call,
|
33
33
|
createBlockFilter,
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import { Formatter, Chain } from './
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { a as Formatted, T as TransactionRequestFormatter } from './transactionRequest-8e970b0e.js';
|
1
|
+
import { K as Formatter, M as MergeIntersectionProperties, N as Formatted, s as TransactionRequest, J as Chain, H as Hash } from './chain-32f56cfa.js';
|
2
|
+
import { W as WalletClient } from './createWalletClient-f69a5230.js';
|
3
|
+
import { T as TransactionRequestFormatter } from './transactionRequest-341b6ed2.js';
|
5
4
|
|
6
5
|
type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
|
7
6
|
type SendTransactionArgs<TChain extends Chain = Chain> = FormattedTransactionRequest<TransactionRequestFormatter<TChain>> & {
|
package/dist/{stopImpersonatingAccount-c8a00be7.d.ts → stopImpersonatingAccount-7781842a.d.ts}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { H as Hash,
|
2
|
-
import { T as TestClient } from './createTestClient-
|
1
|
+
import { H as Hash, o as RpcTransaction, A as Address, X as Quantity, s as TransactionRequest, b as Hex } from './chain-32f56cfa.js';
|
2
|
+
import { T as TestClient } from './createTestClient-79498dab.js';
|
3
3
|
|
4
4
|
type DropTransactionArgs = {
|
5
5
|
/** The hash of the transaction to drop. */
|
package/dist/test.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
export { D as DropTransactionArgs, I as ImpersonateAccountArgs, a as IncreaseTimeArgs, M as MineArgs, R as ResetArgs, b as RevertArgs, S as SendUnsignedTransactionArgs, c as SendUnsignedTransactionResponse, d as SetBalanceArgs, e as SetBlockGasLimitArgs, j as SetBlockTimestampIntervalArgs, f as SetCodeArgs, g as SetCoinbaseArgs, h as SetIntervalMiningArgs, i as SetMinGasPriceArgs, l as SetNextBlockBaseFeePerGasArgs, k as SetNextBlockTimestampArgs, m as SetNonceArgs, n as SetStorageAtArgs, o as StopImpersonatingAccountArgs, p as dropTransaction, q as getAutomine, r as getTxpoolContent, s as getTxpoolStatus, t as impersonateAccount, u as increaseTime, v as inspectTxpool, w as mine, x as removeBlockTimestampInterval, y as reset, z as revert, A as sendUnsignedTransaction, B as setAutomine, C as setBalance, E as setBlockGasLimit, F as setBlockTimestampInterval, G as setCode, H as setCoinbase, J as setIntervalMining, K as setLoggingEnabled, L as setMinGasPrice, N as setNextBlockBaseFeePerGas, O as setNextBlockTimestamp, P as setNonce, Q as setStorageAt, T as snapshot, U as stopImpersonatingAccount } from './stopImpersonatingAccount-
|
2
|
-
import './
|
3
|
-
import './createTestClient-24eb7be8.js';
|
4
|
-
import './eip1193-71d8e27d.js';
|
5
|
-
import './createClient-03ba79e8.js';
|
6
|
-
import './chains.js';
|
1
|
+
export { D as DropTransactionArgs, I as ImpersonateAccountArgs, a as IncreaseTimeArgs, M as MineArgs, R as ResetArgs, b as RevertArgs, S as SendUnsignedTransactionArgs, c as SendUnsignedTransactionResponse, d as SetBalanceArgs, e as SetBlockGasLimitArgs, j as SetBlockTimestampIntervalArgs, f as SetCodeArgs, g as SetCoinbaseArgs, h as SetIntervalMiningArgs, i as SetMinGasPriceArgs, l as SetNextBlockBaseFeePerGasArgs, k as SetNextBlockTimestampArgs, m as SetNonceArgs, n as SetStorageAtArgs, o as StopImpersonatingAccountArgs, p as dropTransaction, q as getAutomine, r as getTxpoolContent, s as getTxpoolStatus, t as impersonateAccount, u as increaseTime, v as inspectTxpool, w as mine, x as removeBlockTimestampInterval, y as reset, z as revert, A as sendUnsignedTransaction, B as setAutomine, C as setBalance, E as setBlockGasLimit, F as setBlockTimestampInterval, G as setCode, H as setCoinbase, J as setIntervalMining, K as setLoggingEnabled, L as setMinGasPrice, N as setNextBlockBaseFeePerGas, O as setNextBlockTimestamp, P as setNonce, Q as setStorageAt, T as snapshot, U as stopImpersonatingAccount } from './stopImpersonatingAccount-7781842a.js';
|
2
|
+
import './chain-32f56cfa.js';
|
7
3
|
import '@wagmi/chains';
|
4
|
+
import './createTestClient-79498dab.js';
|
5
|
+
import './eip1193-6c485d63.js';
|
6
|
+
import './createClient-5d316c7e.js';
|
package/dist/test.js
CHANGED
@@ -26,8 +26,8 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
var
|
30
|
-
require('./chunk-
|
29
|
+
var _chunkYFKR74XGjs = require('./chunk-YFKR74XG.js');
|
30
|
+
require('./chunk-SF4I2NKC.js');
|
31
31
|
|
32
32
|
|
33
33
|
|
@@ -56,5 +56,5 @@ require('./chunk-BZFF747V.js');
|
|
56
56
|
|
57
57
|
|
58
58
|
|
59
|
-
exports.dropTransaction =
|
59
|
+
exports.dropTransaction = _chunkYFKR74XGjs.dropTransaction; exports.getAutomine = _chunkYFKR74XGjs.getAutomine; exports.getTxpoolContent = _chunkYFKR74XGjs.getTxpoolContent; exports.getTxpoolStatus = _chunkYFKR74XGjs.getTxpoolStatus; exports.impersonateAccount = _chunkYFKR74XGjs.impersonateAccount; exports.increaseTime = _chunkYFKR74XGjs.increaseTime; exports.inspectTxpool = _chunkYFKR74XGjs.inspectTxpool; exports.mine = _chunkYFKR74XGjs.mine; exports.removeBlockTimestampInterval = _chunkYFKR74XGjs.removeBlockTimestampInterval; exports.reset = _chunkYFKR74XGjs.reset; exports.revert = _chunkYFKR74XGjs.revert; exports.sendUnsignedTransaction = _chunkYFKR74XGjs.sendUnsignedTransaction; exports.setAutomine = _chunkYFKR74XGjs.setAutomine; exports.setBalance = _chunkYFKR74XGjs.setBalance; exports.setBlockGasLimit = _chunkYFKR74XGjs.setBlockGasLimit; exports.setBlockTimestampInterval = _chunkYFKR74XGjs.setBlockTimestampInterval; exports.setCode = _chunkYFKR74XGjs.setCode; exports.setCoinbase = _chunkYFKR74XGjs.setCoinbase; exports.setIntervalMining = _chunkYFKR74XGjs.setIntervalMining; exports.setLoggingEnabled = _chunkYFKR74XGjs.setLoggingEnabled; exports.setMinGasPrice = _chunkYFKR74XGjs.setMinGasPrice; exports.setNextBlockBaseFeePerGas = _chunkYFKR74XGjs.setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = _chunkYFKR74XGjs.setNextBlockTimestamp; exports.setNonce = _chunkYFKR74XGjs.setNonce; exports.setStorageAt = _chunkYFKR74XGjs.setStorageAt; exports.snapshot = _chunkYFKR74XGjs.snapshot; exports.stopImpersonatingAccount = _chunkYFKR74XGjs.stopImpersonatingAccount;
|
60
60
|
//# sourceMappingURL=test.js.map
|
package/dist/test.mjs
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
import { J as Chain, Q as ExtractFormatter, V as Formatters, K as Formatter, N as Formatted, q as RpcTransactionRequest, s as TransactionRequest } from './chain-32f56cfa.js';
|
2
|
+
|
3
|
+
type TransactionRequestFormatter<TChain extends Chain = Chain> = ExtractFormatter<TChain, 'transactionRequest', NonNullable<Formatters['transactionRequest']>>;
|
4
|
+
type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, RpcTransactionRequest>;
|
5
|
+
declare function formatTransactionRequest(transactionRequest: Partial<TransactionRequest>): RpcTransactionRequest;
|
6
|
+
declare const defineTransactionRequest: <TFormat extends Formatter<Partial<TransactionRequest<bigint, number>>, Partial<RpcTransactionRequest> & {
|
7
|
+
[key: string]: unknown;
|
8
|
+
}>, TExclude extends ("data" | "value" | "gas" | "from" | "nonce" | "to" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "accessList")[] = []>({ exclude, format: formatOverride, }: {
|
9
|
+
exclude?: TExclude | undefined;
|
10
|
+
format?: TFormat | undefined;
|
11
|
+
}) => (data: Partial<TransactionRequest<bigint, number>> & {
|
12
|
+
[key: string]: unknown;
|
13
|
+
}) => RpcTransactionRequest & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
14
|
+
|
15
|
+
export { FormattedTransactionRequest as F, TransactionRequestFormatter as T, defineTransactionRequest as d, formatTransactionRequest as f };
|
package/dist/utils/index.d.ts
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
export { D as DecodeAbiArgs, a as DecodeErrorResultArgs, b as DecodeFunctionDataArgs, c as DecodeFunctionResultArgs, d as DecodeFunctionResultResponse, E as EncodeAbiArgs, e as EncodeDeployDataArgs, f as EncodeErrorResultArgs, g as EncodeEventTopicsArgs, h as EncodeFunctionDataArgs, i as EncodeFunctionResultArgs, l as EncodeRlpResponse, G as GetContractAddressOptions, k as GetCreate2AddressOptions, j as GetCreateAddressOptions, o as boolToBytes, p as boolToHex, q as bytesToBigint, r as bytesToBool, m as bytesToHex, s as bytesToNumber, n as bytesToString, t as decodeAbi, u as decodeBytes, v as decodeErrorResult, w as decodeFunctionData, x as decodeFunctionResult, y as decodeHex, z as decodeRlp, A as encodeAbi, B as encodeBytes, C as encodeDeployData, F as encodeErrorResult, H as encodeEventTopics, I as encodeFunctionData, J as encodeFunctionResult, K as encodeHex, L as encodeRlp,
|
2
|
-
import { A as AbiItem } from '../
|
3
|
-
export { B as BlockFormatter, F as FormattedBlock,
|
1
|
+
export { D as DecodeAbiArgs, a as DecodeErrorResultArgs, b as DecodeFunctionDataArgs, c as DecodeFunctionResultArgs, d as DecodeFunctionResultResponse, E as EncodeAbiArgs, e as EncodeDeployDataArgs, f as EncodeErrorResultArgs, g as EncodeEventTopicsArgs, h as EncodeFunctionDataArgs, i as EncodeFunctionResultArgs, l as EncodeRlpResponse, G as GetContractAddressOptions, k as GetCreate2AddressOptions, j as GetCreateAddressOptions, o as boolToBytes, p as boolToHex, q as bytesToBigint, r as bytesToBool, m as bytesToHex, s as bytesToNumber, n as bytesToString, t as decodeAbi, u as decodeBytes, v as decodeErrorResult, w as decodeFunctionData, x as decodeFunctionResult, y as decodeHex, z as decodeRlp, A as encodeAbi, B as encodeBytes, C as encodeDeployData, F as encodeErrorResult, H as encodeEventTopics, I as encodeFunctionData, J as encodeFunctionResult, K as encodeHex, L as encodeRlp, M as etherUnits, U as formatEther, a9 as formatGwei, aa as formatUnit, N as getAddress, O as getContractAddress, Q as getCreate2Address, P as getCreateAddress, R as getEventSignature, S as getFunctionSignature, T as gweiUnits, Z as hexToBigInt, _ as hexToBool, $ as hexToBytes, ab as hexToNumber, a0 as hexToString, V as isAddress, W as isAddressEqual, X as isBytes, Y as isHex, a1 as keccak256, a2 as numberToBytes, ac as numberToHex, a3 as pad, a4 as padBytes, a5 as padHex, a6 as parseEther, a7 as parseGwei, a8 as parseUnit, ad as size, ae as slice, af as sliceBytes, ag as sliceHex, ah as stringToBytes, ai as stringToHex, aj as trim, ak as weiUnits } from '../parseGwei-4308ad80.js';
|
2
|
+
import { A as AbiItem } from '../contract-9af4608b.js';
|
3
|
+
export { B as BlockFormatter, F as FormattedBlock, i as FormattedTransactionReceipt, T as TransactionReceiptFormatter, k as defineBlock, l as defineTransactionReceipt, g as formatBlock } from '../contract-9af4608b.js';
|
4
4
|
import * as abitype_dist_abi_b1bae27f from 'abitype/dist/abi-b1bae27f';
|
5
5
|
import { Abi } from 'abitype';
|
6
|
-
|
7
|
-
import { Formatter } from '../
|
8
|
-
export {
|
6
|
+
export { d as defineChain } from '../chain-f12cdc7f.js';
|
7
|
+
import { A as Address, K as Formatter } from '../chain-32f56cfa.js';
|
8
|
+
export { Q as ExtractFormatter, N as Formatted, E as FormattedTransaction, P as TransactionFormatter, _ as defineFormatter, $ as defineTransaction, a0 as format, G as formatTransaction, I as transactionType } from '../chain-32f56cfa.js';
|
9
|
+
export { F as FormattedTransactionRequest, T as TransactionRequestFormatter, d as defineTransactionRequest, f as formatTransactionRequest } from '../transactionRequest-341b6ed2.js';
|
9
10
|
export { r as rpc } from '../rpc-26932bae.js';
|
10
11
|
import '@wagmi/chains';
|
11
12
|
|
@@ -16,7 +17,7 @@ declare function formatAbiItemWithArgs({ abiItem, args, includeFunctionName, inc
|
|
16
17
|
includeName?: boolean;
|
17
18
|
}): string | undefined;
|
18
19
|
|
19
|
-
declare function
|
20
|
+
declare function formatAbiItem(abiItem: AbiItem, { includeName }?: {
|
20
21
|
includeName?: boolean;
|
21
22
|
}): string;
|
22
23
|
|
@@ -57,4 +58,4 @@ declare function extract(value: Record<string, unknown>, { formatter }: {
|
|
57
58
|
|
58
59
|
declare function stringify(value: unknown): string;
|
59
60
|
|
60
|
-
export { buildRequest, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType,
|
61
|
+
export { buildRequest, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType, formatAbiItem, formatAbiItemWithArgs, getAbiItem, getContractError, stringify };
|
package/dist/utils/index.js
CHANGED
@@ -72,7 +72,6 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
var _chunkBZFF747Vjs = require('../chunk-BZFF747V.js');
|
76
75
|
|
77
76
|
|
78
77
|
|
@@ -83,6 +82,7 @@ var _chunkBZFF747Vjs = require('../chunk-BZFF747V.js');
|
|
83
82
|
|
84
83
|
|
85
84
|
|
85
|
+
var _chunkSF4I2NKCjs = require('../chunk-SF4I2NKC.js');
|
86
86
|
|
87
87
|
|
88
88
|
|
@@ -147,5 +147,25 @@ var _chunkBZFF747Vjs = require('../chunk-BZFF747V.js');
|
|
147
147
|
|
148
148
|
|
149
149
|
|
150
|
-
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
exports.boolToBytes = _chunkSF4I2NKCjs.boolToBytes; exports.boolToHex = _chunkSF4I2NKCjs.boolToHex; exports.buildRequest = _chunkSF4I2NKCjs.buildRequest; exports.bytesToBigint = _chunkSF4I2NKCjs.bytesToBigint; exports.bytesToBool = _chunkSF4I2NKCjs.bytesToBool; exports.bytesToHex = _chunkSF4I2NKCjs.bytesToHex; exports.bytesToNumber = _chunkSF4I2NKCjs.bytesToNumber; exports.bytesToString = _chunkSF4I2NKCjs.bytesToString; exports.decodeAbi = _chunkSF4I2NKCjs.decodeAbi; exports.decodeBytes = _chunkSF4I2NKCjs.decodeBytes; exports.decodeErrorResult = _chunkSF4I2NKCjs.decodeErrorResult; exports.decodeFunctionData = _chunkSF4I2NKCjs.decodeFunctionData; exports.decodeFunctionResult = _chunkSF4I2NKCjs.decodeFunctionResult; exports.decodeHex = _chunkSF4I2NKCjs.decodeHex; exports.decodeRlp = _chunkSF4I2NKCjs.decodeRlp; exports.defineBlock = _chunkSF4I2NKCjs.defineBlock; exports.defineChain = _chunkSF4I2NKCjs.defineChain; exports.defineFormatter = _chunkSF4I2NKCjs.defineFormatter; exports.defineTransaction = _chunkSF4I2NKCjs.defineTransaction; exports.defineTransactionReceipt = _chunkSF4I2NKCjs.defineTransactionReceipt; exports.defineTransactionRequest = _chunkSF4I2NKCjs.defineTransactionRequest; exports.encodeAbi = _chunkSF4I2NKCjs.encodeAbi; exports.encodeBytes = _chunkSF4I2NKCjs.encodeBytes; exports.encodeDeployData = _chunkSF4I2NKCjs.encodeDeployData; exports.encodeErrorResult = _chunkSF4I2NKCjs.encodeErrorResult; exports.encodeEventTopics = _chunkSF4I2NKCjs.encodeEventTopics; exports.encodeFunctionData = _chunkSF4I2NKCjs.encodeFunctionData; exports.encodeFunctionResult = _chunkSF4I2NKCjs.encodeFunctionResult; exports.encodeHex = _chunkSF4I2NKCjs.encodeHex; exports.encodeRlp = _chunkSF4I2NKCjs.encodeRlp; exports.etherUnits = _chunkSF4I2NKCjs.etherUnits; exports.extract = _chunkSF4I2NKCjs.extract; exports.extractFunctionName = _chunkSF4I2NKCjs.extractFunctionName; exports.extractFunctionParams = _chunkSF4I2NKCjs.extractFunctionParams; exports.extractFunctionParts = _chunkSF4I2NKCjs.extractFunctionParts; exports.extractFunctionType = _chunkSF4I2NKCjs.extractFunctionType; exports.format = _chunkSF4I2NKCjs.format; exports.formatAbiItem = _chunkSF4I2NKCjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkSF4I2NKCjs.formatAbiItemWithArgs; exports.formatBlock = _chunkSF4I2NKCjs.formatBlock; exports.formatEther = _chunkSF4I2NKCjs.formatEther; exports.formatGwei = _chunkSF4I2NKCjs.formatGwei; exports.formatTransaction = _chunkSF4I2NKCjs.formatTransaction; exports.formatTransactionRequest = _chunkSF4I2NKCjs.formatTransactionRequest; exports.formatUnit = _chunkSF4I2NKCjs.formatUnit; exports.getAbiItem = _chunkSF4I2NKCjs.getAbiItem; exports.getAddress = _chunkSF4I2NKCjs.getAddress; exports.getContractAddress = _chunkSF4I2NKCjs.getContractAddress; exports.getContractError = _chunkSF4I2NKCjs.getContractError; exports.getCreate2Address = _chunkSF4I2NKCjs.getCreate2Address; exports.getCreateAddress = _chunkSF4I2NKCjs.getCreateAddress; exports.getEventSignature = _chunkSF4I2NKCjs.getEventSignature; exports.getFunctionSignature = _chunkSF4I2NKCjs.getFunctionSignature; exports.gweiUnits = _chunkSF4I2NKCjs.gweiUnits; exports.hexToBigInt = _chunkSF4I2NKCjs.hexToBigInt; exports.hexToBool = _chunkSF4I2NKCjs.hexToBool; exports.hexToBytes = _chunkSF4I2NKCjs.hexToBytes; exports.hexToNumber = _chunkSF4I2NKCjs.hexToNumber; exports.hexToString = _chunkSF4I2NKCjs.hexToString; exports.isAddress = _chunkSF4I2NKCjs.isAddress; exports.isAddressEqual = _chunkSF4I2NKCjs.isAddressEqual; exports.isBytes = _chunkSF4I2NKCjs.isBytes; exports.isHex = _chunkSF4I2NKCjs.isHex; exports.keccak256 = _chunkSF4I2NKCjs.keccak256; exports.numberToBytes = _chunkSF4I2NKCjs.numberToBytes; exports.numberToHex = _chunkSF4I2NKCjs.numberToHex; exports.pad = _chunkSF4I2NKCjs.pad; exports.padBytes = _chunkSF4I2NKCjs.padBytes; exports.padHex = _chunkSF4I2NKCjs.padHex; exports.parseEther = _chunkSF4I2NKCjs.parseEther; exports.parseGwei = _chunkSF4I2NKCjs.parseGwei; exports.parseUnit = _chunkSF4I2NKCjs.parseUnit; exports.rpc = _chunkSF4I2NKCjs.rpc; exports.size = _chunkSF4I2NKCjs.size; exports.slice = _chunkSF4I2NKCjs.slice; exports.sliceBytes = _chunkSF4I2NKCjs.sliceBytes; exports.sliceHex = _chunkSF4I2NKCjs.sliceHex; exports.stringToBytes = _chunkSF4I2NKCjs.stringToBytes; exports.stringToHex = _chunkSF4I2NKCjs.stringToHex; exports.stringify = _chunkSF4I2NKCjs.stringify; exports.transactionType = _chunkSF4I2NKCjs.transactionType; exports.trim = _chunkSF4I2NKCjs.trim; exports.weiUnits = _chunkSF4I2NKCjs.weiUnits;
|
151
171
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.mjs
CHANGED
@@ -14,6 +14,12 @@ import {
|
|
14
14
|
decodeFunctionResult,
|
15
15
|
decodeHex,
|
16
16
|
decodeRlp,
|
17
|
+
defineBlock,
|
18
|
+
defineChain,
|
19
|
+
defineFormatter,
|
20
|
+
defineTransaction,
|
21
|
+
defineTransactionReceipt,
|
22
|
+
defineTransactionRequest,
|
17
23
|
encodeAbi,
|
18
24
|
encodeBytes,
|
19
25
|
encodeDeployData,
|
@@ -23,14 +29,15 @@ import {
|
|
23
29
|
encodeFunctionResult,
|
24
30
|
encodeHex,
|
25
31
|
encodeRlp,
|
32
|
+
etherUnits,
|
26
33
|
extract,
|
27
34
|
extractFunctionName,
|
28
35
|
extractFunctionParams,
|
29
36
|
extractFunctionParts,
|
30
37
|
extractFunctionType,
|
31
38
|
format,
|
39
|
+
formatAbiItem,
|
32
40
|
formatAbiItemWithArgs,
|
33
|
-
formatAbiItemWithParams,
|
34
41
|
formatBlock,
|
35
42
|
formatEther,
|
36
43
|
formatGwei,
|
@@ -45,6 +52,7 @@ import {
|
|
45
52
|
getCreateAddress,
|
46
53
|
getEventSignature,
|
47
54
|
getFunctionSignature,
|
55
|
+
gweiUnits,
|
48
56
|
hexToBigInt,
|
49
57
|
hexToBool,
|
50
58
|
hexToBytes,
|
@@ -71,8 +79,10 @@ import {
|
|
71
79
|
stringToBytes,
|
72
80
|
stringToHex,
|
73
81
|
stringify,
|
74
|
-
|
75
|
-
|
82
|
+
transactionType,
|
83
|
+
trim,
|
84
|
+
weiUnits
|
85
|
+
} from "../chunk-5Q6FSUU2.mjs";
|
76
86
|
export {
|
77
87
|
boolToBytes,
|
78
88
|
boolToHex,
|
@@ -89,6 +99,12 @@ export {
|
|
89
99
|
decodeFunctionResult,
|
90
100
|
decodeHex,
|
91
101
|
decodeRlp,
|
102
|
+
defineBlock,
|
103
|
+
defineChain,
|
104
|
+
defineFormatter,
|
105
|
+
defineTransaction,
|
106
|
+
defineTransactionReceipt,
|
107
|
+
defineTransactionRequest,
|
92
108
|
encodeAbi,
|
93
109
|
encodeBytes,
|
94
110
|
encodeDeployData,
|
@@ -98,14 +114,15 @@ export {
|
|
98
114
|
encodeFunctionResult,
|
99
115
|
encodeHex,
|
100
116
|
encodeRlp,
|
117
|
+
etherUnits,
|
101
118
|
extract,
|
102
119
|
extractFunctionName,
|
103
120
|
extractFunctionParams,
|
104
121
|
extractFunctionParts,
|
105
122
|
extractFunctionType,
|
106
123
|
format,
|
124
|
+
formatAbiItem,
|
107
125
|
formatAbiItemWithArgs,
|
108
|
-
formatAbiItemWithParams,
|
109
126
|
formatBlock,
|
110
127
|
formatEther,
|
111
128
|
formatGwei,
|
@@ -120,6 +137,7 @@ export {
|
|
120
137
|
getCreateAddress,
|
121
138
|
getEventSignature,
|
122
139
|
getFunctionSignature,
|
140
|
+
gweiUnits,
|
123
141
|
hexToBigInt,
|
124
142
|
hexToBool,
|
125
143
|
hexToBytes,
|
@@ -146,6 +164,8 @@ export {
|
|
146
164
|
stringToBytes,
|
147
165
|
stringToHex,
|
148
166
|
stringify,
|
149
|
-
|
167
|
+
transactionType,
|
168
|
+
trim,
|
169
|
+
weiUnits
|
150
170
|
};
|
151
171
|
//# sourceMappingURL=index.mjs.map
|
package/dist/wallet.d.ts
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
export { G as GetPermissionsResponse, R as RequestPermissionsResponse, S as SignMessageArgs, a as SignMessageResponse, b as SwitchChainArgs, W as WatchAssetArgs, c as WatchAssetResponse, d as addChain, g as getAccounts, e as getPermissions, r as requestAccounts, f as requestPermissions, s as signMessage, h as switchChain, w as watchAsset } from './watchAsset-
|
2
|
-
export { F as FormattedTransactionRequest, S as SendTransactionArgs, a as SendTransactionResponse, s as sendTransaction } from './sendTransaction-
|
3
|
-
import './
|
4
|
-
import './rpc-858670f1.js';
|
1
|
+
export { G as GetPermissionsResponse, R as RequestPermissionsResponse, S as SignMessageArgs, a as SignMessageResponse, b as SwitchChainArgs, W as WatchAssetArgs, c as WatchAssetResponse, d as addChain, g as getAccounts, e as getPermissions, r as requestAccounts, f as requestPermissions, s as signMessage, h as switchChain, w as watchAsset } from './watchAsset-afaad3c7.js';
|
2
|
+
export { F as FormattedTransactionRequest, S as SendTransactionArgs, a as SendTransactionResponse, s as sendTransaction } from './sendTransaction-1c8290a9.js';
|
3
|
+
import './chain-32f56cfa.js';
|
5
4
|
import '@wagmi/chains';
|
6
|
-
import './createWalletClient-
|
7
|
-
import './eip1193-
|
8
|
-
import './createClient-
|
9
|
-
import './transactionRequest-
|
5
|
+
import './createWalletClient-f69a5230.js';
|
6
|
+
import './eip1193-6c485d63.js';
|
7
|
+
import './createClient-5d316c7e.js';
|
8
|
+
import './transactionRequest-341b6ed2.js';
|
package/dist/wallet.js
CHANGED
@@ -8,8 +8,8 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
var
|
12
|
-
require('./chunk-
|
11
|
+
var _chunkIAQPMSGJjs = require('./chunk-IAQPMSGJ.js');
|
12
|
+
require('./chunk-SF4I2NKC.js');
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -20,5 +20,5 @@ require('./chunk-BZFF747V.js');
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
exports.addChain =
|
23
|
+
exports.addChain = _chunkIAQPMSGJjs.addChain; exports.getAccounts = _chunkIAQPMSGJjs.getAccounts; exports.getPermissions = _chunkIAQPMSGJjs.getPermissions; exports.requestAccounts = _chunkIAQPMSGJjs.requestAccounts; exports.requestPermissions = _chunkIAQPMSGJjs.requestPermissions; exports.sendTransaction = _chunkIAQPMSGJjs.sendTransaction; exports.signMessage = _chunkIAQPMSGJjs.signMessage; exports.switchChain = _chunkIAQPMSGJjs.switchChain; exports.watchAsset = _chunkIAQPMSGJjs.watchAsset;
|
24
24
|
//# sourceMappingURL=wallet.js.map
|
package/dist/wallet.mjs
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import { Chain } from './
|
2
|
-
import { W as WalletClient } from './createWalletClient-
|
3
|
-
import { a as WalletPermission, b as WatchAssetParams } from './eip1193-
|
4
|
-
import { A as Address, b as Hex, c as ByteArray } from './rpc-858670f1.js';
|
1
|
+
import { J as Chain, A as Address, b as Hex, c as ByteArray } from './chain-32f56cfa.js';
|
2
|
+
import { W as WalletClient } from './createWalletClient-f69a5230.js';
|
3
|
+
import { a as WalletPermission, b as WatchAssetParams } from './eip1193-6c485d63.js';
|
5
4
|
|
6
5
|
declare function addChain(client: WalletClient, chain: Chain): Promise<void>;
|
7
6
|
|
package/dist/{watchPendingTransactions-01e6be4f.d.ts → watchPendingTransactions-3b722547.d.ts}
RENAMED
@@ -1,11 +1,10 @@
|
|
1
1
|
import { Abi } from 'abitype';
|
2
|
-
import { Chain, Formatter } from './
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import { T as TransactionRequestFormatter, a as Formatted, E as ExtractFormatter } from './transactionRequest-8e970b0e.js';
|
2
|
+
import { b as Hex, J as Chain, A as Address, a as BlockTag, K as Formatter, M as MergeIntersectionProperties, N as Formatted, s as TransactionRequest, O as EstimateGasParameters, H as Hash, F as FeeHistory, L as Log, E as FormattedTransaction, P as TransactionFormatter, Q as ExtractFormatter, p as RpcTransactionReceipt, T as TransactionReceipt, S as TransactionType, x as Transaction } from './chain-32f56cfa.js';
|
3
|
+
import { d as ExtractFunctionNameFromAbi, G as GetValue, e as ExtractArgsFromAbi, f as ExtractResultFromAbi, h as ExtractConstructorArgsFromAbi, F as FormattedBlock, B as BlockFormatter, i as FormattedTransactionReceipt, T as TransactionReceiptFormatter } from './contract-9af4608b.js';
|
4
|
+
import { P as PublicClient } from './createPublicClient-9d2b42e1.js';
|
5
|
+
import { W as WalletClient } from './createWalletClient-f69a5230.js';
|
6
|
+
import { S as SendTransactionArgs, a as SendTransactionResponse } from './sendTransaction-1c8290a9.js';
|
7
|
+
import { T as TransactionRequestFormatter } from './transactionRequest-341b6ed2.js';
|
9
8
|
|
10
9
|
type FilterType = 'transaction' | 'block' | 'event';
|
11
10
|
type Filter<TFilterType extends FilterType = 'event'> = {
|
@@ -340,8 +339,8 @@ type WatchBlockNumberArgs = {
|
|
340
339
|
/** @description Watches and returns incoming block numbers. */
|
341
340
|
declare function watchBlockNumber(client: PublicClient, { emitOnBegin, emitMissed, onBlockNumber, onError, pollingInterval, }: WatchBlockNumberArgs): () => void;
|
342
341
|
|
343
|
-
type OnBlockResponse<TChain extends Chain = Chain> = GetBlockResponse<TChain>;
|
344
|
-
type OnBlock<TChain extends Chain = Chain> = (block: OnBlockResponse<TChain>, prevBlock: OnBlockResponse<TChain> | undefined) => void;
|
342
|
+
type OnBlockResponse<TChain extends Chain = Chain, TIncludeTransactions = false> = Omit<GetBlockResponse<TChain>, TIncludeTransactions extends false ? 'transactions' : ''>;
|
343
|
+
type OnBlock<TChain extends Chain = Chain, TIncludeTransactions = false> = (block: OnBlockResponse<TChain, TIncludeTransactions>, prevBlock: OnBlockResponse<TChain, TIncludeTransactions> | undefined) => void;
|
345
344
|
type WatchBlocksArgs<TChain extends Chain = Chain> = {
|
346
345
|
/** The block tag. Defaults to "latest". */
|
347
346
|
blockTag?: BlockTag;
|
@@ -349,17 +348,23 @@ type WatchBlocksArgs<TChain extends Chain = Chain> = {
|
|
349
348
|
emitMissed?: boolean;
|
350
349
|
/** Whether or not to emit the block to the callback when the subscription opens. */
|
351
350
|
emitOnBegin?: boolean;
|
352
|
-
/** The callback to call when a new block is received. */
|
353
|
-
onBlock: OnBlock<TChain>;
|
354
351
|
/** The callback to call when an error occurred when trying to get for a new block. */
|
355
352
|
onError?: (error: Error) => void;
|
356
|
-
/** Whether or not to include transaction data in the response. */
|
357
|
-
includeTransactions?: boolean;
|
358
353
|
/** Polling frequency (in ms). Defaults to the client's pollingInterval config. */
|
359
354
|
pollingInterval?: number;
|
360
|
-
}
|
355
|
+
} & ({
|
356
|
+
/** Whether or not to include transaction data in the response. */
|
357
|
+
includeTransactions: true;
|
358
|
+
/** The callback to call when a new block is received. */
|
359
|
+
onBlock: OnBlock<TChain, true>;
|
360
|
+
} | {
|
361
|
+
/** Whether or not to include transaction data in the response. */
|
362
|
+
includeTransactions?: false;
|
363
|
+
/** The callback to call when a new block is received. */
|
364
|
+
onBlock: OnBlock<TChain>;
|
365
|
+
});
|
361
366
|
/** @description Watches and returns information for incoming blocks. */
|
362
|
-
declare function watchBlocks<TChain extends Chain
|
367
|
+
declare function watchBlocks<TChain extends Chain, TWatchBlocksArgs extends WatchBlocksArgs<TChain>>(client: PublicClient<any, TChain>, { blockTag, emitMissed, emitOnBegin, onBlock, onError, includeTransactions, pollingInterval, }: TWatchBlocksArgs): () => void;
|
363
368
|
|
364
369
|
type OnTransactionsResponse = Hash[];
|
365
370
|
type OnTransactions = (transactions: OnTransactionsResponse) => void;
|
@@ -375,4 +380,4 @@ type WatchPendingTransactionsArgs = {
|
|
375
380
|
};
|
376
381
|
declare function watchPendingTransactions(client: PublicClient, { batch, onError, onTransactions, pollingInterval, }: WatchPendingTransactionsArgs): () => void;
|
377
382
|
|
378
|
-
export {
|
383
|
+
export { createPendingTransactionFilter as $, GetTransactionResponse as A, GetTransactionReceiptArgs as B, CallArgs as C, DeployContractArgs as D, EstimateGasArgs as E, Filter as F, GetBalanceArgs as G, GetTransactionReceiptResponse as H, OnBlockNumber as I, OnBlockNumberResponse as J, OnBlockResponse as K, OnTransactions as L, OnTransactionsResponse as M, SimulateContractResponse as N, OnBlock as O, UninstallFilterResponse as P, WaitForTransactionReceiptResponse as Q, WatchBlockNumberArgs as R, SimulateContractArgs as S, WatchBlocksArgs as T, UninstallFilterArgs as U, WatchPendingTransactionsArgs as V, WaitForTransactionReceiptArgs as W, WriteContractArgs as X, WriteContractResponse as Y, call as Z, createBlockFilter as _, CallResponse as a, deployContract as a0, estimateGas as a1, getBalance as a2, getBlock as a3, getBlockNumber as a4, getBlockTransactionCount as a5, getBytecode as a6, getChainId as a7, getFeeHistory as a8, getFilterChanges as a9, getFilterLogs as aa, getGasPrice as ab, getTransaction as ac, getTransactionConfirmations as ad, getTransactionCount as ae, getTransactionReceipt as af, simulateContract as ag, uninstallFilter as ah, waitForTransactionReceipt as ai, watchBlockNumber as aj, watchBlocks as ak, watchPendingTransactions as al, writeContract as am, getBlockNumberCache as an, ReplacementReason as ao, ReplacementResponse as ap, CreateBlockFilterResponse as b, CreatePendingTransactionFilterResponse as c, EstimateGasResponse as d, DeployContractResponse as e, GetBalanceResponse as f, GetBlockArgs as g, GetBlockNumberArgs as h, GetBlockNumberResponse as i, GetBlockResponse as j, GetBlockTransactionCountArgs as k, GetBlockTransactionCountResponse as l, GetBytecodeArgs as m, GetBytecodeResponse as n, GetFeeHistoryArgs as o, GetFeeHistoryResponse as p, GetFilterChangesArgs as q, GetFilterChangesResponse as r, GetFilterLogsArgs as s, GetFilterLogsResponse as t, GetGasPriceResponse as u, GetTransactionArgs as v, GetTransactionConfirmationsArgs as w, GetTransactionConfirmationsResponse as x, GetTransactionCountArgs as y, GetTransactionCountResponse as z };
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { b as TransportConfig, T as Transport, B as BaseRpcRequests } from './createClient-
|
2
|
-
import { H as Hash } from './
|
1
|
+
import { b as TransportConfig, T as Transport, B as BaseRpcRequests } from './createClient-5d316c7e.js';
|
2
|
+
import { H as Hash } from './chain-32f56cfa.js';
|
3
3
|
import { R as RpcResponse } from './rpc-26932bae.js';
|
4
4
|
|
5
5
|
type EthereumProvider = {
|
package/dist/window.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import { R as Requests, E as Events } from './eip1193-
|
2
|
-
import './
|
1
|
+
import { R as Requests, E as Events } from './eip1193-6c485d63.js';
|
2
|
+
import './chain-32f56cfa.js';
|
3
|
+
import '@wagmi/chains';
|
3
4
|
|
4
5
|
type WindowProvider = Requests & Events;
|
5
6
|
declare global {
|
package/package.json
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
"description": "TypeScript Interface for Ethereum",
|
4
4
|
"dependencies": {
|
5
5
|
"@noble/hashes": "^1.1.2",
|
6
|
-
"@wagmi/chains": "0.
|
7
|
-
"abitype": "
|
6
|
+
"@wagmi/chains": "~0.2.6",
|
7
|
+
"abitype": "~0.2.5"
|
8
8
|
},
|
9
|
-
"version": "0.0.1-alpha.
|
9
|
+
"version": "0.0.1-alpha.20",
|
10
10
|
"files": [
|
11
11
|
"/actions",
|
12
12
|
"/chains",
|