@btc-vision/walletconnect 1.5.3 → 1.5.5

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.
Files changed (41) hide show
  1. package/browser/consts.d.ts +1 -1
  2. package/browser/context/WalletConnectContext.d.ts +3 -3
  3. package/browser/index.js +1 -1
  4. package/browser/types.d.ts +2 -1
  5. package/browser/wallets/controller.d.ts +4 -4
  6. package/browser/wallets/opwallet/controller.d.ts +2 -2
  7. package/browser/wallets/opwallet/interface.d.ts +1 -1
  8. package/browser/wallets/types.d.ts +3 -3
  9. package/browser/wallets/unisat/controller.d.ts +2 -2
  10. package/browser/wallets/unisat/interface.d.ts +1 -1
  11. package/build/consts.d.ts +1 -1
  12. package/build/consts.js +2 -0
  13. package/build/context/WalletConnectContext.d.ts +3 -3
  14. package/build/context/WalletConnectContext.js +3 -0
  15. package/build/provider/WalletConnectProvider.js +4 -3
  16. package/build/types.d.ts +2 -1
  17. package/build/types.js +2 -1
  18. package/build/wallets/controller.d.ts +4 -4
  19. package/build/wallets/controller.js +9 -6
  20. package/build/wallets/opwallet/controller.d.ts +2 -2
  21. package/build/wallets/opwallet/controller.js +4 -2
  22. package/build/wallets/opwallet/interface.d.ts +1 -1
  23. package/build/wallets/opwallet/interface.js +1 -0
  24. package/build/wallets/types.d.ts +3 -3
  25. package/build/wallets/types.js +4 -1
  26. package/build/wallets/unisat/controller.d.ts +2 -2
  27. package/build/wallets/unisat/controller.js +3 -1
  28. package/build/wallets/unisat/interface.d.ts +1 -1
  29. package/build/wallets/unisat/interface.js +1 -0
  30. package/package.json +3 -3
  31. package/src/consts.ts +2 -1
  32. package/src/context/WalletConnectContext.ts +3 -3
  33. package/src/provider/WalletConnectProvider.tsx +6 -6
  34. package/src/types.ts +2 -1
  35. package/src/wallets/controller.ts +11 -11
  36. package/src/wallets/opwallet/controller.ts +4 -4
  37. package/src/wallets/opwallet/interface.ts +1 -1
  38. package/src/wallets/types.ts +4 -4
  39. package/src/wallets/unisat/controller.ts +3 -3
  40. package/src/wallets/unisat/interface.ts +1 -1
  41. package/tsconfig.base.json +1 -0
@@ -1,7 +1,8 @@
1
- import { Network } from '@btc-vision/bitcoin';
1
+ import { type Network } from '@btc-vision/bitcoin';
2
2
  import { UnisatChainType } from '@btc-vision/transaction';
3
3
  export interface WalletConnectNetwork extends Network {
4
4
  chainType: UnisatChainType;
5
+ network: string;
5
6
  }
