@wagmi/core 2.0.0-beta.1 → 2.0.0-beta.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/dist/esm/actions/codegen/createReadContract.js +31 -0
- package/dist/esm/actions/codegen/createReadContract.js.map +1 -0
- package/dist/esm/actions/codegen/createSimulateContract.js +33 -0
- package/dist/esm/actions/codegen/createSimulateContract.js.map +1 -0
- package/dist/esm/actions/codegen/createWatchContractEvent.js +31 -0
- package/dist/esm/actions/codegen/createWatchContractEvent.js.map +1 -0
- package/dist/esm/actions/codegen/createWriteContract.js +43 -0
- package/dist/esm/actions/codegen/createWriteContract.js.map +1 -0
- package/dist/esm/actions/disconnect.js +7 -11
- package/dist/esm/actions/disconnect.js.map +1 -1
- package/dist/esm/actions/estimateMaxPriorityFeePerGas.js +12 -0
- package/dist/esm/actions/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/dist/esm/actions/getBlock.js.map +1 -1
- package/dist/esm/actions/getBlockTransactionCount.js +11 -0
- package/dist/esm/actions/getBlockTransactionCount.js.map +1 -0
- package/dist/esm/actions/getFeeHistory.js +11 -0
- package/dist/esm/actions/getFeeHistory.js.map +1 -0
- package/dist/esm/actions/getGasPrice.js +11 -0
- package/dist/esm/actions/getGasPrice.js.map +1 -0
- package/dist/esm/actions/getTransaction.js.map +1 -1
- package/dist/esm/actions/getTransactionCount.js +11 -0
- package/dist/esm/actions/getTransactionCount.js.map +1 -0
- package/dist/esm/actions/simulateContract.js +3 -0
- package/dist/esm/actions/simulateContract.js.map +1 -1
- package/dist/esm/actions/verifyMessage.js +11 -0
- package/dist/esm/actions/verifyMessage.js.map +1 -0
- package/dist/esm/actions/verifyTypedData.js +12 -0
- package/dist/esm/actions/verifyTypedData.js.map +1 -0
- package/dist/esm/actions/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/watchContractEvent.js +3 -0
- package/dist/esm/actions/watchContractEvent.js.map +1 -1
- package/dist/esm/actions/writeContract.js +3 -0
- package/dist/esm/actions/writeContract.js.map +1 -1
- package/dist/esm/connectors/createConnector.js.map +1 -1
- package/dist/esm/connectors/injected.js +10 -4
- package/dist/esm/connectors/injected.js.map +1 -1
- package/dist/esm/connectors/mock.js +2 -0
- package/dist/esm/connectors/mock.js.map +1 -1
- package/dist/esm/createConfig.js +13 -2
- package/dist/esm/createConfig.js.map +1 -1
- package/dist/esm/exports/actions.js +8 -0
- package/dist/esm/exports/actions.js.map +1 -1
- package/dist/esm/exports/chains.js +1 -0
- package/dist/esm/exports/chains.js.map +1 -1
- package/dist/esm/exports/codegen.js +5 -0
- package/dist/esm/exports/codegen.js.map +1 -0
- package/dist/esm/exports/index.js +26 -6
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/exports/internal.js +5 -4
- package/dist/esm/exports/internal.js.map +1 -1
- package/dist/esm/exports/query.js +8 -1
- package/dist/esm/exports/query.js.map +1 -1
- package/dist/esm/query/estimateMaxPriorityFeePerGas.js +19 -0
- package/dist/esm/query/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/dist/esm/query/getBlock.js +1 -1
- package/dist/esm/query/getBlock.js.map +1 -1
- package/dist/esm/query/getBlockTransactionCount.js +20 -0
- package/dist/esm/query/getBlockTransactionCount.js.map +1 -0
- package/dist/esm/query/getFeeHistory.js +27 -0
- package/dist/esm/query/getFeeHistory.js.map +1 -0
- package/dist/esm/query/getGasPrice.js +20 -0
- package/dist/esm/query/getGasPrice.js.map +1 -0
- package/dist/esm/query/getTransactionCount.js +23 -0
- package/dist/esm/query/getTransactionCount.js.map +1 -0
- package/dist/esm/query/infiniteReadContracts.js +2 -0
- package/dist/esm/query/infiniteReadContracts.js.map +1 -1
- package/dist/esm/query/readContract.js +4 -0
- package/dist/esm/query/readContract.js.map +1 -1
- package/dist/esm/query/verifyMessage.js +21 -0
- package/dist/esm/query/verifyMessage.js.map +1 -0
- package/dist/esm/query/verifyTypedData.js +38 -0
- package/dist/esm/query/verifyTypedData.js.map +1 -0
- package/dist/esm/query/waitForTransactionReceipt.js +1 -1
- package/dist/esm/query/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/transports/connector.js +37 -0
- package/dist/esm/transports/connector.js.map +1 -0
- package/dist/esm/transports/fallback.js +6 -0
- package/dist/esm/transports/fallback.js.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/actions/codegen/createReadContract.d.ts +16 -0
- package/dist/types/actions/codegen/createReadContract.d.ts.map +1 -0
- package/dist/types/actions/codegen/createSimulateContract.d.ts +20 -0
- package/dist/types/actions/codegen/createSimulateContract.d.ts.map +1 -0
- package/dist/types/actions/codegen/createWatchContractEvent.d.ts +14 -0
- package/dist/types/actions/codegen/createWatchContractEvent.d.ts.map +1 -0
- package/dist/types/actions/codegen/createWriteContract.d.ts +22 -0
- package/dist/types/actions/codegen/createWriteContract.d.ts.map +1 -0
- package/dist/types/actions/disconnect.d.ts +2 -2
- package/dist/types/actions/disconnect.d.ts.map +1 -1
- package/dist/types/actions/estimateGas.d.ts +2 -2
- package/dist/types/actions/estimateGas.d.ts.map +1 -1
- package/dist/types/actions/estimateMaxPriorityFeePerGas.d.ts +11 -0
- package/dist/types/actions/estimateMaxPriorityFeePerGas.d.ts.map +1 -0
- package/dist/types/actions/getBlock.d.ts +2 -2
- package/dist/types/actions/getBlock.d.ts.map +1 -1
- package/dist/types/actions/getBlockTransactionCount.d.ts +10 -0
- package/dist/types/actions/getBlockTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/getFeeHistory.d.ts +10 -0
- package/dist/types/actions/getFeeHistory.d.ts.map +1 -0
- package/dist/types/actions/getGasPrice.d.ts +10 -0
- package/dist/types/actions/getGasPrice.d.ts.map +1 -0
- package/dist/types/actions/getTransaction.d.ts +2 -2
- package/dist/types/actions/getTransaction.d.ts.map +1 -1
- package/dist/types/actions/getTransactionCount.d.ts +10 -0
- package/dist/types/actions/getTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/simulateContract.d.ts +3 -3
- package/dist/types/actions/simulateContract.d.ts.map +1 -1
- package/dist/types/actions/verifyMessage.d.ts +10 -0
- package/dist/types/actions/verifyMessage.d.ts.map +1 -0
- package/dist/types/actions/verifyTypedData.d.ts +11 -0
- package/dist/types/actions/verifyTypedData.d.ts.map +1 -0
- package/dist/types/actions/waitForTransactionReceipt.d.ts +2 -2
- package/dist/types/actions/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/actions/watchBlocks.d.ts +2 -2
- package/dist/types/actions/watchBlocks.d.ts.map +1 -1
- package/dist/types/actions/watchContractEvent.d.ts +3 -3
- package/dist/types/actions/watchContractEvent.d.ts.map +1 -1
- package/dist/types/actions/writeContract.d.ts +3 -3
- package/dist/types/actions/writeContract.d.ts.map +1 -1
- package/dist/types/connectors/createConnector.d.ts +1 -0
- package/dist/types/connectors/createConnector.d.ts.map +1 -1
- package/dist/types/connectors/injected.d.ts +7 -0
- package/dist/types/connectors/injected.d.ts.map +1 -1
- package/dist/types/connectors/mock.d.ts +3 -0
- package/dist/types/connectors/mock.d.ts.map +1 -1
- package/dist/types/createConfig.d.ts +4 -1
- package/dist/types/createConfig.d.ts.map +1 -1
- package/dist/types/exports/actions.d.ts +7 -0
- package/dist/types/exports/actions.d.ts.map +1 -1
- package/dist/types/exports/chains.d.ts.map +1 -1
- package/dist/types/exports/codegen.d.ts +5 -0
- package/dist/types/exports/codegen.d.ts.map +1 -0
- package/dist/types/exports/index.d.ts +12 -1
- package/dist/types/exports/index.d.ts.map +1 -1
- package/dist/types/exports/internal.d.ts +2 -2
- package/dist/types/exports/internal.d.ts.map +1 -1
- package/dist/types/exports/query.d.ts +7 -1
- package/dist/types/exports/query.d.ts.map +1 -1
- package/dist/types/query/estimateFeesPerGas.d.ts +1 -1
- package/dist/types/query/estimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/query/estimateGas.d.ts +1 -1
- package/dist/types/query/estimateGas.d.ts.map +1 -1
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts +27 -0
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts.map +1 -0
- package/dist/types/query/getBalance.d.ts +1 -1
- package/dist/types/query/getBalance.d.ts.map +1 -1
- package/dist/types/query/getBlock.d.ts +2 -2
- package/dist/types/query/getBlock.d.ts.map +1 -1
- package/dist/types/query/getBlockNumber.d.ts +1 -4
- package/dist/types/query/getBlockNumber.d.ts.map +1 -1
- package/dist/types/query/getBlockTransactionCount.d.ts +18 -0
- package/dist/types/query/getBlockTransactionCount.d.ts.map +1 -0
- package/dist/types/query/getConnectorClient.d.ts +5 -1
- package/dist/types/query/getConnectorClient.d.ts.map +1 -1
- package/dist/types/query/getEnsAddress.d.ts +1 -1
- package/dist/types/query/getEnsAddress.d.ts.map +1 -1
- package/dist/types/query/getEnsAvatar.d.ts +1 -1
- package/dist/types/query/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/query/getEnsName.d.ts +1 -1
- package/dist/types/query/getEnsName.d.ts.map +1 -1
- package/dist/types/query/getEnsResolver.d.ts +1 -1
- package/dist/types/query/getEnsResolver.d.ts.map +1 -1
- package/dist/types/query/getFeeHistory.d.ts +39 -0
- package/dist/types/query/getFeeHistory.d.ts.map +1 -0
- package/dist/types/query/getGasPrice.d.ts +27 -0
- package/dist/types/query/getGasPrice.d.ts.map +1 -0
- package/dist/types/query/getToken.d.ts +1 -1
- package/dist/types/query/getToken.d.ts.map +1 -1
- package/dist/types/query/getTransaction.d.ts +2 -2
- package/dist/types/query/getTransaction.d.ts.map +1 -1
- package/dist/types/query/getTransactionCount.d.ts +36 -0
- package/dist/types/query/getTransactionCount.d.ts.map +1 -0
- package/dist/types/query/getWalletClient.d.ts +13 -13
- package/dist/types/query/getWalletClient.d.ts.map +1 -1
- package/dist/types/query/infiniteReadContracts.d.ts +2 -3
- package/dist/types/query/infiniteReadContracts.d.ts.map +1 -1
- package/dist/types/query/readContract.d.ts +2 -2
- package/dist/types/query/readContract.d.ts.map +1 -1
- package/dist/types/query/readContracts.d.ts +1 -1
- package/dist/types/query/readContracts.d.ts.map +1 -1
- package/dist/types/query/signTypedData.d.ts +8 -8
- package/dist/types/query/simulateContract.d.ts +1 -1
- package/dist/types/query/simulateContract.d.ts.map +1 -1
- package/dist/types/query/types.d.ts +0 -3
- package/dist/types/query/types.d.ts.map +1 -1
- package/dist/types/query/verifyMessage.d.ts +42 -0
- package/dist/types/query/verifyMessage.d.ts.map +1 -0
- package/dist/types/query/verifyTypedData.d.ts +19 -0
- package/dist/types/query/verifyTypedData.d.ts.map +1 -0
- package/dist/types/query/waitForTransactionReceipt.d.ts +2 -2
- package/dist/types/query/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/transports/connector.d.ts +15 -0
- package/dist/types/transports/connector.d.ts.map +1 -0
- package/dist/types/transports/fallback.d.ts +4 -0
- package/dist/types/transports/fallback.d.ts.map +1 -0
- package/dist/types/types/properties.d.ts +3 -0
- package/dist/types/types/properties.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +17 -20
- package/src/actions/codegen/createReadContract.ts +100 -0
- package/src/actions/codegen/createSimulateContract.ts +122 -0
- package/src/actions/codegen/createWatchContractEvent.ts +87 -0
- package/src/actions/codegen/createWriteContract.ts +142 -0
- package/src/actions/disconnect.ts +11 -17
- package/src/actions/estimateGas.ts +1 -1
- package/src/actions/estimateMaxPriorityFeePerGas.ts +41 -0
- package/src/actions/getBlock.ts +2 -2
- package/src/actions/getBlockTransactionCount.ts +36 -0
- package/src/actions/getFeeHistory.ts +32 -0
- package/src/actions/getGasPrice.ts +31 -0
- package/src/actions/getTransaction.ts +4 -2
- package/src/actions/getTransactionCount.ts +31 -0
- package/src/actions/simulateContract.ts +5 -5
- package/src/actions/verifyMessage.ts +28 -0
- package/src/actions/verifyTypedData.ts +41 -0
- package/src/actions/waitForTransactionReceipt.ts +4 -2
- package/src/actions/watchBlocks.ts +2 -2
- package/src/actions/watchContractEvent.ts +6 -5
- package/src/actions/writeContract.ts +6 -7
- package/src/connectors/createConnector.ts +1 -0
- package/src/connectors/injected.ts +13 -3
- package/src/connectors/mock.ts +2 -0
- package/src/createConfig.ts +23 -4
- package/src/exports/actions.ts +48 -0
- package/src/exports/chains.ts +1 -0
- package/src/exports/codegen.ts +7 -0
- package/src/exports/index.ts +80 -13
- package/src/exports/internal.ts +11 -13
- package/src/exports/query.ts +64 -1
- package/src/query/estimateFeesPerGas.ts +1 -1
- package/src/query/estimateGas.ts +1 -1
- package/src/query/estimateMaxPriorityFeePerGas.ts +51 -0
- package/src/query/getBalance.ts +1 -1
- package/src/query/getBlock.ts +2 -2
- package/src/query/getBlockNumber.ts +1 -1
- package/src/query/getBlockTransactionCount.ts +62 -0
- package/src/query/getConnectorClient.ts +1 -1
- package/src/query/getEnsAddress.ts +1 -1
- package/src/query/getEnsAvatar.ts +1 -1
- package/src/query/getEnsName.ts +1 -1
- package/src/query/getEnsResolver.ts +1 -1
- package/src/query/getFeeHistory.ts +69 -0
- package/src/query/getGasPrice.ts +54 -0
- package/src/query/getToken.ts +1 -1
- package/src/query/getTransaction.ts +1 -1
- package/src/query/getTransactionCount.ts +55 -0
- package/src/query/getWalletClient.ts +1 -1
- package/src/query/infiniteReadContracts.ts +6 -3
- package/src/query/readContract.ts +4 -2
- package/src/query/readContracts.ts +1 -1
- package/src/query/simulateContract.ts +1 -1
- package/src/query/types.ts +0 -2
- package/src/query/verifyMessage.ts +54 -0
- package/src/query/verifyTypedData.ts +81 -0
- package/src/query/waitForTransactionReceipt.ts +1 -1
- package/src/transports/connector.ts +87 -0
- package/src/transports/fallback.ts +10 -0
- package/src/types/properties.ts +2 -0
- package/src/version.ts +1 -1
|
@@ -28,7 +28,7 @@ export type EstimateGasParameters<
|
|
|
28
28
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
29
29
|
> = {
|
|
30
30
|
[key in keyof chains]: UnionEvaluate<
|
|
31
|
-
UnionLooseOmit<viem_EstimateGasParameters<chains[key]
|
|
31
|
+
UnionLooseOmit<viem_EstimateGasParameters<chains[key]>, 'chain'> &
|
|
32
32
|
ChainIdParameter<config, chainId> &
|
|
33
33
|
ConnectorParameter
|
|
34
34
|
>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Chain } from 'viem'
|
|
2
|
+
import {
|
|
3
|
+
type EstimateMaxPriorityFeePerGasErrorType as viem_EstimateMaxPriorityFeePerGasErrorType,
|
|
4
|
+
type EstimateMaxPriorityFeePerGasParameters as viem_EstimateMaxPriorityFeePerGasParameters,
|
|
5
|
+
type EstimateMaxPriorityFeePerGasReturnType as viem_EstimateMaxPriorityFeePerGasReturnType,
|
|
6
|
+
estimateMaxPriorityFeePerGas as viem_estimateMaxPriorityFeePerGas,
|
|
7
|
+
} from 'viem/actions'
|
|
8
|
+
|
|
9
|
+
import { type Config } from '../createConfig.js'
|
|
10
|
+
import { type ChainIdParameter } from '../types/properties.js'
|
|
11
|
+
import { type Evaluate, type UnionLooseOmit } from '../types/utils.js'
|
|
12
|
+
|
|
13
|
+
export type EstimateMaxPriorityFeePerGasParameters<
|
|
14
|
+
config extends Config = Config,
|
|
15
|
+
chainId extends config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
16
|
+
> = Evaluate<
|
|
17
|
+
UnionLooseOmit<
|
|
18
|
+
viem_EstimateMaxPriorityFeePerGasParameters<Chain, Chain> &
|
|
19
|
+
ChainIdParameter<config, chainId>,
|
|
20
|
+
'chain'
|
|
21
|
+
>
|
|
22
|
+
>
|
|
23
|
+
|
|
24
|
+
export type EstimateMaxPriorityFeePerGasReturnType =
|
|
25
|
+
viem_EstimateMaxPriorityFeePerGasReturnType
|
|
26
|
+
|
|
27
|
+
export type EstimateMaxPriorityFeePerGasErrorType =
|
|
28
|
+
viem_EstimateMaxPriorityFeePerGasErrorType
|
|
29
|
+
|
|
30
|
+
/** https://beta.wagmi.sh/core/api/actions/estimateMaxPriorityFeePerGas */
|
|
31
|
+
export async function estimateMaxPriorityFeePerGas<
|
|
32
|
+
config extends Config,
|
|
33
|
+
chainId extends config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
34
|
+
>(
|
|
35
|
+
config: config,
|
|
36
|
+
parameters: EstimateMaxPriorityFeePerGasParameters<config, chainId> = {},
|
|
37
|
+
): Promise<EstimateMaxPriorityFeePerGasReturnType> {
|
|
38
|
+
const { chainId } = parameters
|
|
39
|
+
const client = config.getClient({ chainId })
|
|
40
|
+
return viem_estimateMaxPriorityFeePerGas(client)
|
|
41
|
+
}
|
package/src/actions/getBlock.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { type Config } from '../createConfig.js'
|
|
10
10
|
import type { SelectChains } from '../types/chain.js'
|
|
11
11
|
import { type ChainIdParameter } from '../types/properties.js'
|
|
12
|
-
import { type Evaluate } from '../types/utils.js'
|
|
12
|
+
import { type Evaluate, type IsNarrowable } from '../types/utils.js'
|
|
13
13
|
|
|
14
14
|
export type GetBlockParameters<
|
|
15
15
|
includeTransactions extends boolean = false,
|
|
@@ -32,7 +32,7 @@ export type GetBlockReturnType<
|
|
|
32
32
|
> = Evaluate<
|
|
33
33
|
{
|
|
34
34
|
[key in keyof chains]: viem_GetBlockReturnType<
|
|
35
|
-
chains[key],
|
|
35
|
+
IsNarrowable<chains[key], Chain> extends true ? chains[key] : undefined,
|
|
36
36
|
includeTransactions,
|
|
37
37
|
blockTag
|
|
38
38
|
>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type GetBlockTransactionCountErrorType as viem_GetBlockTransactionCountErrorType,
|
|
3
|
+
type GetBlockTransactionCountParameters as viem_GetBlockTransactionCountParameters,
|
|
4
|
+
type GetBlockTransactionCountReturnType as viem_GetBlockTransactionCountReturnType,
|
|
5
|
+
getBlockTransactionCount as viem_getBlockTransactionCount,
|
|
6
|
+
} from 'viem/actions'
|
|
7
|
+
|
|
8
|
+
import { type Config } from '../createConfig.js'
|
|
9
|
+
import { type ChainIdParameter } from '../types/properties.js'
|
|
10
|
+
import { type UnionEvaluate } from '../types/utils.js'
|
|
11
|
+
|
|
12
|
+
export type GetBlockTransactionCountParameters<
|
|
13
|
+
config extends Config = Config,
|
|
14
|
+
chainId extends config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
15
|
+
> = UnionEvaluate<
|
|
16
|
+
viem_GetBlockTransactionCountParameters & ChainIdParameter<config, chainId>
|
|
17
|
+
>
|
|
18
|
+
|
|
19
|
+
export type GetBlockTransactionCountReturnType =
|
|
20
|
+
viem_GetBlockTransactionCountReturnType
|
|
21
|
+
|
|
22
|
+
export type GetBlockTransactionCountErrorType =
|
|
23
|
+
viem_GetBlockTransactionCountErrorType
|
|
24
|
+
|
|
25
|
+
/** https://beta.wagmi.sh/core/api/actions/getBlockTransactionCount */
|
|
26
|
+
export function getBlockTransactionCount<
|
|
27
|
+
config extends Config,
|
|
28
|
+
chainId extends config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
29
|
+
>(
|
|
30
|
+
config: config,
|
|
31
|
+
parameters: GetBlockTransactionCountParameters<config, chainId> = {},
|
|
32
|
+
): Promise<GetBlockTransactionCountReturnType> {
|
|
33
|
+
const { chainId } = parameters
|
|
34
|
+
const client = config.getClient({ chainId })
|
|
35
|
+
return viem_getBlockTransactionCount(client, parameters)
|
|
36
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type GetFeeHistoryErrorType as viem_GetFeeHistoryErrorType,
|
|
3
|
+
type GetFeeHistoryParameters as viem_GetFeeHistoryParameters,
|
|
4
|
+
type GetFeeHistoryReturnType as viem_GetFeeHistoryReturnType,
|
|
5
|
+
getFeeHistory as viem_getFeeHistory,
|
|
6
|
+
} from 'viem/actions'
|
|
7
|
+
|
|
8
|
+
import { type Config } from '../createConfig.js'
|
|
9
|
+
import { type ChainIdParameter } from '../types/properties.js'
|
|
10
|
+
import { type Evaluate } from '../types/utils.js'
|
|
11
|
+
|
|
12
|
+
export type GetFeeHistoryParameters<
|
|
13
|
+
config extends Config = Config,
|
|
14
|
+
chainId extends config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
15
|
+
> = Evaluate<viem_GetFeeHistoryParameters & ChainIdParameter<config, chainId>>
|
|
16
|
+
|
|
17
|
+
export type GetFeeHistoryReturnType = viem_GetFeeHistoryReturnType
|
|
18
|
+
|
|
19
|
+
export type GetFeeHistoryErrorType = viem_GetFeeHistoryErrorType
|
|
20
|
+
|
|
21
|
+
/** https://beta.wagmi.sh/core/api/actions/getFeeHistory */
|
|
22
|
+
export function getFeeHistory<
|
|
23
|
+
config extends Config,
|
|
24
|
+
chainId extends config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
25
|
+
>(
|
|
26
|
+
config: config,
|
|
27
|
+
parameters: GetFeeHistoryParameters<config, chainId>,
|
|
28
|
+
): Promise<GetFeeHistoryReturnType> {
|
|
29
|
+
const { chainId } = parameters
|
|
30
|
+
const client = config.getClient({ chainId })
|
|
31
|
+
return viem_getFeeHistory(client, parameters)
|
|
32
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type GetGasPriceErrorType as viem_GetGasPriceErrorType,
|
|
3
|
+
type GetGasPriceReturnType as viem_GetGasPriceReturnType,
|
|
4
|
+
getGasPrice as viem_getGasPrice,
|
|
5
|
+
} from 'viem/actions'
|
|
6
|
+
|
|
7
|
+
import { type Config } from '../createConfig.js'
|
|
8
|
+
import { type ChainIdParameter } from '../types/properties.js'
|
|
9
|
+
import { type Evaluate } from '../types/utils.js'
|
|
10
|
+
|
|
11
|
+
export type GetGasPriceParameters<
|
|
12
|
+
config extends Config = Config,
|
|
13
|
+
chainId extends config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
14
|
+
> = Evaluate<ChainIdParameter<config, chainId>>
|
|
15
|
+
|
|
16
|
+
export type GetGasPriceReturnType = viem_GetGasPriceReturnType
|
|
17
|
+
|
|
18
|
+
export type GetGasPriceErrorType = viem_GetGasPriceErrorType
|
|
19
|
+
|
|
20
|
+
/** https://beta.wagmi.sh/core/api/actions/getGasPrice */
|
|
21
|
+
export function getGasPrice<
|
|
22
|
+
config extends Config,
|
|
23
|
+
chainId extends config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
24
|
+
>(
|
|
25
|
+
config: config,
|
|
26
|
+
parameters: GetGasPriceParameters<config, chainId> = {},
|
|
27
|
+
): Promise<GetGasPriceReturnType> {
|
|
28
|
+
const { chainId } = parameters
|
|
29
|
+
const client = config.getClient({ chainId })
|
|
30
|
+
return viem_getGasPrice(client)
|
|
31
|
+
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { type Config } from '../createConfig.js'
|
|
10
10
|
import type { SelectChains } from '../types/chain.js'
|
|
11
11
|
import { type ChainIdParameter } from '../types/properties.js'
|
|
12
|
-
import { type Evaluate } from '../types/utils.js'
|
|
12
|
+
import { type Evaluate, type IsNarrowable } from '../types/utils.js'
|
|
13
13
|
|
|
14
14
|
export type GetTransactionParameters<
|
|
15
15
|
config extends Config = Config,
|
|
@@ -23,7 +23,9 @@ export type GetTransactionReturnType<
|
|
|
23
23
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
24
24
|
> = Evaluate<
|
|
25
25
|
{
|
|
26
|
-
[key in keyof chains]: viem_GetTransactionReturnType<
|
|
26
|
+
[key in keyof chains]: viem_GetTransactionReturnType<
|
|
27
|
+
IsNarrowable<chains[key], Chain> extends true ? chains[key] : undefined
|
|
28
|
+
>
|
|
27
29
|
}[number]
|
|
28
30
|
>
|
|
29
31
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type GetTransactionCountErrorType as viem_GetTransactionCountErrorType,
|
|
3
|
+
type GetTransactionCountParameters as viem_GetTransactionCountParameters,
|
|
4
|
+
type GetTransactionCountReturnType as viem_GetTransactionCountReturnType,
|
|
5
|
+
getTransactionCount as viem_getTransactionCount,
|
|
6
|
+
} from 'viem/actions'
|
|
7
|
+
|
|
8
|
+
import { type Config } from '../createConfig.js'
|
|
9
|
+
import { type ChainIdParameter } from '../types/properties.js'
|
|
10
|
+
import { type Evaluate } from '../types/utils.js'
|
|
11
|
+
|
|
12
|
+
export type GetTransactionCountParameters<config extends Config = Config> =
|
|
13
|
+
Evaluate<ChainIdParameter<config> & viem_GetTransactionCountParameters>
|
|
14
|
+
|
|
15
|
+
export type GetTransactionCountReturnType = viem_GetTransactionCountReturnType
|
|
16
|
+
|
|
17
|
+
export type GetTransactionCountErrorType = viem_GetTransactionCountErrorType
|
|
18
|
+
|
|
19
|
+
/** https://beta.wagmi.sh/core/api/actions/getTransactionCount */
|
|
20
|
+
export async function getTransactionCount<config extends Config>(
|
|
21
|
+
config: config,
|
|
22
|
+
parameters: GetTransactionCountParameters<config>,
|
|
23
|
+
): Promise<GetTransactionCountReturnType> {
|
|
24
|
+
const { address, blockNumber, blockTag, chainId } = parameters
|
|
25
|
+
|
|
26
|
+
const client = config.getClient({ chainId })
|
|
27
|
+
return await viem_getTransactionCount(
|
|
28
|
+
client,
|
|
29
|
+
blockNumber ? { address, blockNumber } : { address, blockTag },
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
} from 'viem/actions'
|
|
15
15
|
|
|
16
16
|
import { type Config } from '../createConfig.js'
|
|
17
|
-
import type
|
|
18
|
-
import type
|
|
19
|
-
import
|
|
20
|
-
ChainIdParameter,
|
|
21
|
-
ConnectorParameter,
|
|
17
|
+
import { type BaseErrorType, type ErrorType } from '../errors/base.js'
|
|
18
|
+
import { type SelectChains } from '../types/chain.js'
|
|
19
|
+
import {
|
|
20
|
+
type ChainIdParameter,
|
|
21
|
+
type ConnectorParameter,
|
|
22
22
|
} from '../types/properties.js'
|
|
23
23
|
import type { PartialBy, UnionEvaluate, UnionOmit } from '../types/utils.js'
|
|
24
24
|
import {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type VerifyMessageErrorType as viem_VerifyMessageErrorType,
|
|
3
|
+
type VerifyMessageParameters as viem_VerifyMessageParameters,
|
|
4
|
+
type VerifyMessageReturnType as viem_VerifyMessageReturnType,
|
|
5
|
+
verifyMessage as viem_verifyMessage,
|
|
6
|
+
} from 'viem/actions'
|
|
7
|
+
|
|
8
|
+
import { type Config } from '../createConfig.js'
|
|
9
|
+
import { type ChainIdParameter } from '../types/properties.js'
|
|
10
|
+
import { type Evaluate } from '../types/utils.js'
|
|
11
|
+
|
|
12
|
+
export type VerifyMessageParameters<config extends Config = Config> = Evaluate<
|
|
13
|
+
viem_VerifyMessageParameters & ChainIdParameter<config>
|
|
14
|
+
>
|
|
15
|
+
|
|
16
|
+
export type VerifyMessageReturnType = viem_VerifyMessageReturnType
|
|
17
|
+
|
|
18
|
+
export type VerifyMessageErrorType = viem_VerifyMessageErrorType
|
|
19
|
+
|
|
20
|
+
/** https://beta.wagmi.sh/core/api/actions/verifyMessage */
|
|
21
|
+
export async function verifyMessage<config extends Config>(
|
|
22
|
+
config: config,
|
|
23
|
+
parameters: VerifyMessageParameters<config>,
|
|
24
|
+
): Promise<VerifyMessageReturnType> {
|
|
25
|
+
const { chainId, ...rest } = parameters
|
|
26
|
+
const client = config.getClient({ chainId })
|
|
27
|
+
return viem_verifyMessage(client, rest)
|
|
28
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type TypedData } from 'viem'
|
|
2
|
+
import {
|
|
3
|
+
type VerifyTypedDataErrorType as viem_VerifyTypedDataErrorType,
|
|
4
|
+
type VerifyTypedDataParameters as viem_VerifyTypedDataParameters,
|
|
5
|
+
type VerifyTypedDataReturnType as viem_VerifyTypedDataReturnType,
|
|
6
|
+
verifyTypedData as viem_verifyTypedData,
|
|
7
|
+
} from 'viem/actions'
|
|
8
|
+
|
|
9
|
+
import { type Config } from '../createConfig.js'
|
|
10
|
+
import { type ChainIdParameter } from '../types/properties.js'
|
|
11
|
+
import { type Evaluate } from '../types/utils.js'
|
|
12
|
+
|
|
13
|
+
export type VerifyTypedDataParameters<
|
|
14
|
+
typedData extends TypedData | Record<string, unknown> = TypedData,
|
|
15
|
+
primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData,
|
|
16
|
+
config extends Config = Config,
|
|
17
|
+
> = Evaluate<
|
|
18
|
+
viem_VerifyTypedDataParameters<
|
|
19
|
+
typedData,
|
|
20
|
+
primaryType extends string ? primaryType : never // TODO: Remove extends clause once Viem is updated
|
|
21
|
+
> &
|
|
22
|
+
ChainIdParameter<config>
|
|
23
|
+
>
|
|
24
|
+
|
|
25
|
+
export type VerifyTypedDataReturnType = viem_VerifyTypedDataReturnType
|
|
26
|
+
|
|
27
|
+
export type VerifyTypedDataErrorType = viem_VerifyTypedDataErrorType
|
|
28
|
+
|
|
29
|
+
/** https://beta.wagmi.sh/core/api/actions/verifyTypedData */
|
|
30
|
+
export async function verifyTypedData<
|
|
31
|
+
config extends Config,
|
|
32
|
+
const typedData extends TypedData | Record<string, unknown>,
|
|
33
|
+
primaryType extends keyof typedData | 'EIP712Domain',
|
|
34
|
+
>(
|
|
35
|
+
config: config,
|
|
36
|
+
parameters: VerifyTypedDataParameters<typedData, primaryType, config>,
|
|
37
|
+
): Promise<VerifyTypedDataReturnType> {
|
|
38
|
+
const { chainId, ...rest } = parameters
|
|
39
|
+
const client = config.getClient({ chainId })
|
|
40
|
+
return viem_verifyTypedData(client, rest as viem_VerifyTypedDataParameters)
|
|
41
|
+
}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { type Config } from '../createConfig.js'
|
|
13
13
|
import type { SelectChains } from '../types/chain.js'
|
|
14
14
|
import { type ChainIdParameter } from '../types/properties.js'
|
|
15
|
-
import { type Evaluate } from '../types/utils.js'
|
|
15
|
+
import { type Evaluate, type IsNarrowable } from '../types/utils.js'
|
|
16
16
|
|
|
17
17
|
export type WaitForTransactionReceiptParameters<
|
|
18
18
|
config extends Config = Config,
|
|
@@ -28,7 +28,9 @@ export type WaitForTransactionReceiptReturnType<
|
|
|
28
28
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
29
29
|
> = Evaluate<
|
|
30
30
|
{
|
|
31
|
-
[key in keyof chains]: viem_WaitForTransactionReceiptReturnType<
|
|
31
|
+
[key in keyof chains]: viem_WaitForTransactionReceiptReturnType<
|
|
32
|
+
IsNarrowable<chains[key], Chain> extends true ? chains[key] : undefined
|
|
33
|
+
>
|
|
32
34
|
}[number]
|
|
33
35
|
>
|
|
34
36
|
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
ChainIdParameter,
|
|
12
12
|
SyncConnectedChainParameter,
|
|
13
13
|
} from '../types/properties.js'
|
|
14
|
-
import type { UnionEvaluate } from '../types/utils.js'
|
|
14
|
+
import type { IsNarrowable, UnionEvaluate } from '../types/utils.js'
|
|
15
15
|
|
|
16
16
|
export type WatchBlocksParameters<
|
|
17
17
|
includeTransactions extends boolean = false,
|
|
@@ -28,7 +28,7 @@ export type WatchBlocksParameters<
|
|
|
28
28
|
? WebSocketTransport
|
|
29
29
|
: transport
|
|
30
30
|
: WebSocketTransport,
|
|
31
|
-
chains[key],
|
|
31
|
+
IsNarrowable<chains[key], Chain> extends true ? chains[key] : undefined,
|
|
32
32
|
includeTransactions,
|
|
33
33
|
blockTag
|
|
34
34
|
> &
|
|
@@ -10,13 +10,14 @@ import {
|
|
|
10
10
|
type WatchContractEventReturnType as viem_WatchContractEventReturnType,
|
|
11
11
|
watchContractEvent as viem_watchContractEvent,
|
|
12
12
|
} from 'viem/actions'
|
|
13
|
+
|
|
13
14
|
import { type Config } from '../createConfig.js'
|
|
14
|
-
import type
|
|
15
|
-
import
|
|
16
|
-
ChainIdParameter,
|
|
17
|
-
SyncConnectedChainParameter,
|
|
15
|
+
import { type SelectChains } from '../types/chain.js'
|
|
16
|
+
import {
|
|
17
|
+
type ChainIdParameter,
|
|
18
|
+
type SyncConnectedChainParameter,
|
|
18
19
|
} from '../types/properties.js'
|
|
19
|
-
import type
|
|
20
|
+
import { type UnionEvaluate } from '../types/utils.js'
|
|
20
21
|
|
|
21
22
|
export type WatchContractEventParameters<
|
|
22
23
|
abi extends Abi | readonly unknown[] = Abi,
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
} from 'viem/actions'
|
|
14
14
|
|
|
15
15
|
import { type Config } from '../createConfig.js'
|
|
16
|
-
import type
|
|
17
|
-
import type
|
|
18
|
-
import
|
|
19
|
-
ChainIdParameter,
|
|
20
|
-
ConnectorParameter,
|
|
16
|
+
import { type BaseErrorType, type ErrorType } from '../errors/base.js'
|
|
17
|
+
import { type SelectChains } from '../types/chain.js'
|
|
18
|
+
import {
|
|
19
|
+
type ChainIdParameter,
|
|
20
|
+
type ConnectorParameter,
|
|
21
21
|
} from '../types/properties.js'
|
|
22
22
|
import type { Evaluate, UnionEvaluate, UnionOmit } from '../types/utils.js'
|
|
23
23
|
import {
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
} from './getConnectorClient.js'
|
|
27
27
|
import {
|
|
28
28
|
type SimulateContractErrorType,
|
|
29
|
-
type SimulateContractParameters,
|
|
30
29
|
simulateContract,
|
|
31
30
|
} from './simulateContract.js'
|
|
32
31
|
|
|
@@ -106,7 +105,7 @@ export async function writeContract<
|
|
|
106
105
|
else {
|
|
107
106
|
const { request: simulateRequest } = await simulateContract(
|
|
108
107
|
config,
|
|
109
|
-
rest as
|
|
108
|
+
rest as any,
|
|
110
109
|
)
|
|
111
110
|
request = simulateRequest
|
|
112
111
|
}
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
UserRejectedRequestError,
|
|
10
10
|
getAddress,
|
|
11
11
|
numberToHex,
|
|
12
|
+
withRetry,
|
|
13
|
+
withTimeout,
|
|
12
14
|
} from 'viem'
|
|
13
15
|
|
|
14
16
|
import { ChainNotConfiguredError } from '../errors/config.js'
|
|
@@ -84,6 +86,7 @@ const targetMap = {
|
|
|
84
86
|
},
|
|
85
87
|
} as const satisfies TargetMap
|
|
86
88
|
|
|
89
|
+
injected.type = 'injected' as const
|
|
87
90
|
export function injected(parameters: InjectedParameters = {}) {
|
|
88
91
|
const { shimDisconnect = true, unstable_shimAsyncInject } = parameters
|
|
89
92
|
|
|
@@ -132,6 +135,7 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
132
135
|
get name() {
|
|
133
136
|
return getTarget().name
|
|
134
137
|
},
|
|
138
|
+
type: injected.type,
|
|
135
139
|
async setup() {
|
|
136
140
|
const provider = await this.getProvider()
|
|
137
141
|
// Only start listening for events if `target` is set, otherwise `injected()` will also receive events
|
|
@@ -268,7 +272,7 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
268
272
|
unstable_shimAsyncInject !== false
|
|
269
273
|
) {
|
|
270
274
|
// If no provider is found, check for async injection
|
|
271
|
-
// https://github.com/
|
|
275
|
+
// https://github.com/wevm/references/issues/167
|
|
272
276
|
// https://github.com/MetaMask/detect-provider
|
|
273
277
|
const handleEthereum = async () => {
|
|
274
278
|
if (typeof window !== 'undefined')
|
|
@@ -305,7 +309,13 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
305
309
|
throw new ProviderNotFoundError()
|
|
306
310
|
}
|
|
307
311
|
|
|
308
|
-
|
|
312
|
+
// We are applying a retry & timeout strategy here as some injected wallets (ie. MetaMask) fail to
|
|
313
|
+
// immediately resolve a JSON-RPC request on page load.
|
|
314
|
+
const accounts = await withRetry(() =>
|
|
315
|
+
withTimeout(() => this.getAccounts(), {
|
|
316
|
+
timeout: 100,
|
|
317
|
+
}),
|
|
318
|
+
)
|
|
309
319
|
return !!accounts.length
|
|
310
320
|
} catch {
|
|
311
321
|
return false
|
|
@@ -359,7 +369,7 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
359
369
|
chainId: numberToHex(chainId),
|
|
360
370
|
chainName: chain.name,
|
|
361
371
|
nativeCurrency: chain.nativeCurrency,
|
|
362
|
-
rpcUrls: [chain.rpcUrls.
|
|
372
|
+
rpcUrls: [chain.rpcUrls.default?.http[0] ?? ''],
|
|
363
373
|
blockExplorerUrls,
|
|
364
374
|
},
|
|
365
375
|
],
|
package/src/connectors/mock.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type MockParameters = {
|
|
|
34
34
|
| undefined
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
mock.type = 'mock' as const
|
|
37
38
|
export function mock(parameters: MockParameters) {
|
|
38
39
|
const features = parameters.features ?? {}
|
|
39
40
|
|
|
@@ -46,6 +47,7 @@ export function mock(parameters: MockParameters) {
|
|
|
46
47
|
return createConnector<Provider>((config) => ({
|
|
47
48
|
id: 'mock',
|
|
48
49
|
name: 'Mock Connector',
|
|
50
|
+
type: mock.type,
|
|
49
51
|
async setup() {
|
|
50
52
|
connectedChainId = config.chains[0].id
|
|
51
53
|
},
|
package/src/createConfig.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
type Chain,
|
|
9
9
|
type Client,
|
|
10
10
|
type ClientConfig as viem_ClientConfig,
|
|
11
|
-
type Transport,
|
|
11
|
+
type Transport as viem_Transport,
|
|
12
12
|
createClient,
|
|
13
13
|
} from 'viem'
|
|
14
14
|
import { persist, subscribeWithSelector } from 'zustand/middleware'
|
|
@@ -92,7 +92,7 @@ export function createConfig<
|
|
|
92
92
|
: []),
|
|
93
93
|
].map(setup),
|
|
94
94
|
)
|
|
95
|
-
function setup(connectorFn: CreateConnectorFn) {
|
|
95
|
+
function setup(connectorFn: CreateConnectorFn): Connector {
|
|
96
96
|
// Set up emitter with uid and add to connector so they are "linked" together.
|
|
97
97
|
const emitter = createEmitter<ConnectorEventMap>(uid())
|
|
98
98
|
const connector = {
|
|
@@ -155,7 +155,11 @@ export function createConfig<
|
|
|
155
155
|
...properties,
|
|
156
156
|
chain,
|
|
157
157
|
batch: properties.batch ?? { multicall: true },
|
|
158
|
-
transport:
|
|
158
|
+
transport: (parameters) =>
|
|
159
|
+
rest.transports[chainId]({
|
|
160
|
+
...parameters,
|
|
161
|
+
connectors,
|
|
162
|
+
}),
|
|
159
163
|
})
|
|
160
164
|
}
|
|
161
165
|
|
|
@@ -218,10 +222,19 @@ export function createConfig<
|
|
|
218
222
|
|
|
219
223
|
// EIP-6963 subscribe for new wallet providers
|
|
220
224
|
mipd?.subscribe((providerDetails) => {
|
|
225
|
+
const currentConnectorIds = new Map()
|
|
226
|
+
for (const connector of connectors.getState()) {
|
|
227
|
+
currentConnectorIds.set(connector.id, true)
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const newConnectors: Connector[] = []
|
|
221
231
|
for (const providerDetail of providerDetails) {
|
|
222
232
|
const connector = setup(providerDetailToConnector(providerDetail))
|
|
223
|
-
|
|
233
|
+
if (currentConnectorIds.has(connector.id)) continue
|
|
234
|
+
newConnectors.push(connector)
|
|
224
235
|
}
|
|
236
|
+
|
|
237
|
+
connectors.setState((x) => [...x, ...newConnectors], true)
|
|
225
238
|
})
|
|
226
239
|
|
|
227
240
|
/////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -434,6 +447,12 @@ export type Connector = ReturnType<CreateConnectorFn> & {
|
|
|
434
447
|
uid: string
|
|
435
448
|
}
|
|
436
449
|
|
|
450
|
+
export type Transport = (
|
|
451
|
+
params: Parameters<viem_Transport>[0] & {
|
|
452
|
+
connectors?: StoreApi<Connector[]>
|
|
453
|
+
},
|
|
454
|
+
) => ReturnType<viem_Transport>
|
|
455
|
+
|
|
437
456
|
type ClientConfig = LooseOmit<
|
|
438
457
|
viem_ClientConfig,
|
|
439
458
|
'account' | 'chain' | 'key' | 'name' | 'transport' | 'type'
|
package/src/exports/actions.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
////////////////////////////////////////////////////////////////////////////////
|
|
2
2
|
// Actions
|
|
3
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
3
4
|
|
|
4
5
|
export {
|
|
5
6
|
type ConnectErrorType,
|
|
@@ -29,6 +30,13 @@ export {
|
|
|
29
30
|
estimateFeesPerGas,
|
|
30
31
|
} from '../actions/estimateFeesPerGas.js'
|
|
31
32
|
|
|
33
|
+
export {
|
|
34
|
+
type EstimateMaxPriorityFeePerGasErrorType,
|
|
35
|
+
type EstimateMaxPriorityFeePerGasParameters,
|
|
36
|
+
type EstimateMaxPriorityFeePerGasReturnType,
|
|
37
|
+
estimateMaxPriorityFeePerGas,
|
|
38
|
+
} from '../actions/estimateMaxPriorityFeePerGas.js'
|
|
39
|
+
|
|
32
40
|
export {
|
|
33
41
|
type GetAccountReturnType,
|
|
34
42
|
getAccount,
|
|
@@ -59,6 +67,13 @@ export {
|
|
|
59
67
|
getBlockNumber as fetchBlockNumber,
|
|
60
68
|
} from '../actions/getBlockNumber.js'
|
|
61
69
|
|
|
70
|
+
export {
|
|
71
|
+
type GetBlockTransactionCountErrorType,
|
|
72
|
+
type GetBlockTransactionCountParameters,
|
|
73
|
+
type GetBlockTransactionCountReturnType,
|
|
74
|
+
getBlockTransactionCount,
|
|
75
|
+
} from '../actions/getBlockTransactionCount.js'
|
|
76
|
+
|
|
62
77
|
export {
|
|
63
78
|
type GetChainIdReturnType,
|
|
64
79
|
getChainId,
|
|
@@ -123,6 +138,20 @@ export {
|
|
|
123
138
|
getEnsResolver as fetchEnsResolver,
|
|
124
139
|
} from '../actions/getEnsResolver.js'
|
|
125
140
|
|
|
141
|
+
export {
|
|
142
|
+
type GetFeeHistoryErrorType,
|
|
143
|
+
type GetFeeHistoryParameters,
|
|
144
|
+
type GetFeeHistoryReturnType,
|
|
145
|
+
getFeeHistory,
|
|
146
|
+
} from '../actions/getFeeHistory.js'
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
type GetGasPriceErrorType,
|
|
150
|
+
type GetGasPriceParameters,
|
|
151
|
+
type GetGasPriceReturnType,
|
|
152
|
+
getGasPrice,
|
|
153
|
+
} from '../actions/getGasPrice.js'
|
|
154
|
+
|
|
126
155
|
export {
|
|
127
156
|
type GetPublicClientParameters,
|
|
128
157
|
type GetPublicClientReturnType,
|
|
@@ -147,6 +176,13 @@ export {
|
|
|
147
176
|
getTransaction as fetchTransaction,
|
|
148
177
|
} from '../actions/getTransaction.js'
|
|
149
178
|
|
|
179
|
+
export {
|
|
180
|
+
type GetTransactionCountErrorType,
|
|
181
|
+
type GetTransactionCountParameters,
|
|
182
|
+
type GetTransactionCountReturnType,
|
|
183
|
+
getTransactionCount,
|
|
184
|
+
} from '../actions/getTransactionCount.js'
|
|
185
|
+
|
|
150
186
|
export {
|
|
151
187
|
type GetWalletClientErrorType,
|
|
152
188
|
type GetWalletClientParameters,
|
|
@@ -225,6 +261,18 @@ export {
|
|
|
225
261
|
switchChain as switchNetwork,
|
|
226
262
|
} from '../actions/switchChain.js'
|
|
227
263
|
|
|
264
|
+
export {
|
|
265
|
+
type VerifyMessageParameters,
|
|
266
|
+
type VerifyMessageReturnType,
|
|
267
|
+
verifyMessage,
|
|
268
|
+
} from '../actions/verifyMessage.js'
|
|
269
|
+
|
|
270
|
+
export {
|
|
271
|
+
type VerifyTypedDataParameters,
|
|
272
|
+
type VerifyTypedDataReturnType,
|
|
273
|
+
verifyTypedData,
|
|
274
|
+
} from '../actions/verifyTypedData.js'
|
|
275
|
+
|
|
228
276
|
export {
|
|
229
277
|
type WatchAccountParameters,
|
|
230
278
|
type WatchAccountReturnType,
|
package/src/exports/chains.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { createSimulateContract } from '../actions/codegen/createSimulateContract.js'
|
|
2
|
+
|
|
3
|
+
export { createReadContract } from '../actions/codegen/createReadContract.js'
|
|
4
|
+
|
|
5
|
+
export { createWatchContractEvent } from '../actions/codegen/createWatchContractEvent.js'
|
|
6
|
+
|
|
7
|
+
export { createWriteContract } from '../actions/codegen/createWriteContract.js'
|