@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.
@@ -15,7 +15,7 @@ declare const chainId: {
15
15
  readonly hardhat: 31337;
16
16
  readonly foundry: 31337;
17
17
  };
18
- declare type ChainName = keyof typeof chainId;
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
- declare type BlockExplorerName = 'etherscan';
54
- declare type BlockExplorer = {
53
+ type BlockExplorerName = 'etherscan';
54
+ type BlockExplorer = {
55
55
  name: string;
56
56
  url: string;
57
57
  };
58
- declare type EtherscanChains = Extract<ChainName, 'mainnet' | 'goerli' | 'sepolia' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
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
- declare type RpcProviderName = 'alchemy' | 'infura' | 'public';
62
- declare type AlchemyChains = Extract<ChainName, 'mainnet' | 'goerli' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
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
- declare type InfuraChains = Extract<ChainName, 'mainnet' | 'goerli' | 'sepolia' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
64
+ type InfuraChains = Extract<ChainName, 'mainnet' | 'goerli' | 'sepolia' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
65
65
  declare const infuraRpcUrls: Record<InfuraChains, string>;
66
- declare type PublicChains = Extract<ChainName, 'mainnet' | 'goerli' | 'sepolia' | 'optimism' | 'optimismGoerli' | 'polygon' | 'polygonMumbai' | 'arbitrum' | 'arbitrumGoerli'>;
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
- declare type Hash = `0x${string}`;
91
- declare type Chain = {
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
- declare type ChainProviderFn<TProvider extends Provider = providers.BaseProvider, TWebSocketProvider extends WebSocketProvider = providers.WebSocketProvider, TChain extends Chain = Chain> = (chain: TChain) => {
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
- declare type FallbackProviderConfig = Omit<providers.FallbackProviderConfig, 'provider'>;
134
- declare type ProviderWithFallbackConfig<TProvider extends Provider = Provider> = TProvider & FallbackProviderConfig;
135
- declare type Provider = providers.BaseProvider & {
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
- declare type WebSocketProvider = providers.WebSocketProvider & {
138
+ type WebSocketProvider = providers.WebSocketProvider & {
139
139
  chains?: Chain[];
140
140
  };
141
- declare type Signer = Signer$1;
142
- declare type Unit = typeof units[number];
143
- declare type AddEthereumChainParameter = {
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
- declare type WalletPermissionCaveat = {
158
+ type WalletPermissionCaveat = {
159
159
  type: string;
160
160
  value: any;
161
161
  };
162
- declare type WalletPermission = {
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
- declare type WatchAssetParams = {
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
- declare type InjectedProviderFlags = {
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
- declare type InjectedProviders = InjectedProviderFlags & {
203
+ type InjectedProviders = InjectedProviderFlags & {
204
204
  isMetaMask: true;
205
205
  /** Only exists in MetaMask as of 2022/04/03 */
206
206
  _events: {