@wagmi/connectors 0.1.3 → 0.1.4

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 awkweb.eth
3
+ Copyright (c) 2022 wagmi
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -2,7 +2,7 @@ import { Chain } from '@wagmi/core/chains';
2
2
  import { Address } from 'abitype';
3
3
  import EventEmitter from 'eventemitter3';
4
4
 
5
- type ConnectorData<Provider = any> = {
5
+ declare type ConnectorData<Provider = any> = {
6
6
  account?: Address;
7
7
  chain?: {
8
8
  id: number;
@@ -2,11 +2,11 @@ import { CoinbaseWalletProvider } from '@coinbase/wallet-sdk';
2
2
  import { CoinbaseWalletSDKOptions } from '@coinbase/wallet-sdk/dist/CoinbaseWalletSDK';
3
3
  import { Chain } from '@wagmi/core/chains';
4
4
  import { providers } from 'ethers';
5
- import { C as Connector } from './base-caae9601.js';
5
+ import { C as Connector } from './base-6b5431a5.js';
6
6
  import 'abitype';
7
7
  import 'eventemitter3';
8
8
 
9
- type Options = CoinbaseWalletSDKOptions & {
9
+ declare type Options = CoinbaseWalletSDKOptions & {
10
10
  /**
11
11
  * Fallback Ethereum JSON RPC URL
12
12
  * @default ""
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as Connector, a as ConnectorData, b as ConnectorEvents } from './base-caae9601.js';
1
+ export { C as Connector, a as ConnectorData, b as ConnectorEvents } from './base-6b5431a5.js';
2
2
  import '@wagmi/core/chains';
3
3
  import 'abitype';
4
4
  import 'eventemitter3';
@@ -1,11 +1,11 @@
1
- import * as _wagmi_core_dist_index_37d6352e from '@wagmi/core/dist/index-37d6352e';
1
+ import * as _wagmi_core_dist_index_971cda79 from '@wagmi/core/dist/index-971cda79';
2
2
  import { Chain } from '@wagmi/core/chains';
3
3
  import { Address } from 'abitype';
4
4
  import { providers } from 'ethers';
5
- import { C as Connector } from './base-caae9601.js';
5
+ import { C as Connector } from './base-6b5431a5.js';
6
6
  import 'eventemitter3';
7
7
 
8
- type InjectedConnectorOptions = {
8
+ declare type InjectedConnectorOptions = {
9
9
  /** Name of connector */
10
10
  name?: string | ((detectedName: string | string[]) => string);
11
11
  /**
@@ -27,7 +27,7 @@ type InjectedConnectorOptions = {
27
27
  */
28
28
  shimDisconnect?: boolean;
29
29
  };
30
- type ConnectorOptions = InjectedConnectorOptions & Required<Pick<InjectedConnectorOptions, 'getProvider'>>;
30
+ declare type ConnectorOptions = InjectedConnectorOptions & Required<Pick<InjectedConnectorOptions, 'getProvider'>>;
31
31
  declare class InjectedConnector extends Connector<Window['ethereum'], ConnectorOptions, providers.JsonRpcSigner> {
32
32
  #private;
33
33
  readonly id: string;
@@ -46,12 +46,12 @@ declare class InjectedConnector extends Connector<Window['ethereum'], ConnectorO
46
46
  id: number;
47
47
  unsupported: boolean;
48
48
  };
49
- provider: _wagmi_core_dist_index_37d6352e.E;
49
+ provider: _wagmi_core_dist_index_971cda79.E;
50
50
  }>;
51
51
  disconnect(): Promise<void>;
52
52
  getAccount(): Promise<`0x${string}`>;
53
53
  getChainId(): Promise<number>;
54
- getProvider(): Promise<_wagmi_core_dist_index_37d6352e.E | undefined>;
54
+ getProvider(): Promise<_wagmi_core_dist_index_971cda79.E | undefined>;
55
55
  getSigner({ chainId }?: {
56
56
  chainId?: number;
57
57
  }): Promise<providers.JsonRpcSigner>;
package/dist/ledger.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { EthereumProvider } from '@ledgerhq/connect-kit-loader';
2
2
  import { Chain } from '@wagmi/core';
3
3
  import { providers } from 'ethers';
4
- import { C as Connector, a as ConnectorData } from './base-caae9601.js';
4
+ import { C as Connector, a as ConnectorData } from './base-6b5431a5.js';
5
5
  import '@wagmi/core/chains';
6
6
  import 'abitype';
7
7
  import 'eventemitter3';
8
8
 
9
- type LedgerConnectorOptions = {
9
+ declare type LedgerConnectorOptions = {
10
10
  bridge?: string;
11
11
  chainId?: number;
12
12
  enableDebugLogs?: boolean;
@@ -14,7 +14,7 @@ type LedgerConnectorOptions = {
14
14
  [chainId: number]: string;
15
15
  };
16
16
  };
17
- type LedgerSigner = providers.JsonRpcSigner;
17
+ declare type LedgerSigner = providers.JsonRpcSigner;
18
18
  declare class LedgerConnector extends Connector<EthereumProvider, LedgerConnectorOptions, LedgerSigner> {
19
19
  #private;
20
20
  readonly id = "ledger";
@@ -1,13 +1,13 @@
1
1
  import { Ethereum } from '@wagmi/core';
2
2
  import { Chain } from '@wagmi/core/chains';
3
3
  import { InjectedConnectorOptions, InjectedConnector } from './injected.js';
4
- import '@wagmi/core/dist/index-37d6352e';
4
+ import '@wagmi/core/dist/index-971cda79';
5
5
  import 'abitype';
6
6
  import 'ethers';
7
- import './base-caae9601.js';
7
+ import './base-6b5431a5.js';
8
8
  import 'eventemitter3';
9
9
 
10
- type MetaMaskConnectorOptions = Pick<InjectedConnectorOptions, 'shimChainChangedDisconnect' | 'shimDisconnect'> & {
10
+ declare type MetaMaskConnectorOptions = Pick<InjectedConnectorOptions, 'shimChainChangedDisconnect' | 'shimDisconnect'> & {
11
11
  /**
12
12
  * While "disconnected" with `shimDisconnect`, allows user to select a different MetaMask account (than the currently connected account) when trying to connect.
13
13
  */
@@ -1,12 +1,12 @@
1
1
  import * as ethers from 'ethers';
2
2
  import { providers } from 'ethers';
3
3
  import { Chain } from '@wagmi/core/chains';
4
- import { C as Connector, a as ConnectorData } from '../base-caae9601.js';
4
+ import { C as Connector, a as ConnectorData } from '../base-6b5431a5.js';
5
5
  import { Signer } from '@wagmi/core';
6
6
  import EventEmitter from 'eventemitter3';
7
7
  import 'abitype';
8
8
 
9
- type MockProviderOptions = {
9
+ declare type MockProviderOptions = {
10
10
  chainId: number;
11
11
  flags?: {
12
12
  isAuthorized?: boolean;
@@ -16,12 +16,12 @@ type MockProviderOptions = {
16
16
  };
17
17
  signer: Signer;
18
18
  };
19
- type Events = {
19
+ declare type Events = {
20
20
  accountsChanged(accounts: string[]): void;
21
21
  chainChanged(chainId: number | string): void;
22
22
  disconnect(): void;
23
23
  };
24
- type Event = keyof Events;
24
+ declare type Event = keyof Events;
25
25
  declare class MockProvider extends providers.BaseProvider {
26
26
  #private;
27
27
  events: EventEmitter<Events, any>;
@@ -44,7 +44,7 @@ declare class MockProvider extends providers.BaseProvider {
44
44
  toJSON(): string;
45
45
  }
46
46
 
47
- type MockConnectorOptions = Omit<MockProviderOptions, 'chainId'> & {
47
+ declare type MockConnectorOptions = Omit<MockProviderOptions, 'chainId'> & {
48
48
  chainId?: number;
49
49
  };
50
50
  declare class MockConnector extends Connector<MockProvider, MockConnectorOptions> {
@@ -3,13 +3,13 @@ import { UniversalProvider as UniversalProvider$1, UniversalProviderOpts } from
3
3
  import { Chain } from '@wagmi/core';
4
4
  import WalletConnectProvider from '@walletconnect/ethereum-provider';
5
5
  import { providers } from 'ethers';
6
- import { C as Connector } from './base-caae9601.js';
6
+ import { C as Connector } from './base-6b5431a5.js';
7
7
  import '@wagmi/core/chains';
8
8
  import 'abitype';
9
9
  import 'eventemitter3';
10
10
 
11
- type UniversalProvider = InstanceType<typeof UniversalProvider$1>;
12
- type WalletConnectOptions = {
11
+ declare type UniversalProvider = InstanceType<typeof UniversalProvider$1>;
12
+ declare type WalletConnectOptions = {
13
13
  /** When `true`, uses default WalletConnect QR Code modal */
14
14
  qrcode?: boolean;
15
15
  } & (({
@@ -21,7 +21,7 @@ type WalletConnectOptions = {
21
21
  projectId: NonNullable<UniversalProviderOpts['projectId']>;
22
22
  version: '2';
23
23
  } & Omit<UniversalProviderOpts, 'projectId'>));
24
- type WalletConnectSigner = providers.JsonRpcSigner;
24
+ declare type WalletConnectSigner = providers.JsonRpcSigner;
25
25
  declare class WalletConnectConnector extends Connector<WalletConnectProvider | UniversalProvider, WalletConnectOptions, WalletConnectSigner> {
26
26
  #private;
27
27
  readonly id = "walletConnect";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wagmi/connectors",
3
3
  "description": "A collection of connectors for wagmi",
4
4
  "license": "MIT",
5
- "version": "0.1.3",
5
+ "version": "0.1.4",
6
6
  "peerDependencies": {
7
7
  "@wagmi/core": "0.8.x",
8
8
  "ethers": "^5.0.0"