@wagmi/core 0.7.7 → 0.7.8
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/{base-5bd9b5ed.d.ts → base-a32d0b91.d.ts} +2 -2
- package/dist/chains.d.ts +1 -1
- package/dist/{chunk-TYXJCTXO.js → chunk-HEIMP7HQ.js} +28 -23
- package/dist/connectors/coinbaseWallet.d.ts +3 -3
- package/dist/connectors/coinbaseWallet.js +1 -1
- package/dist/connectors/metaMask.d.ts +4 -6
- package/dist/connectors/metaMask.js +36 -43
- package/dist/connectors/mock/index.d.ts +5 -5
- package/dist/connectors/mock/index.js +1 -1
- package/dist/connectors/walletConnect.d.ts +4 -4
- package/dist/connectors/walletConnect.js +1 -1
- package/dist/{contracts-3c4d70a1.d.ts → contracts-3880ee54.d.ts} +24 -24
- package/dist/{index-bacc1c49.d.ts → index-58cffc47.d.ts} +23 -23
- package/dist/index.d.ts +111 -111
- package/dist/index.js +1 -1
- package/dist/{injected-6980e5c3.d.ts → injected-82510902.d.ts} +12 -4
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/providers/alchemy.d.ts +2 -2
- package/dist/providers/infura.d.ts +2 -2
- package/dist/providers/jsonRpc.d.ts +2 -2
- package/dist/providers/public.d.ts +2 -2
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ declare const chainId: {
|
|
|
15
15
|
readonly hardhat: 31337;
|
|
16
16
|
readonly foundry: 31337;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type ChainName = keyof typeof chainId;
|
|
19
19
|
declare const mainnet: Chain;
|
|
20
20
|
declare const goerli: Chain;
|
|
21
21
|
declare const sepolia: Chain;
|
|
@@ -50,20 +50,20 @@ declare const allChains: Chain[];
|
|
|
50
50
|
declare const defaultChains: Chain[];
|
|
51
51
|
declare const defaultL2Chains: Chain[];
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
type BlockExplorerName = 'etherscan';
|
|
54
|
+
type BlockExplorer = {
|
|
55
55
|
name: string;
|
|
56
56
|
url: string;
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
type EtherscanChains = Extract<ChainName, 'mainnet' | 'goerli' | 'sepolia' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
|
|
59
59
|
declare const etherscanBlockExplorers: Record<EtherscanChains, BlockExplorer>;
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
type RpcProviderName = 'alchemy' | 'infura' | 'public';
|
|
62
|
+
type AlchemyChains = Extract<ChainName, 'mainnet' | 'goerli' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
|
|
63
63
|
declare const alchemyRpcUrls: Record<AlchemyChains, string>;
|
|
64
|
-
|
|
64
|
+
type InfuraChains = Extract<ChainName, 'mainnet' | 'goerli' | 'sepolia' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
|
|
65
65
|
declare const infuraRpcUrls: Record<InfuraChains, string>;
|
|
66
|
-
|
|
66
|
+
type PublicChains = Extract<ChainName, 'mainnet' | 'goerli' | 'sepolia' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
|
|
67
67
|
declare const publicRpcUrls: Record<PublicChains, string>;
|
|
68
68
|
|
|
69
69
|
declare const units: readonly ["wei", "kwei", "mwei", "gwei", "szabo", "finney", "ether"];
|
|
@@ -87,8 +87,8 @@ declare module 'ethers/lib/utils.js' {
|
|
|
87
87
|
v?: number;
|
|
88
88
|
} | ResolvedConfig['BytesType'] | string): string;
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
type Hash = `0x${string}`;
|
|
91
|
+
type Chain = {
|
|
92
92
|
/** ID in number form */
|
|
93
93
|
id: number;
|
|
94
94
|
/** Human-readable name */
|
|
@@ -125,22 +125,22 @@ declare type Chain = {
|
|
|
125
125
|
/** Flag for test networks */
|
|
126
126
|
testnet?: boolean;
|
|
127
127
|
};
|
|
128
|
-
|
|
128
|
+
type ChainProviderFn<TProvider extends Provider = providers.BaseProvider, TWebSocketProvider extends WebSocketProvider = providers.WebSocketProvider, TChain extends Chain = Chain> = (chain: TChain) => {
|
|
129
129
|
chain: TChain;
|
|
130
130
|
provider: () => ProviderWithFallbackConfig<TProvider>;
|
|
131
131
|
webSocketProvider?: () => TWebSocketProvider;
|
|
132
132
|
} | null;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
type FallbackProviderConfig = Omit<providers.FallbackProviderConfig, 'provider'>;
|
|
134
|
+
type ProviderWithFallbackConfig<TProvider extends Provider = Provider> = TProvider & FallbackProviderConfig;
|
|
135
|
+
type Provider = providers.BaseProvider & {
|
|
136
136
|
chains?: Chain[];
|
|
137
137
|
};
|
|
138
|
-
|
|
138
|
+
type WebSocketProvider = providers.WebSocketProvider & {
|
|
139
139
|
chains?: Chain[];
|
|
140
140
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
type Signer = Signer$1;
|
|
142
|
+
type Unit = typeof units[number];
|
|
143
|
+
type AddEthereumChainParameter = {
|
|
144
144
|
/** A 0x-prefixed hexadecimal string */
|
|
145
145
|
chainId: string;
|
|
146
146
|
chainName: string;
|
|
@@ -155,18 +155,18 @@ declare type AddEthereumChainParameter = {
|
|
|
155
155
|
/** Currently ignored. */
|
|
156
156
|
iconUrls?: string[];
|
|
157
157
|
};
|
|
158
|
-
|
|
158
|
+
type WalletPermissionCaveat = {
|
|
159
159
|
type: string;
|
|
160
160
|
value: any;
|
|
161
161
|
};
|
|
162
|
-
|
|
162
|
+
type WalletPermission = {
|
|
163
163
|
caveats: WalletPermissionCaveat[];
|
|
164
164
|
date: number;
|
|
165
165
|
id: string;
|
|
166
166
|
invoker: `http://${string}` | `https://${string}`;
|
|
167
167
|
parentCapability: 'eth_accounts' | string;
|
|
168
168
|
};
|
|
169
|
-
|
|
169
|
+
type WatchAssetParams = {
|
|
170
170
|
/** In the future, other standards will be supported */
|
|
171
171
|
type: 'ERC20';
|
|
172
172
|
options: {
|
|
@@ -180,7 +180,7 @@ declare type WatchAssetParams = {
|
|
|
180
180
|
symbol: string;
|
|
181
181
|
};
|
|
182
182
|
};
|
|
183
|
-
|
|
183
|
+
type InjectedProviderFlags = {
|
|
184
184
|
isAvalanche?: true;
|
|
185
185
|
isBitKeep?: true;
|
|
186
186
|
isBraveWallet?: true;
|
|
@@ -200,7 +200,7 @@ declare type InjectedProviderFlags = {
|
|
|
200
200
|
isTrust?: true;
|
|
201
201
|
isTrustWallet?: true;
|
|
202
202
|
};
|
|
203
|
-
|
|
203
|
+
type InjectedProviders = InjectedProviderFlags & {
|
|
204
204
|
isMetaMask: true;
|
|
205
205
|
/** Only exists in MetaMask as of 2022/04/03 */
|
|
206
206
|
_events: {
|