6
7
  export interface WalletInformation {
7
8
  name: string;
@@ -1,8 +1,8 @@
1
- import { Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import { WalletConnectNetwork } from '../types';
3
- import { SupportedWallets } from './index';
4
- import type { ControllerConnectAccounts, ControllerErrorResponse, ControllerResponse, WalletConnectWallet } from './types.ts';
1
+ import { type Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
5
2
  import { AbstractRpcProvider } from 'opnet';
3
+ import { type WalletConnectNetwork } from '../types';
4
+ import { type SupportedWallets } from './index';
5
+ import type { ControllerConnectAccounts, ControllerErrorResponse, ControllerResponse, WalletConnectWallet } from './types.ts';
6
6
  declare class WalletController {
7
7
  private static wallets;
8
8
  private static currentWallet;
@@ -1,6 +1,6 @@
1
- import { Unisat, UnisatChainType } from '@btc-vision/transaction';
2
- import type { WalletBase } from '../types.ts';
1
+ import { type Unisat, UnisatChainType } from '@btc-vision/transaction';
3
2
  import { AbstractRpcProvider } from 'opnet';
3
+ import { type WalletBase } from '../types';
4
4
  declare class OPWallet implements WalletBase {
5
5
  private walletBase;
6
6
  private accountsChangedHookWrapper?;
@@ -1,4 +1,4 @@
1
- import type { Unisat } from '@btc-vision/transaction';
1
+ import { type Unisat } from '@btc-vision/transaction';
2
2
  export interface OPWalletInterface extends Unisat {
3
3
  disconnect: () => Promise<void>;
4
4
  }
@@ -1,7 +1,7 @@
1
- import { Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import { SupportedWallets } from './index';
1
+ import { type Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
3
2
  import { AbstractRpcProvider } from 'opnet';
4
- export type { AbstractRpcProvider } from 'opnet';
3
+ import { type SupportedWallets } from './index';
4
+ export { type AbstractRpcProvider } from 'opnet';
5
5
  export interface WalletBase {
6
6
  isInstalled(): boolean;
7
7
  isConnected(): boolean;
@@ -1,5 +1,5 @@
1
- import { Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import type { WalletBase } from '../types.ts';
1
+ import { type Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
+ import { type WalletBase } from '../types';
3
3
  import { AbstractRpcProvider } from 'opnet';
4
4
  declare class UnisatWallet implements WalletBase {
5
5
  private walletBase;
@@ -1,4 +1,4 @@
1
- import type { Unisat } from '@btc-vision/transaction';
1
+ import { type Unisat } from '@btc-vision/transaction';
2
2
  export interface UnisatWalletInterface extends Unisat {
3
3
  disconnect: () => Promise<void>;
4
4
  }
package/build/consts.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { WalletConnectNetwork } from './types';
1
+ import { type WalletConnectNetwork } from './types';
2
2
  export declare const DefaultWalletConnectNetwork: WalletConnectNetwork;
package/build/consts.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { networks } from '@btc-vision/bitcoin';
2
2
  import { UnisatChainType } from '@btc-vision/transaction';
3
+ import {} from './types';
3
4
  export const DefaultWalletConnectNetwork = {
4
5
  ...networks.regtest,
5
6
  chainType: UnisatChainType.BITCOIN_REGTEST,
7
+ network: 'regtest',
6
8
  };
@@ -1,7 +1,7 @@
1
- import { Address, Unisat, UnisatSigner } from '@btc-vision/transaction';
2
- import type { WalletConnectNetwork, WalletInformation } from '../types.ts';
3
- import { SupportedWallets } from '../wallets';
1
+ import { Address, type Unisat, UnisatSigner } from '@btc-vision/transaction';
4
2
  import { AbstractRpcProvider } from 'opnet';
3
+ import type { WalletConnectNetwork, WalletInformation } from '../types.ts';
4
+ import { type SupportedWallets } from '../wallets';
5
5
  export type WalletConnectContextType = {
6
6
  allWallets: WalletInformation[];
7
7
  walletType: string | null;
@@ -1,2 +1,5 @@
1
+ import { Address, UnisatSigner } from '@btc-vision/transaction';
2
+ import { AbstractRpcProvider } from 'opnet';
1
3
  import { createContext } from 'react';
4
+ import {} from '../wallets';
2
5
  export const WalletConnectContext = createContext(undefined);
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Address } from '@btc-vision/transaction';
3
- import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
+ import { Address, UnisatSigner } from '@btc-vision/transaction';
3
+ import { AbstractRpcProvider } from 'opnet';
4
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
5
  import { DefaultWalletConnectNetwork } from '../consts';
5
6
  import { WalletConnectContext } from '../context/WalletConnectContext';
6
7
  import '../utils/style.css';
@@ -147,7 +148,7 @@ const WalletConnectProvider = ({ theme, children }) => {
147
148
  }, [walletAddress]);
148
149
  useEffect(() => {
149
150
  const updateWalletInfo = async () => {
150
- const provider = walletAddress ? (await WalletController.getProvider()) : null;
151
+ const provider = walletAddress ? await WalletController.getProvider() : null;
151
152
  setProvider(provider);
152
153
  };
153
154
  void updateWalletInfo();
package/build/types.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { Network } from '@btc-vision/bitcoin';
1
+ import { type Network } from '@btc-vision/bitcoin';
2
2
  import { UnisatChainType } from '@btc-vision/transaction';
3
3
  export interface WalletConnectNetwork extends Network {
4
4
  chainType: UnisatChainType;
5
+ network: string;
5
6
  }
6
7
  export interface WalletInformation {
7
8
  name: string;
package/build/types.js CHANGED
@@ -1 +1,2 @@
1
- export {};
1
+ import {} from '@btc-vision/bitcoin';
2
+ import { UnisatChainType } from '@btc-vision/transaction';
@@ -1,8 +1,8 @@
1
- import { Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import { WalletConnectNetwork } from '../types';
3
- import { SupportedWallets } from './index';
4
- import type { ControllerConnectAccounts, ControllerErrorResponse, ControllerResponse, WalletConnectWallet } from './types.ts';
1
+ import { type Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
5
2
  import { AbstractRpcProvider } from 'opnet';
3
+ import { type WalletConnectNetwork } from '../types';
4
+ import { type SupportedWallets } from './index';
5
+ import type { ControllerConnectAccounts, ControllerErrorResponse, ControllerResponse, WalletConnectWallet } from './types.ts';
6
6
  declare class WalletController {
7
7
  private static wallets;
8
8
  private static currentWallet;
@@ -1,8 +1,11 @@
1
1
  var _a;
2
2
  import { networks } from '@btc-vision/bitcoin';
3
- import { UnisatChainType } from '@btc-vision/transaction';
3
+ import { UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
4
+ import { AbstractRpcProvider } from 'opnet';
4
5
  import { DefaultWalletConnectNetwork } from '../consts';
6
+ import {} from '../types';
5
7
  import { _e } from '../utils/accessibility/errorDecoder';
8
+ import {} from './index';
6
9
  class WalletController {
7
10
  static isWalletInstalled(wallet) {
8
11
  return this.wallets.get(wallet)?.controller?.isInstalled() || false;
@@ -34,16 +37,16 @@ class WalletController {
34
37
  return await wallet.controller.getSigner();
35
38
  }
36
39
  static convertChainTypeToNetwork(chainType) {
37
- const walletNetwork = (network) => {
38
- return { ...network, chainType: chainType };
40
+ const walletNetwork = (network, name) => {
41
+ return { ...network, chainType: chainType, network: name };
39
42
  };
40
43
  switch (chainType) {
41
44
  case UnisatChainType.BITCOIN_REGTEST:
42
- return walletNetwork(networks.regtest);
45
+ return walletNetwork(networks.regtest, 'regtest');
43
46
  case UnisatChainType.BITCOIN_TESTNET:
44
- return walletNetwork(networks.testnet);
47
+ return walletNetwork(networks.testnet, 'testnet');
45
48
  case UnisatChainType.BITCOIN_MAINNET:
46
- return walletNetwork(networks.bitcoin);
49
+ return walletNetwork(networks.bitcoin, 'mainnet');
47
50
  case UnisatChainType.BITCOIN_TESTNET4:
48
51
  case UnisatChainType.BITCOIN_SIGNET:
49
52
  case UnisatChainType.FRACTAL_BITCOIN_TESTNET:
@@ -1,6 +1,6 @@
1
- import { Unisat, UnisatChainType } from '@btc-vision/transaction';
2
- import type { WalletBase } from '../types.ts';
1
+ import { type Unisat, UnisatChainType } from '@btc-vision/transaction';
3
2
  import { AbstractRpcProvider } from 'opnet';
3
+ import { type WalletBase } from '../types';
4
4
  declare class OPWallet implements WalletBase {
5
5
  private walletBase;
6
6
  private accountsChangedHookWrapper?;
@@ -1,6 +1,8 @@
1
- import { UnisatChainType } from '@btc-vision/transaction';
2
- import { JSONRpcProvider } from 'opnet';
3
1
  import { networks } from '@btc-vision/bitcoin';
2
+ import { UnisatChainType } from '@btc-vision/transaction';
3
+ import { AbstractRpcProvider, JSONRpcProvider } from 'opnet';
4
+ import {} from '../types';
5
+ import {} from './interface';
4
6
  const notInstalledError = 'OP_WALLET is not installed';
5
7
  class OPWallet {
6
8
  constructor() {
@@ -1,4 +1,4 @@
1
- import type { Unisat } from '@btc-vision/transaction';
1
+ import { type Unisat } from '@btc-vision/transaction';
2
2
  export interface OPWalletInterface extends Unisat {
3
3
  disconnect: () => Promise<void>;
4
4
  }
@@ -1,3 +1,4 @@
1
+ import {} from '@btc-vision/transaction';
1
2
  export const logo = 'data:image/svg+xml;base64,' +
2
3
  'PHN2ZyB3aWR0aD0iNDgxIiBoZWlnaHQ9IjExMiIgdmlld0JveD0iMCAwIDQ4MSAxMTIiIGZpbGw9' +
3
4
  'Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0i' +
@@ -1,7 +1,7 @@
1
- import { Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import { SupportedWallets } from './index';
1
+ import { type Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
3
2
  import { AbstractRpcProvider } from 'opnet';
4
- export type { AbstractRpcProvider } from 'opnet';
3
+ import { type SupportedWallets } from './index';
4
+ export { type AbstractRpcProvider } from 'opnet';
5
5
  export interface WalletBase {
6
6
  isInstalled(): boolean;
7
7
  isConnected(): boolean;
@@ -1 +1,4 @@
1
- export {};
1
+ import { UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
+ import { AbstractRpcProvider } from 'opnet';
3
+ import {} from './index';
4
+ export {} from 'opnet';
@@ -1,5 +1,5 @@
1
- import { Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import type { WalletBase } from '../types.ts';
1
+ import { type Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
+ import { type WalletBase } from '../types';
3
3
  import { AbstractRpcProvider } from 'opnet';
4
4
  declare class UnisatWallet implements WalletBase {
5
5
  private walletBase;
@@ -1,5 +1,7 @@
1
1
  import { UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import { JSONRpcProvider } from 'opnet';
2
+ import {} from '../types';
3
+ import {} from './interface';
4
+ import { AbstractRpcProvider, JSONRpcProvider } from 'opnet';
3
5
  import { networks } from '@btc-vision/bitcoin';
4
6
  const notInstalledError = 'UNISAT is not installed';
5
7
  class UnisatWallet {
@@ -1,4 +1,4 @@
1
- import type { Unisat } from '@btc-vision/transaction';
1
+ import { type Unisat } from '@btc-vision/transaction';
2
2
  export interface UnisatWalletInterface extends Unisat {
3
3
  disconnect: () => Promise<void>;
4
4
  }
@@ -1,3 +1,4 @@
1
+ import {} from '@btc-vision/transaction';
1
2
  export const logo = 'data:image/png;base64,' +
2
3
  'iVBORw0KGgoAAAANSUhEUgAAAV4AAABjCAYAAADTuGjdAAAAAXNSR0IB2cksfwAAAARnQU1BAACx' +
3
4
  'jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dE' +
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/walletconnect",
3
3
  "type": "module",
4
- "version": "1.5.3",
4
+ "version": "1.5.5",
5
5
  "author": "impredmet",
6
6
  "description": "The OP_NET Wallet Connect library helps your dApp connect to any compatible wallet.",
7
7
  "engines": {
@@ -87,14 +87,14 @@
87
87
  },
88
88
  "dependencies": {
89
89
  "@btc-vision/bitcoin": "^6.4.8",
90
- "@btc-vision/transaction": "^1.6.9",
90
+ "@btc-vision/transaction": "^1.6.15",
91
91
  "@eslint/js": "^9.34.0",
92
92
  "css-loader": "^7.1.2",
93
93
  "eslint-plugin-react-hooks": "^5.2.0",
94
94
  "gulp-clean": "^0.4.0",
95
95
  "gulp-eslint-new": "^2.4.0",
96
96
  "gulp-logger-new": "^1.0.1",
97
- "opnet": "^1.6.18",
97
+ "opnet": "^1.6.27",
98
98
  "style-loader": "^4.0.0",
99
99
  "webpack": "^5.101.3"
100
100
  }
package/src/consts.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { networks } from '@btc-vision/bitcoin';
2
2
  import { UnisatChainType } from '@btc-vision/transaction';
3
- import { WalletConnectNetwork } from './types';
3
+ import { type WalletConnectNetwork } from './types';
4
4
 
5
5
  export const DefaultWalletConnectNetwork: WalletConnectNetwork = {
6
6
  ...networks.regtest,
7
7
  chainType: UnisatChainType.BITCOIN_REGTEST,
8
+ network: 'regtest',
8
9
  } as const;
@@ -1,8 +1,8 @@
1
- import { Address, Unisat, UnisatSigner } from '@btc-vision/transaction';
1
+ import { Address, type Unisat, UnisatSigner } from '@btc-vision/transaction';
2
+ import { AbstractRpcProvider } from 'opnet';
2
3
  import { createContext } from 'react';
3
4
  import type { WalletConnectNetwork, WalletInformation } from '../types.ts';
4
- import { SupportedWallets } from '../wallets';
5
- import { AbstractRpcProvider } from 'opnet';
5
+ import { type SupportedWallets } from '../wallets';
6
6
 
7
7
  export type WalletConnectContextType = {
8
8
  allWallets: WalletInformation[];
@@ -1,18 +1,18 @@
1
- import { Address, Unisat, UnisatSigner } from '@btc-vision/transaction';
1
+ import { Address, type Unisat, UnisatSigner } from '@btc-vision/transaction';
2
+ import { AbstractRpcProvider } from 'opnet';
2
3
  import React, { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
4
  import { DefaultWalletConnectNetwork } from '../consts';
4
5
  import { WalletConnectContext } from '../context/WalletConnectContext';
5
6
  import type { WalletConnectNetwork, WalletInformation } from '../types.ts';
6
7
  import '../utils/style.css';
7
8
  import '../utils/theme.css';
8
- import { SupportedWallets, WalletController } from '../wallets';
9
+ import { type SupportedWallets, WalletController } from '../wallets';
9
10
  import type {
10
11
  ControllerConnectAccounts,
11
12
  ControllerErrorResponse,
12
13
  ControllerResponse,
13
14
  WalletConnectWallet,
14
15
  } from '../wallets/types.ts';
15
- import { AbstractRpcProvider } from 'opnet';
16
16
 
17
17
  const AUTO_RECONNECT_RETRIES = 5;
18
18
 
@@ -201,11 +201,11 @@ const WalletConnectProvider: React.FC<WalletConnectProviderProps> = ({ theme, ch
201
201
 
202
202
  useEffect(() => {
203
203
  const updateWalletInfo = async () => {
204
- const provider = walletAddress ? (await WalletController.getProvider()) : null;
204
+ const provider = walletAddress ? await WalletController.getProvider() : null;
205
205
  setProvider(provider);
206
- }
206
+ };
207
207
  void updateWalletInfo();
208
- }, [walletAddress,network]);
208
+ }, [walletAddress, network]);
209
209
 
210
210
  useEffect(() => {
211
211
  const updateSigner = async () => {
package/src/types.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { Network } from '@btc-vision/bitcoin';
1
+ import { type Network } from '@btc-vision/bitcoin';
2
2
  import { UnisatChainType } from '@btc-vision/transaction';
3
3
 
4
4
  export interface WalletConnectNetwork extends Network {
5
5
  chainType: UnisatChainType;
6
+ network: string;
6
7
  }
7
8
 
8
9
  export interface WalletInformation {
@@ -1,16 +1,16 @@
1
- import { Network, networks } from '@btc-vision/bitcoin';
2
- import { Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
1
+ import { type Network, networks } from '@btc-vision/bitcoin';
2
+ import { type Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
3
+ import { AbstractRpcProvider } from 'opnet';
3
4
  import { DefaultWalletConnectNetwork } from '../consts';
4
- import { WalletConnectNetwork } from '../types';
5
+ import { type WalletConnectNetwork } from '../types';
5
6
  import { _e } from '../utils/accessibility/errorDecoder';
6
- import { SupportedWallets } from './index';
7
+ import { type SupportedWallets } from './index';
7
8
  import type {
8
9
  ControllerConnectAccounts,
9
10
  ControllerErrorResponse,
10
11
  ControllerResponse,
11
12
  WalletConnectWallet,
12
13
  } from './types.ts';
13
- import { AbstractRpcProvider } from 'opnet';
14
14
 
15
15
  class WalletController {
16
16
  private static wallets: Map<string, WalletConnectWallet> = new Map();
@@ -42,7 +42,7 @@ class WalletController {
42
42
  return null;
43
43
  }
44
44
  // Needs to return a Proxy to be sure useEffects are triggered
45
- const provider = await wallet.controller.getProvider()
45
+ const provider = await wallet.controller.getProvider();
46
46
  return provider ? new Proxy(provider, {}) : null;
47
47
  }
48
48
 
@@ -57,16 +57,16 @@ class WalletController {
57
57
  //TODO: check if we really want to return a default network here
58
58
  // instead of null. Default is there: DefaultWalletConnectChain.network
59
59
  static convertChainTypeToNetwork(chainType: UnisatChainType): WalletConnectNetwork {
60
- const walletNetwork = (network: Network): WalletConnectNetwork => {
61
- return { ...network, chainType: chainType };
60
+ const walletNetwork = (network: Network, name: string): WalletConnectNetwork => {
61
+ return { ...network, chainType: chainType, network: name };
62
62
  };
63
63
  switch (chainType) {
64
64
  case UnisatChainType.BITCOIN_REGTEST:
65
- return walletNetwork(networks.regtest);
65
+ return walletNetwork(networks.regtest, 'regtest');
66
66
  case UnisatChainType.BITCOIN_TESTNET:
67
- return walletNetwork(networks.testnet);
67
+ return walletNetwork(networks.testnet, 'testnet');
68
68
  case UnisatChainType.BITCOIN_MAINNET:
69
- return walletNetwork(networks.bitcoin);
69
+ return walletNetwork(networks.bitcoin, 'mainnet');
70
70
 
71
71
  case UnisatChainType.BITCOIN_TESTNET4:
72
72
  case UnisatChainType.BITCOIN_SIGNET:
@@ -1,8 +1,8 @@
1
- import { Unisat, UnisatChainInfo, UnisatChainType } from '@btc-vision/transaction';
2
- import type { WalletBase } from '../types.ts';
3
- import type { OPWalletInterface } from './interface';
4
- import { AbstractRpcProvider, JSONRpcProvider } from 'opnet';
5
1
  import { networks } from '@btc-vision/bitcoin';
2
+ import { type Unisat, type UnisatChainInfo, UnisatChainType } from '@btc-vision/transaction';
3
+ import { AbstractRpcProvider, JSONRpcProvider } from 'opnet';
4
+ import { type WalletBase } from '../types';
5
+ import { type OPWalletInterface } from './interface';
6
6
 
7
7
  interface OPWalletWindow extends Window {
8
8
  opnet?: OPWalletInterface;
@@ -1,4 +1,4 @@
1
- import type { Unisat } from '@btc-vision/transaction';
1
+ import { type Unisat } from '@btc-vision/transaction';
2
2
 
3
3
  export interface OPWalletInterface extends Unisat {
4
4
  disconnect: () => Promise<void>;
@@ -1,7 +1,7 @@
1
- import { Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import { SupportedWallets } from './index';
3
- import { AbstractRpcProvider } from 'opnet'
4
- export type { AbstractRpcProvider } from 'opnet';
1
+ import { type Unisat, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
+ import { AbstractRpcProvider } from 'opnet';
3
+ import { type SupportedWallets } from './index';
4
+ export { type AbstractRpcProvider } from 'opnet';
5
5
 
6
6
  export interface WalletBase {
7
7
  isInstalled(): boolean;
@@ -1,6 +1,6 @@
1
- import { Unisat, UnisatChainInfo, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
- import type { WalletBase } from '../types.ts';
3
- import type { UnisatWalletInterface } from './interface';
1
+ import { type Unisat, type UnisatChainInfo, UnisatChainType, UnisatSigner } from '@btc-vision/transaction';
2
+ import { type WalletBase } from '../types';
3
+ import { type UnisatWalletInterface } from './interface';
4
4
  import { AbstractRpcProvider, JSONRpcProvider } from 'opnet';
5
5
  import { networks } from '@btc-vision/bitcoin';
6
6
 
@@ -1,4 +1,4 @@
1
- import type { Unisat } from '@btc-vision/transaction';
1
+ import { type Unisat } from '@btc-vision/transaction';
2
2
 
3
3
  export interface UnisatWalletInterface extends Unisat {
4
4
  disconnect: () => Promise<void>;
@@ -21,6 +21,7 @@
21
21
  "allowJs": true,
22
22
  "incremental": true,
23
23
  "allowSyntheticDefaultImports": true,
24
+ "verbatimModuleSyntax": true,
24
25
  "esModuleInterop": true
25
26
  },
26
27
  "include": ["src/**/*.ts", "src/*", "src/**/*.js", "src/*.ts", "src/*.js", "src/*.cjs"]