wagmi 2.19.4 → 3.0.0
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/exports/index.js +15 -26
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/hooks/useCapabilities.js +2 -2
- package/dist/esm/hooks/useCapabilities.js.map +1 -1
- package/dist/esm/hooks/useConnect.js.map +1 -1
- package/dist/esm/hooks/useConnection.js +10 -0
- package/dist/esm/hooks/useConnection.js.map +1 -0
- package/dist/esm/hooks/{useAccountEffect.js → useConnectionEffect.js} +5 -5
- package/dist/esm/hooks/useConnectionEffect.js.map +1 -0
- package/dist/esm/hooks/useConnectorClient.js +2 -2
- package/dist/esm/hooks/useConnectorClient.js.map +1 -1
- package/dist/esm/hooks/useDisconnect.js.map +1 -1
- package/dist/esm/hooks/useReadContracts.js +2 -3
- package/dist/esm/hooks/useReadContracts.js.map +1 -1
- package/dist/esm/hooks/useSwitchChain.js.map +1 -1
- package/dist/esm/hooks/{useSwitchAccount.js → useSwitchConnection.js} +7 -5
- package/dist/esm/hooks/useSwitchConnection.js.map +1 -0
- package/dist/esm/hooks/useWalletClient.js +2 -2
- package/dist/esm/hooks/useWalletClient.js.map +1 -1
- 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/exports/index.d.ts +26 -27
- package/dist/types/exports/index.d.ts.map +1 -1
- package/dist/types/hooks/codegen/createUseWriteContract.d.ts +1 -4
- package/dist/types/hooks/codegen/createUseWriteContract.d.ts.map +1 -1
- package/dist/types/hooks/useConnect.d.ts +1 -0
- package/dist/types/hooks/useConnect.d.ts.map +1 -1
- package/dist/types/hooks/useConnection.d.ts +7 -0
- package/dist/types/hooks/useConnection.d.ts.map +1 -0
- package/dist/types/hooks/useConnectionEffect.d.ts +14 -0
- package/dist/types/hooks/useConnectionEffect.d.ts.map +1 -0
- package/dist/types/hooks/useDisconnect.d.ts +1 -0
- package/dist/types/hooks/useDisconnect.d.ts.map +1 -1
- package/dist/types/hooks/useSwitchChain.d.ts +1 -0
- package/dist/types/hooks/useSwitchChain.d.ts.map +1 -1
- package/dist/types/hooks/useSwitchConnection.d.ts +21 -0
- package/dist/types/hooks/useSwitchConnection.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +4 -16
- package/src/exports/index.ts +36 -37
- package/src/hooks/codegen/createUseWriteContract.ts +1 -4
- package/src/hooks/useCapabilities.ts +2 -2
- package/src/hooks/useConnect.ts +1 -0
- package/src/hooks/useConnection.ts +33 -0
- package/src/hooks/{useAccountEffect.ts → useConnectionEffect.ts} +8 -6
- package/src/hooks/useConnectorClient.ts +2 -2
- package/src/hooks/useDisconnect.ts +1 -0
- package/src/hooks/useReadContracts.ts +2 -2
- package/src/hooks/useSwitchChain.ts +1 -0
- package/src/hooks/{useSwitchAccount.ts → useSwitchConnection.ts} +28 -21
- package/src/hooks/useWalletClient.ts +2 -2
- package/src/version.ts +1 -1
- package/actions/experimental/package.json +0 -5
- package/dist/esm/experimental/hooks/useWriteContracts.js +0 -20
- package/dist/esm/experimental/hooks/useWriteContracts.js.map +0 -1
- package/dist/esm/exports/actions/experimental.js +0 -7
- package/dist/esm/exports/actions/experimental.js.map +0 -1
- package/dist/esm/exports/experimental.js +0 -23
- package/dist/esm/exports/experimental.js.map +0 -1
- package/dist/esm/hooks/useAccount.js +0 -10
- package/dist/esm/hooks/useAccount.js.map +0 -1
- package/dist/esm/hooks/useAccountEffect.js.map +0 -1
- package/dist/esm/hooks/useSwitchAccount.js.map +0 -1
- package/dist/esm/hooks/useToken.js +0 -22
- package/dist/esm/hooks/useToken.js.map +0 -1
- package/dist/types/experimental/hooks/useWriteContracts.d.ts +0 -16
- package/dist/types/experimental/hooks/useWriteContracts.d.ts.map +0 -1
- package/dist/types/exports/actions/experimental.d.ts +0 -2
- package/dist/types/exports/actions/experimental.d.ts.map +0 -1
- package/dist/types/exports/experimental.d.ts +0 -43
- package/dist/types/exports/experimental.d.ts.map +0 -1
- package/dist/types/hooks/useAccount.d.ts +0 -7
- package/dist/types/hooks/useAccount.d.ts.map +0 -1
- package/dist/types/hooks/useAccountEffect.d.ts +0 -14
- package/dist/types/hooks/useAccountEffect.d.ts.map +0 -1
- package/dist/types/hooks/useSwitchAccount.d.ts +0 -16
- package/dist/types/hooks/useSwitchAccount.d.ts.map +0 -1
- package/dist/types/hooks/useToken.d.ts +0 -14
- package/dist/types/hooks/useToken.d.ts.map +0 -1
- package/experimental/package.json +0 -5
- package/src/experimental/hooks/useWriteContracts.ts +0 -85
- package/src/exports/actions/experimental.ts +0 -7
- package/src/exports/experimental.ts +0 -53
- package/src/hooks/useAccount.ts +0 -31
- package/src/hooks/useToken.ts +0 -60
package/dist/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '
|
|
1
|
+
export const version = '3.0.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
export { WagmiContext,
|
|
2
|
-
/** @deprecated Use `WagmiContext` instead */
|
|
3
|
-
WagmiContext as Context, WagmiProvider,
|
|
4
|
-
/** @deprecated Use `WagmiProvider` instead */
|
|
5
|
-
WagmiProvider as WagmiConfig, type WagmiProviderProps, } from '../context.js';
|
|
1
|
+
export { WagmiContext, WagmiProvider, type WagmiProviderProps, } from '../context.js';
|
|
6
2
|
export { BaseError, type BaseErrorType } from '../errors/base.js';
|
|
7
3
|
export { WagmiProviderNotFoundError, type WagmiProviderNotFoundErrorType, } from '../errors/context.js';
|
|
8
|
-
export { type UseAccountParameters, type UseAccountReturnType, useAccount, } from '../hooks/useAccount.js';
|
|
9
|
-
export { type UseAccountEffectParameters, useAccountEffect, } from '../hooks/useAccountEffect.js';
|
|
10
4
|
export { type UseBalanceParameters, type UseBalanceReturnType, useBalance, } from '../hooks/useBalance.js';
|
|
11
5
|
export { type UseBlockParameters, type UseBlockReturnType, useBlock, } from '../hooks/useBlock.js';
|
|
12
6
|
export { type UseBlockNumberParameters, type UseBlockNumberReturnType, useBlockNumber, } from '../hooks/useBlockNumber.js';
|
|
@@ -20,6 +14,18 @@ export { type UseChainsParameters, type UseChainsReturnType, useChains, } from '
|
|
|
20
14
|
export { type UseClientParameters, type UseClientReturnType, useClient, } from '../hooks/useClient.js';
|
|
21
15
|
export { type UseConfigParameters, type UseConfigReturnType, useConfig, } from '../hooks/useConfig.js';
|
|
22
16
|
export { type UseConnectParameters, type UseConnectReturnType, useConnect, } from '../hooks/useConnect.js';
|
|
17
|
+
export {
|
|
18
|
+
/** @deprecated use `UseConnectionParameters` instead */
|
|
19
|
+
type UseConnectionParameters as UseAccountParameters, type UseConnectionParameters,
|
|
20
|
+
/** @deprecated use `UseConnectionsReturnType` instead */
|
|
21
|
+
type UseConnectionReturnType as UseAccountReturnType, type UseConnectionReturnType,
|
|
22
|
+
/** @deprecated use `useConnection` instead */
|
|
23
|
+
useConnection as useAccount, useConnection, } from '../hooks/useConnection.js';
|
|
24
|
+
export {
|
|
25
|
+
/** @deprecated use `UseConnectionEffectParameters` instead */
|
|
26
|
+
type UseConnectionEffectParameters as UseAccountEffectParameters, type UseConnectionEffectParameters,
|
|
27
|
+
/** @deprecated use `useConnectionEffect` instead */
|
|
28
|
+
useConnectionEffect as useAccountEffect, useConnectionEffect, } from '../hooks/useConnectionEffect.js';
|
|
23
29
|
export { type UseConnectionsParameters, type UseConnectionsReturnType, useConnections, } from '../hooks/useConnections.js';
|
|
24
30
|
export { type UseConnectorClientParameters, type UseConnectorClientReturnType, useConnectorClient, } from '../hooks/useConnectorClient.js';
|
|
25
31
|
export { type UseConnectorsParameters, type UseConnectorsReturnType, useConnectors, } from '../hooks/useConnectors.js';
|
|
@@ -30,25 +36,17 @@ export { type UseEnsAvatarParameters, type UseEnsAvatarReturnType, useEnsAvatar,
|
|
|
30
36
|
export { type UseEnsNameParameters, type UseEnsNameReturnType, useEnsName, } from '../hooks/useEnsName.js';
|
|
31
37
|
export { type UseEnsResolverParameters, type UseEnsResolverReturnType, useEnsResolver, } from '../hooks/useEnsResolver.js';
|
|
32
38
|
export { type UseEnsTextParameters, type UseEnsTextReturnType, useEnsText, } from '../hooks/useEnsText.js';
|
|
33
|
-
export { type UseEstimateFeesPerGasParameters, type UseEstimateFeesPerGasReturnType, useEstimateFeesPerGas,
|
|
34
|
-
/** @deprecated Use `useEstimateFeesPerGas` instead */
|
|
35
|
-
useEstimateFeesPerGas as useFeeData, } from '../hooks/useEstimateFeesPerGas.js';
|
|
39
|
+
export { type UseEstimateFeesPerGasParameters, type UseEstimateFeesPerGasReturnType, useEstimateFeesPerGas, } from '../hooks/useEstimateFeesPerGas.js';
|
|
36
40
|
export { type UseEstimateGasParameters, type UseEstimateGasReturnType, useEstimateGas, } from '../hooks/useEstimateGas.js';
|
|
37
41
|
export { type UseEstimateMaxPriorityFeePerGasParameters, type UseEstimateMaxPriorityFeePerGasReturnType, useEstimateMaxPriorityFeePerGas, } from '../hooks/useEstimateMaxPriorityFeePerGas.js';
|
|
38
42
|
export { type UseFeeHistoryParameters, type UseFeeHistoryReturnType, useFeeHistory, } from '../hooks/useFeeHistory.js';
|
|
39
43
|
export { type UseGasPriceParameters, type UseGasPriceReturnType, useGasPrice, } from '../hooks/useGasPrice.js';
|
|
40
|
-
export { type UseInfiniteContractReadsParameters, type UseInfiniteContractReadsReturnType, useInfiniteReadContracts,
|
|
41
|
-
/** @deprecated Use `useInfiniteReadContracts` instead */
|
|
42
|
-
useInfiniteReadContracts as useContractInfiniteReads, } from '../hooks/useInfiniteReadContracts.js';
|
|
44
|
+
export { type UseInfiniteContractReadsParameters, type UseInfiniteContractReadsReturnType, useInfiniteReadContracts, } from '../hooks/useInfiniteReadContracts.js';
|
|
43
45
|
export { type UsePrepareTransactionRequestParameters, type UsePrepareTransactionRequestReturnType, usePrepareTransactionRequest, } from '../hooks/usePrepareTransactionRequest.js';
|
|
44
46
|
export { type UseProofParameters, type UseProofReturnType, useProof, } from '../hooks/useProof.js';
|
|
45
47
|
export { type UsePublicClientParameters, type UsePublicClientReturnType, usePublicClient, } from '../hooks/usePublicClient.js';
|
|
46
|
-
export { type UseReadContractParameters, type UseReadContractReturnType, useReadContract,
|
|
47
|
-
|
|
48
|
-
useReadContract as useContractRead, } from '../hooks/useReadContract.js';
|
|
49
|
-
export { type UseReadContractsParameters, type UseReadContractsReturnType, useReadContracts,
|
|
50
|
-
/** @deprecated Use `useWriteContract` instead */
|
|
51
|
-
useReadContracts as useContractReads, } from '../hooks/useReadContracts.js';
|
|
48
|
+
export { type UseReadContractParameters, type UseReadContractReturnType, useReadContract, } from '../hooks/useReadContract.js';
|
|
49
|
+
export { type UseReadContractsParameters, type UseReadContractsReturnType, useReadContracts, } from '../hooks/useReadContracts.js';
|
|
52
50
|
export { type UseReconnectParameters, type UseReconnectReturnType, useReconnect, } from '../hooks/useReconnect.js';
|
|
53
51
|
export { type UseSendCallsParameters, type UseSendCallsReturnType, useSendCalls, } from '../hooks/useSendCalls.js';
|
|
54
52
|
export { type UseSendCallsSyncParameters, type UseSendCallsSyncReturnType, useSendCallsSync, } from '../hooks/useSendCallsSync.js';
|
|
@@ -59,11 +57,14 @@ export { type UseSignMessageParameters, type UseSignMessageReturnType, useSignMe
|
|
|
59
57
|
export { type UseSignTypedDataParameters, type UseSignTypedDataReturnType, useSignTypedData, } from '../hooks/useSignTypedData.js';
|
|
60
58
|
export { type UseSimulateContractParameters, type UseSimulateContractReturnType, useSimulateContract, } from '../hooks/useSimulateContract.js';
|
|
61
59
|
export { type UseStorageAtParameters, type UseStorageAtReturnType, useStorageAt, } from '../hooks/useStorageAt.js';
|
|
62
|
-
export { type UseSwitchAccountParameters, type UseSwitchAccountReturnType, useSwitchAccount, } from '../hooks/useSwitchAccount.js';
|
|
63
60
|
export { type UseSwitchChainParameters, type UseSwitchChainReturnType, useSwitchChain, } from '../hooks/useSwitchChain.js';
|
|
64
|
-
export {
|
|
65
|
-
/** @deprecated
|
|
66
|
-
|
|
61
|
+
export {
|
|
62
|
+
/** @deprecated use `UseSwitchConnectionParameters` instead */
|
|
63
|
+
type UseSwitchConnectionParameters as UseSwitchAccountParameters, type UseSwitchConnectionParameters,
|
|
64
|
+
/** @deprecated use `UseSwitchConnectionReturnType` instead */
|
|
65
|
+
type UseSwitchConnectionReturnType as UseSwitchAccountReturnType, type UseSwitchConnectionReturnType,
|
|
66
|
+
/** @deprecated use `useSwitchConnection` instead */
|
|
67
|
+
useSwitchConnection as useSwitchAccount, useSwitchConnection, } from '../hooks/useSwitchConnection.js';
|
|
67
68
|
export { type UseTransactionParameters, type UseTransactionReturnType, useTransaction, } from '../hooks/useTransaction.js';
|
|
68
69
|
export { type UseTransactionConfirmationsParameters, type UseTransactionConfirmationsReturnType, useTransactionConfirmations, } from '../hooks/useTransactionConfirmations.js';
|
|
69
70
|
export { type UseTransactionCountParameters, type UseTransactionCountReturnType, useTransactionCount, } from '../hooks/useTransactionCount.js';
|
|
@@ -78,10 +79,8 @@ export { type UseWatchBlockNumberParameters, type UseWatchBlockNumberReturnType,
|
|
|
78
79
|
export { type UseWatchBlocksParameters, type UseWatchBlocksReturnType, useWatchBlocks, } from '../hooks/useWatchBlocks.js';
|
|
79
80
|
export { type UseWatchContractEventParameters, type UseWatchContractEventReturnType, useWatchContractEvent, } from '../hooks/useWatchContractEvent.js';
|
|
80
81
|
export { type UseWatchPendingTransactionsParameters, type UseWatchPendingTransactionsReturnType, useWatchPendingTransactions, } from '../hooks/useWatchPendingTransactions.js';
|
|
81
|
-
export { type UseWriteContractParameters, type UseWriteContractReturnType, useWriteContract,
|
|
82
|
-
/** @deprecated Use `useWriteContract` instead */
|
|
83
|
-
useWriteContract as useContractWrite, } from '../hooks/useWriteContract.js';
|
|
82
|
+
export { type UseWriteContractParameters, type UseWriteContractReturnType, useWriteContract, } from '../hooks/useWriteContract.js';
|
|
84
83
|
export { Hydrate, type HydrateProps, } from '../hydrate.js';
|
|
85
|
-
export { ChainNotConfiguredError, type ChainNotConfiguredErrorType, type Config, type Connection, type Connector, ConnectorAccountNotFoundError, type ConnectorAccountNotFoundErrorType, ConnectorAlreadyConnectedError, type ConnectorAlreadyConnectedErrorType, ConnectorChainMismatchError, type ConnectorChainMismatchErrorType, type ConnectorEventMap, ConnectorNotFoundError, type ConnectorNotFoundErrorType, ConnectorUnavailableReconnectingError, type ConnectorUnavailableReconnectingErrorType, type CreateConfigParameters, type CreateConnectorFn, type CreateStorageParameters, cookieStorage, cookieToInitialState, createConfig, createConnector, createStorage, custom, deepEqual, deserialize, fallback, http, injected, mock, noopStorage,
|
|
84
|
+
export { ChainNotConfiguredError, type ChainNotConfiguredErrorType, type Config, type Connection, type Connector, ConnectorAccountNotFoundError, type ConnectorAccountNotFoundErrorType, ConnectorAlreadyConnectedError, type ConnectorAlreadyConnectedErrorType, ConnectorChainMismatchError, type ConnectorChainMismatchErrorType, type ConnectorEventMap, ConnectorNotFoundError, type ConnectorNotFoundErrorType, ConnectorUnavailableReconnectingError, type ConnectorUnavailableReconnectingErrorType, type CreateConfigParameters, type CreateConnectorFn, type CreateStorageParameters, cookieStorage, cookieToInitialState, createConfig, createConnector, createStorage, custom, deepEqual, deserialize, fallback, http, injected, mock, noopStorage, type PartializedState, ProviderNotFoundError, type ProviderNotFoundErrorType, parseCookie, type Register, type ResolvedRegister, type State, type Storage, SwitchChainNotSupportedError, type SwitchChainNotSupportedErrorType, serialize, type Transport, unstable_connector, webSocket, } from '@wagmi/core';
|
|
86
85
|
export { version } from '../version.js';
|
|
87
86
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAA;AAMtB,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,EACL,0BAA0B,EAC1B,KAAK,8BAA8B,GACpC,MAAM,sBAAsB,CAAA;AAM7B,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,UAAU,GACX,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,QAAQ,GACT,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,cAAc,GACf,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EACvC,wBAAwB,GACzB,MAAM,sCAAsC,CAAA;AAE7C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,WAAW,GACZ,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,OAAO,GACR,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,cAAc,GACf,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,eAAe,GAChB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,KAAK,oB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,EACV,KAAK,OAAO,EACZ,4BAA4B,EAC5B,KAAK,gCAAgC,EACrC,SAAS,EACT,KAAK,SAAS,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,aAAa,CAAA;AAMpB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -20,9 +20,6 @@ type Variables<abi extends Abi | readonly unknown[], functionName extends Contra
|
|
|
20
20
|
[key in keyof chains]: UnionStrictOmit<viem_WriteContractParameters<abi, name, args, chains[key], Account, chains[key], allFunctionNames>, omittedProperties | 'chain'>;
|
|
21
21
|
}[number] & (address extends Record<number, Address> ? {
|
|
22
22
|
chainId?: keyof address | (chainId extends keyof address ? chainId : never) | undefined;
|
|
23
|
-
} : Compute<ChainIdParameter<config, chainId>>) & ConnectorParameter
|
|
24
|
-
/** @deprecated */
|
|
25
|
-
__mode?: 'prepared';
|
|
26
|
-
}>;
|
|
23
|
+
} : Compute<ChainIdParameter<config, chainId>>) & ConnectorParameter>;
|
|
27
24
|
export {};
|
|
28
25
|
//# sourceMappingURL=createUseWriteContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUseWriteContract.d.ts","sourceRoot":"","sources":["../../../../src/hooks/codegen/createUseWriteContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EACV,MAAM,EACN,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,eAAe,EAChB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EACV,GAAG,EACH,OAAO,EACP,OAAO,EACP,KAAK,EACL,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,MA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AY,CACd;KACG,GAAG,IAAI,MAAM,MAAM,GAAG,eAAe,CACpC,4BAA4B,CAC1B,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,MAAM,CAAC,GAAG,CAAC,EACX,OAAO,EACP,MAAM,CAAC,GAAG,CAAC,EACX,gBAAgB,CACjB,EACD,iBAAiB,GAAG,OAAO,CAC5B;CACF,CAAC,MAAM,CAAC,GACP,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC;IACE,OAAO,CAAC,EACJ,MAAM,OAAO,GACb,CAAC,OAAO,SAAS,MAAM,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC,GACjD,SAAS,CAAA;CACd,GACD,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAC/C,kBAAkB,
|
|
1
|
+
{"version":3,"file":"createUseWriteContract.d.ts","sourceRoot":"","sources":["../../../../src/hooks/codegen/createUseWriteContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EACV,MAAM,EACN,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,eAAe,EAChB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EACV,GAAG,EACH,OAAO,EACP,OAAO,EACP,KAAK,EACL,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,uBAAuB,IAAI,4BAA4B,EAAE,MAAM,cAAc,CAAA;AAI3F,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,0BAA0B,IAAI,gCAAgC,EACpE,MAAM,wBAAwB,CAAA;AAE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AgB,CACjB,EACD,iBAAiB,GAAG,OAAO,CAC5B;CACF,CAAC,MAAM,CAAC,GACP,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC;IACE,OAAO,CAAC,EACJ,MAAM,OAAO,GACb,CAAC,OAAO,SAAS,MAAM,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC,GACjD,SAAS,CAAA;CACd,GACD,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAC/C,kBAAkB,CACrB,CAAA"}
|
|
@@ -10,6 +10,7 @@ export type UseConnectParameters<config extends Config = Config, context = unkno
|
|
|
10
10
|
export type UseConnectReturnType<config extends Config = Config, context = unknown> = Compute<UseMutationReturnType<ConnectData<config, config['connectors'][number], boolean>, ConnectErrorType, ConnectVariables<config, config['connectors'][number], boolean>, context> & {
|
|
11
11
|
connect: ConnectMutate<config, context>;
|
|
12
12
|
connectAsync: ConnectMutateAsync<config, context>;
|
|
13
|
+
/** @deprecated use `useConnectors` instead */
|
|
13
14
|
connectors: Compute<UseConnectorsReturnType> | config['connectors'];
|
|
14
15
|
}>;
|
|
15
16
|
/** https://wagmi.sh/react/api/hooks/useConnect */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConnect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConnect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAEtB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB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gB,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAC/D,OAAO,CACR,GAAG;IACF,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,YAAY,EAAE,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjD,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;CACpE,CACF,CAAA;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CACxB,MAAM,SAAS,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,EAClD,OAAO,GAAG,OAAO,EAEjB,UAAU,GAAE,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAM,GACrD,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CA6BvC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Config, type GetConnectionReturnType, type ResolvedRegister } from '@wagmi/core';
|
|
2
|
+
import type { ConfigParameter } from '../types/properties.js';
|
|
3
|
+
export type UseConnectionParameters<config extends Config = Config> = ConfigParameter<config>;
|
|
4
|
+
export type UseConnectionReturnType<config extends Config = Config> = GetConnectionReturnType<config>;
|
|
5
|
+
/** https://wagmi.sh/react/api/hooks/useConnection */
|
|
6
|
+
export declare function useConnection<config extends Config = ResolvedRegister['config']>(parameters?: UseConnectionParameters<config>): UseConnectionReturnType<config>;
|
|
7
|
+
//# sourceMappingURL=useConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConnection.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConnection.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,uBAAuB,EAE5B,KAAK,gBAAgB,EAEtB,MAAM,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAI7D,MAAM,MAAM,uBAAuB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAChE,eAAe,CAAC,MAAM,CAAC,CAAA;AAEzB,MAAM,MAAM,uBAAuB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAChE,uBAAuB,CAAC,MAAM,CAAC,CAAA;AAEjC,qDAAqD;AACrD,wBAAgB,aAAa,CAC3B,MAAM,SAAS,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,EAElD,UAAU,GAAE,uBAAuB,CAAC,MAAM,CAAM,GAC/C,uBAAuB,CAAC,MAAM,CAAC,CAOjC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type GetConnectionReturnType } from '@wagmi/core';
|
|
2
|
+
import type { Compute } from '@wagmi/core/internal';
|
|
3
|
+
import type { ConfigParameter } from '../types/properties.js';
|
|
4
|
+
export type UseConnectionEffectParameters = Compute<{
|
|
5
|
+
onConnect?(data: Compute<Pick<Extract<GetConnectionReturnType, {
|
|
6
|
+
status: 'connected';
|
|
7
|
+
}>, 'address' | 'addresses' | 'chain' | 'chainId' | 'connector'> & {
|
|
8
|
+
isReconnected: boolean;
|
|
9
|
+
}>): void;
|
|
10
|
+
onDisconnect?(): void;
|
|
11
|
+
} & ConfigParameter>;
|
|
12
|
+
/** https://wagmi.sh/react/api/hooks/useConnectionEffect */
|
|
13
|
+
export declare function useConnectionEffect(parameters?: UseConnectionEffectParameters): void;
|
|
14
|
+
//# sourceMappingURL=useConnectionEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConnectionEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConnectionEffect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,uBAAuB,EAAmB,MAAM,aAAa,CAAA;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAGnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAG7D,MAAM,MAAM,6BAA6B,GAAG,OAAO,CACjD;IACE,SAAS,CAAC,CACR,IAAI,EAAE,OAAO,CACX,IAAI,CACF,OAAO,CAAC,uBAAuB,EAAE;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC,EACzD,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAC5D,GAAG;QACF,aAAa,EAAE,OAAO,CAAA;KACvB,CACF,GACA,IAAI,CAAA;IACP,YAAY,CAAC,IAAI,IAAI,CAAA;CACtB,GAAG,eAAe,CACpB,CAAA;AAED,2DAA2D;AAC3D,wBAAgB,mBAAmB,CACjC,UAAU,GAAE,6BAAkC,QAoC/C"}
|
|
@@ -7,6 +7,7 @@ export type UseDisconnectParameters<context = unknown> = Compute<ConfigParameter
|
|
|
7
7
|
mutation?: UseMutationParameters<DisconnectData, DisconnectErrorType, DisconnectVariables, context> | undefined;
|
|
8
8
|
}>;
|
|
9
9
|
export type UseDisconnectReturnType<context = unknown> = Compute<UseMutationReturnType<DisconnectData, DisconnectErrorType, DisconnectVariables, context> & {
|
|
10
|
+
/** @deprecated use `useConnections` instead */
|
|
10
11
|
connectors: readonly Connector[];
|
|
11
12
|
disconnect: DisconnectMutate<context>;
|
|
12
13
|
disconnectAsync: DisconnectMutateAsync<context>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisconnect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDisconnect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,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AO,GAAG,OAAO,IAAI,OAAO,CAC9D,eAAe,GAAG;IAChB,QAAQ,CAAC,EACL,qBAAqB,CACnB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,CACR,GACD,SAAS,CAAA;CACd,CACF,CAAA;AAED,MAAM,MAAM,uBAAuB,CAAC,OAAO,GAAG,OAAO,IAAI,OAAO,CAC9D,qBAAqB,CACnB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,CACR,GAAG;IACF,+CAA+C;IAC/C,UAAU,EAAE,SAAS,SAAS,EAAE,CAAA;IAChC,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACrC,eAAe,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAA;CAChD,CACF,CAAA;AAED,qDAAqD;AACrD,wBAAgB,aAAa,CAAC,OAAO,GAAG,OAAO,EAC7C,UAAU,GAAE,uBAAuB,CAAC,OAAO,CAAM,GAChD,uBAAuB,CAAC,OAAO,CAAC,CAmBlC"}
|
|
@@ -7,6 +7,7 @@ export type UseSwitchChainParameters<config extends Config = Config, context = u
|
|
|
7
7
|
mutation?: UseMutationParameters<SwitchChainData<config, config['chains'][number]['id']>, SwitchChainErrorType, SwitchChainVariables<config, config['chains'][number]['id']>, context> | undefined;
|
|
8
8
|
}>;
|
|
9
9
|
export type UseSwitchChainReturnType<config extends Config = Config, context = unknown> = Compute<UseMutationReturnType<SwitchChainData<config, config['chains'][number]['id']>, SwitchChainErrorType, SwitchChainVariables<config, config['chains'][number]['id']>, context> & {
|
|
10
|
+
/** @deprecated use `useChains` instead */
|
|
10
11
|
chains: config['chains'];
|
|
11
12
|
switchChain: SwitchChainMutate<config, context>;
|
|
12
13
|
switchChainAsync: SwitchChainMutateAsync<config, context>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSwitchChain.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSwitchChain.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAC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ACd,CACF,CAAA;AAED,MAAM,MAAM,wBAAwB,CAClC,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,OAAO,GAAG,OAAO,IACf,OAAO,CACT,qBAAqB,CACnB,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EACvD,oBAAoB,EACpB,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EAC5D,OAAO,CACR,GAAG;IACF,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAA;IACxB,WAAW,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/C,gBAAgB,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1D,CACF,CAAA;AAED,sDAAsD;AACtD,wBAAgB,cAAc,CAC5B,MAAM,SAAS,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,EAClD,OAAO,GAAG,OAAO,EAEjB,UAAU,GAAE,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAM,GACzD,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAC,CAkB3C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Config, Connector, ResolvedRegister, SwitchConnectionErrorType } from '@wagmi/core';
|
|
2
|
+
import type { Compute } from '@wagmi/core/internal';
|
|
3
|
+
import { type SwitchConnectionData, type SwitchConnectionMutate, type SwitchConnectionMutateAsync, type SwitchConnectionVariables } from '@wagmi/core/query';
|
|
4
|
+
import type { ConfigParameter } from '../types/properties.js';
|
|
5
|
+
import type { UseMutationParameters, UseMutationReturnType } from '../utils/query.js';
|
|
6
|
+
export type UseSwitchConnectionParameters<config extends Config = Config, context = unknown> = Compute<ConfigParameter<config> & {
|
|
7
|
+
mutation?: UseMutationParameters<SwitchConnectionData<config>, SwitchConnectionErrorType, SwitchConnectionVariables, context> | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export type UseSwitchConnectionReturnType<config extends Config = Config, context = unknown> = Compute<UseMutationReturnType<SwitchConnectionData<config>, SwitchConnectionErrorType, SwitchConnectionVariables, context> & {
|
|
10
|
+
/** @deprecated use `useConnections` instead */
|
|
11
|
+
connectors: readonly Connector[];
|
|
12
|
+
/** @deprecated use `switchConnection` instead */
|
|
13
|
+
switchAccount: SwitchConnectionMutate<config, context>;
|
|
14
|
+
/** @deprecated use `switchConnectionAsync` instead */
|
|
15
|
+
switchAccountAsync: SwitchConnectionMutateAsync<config, context>;
|
|
16
|
+
switchConnection: SwitchConnectionMutate<config, context>;
|
|
17
|
+
switchConnectionAsync: SwitchConnectionMutateAsync<config, context>;
|
|
18
|
+
}>;
|
|
19
|
+
/** https://wagmi.sh/react/api/hooks/useSwitchConnection */
|
|
20
|
+
export declare function useSwitchConnection<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: UseSwitchConnectionParameters<config, context>): UseSwitchConnectionReturnType<config, context>;
|
|
21
|
+
//# sourceMappingURL=useSwitchConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSwitchConnection.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSwitchConnection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAE/B,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,mBAAmB,CAAA;AAI1B,MAAM,MAAM,6BAA6B,CACvC,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,OAAO,GAAG,OAAO,IACf,OAAO,CACT,eAAe,CAAC,MAAM,CAAC,GAAG;IACxB,QAAQ,CAAC,EACL,qBAAqB,CACnB,oBAAoB,CAAC,MAAM,CAAC,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,OAAO,CACR,GACD,SAAS,CAAA;CACd,CACF,CAAA;AAED,MAAM,MAAM,6BAA6B,CACvC,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,OAAO,GAAG,OAAO,IACf,OAAO,CACT,qBAAqB,CACnB,oBAAoB,CAAC,MAAM,CAAC,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,OAAO,CACR,GAAG;IACF,+CAA+C;IAC/C,UAAU,EAAE,SAAS,SAAS,EAAE,CAAA;IAChC,iDAAiD;IACjD,aAAa,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtD,sDAAsD;IACtD,kBAAkB,EAAE,2BAA2B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChE,gBAAgB,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzD,qBAAqB,EAAE,2BAA2B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpE,CACF,CAAA;AAED,2DAA2D;AAC3D,wBAAgB,mBAAmB,CACjC,MAAM,SAAS,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,EAClD,OAAO,GAAG,OAAO,EAEjB,UAAU,GAAE,6BAA6B,CAAC,MAAM,EAAE,OAAO,CAAM,GAC9D,6BAA6B,CAAC,MAAM,EAAE,OAAO,CAAC,CAqBhD"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "
|
|
1
|
+
export declare const version = "3.0.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wagmi",
|
|
3
3
|
"description": "React Hooks for Ethereum",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"/chains",
|
|
19
19
|
"/codegen",
|
|
20
20
|
"/connectors",
|
|
21
|
-
"/experimental",
|
|
22
21
|
"/internal",
|
|
23
22
|
"/query"
|
|
24
23
|
],
|
|
@@ -36,10 +35,6 @@
|
|
|
36
35
|
"types": "./dist/types/exports/actions.d.ts",
|
|
37
36
|
"default": "./dist/esm/exports/actions.js"
|
|
38
37
|
},
|
|
39
|
-
"./actions/experimental": {
|
|
40
|
-
"types": "./dist/types/exports/actions/experimental.d.ts",
|
|
41
|
-
"default": "./dist/esm/exports/actions/experimental.js"
|
|
42
|
-
},
|
|
43
38
|
"./chains": {
|
|
44
39
|
"types": "./dist/types/exports/chains.d.ts",
|
|
45
40
|
"default": "./dist/esm/exports/chains.js"
|
|
@@ -52,10 +47,6 @@
|
|
|
52
47
|
"types": "./dist/types/exports/connectors.d.ts",
|
|
53
48
|
"default": "./dist/esm/exports/connectors.js"
|
|
54
49
|
},
|
|
55
|
-
"./experimental": {
|
|
56
|
-
"types": "./dist/types/exports/experimental.d.ts",
|
|
57
|
-
"default": "./dist/esm/exports/experimental.js"
|
|
58
|
-
},
|
|
59
50
|
"./internal": {
|
|
60
51
|
"types": "./dist/types/exports/internal.d.ts",
|
|
61
52
|
"default": "./dist/esm/exports/internal.js"
|
|
@@ -80,9 +71,6 @@
|
|
|
80
71
|
"connectors": [
|
|
81
72
|
"./dist/types/exports/connectors.d.ts"
|
|
82
73
|
],
|
|
83
|
-
"experimental": [
|
|
84
|
-
"./dist/types/exports/experimental.d.ts"
|
|
85
|
-
],
|
|
86
74
|
"internal": [
|
|
87
75
|
"./dist/types/exports/internal.d.ts"
|
|
88
76
|
],
|
|
@@ -94,7 +82,7 @@
|
|
|
94
82
|
"peerDependencies": {
|
|
95
83
|
"@tanstack/react-query": ">=5.0.0",
|
|
96
84
|
"react": ">=18",
|
|
97
|
-
"typescript": ">=5.
|
|
85
|
+
"typescript": ">=5.7.3",
|
|
98
86
|
"viem": "2.x"
|
|
99
87
|
},
|
|
100
88
|
"peerDependenciesMeta": {
|
|
@@ -104,8 +92,8 @@
|
|
|
104
92
|
},
|
|
105
93
|
"dependencies": {
|
|
106
94
|
"use-sync-external-store": "1.4.0",
|
|
107
|
-
"@wagmi/connectors": "
|
|
108
|
-
"@wagmi/core": "
|
|
95
|
+
"@wagmi/connectors": "7.0.0",
|
|
96
|
+
"@wagmi/core": "3.0.0"
|
|
109
97
|
},
|
|
110
98
|
"contributors": [
|
|
111
99
|
"awkweb.eth <t@wevm.dev>",
|
package/src/exports/index.ts
CHANGED
|
@@ -5,11 +5,7 @@
|
|
|
5
5
|
// biome-ignore lint/performance/noBarrelFile: entrypoint module
|
|
6
6
|
export {
|
|
7
7
|
WagmiContext,
|
|
8
|
-
/** @deprecated Use `WagmiContext` instead */
|
|
9
|
-
WagmiContext as Context,
|
|
10
8
|
WagmiProvider,
|
|
11
|
-
/** @deprecated Use `WagmiProvider` instead */
|
|
12
|
-
WagmiProvider as WagmiConfig,
|
|
13
9
|
type WagmiProviderProps,
|
|
14
10
|
} from '../context.js'
|
|
15
11
|
|
|
@@ -28,17 +24,6 @@ export {
|
|
|
28
24
|
// Hooks
|
|
29
25
|
////////////////////////////////////////////////////////////////////////////////
|
|
30
26
|
|
|
31
|
-
export {
|
|
32
|
-
type UseAccountParameters,
|
|
33
|
-
type UseAccountReturnType,
|
|
34
|
-
useAccount,
|
|
35
|
-
} from '../hooks/useAccount.js'
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
type UseAccountEffectParameters,
|
|
39
|
-
useAccountEffect,
|
|
40
|
-
} from '../hooks/useAccountEffect.js'
|
|
41
|
-
|
|
42
27
|
export {
|
|
43
28
|
type UseBalanceParameters,
|
|
44
29
|
type UseBalanceReturnType,
|
|
@@ -68,16 +53,19 @@ export {
|
|
|
68
53
|
type UseBytecodeReturnType,
|
|
69
54
|
useBytecode,
|
|
70
55
|
} from '../hooks/useBytecode.js'
|
|
56
|
+
|
|
71
57
|
export {
|
|
72
58
|
type UseCallParameters,
|
|
73
59
|
type UseCallReturnType,
|
|
74
60
|
useCall,
|
|
75
61
|
} from '../hooks/useCall.js'
|
|
62
|
+
|
|
76
63
|
export {
|
|
77
64
|
type UseCallsStatusParameters,
|
|
78
65
|
type UseCallsStatusReturnType,
|
|
79
66
|
useCallsStatus,
|
|
80
67
|
} from '../hooks/useCallsStatus.js'
|
|
68
|
+
|
|
81
69
|
export {
|
|
82
70
|
type UseCapabilitiesParameters,
|
|
83
71
|
type UseCapabilitiesReturnType,
|
|
@@ -114,16 +102,39 @@ export {
|
|
|
114
102
|
useConnect,
|
|
115
103
|
} from '../hooks/useConnect.js'
|
|
116
104
|
|
|
105
|
+
export {
|
|
106
|
+
/** @deprecated use `UseConnectionParameters` instead */
|
|
107
|
+
type UseConnectionParameters as UseAccountParameters,
|
|
108
|
+
type UseConnectionParameters,
|
|
109
|
+
/** @deprecated use `UseConnectionsReturnType` instead */
|
|
110
|
+
type UseConnectionReturnType as UseAccountReturnType,
|
|
111
|
+
type UseConnectionReturnType,
|
|
112
|
+
/** @deprecated use `useConnection` instead */
|
|
113
|
+
useConnection as useAccount,
|
|
114
|
+
useConnection,
|
|
115
|
+
} from '../hooks/useConnection.js'
|
|
116
|
+
|
|
117
|
+
export {
|
|
118
|
+
/** @deprecated use `UseConnectionEffectParameters` instead */
|
|
119
|
+
type UseConnectionEffectParameters as UseAccountEffectParameters,
|
|
120
|
+
type UseConnectionEffectParameters,
|
|
121
|
+
/** @deprecated use `useConnectionEffect` instead */
|
|
122
|
+
useConnectionEffect as useAccountEffect,
|
|
123
|
+
useConnectionEffect,
|
|
124
|
+
} from '../hooks/useConnectionEffect.js'
|
|
125
|
+
|
|
117
126
|
export {
|
|
118
127
|
type UseConnectionsParameters,
|
|
119
128
|
type UseConnectionsReturnType,
|
|
120
129
|
useConnections,
|
|
121
130
|
} from '../hooks/useConnections.js'
|
|
131
|
+
|
|
122
132
|
export {
|
|
123
133
|
type UseConnectorClientParameters,
|
|
124
134
|
type UseConnectorClientReturnType,
|
|
125
135
|
useConnectorClient,
|
|
126
136
|
} from '../hooks/useConnectorClient.js'
|
|
137
|
+
|
|
127
138
|
export {
|
|
128
139
|
type UseConnectorsParameters,
|
|
129
140
|
type UseConnectorsReturnType,
|
|
@@ -176,8 +187,6 @@ export {
|
|
|
176
187
|
type UseEstimateFeesPerGasParameters,
|
|
177
188
|
type UseEstimateFeesPerGasReturnType,
|
|
178
189
|
useEstimateFeesPerGas,
|
|
179
|
-
/** @deprecated Use `useEstimateFeesPerGas` instead */
|
|
180
|
-
useEstimateFeesPerGas as useFeeData,
|
|
181
190
|
} from '../hooks/useEstimateFeesPerGas.js'
|
|
182
191
|
|
|
183
192
|
export {
|
|
@@ -208,8 +217,6 @@ export {
|
|
|
208
217
|
type UseInfiniteContractReadsParameters,
|
|
209
218
|
type UseInfiniteContractReadsReturnType,
|
|
210
219
|
useInfiniteReadContracts,
|
|
211
|
-
/** @deprecated Use `useInfiniteReadContracts` instead */
|
|
212
|
-
useInfiniteReadContracts as useContractInfiniteReads,
|
|
213
220
|
} from '../hooks/useInfiniteReadContracts.js'
|
|
214
221
|
|
|
215
222
|
export {
|
|
@@ -234,16 +241,12 @@ export {
|
|
|
234
241
|
type UseReadContractParameters,
|
|
235
242
|
type UseReadContractReturnType,
|
|
236
243
|
useReadContract,
|
|
237
|
-
/** @deprecated Use `useReadContract` instead */
|
|
238
|
-
useReadContract as useContractRead,
|
|
239
244
|
} from '../hooks/useReadContract.js'
|
|
240
245
|
|
|
241
246
|
export {
|
|
242
247
|
type UseReadContractsParameters,
|
|
243
248
|
type UseReadContractsReturnType,
|
|
244
249
|
useReadContracts,
|
|
245
|
-
/** @deprecated Use `useWriteContract` instead */
|
|
246
|
-
useReadContracts as useContractReads,
|
|
247
250
|
} from '../hooks/useReadContracts.js'
|
|
248
251
|
|
|
249
252
|
export {
|
|
@@ -306,12 +309,6 @@ export {
|
|
|
306
309
|
useStorageAt,
|
|
307
310
|
} from '../hooks/useStorageAt.js'
|
|
308
311
|
|
|
309
|
-
export {
|
|
310
|
-
type UseSwitchAccountParameters,
|
|
311
|
-
type UseSwitchAccountReturnType,
|
|
312
|
-
useSwitchAccount,
|
|
313
|
-
} from '../hooks/useSwitchAccount.js'
|
|
314
|
-
|
|
315
312
|
export {
|
|
316
313
|
type UseSwitchChainParameters,
|
|
317
314
|
type UseSwitchChainReturnType,
|
|
@@ -319,11 +316,16 @@ export {
|
|
|
319
316
|
} from '../hooks/useSwitchChain.js'
|
|
320
317
|
|
|
321
318
|
export {
|
|
322
|
-
|
|
323
|
-
type
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
319
|
+
/** @deprecated use `UseSwitchConnectionParameters` instead */
|
|
320
|
+
type UseSwitchConnectionParameters as UseSwitchAccountParameters,
|
|
321
|
+
type UseSwitchConnectionParameters,
|
|
322
|
+
/** @deprecated use `UseSwitchConnectionReturnType` instead */
|
|
323
|
+
type UseSwitchConnectionReturnType as UseSwitchAccountReturnType,
|
|
324
|
+
type UseSwitchConnectionReturnType,
|
|
325
|
+
/** @deprecated use `useSwitchConnection` instead */
|
|
326
|
+
useSwitchConnection as useSwitchAccount,
|
|
327
|
+
useSwitchConnection,
|
|
328
|
+
} from '../hooks/useSwitchConnection.js'
|
|
327
329
|
|
|
328
330
|
export {
|
|
329
331
|
type UseTransactionParameters,
|
|
@@ -408,8 +410,6 @@ export {
|
|
|
408
410
|
type UseWriteContractParameters,
|
|
409
411
|
type UseWriteContractReturnType,
|
|
410
412
|
useWriteContract,
|
|
411
|
-
/** @deprecated Use `useWriteContract` instead */
|
|
412
|
-
useWriteContract as useContractWrite,
|
|
413
413
|
} from '../hooks/useWriteContract.js'
|
|
414
414
|
|
|
415
415
|
////////////////////////////////////////////////////////////////////////////////
|
|
@@ -464,7 +464,6 @@ export {
|
|
|
464
464
|
injected,
|
|
465
465
|
mock,
|
|
466
466
|
noopStorage,
|
|
467
|
-
normalizeChainId,
|
|
468
467
|
type PartializedState,
|
|
469
468
|
ProviderNotFoundError,
|
|
470
469
|
type ProviderNotFoundErrorType,
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
|
|
17
17
|
import type { ConfigParameter, QueryParameter } from '../types/properties.js'
|
|
18
18
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
19
|
-
import { useAccount } from './useAccount.js'
|
|
20
19
|
import { useConfig } from './useConfig.js'
|
|
20
|
+
import { useConnection } from './useConnection.js'
|
|
21
21
|
|
|
22
22
|
export type UseCapabilitiesParameters<
|
|
23
23
|
config extends Config = Config,
|
|
@@ -50,7 +50,7 @@ export function useCapabilities<
|
|
|
50
50
|
): UseCapabilitiesReturnType<config, chainId, selectData> {
|
|
51
51
|
const { account, query = {} } = parameters
|
|
52
52
|
|
|
53
|
-
const { address } =
|
|
53
|
+
const { address } = useConnection()
|
|
54
54
|
const config = useConfig(parameters)
|
|
55
55
|
|
|
56
56
|
const options = getCapabilitiesQueryOptions(config, {
|
package/src/hooks/useConnect.ts
CHANGED
|
@@ -48,6 +48,7 @@ export type UseConnectReturnType<
|
|
|
48
48
|
> & {
|
|
49
49
|
connect: ConnectMutate<config, context>
|
|
50
50
|
connectAsync: ConnectMutateAsync<config, context>
|
|
51
|
+
/** @deprecated use `useConnectors` instead */
|
|
51
52
|
connectors: Compute<UseConnectorsReturnType> | config['connectors']
|
|
52
53
|
}
|
|
53
54
|
>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
type Config,
|
|
5
|
+
type GetConnectionReturnType,
|
|
6
|
+
getConnection,
|
|
7
|
+
type ResolvedRegister,
|
|
8
|
+
watchConnection,
|
|
9
|
+
} from '@wagmi/core'
|
|
10
|
+
|
|
11
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
12
|
+
import { useConfig } from './useConfig.js'
|
|
13
|
+
import { useSyncExternalStoreWithTracked } from './useSyncExternalStoreWithTracked.js'
|
|
14
|
+
|
|
15
|
+
export type UseConnectionParameters<config extends Config = Config> =
|
|
16
|
+
ConfigParameter<config>
|
|
17
|
+
|
|
18
|
+
export type UseConnectionReturnType<config extends Config = Config> =
|
|
19
|
+
GetConnectionReturnType<config>
|
|
20
|
+
|
|
21
|
+
/** https://wagmi.sh/react/api/hooks/useConnection */
|
|
22
|
+
export function useConnection<
|
|
23
|
+
config extends Config = ResolvedRegister['config'],
|
|
24
|
+
>(
|
|
25
|
+
parameters: UseConnectionParameters<config> = {},
|
|
26
|
+
): UseConnectionReturnType<config> {
|
|
27
|
+
const config = useConfig(parameters)
|
|
28
|
+
|
|
29
|
+
return useSyncExternalStoreWithTracked(
|
|
30
|
+
(onChange) => watchConnection(config, { onChange }),
|
|
31
|
+
() => getConnection(config),
|
|
32
|
+
)
|
|
33
|
+
}
|