@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/index.js CHANGED
@@ -71,7 +71,7 @@ import {
71
71
  watchSigner,
72
72
  watchWebSocketProvider,
73
73
  writeContract
74
- } from "./chunk-TYXJCTXO.js";
74
+ } from "./chunk-HEIMP7HQ.js";
75
75
  import {
76
76
  alchemyRpcUrls,
77
77
  allChains,
@@ -1,11 +1,18 @@
1
- import { C as Chain, E as Ethereum } from './index-bacc1c49.js';
1
+ import { C as Chain, E as Ethereum } from './index-58cffc47.js';
2
2
  import { Address } from 'abitype';
3
3
  import { providers } from 'ethers';
4
- import { C as Connector } from './base-5bd9b5ed.js';
4
+ import { C as Connector } from './base-a32d0b91.js';
5
5
 
6
- declare type InjectedConnectorOptions = {
6
+ type InjectedConnectorOptions = {
7
7
  /** Name of connector */
8
8
  name?: string | ((detectedName: string | string[]) => string);
9
+ /**
10
+ * [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) Ethereum Provider to target
11
+ *
12
+ * @default
13
+ * () => typeof window !== 'undefined' ? window.ethereum : undefined
14
+ */
15
+ getProvider?: () => Window['ethereum'] | undefined;
9
16
  /**
10
17
  * MetaMask 10.9.3 emits disconnect event when chain is changed.
11
18
  * This flag prevents the `"disconnect"` event from being emitted upon switching chains. See [GitHub issue](https://github.com/MetaMask/metamask-extension/issues/13375#issuecomment-1027663334) for more info.
@@ -18,7 +25,8 @@ declare type InjectedConnectorOptions = {
18
25
  */
19
26
  shimDisconnect?: boolean;
20
27
  };
21
- declare class InjectedConnector extends Connector<Window['ethereum'], InjectedConnectorOptions | undefined, providers.JsonRpcSigner> {
28
+ type ConnectorOptions = InjectedConnectorOptions & Required<Pick<InjectedConnectorOptions, 'getProvider'>>;
29
+ declare class InjectedConnector extends Connector<Window['ethereum'], ConnectorOptions, providers.JsonRpcSigner> {
22
30
  #private;
23
31
  readonly id: string;
24
32
  readonly name: string;
@@ -1,5 +1,5 @@
1
- import './index-bacc1c49.js';
2
- export { g as AbiParameter, h as ContractConfig, b as ContractsConfig, c as ContractsResult, E as Event, i as GetArgs, G as GetConfig, d as GetReturnType, f as IsNever, N as NotEqual, j as Optional, e as Or } from './contracts-3c4d70a1.js';
1
+ import './index-58cffc47.js';
2
+ export { g as AbiParameter, h as ContractConfig, b as ContractsConfig, c as ContractsResult, E as Event, i as GetArgs, G as GetConfig, d as GetReturnType, f as IsNever, N as NotEqual, j as Optional, e as Or } from './contracts-3880ee54.js';
3
3
  import 'abitype';
4
4
  import 'ethers';
5
5
 
package/dist/internal.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  debounce
3
- } from "./chunk-TYXJCTXO.js";
3
+ } from "./chunk-HEIMP7HQ.js";
4
4
  import "./chunk-4DNFSL2K.js";
5
5
  import "./chunk-MQXBDTVK.js";
6
6
  export {
@@ -1,8 +1,8 @@
1
1
  import { providers } from 'ethers';
2
- import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-bacc1c49.js';
2
+ import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-58cffc47.js';
3
3
  import 'abitype';
4
4
 
5
- declare type AlchemyProviderConfig = FallbackProviderConfig & {
5
+ type AlchemyProviderConfig = FallbackProviderConfig & {
6
6
  /** Your Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemyapi.io/). */
7
7
  apiKey: string;
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import { providers } from 'ethers';
2
- import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-bacc1c49.js';
2
+ import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-58cffc47.js';
3
3
  import 'abitype';
4
4
 
5
- declare type InfuraProviderConfig = FallbackProviderConfig & {
5
+ type InfuraProviderConfig = FallbackProviderConfig & {
6
6
  /** Your Infura API key from the [Infura Dashboard](https://infura.io/login). */
7
7
  apiKey: string;
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import { providers } from 'ethers';
2
- import { F as FallbackProviderConfig, C as Chain, a as ChainProviderFn } from '../index-bacc1c49.js';
2
+ import { F as FallbackProviderConfig, C as Chain, a as ChainProviderFn } from '../index-58cffc47.js';
3
3
  import 'abitype';
4
4
 
5
- declare type JsonRpcProviderConfig = FallbackProviderConfig & {
5
+ type JsonRpcProviderConfig = FallbackProviderConfig & {
6
6
  rpc: (chain: Chain) => {
7
7
  http: string;
8
8
  webSocket?: string;
@@ -1,8 +1,8 @@
1
1
  import { providers } from 'ethers';
2
- import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-bacc1c49.js';
2
+ import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-58cffc47.js';
3
3
  import 'abitype';
4
4
 
5
- declare type PublicProviderConfig = FallbackProviderConfig;
5
+ type PublicProviderConfig = FallbackProviderConfig;
6
6
  declare function publicProvider({ priority, stallTimeout, weight, }?: PublicProviderConfig): ChainProviderFn<providers.StaticJsonRpcProvider>;
7
7
 
8
8
  export { PublicProviderConfig, publicProvider };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wagmi/core",
3
3
  "description": "Vanilla JS library for Ethereum",
4
4
  "license": "MIT",
5
- "version": "0.7.7",
5
+ "version": "0.7.8",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/wagmi-dev/wagmi.git",
@@ -102,7 +102,7 @@
102
102
  "devDependencies": {
103
103
  "@coinbase/wallet-sdk": "^3.4.1",
104
104
  "@walletconnect/ethereum-provider": "^1.7.8",
105
- "typescript": "^4.7.4"
105
+ "typescript": "^4.9.3"
106
106
  },
107
107
  "keywords": [
108
108
  "eth",