@dynamic-labs/bitcoin 2.2.0-alpha.5 → 2.2.1

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/CHANGELOG.md CHANGED
@@ -1,53 +1,86 @@
1
1
 
2
- ## [2.2.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0-alpha.4...v2.2.0-alpha.5) (2024-06-08)
2
+ ### [2.2.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0...v2.2.1) (2024-06-17)
3
3
 
4
4
 
5
5
  ### Bug Fixes
6
6
 
7
- * find solana provider from wallet standard ([#5897](https://github.com/dynamic-labs/DynamicAuth/issues/5897)) ([2144041](https://github.com/dynamic-labs/DynamicAuth/commit/21440410c3a75983195260ce57f4442177480c65))
8
- * remove force consent and account selection even for returning google users ([#5911](https://github.com/dynamic-labs/DynamicAuth/issues/5911)) ([8b2a358](https://github.com/dynamic-labs/DynamicAuth/commit/8b2a3586ee559c553a1615a57c34226c175db2f9))
9
- * retrieve connected account from cache when MagicEden wallet is secondary and locked ([#5885](https://github.com/dynamic-labs/DynamicAuth/issues/5885)) ([fb35a65](https://github.com/dynamic-labs/DynamicAuth/commit/fb35a651dc18dbdc2bfaad87b7528bfae977f7e3))
7
+ * improve handling of bitcoin connected accounts ([#6049](https://github.com/dynamic-labs/DynamicAuth/issues/6049)) ([08cb8ba](https://github.com/dynamic-labs/DynamicAuth/commit/08cb8bae2b1521367234cbe2bb55a8c3766df3c1))
8
+ * improve wagmi hooks with embedded wallets ([#6044](https://github.com/dynamic-labs/DynamicAuth/issues/6044)) ([#6052](https://github.com/dynamic-labs/DynamicAuth/issues/6052)) ([28654e8](https://github.com/dynamic-labs/DynamicAuth/commit/28654e8a45b25c4fc3bb3abfa89b453808a55053))
10
9
 
11
- ## [2.2.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0-alpha.3...v2.2.0-alpha.4) (2024-06-06)
10
+ ## [2.2.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.5...v2.2.0) (2024-06-16)
11
+
12
+
13
+ ### Features
14
+
15
+ * add useSwitchNetwork ([#6027](https://github.com/dynamic-labs/DynamicAuth/issues/6027)) ([671310a](https://github.com/dynamic-labs/DynamicAuth/commit/671310a98aaeca12e02443c824d5d7cad2cdc769))
16
+ * add walletAdded to useDynamicEvents ([#6026](https://github.com/dynamic-labs/DynamicAuth/issues/6026)) ([8b784b7](https://github.com/dynamic-labs/DynamicAuth/commit/8b784b702e242ca279aafae657a076a51d397627))
17
+ * expose selectedTabState and deprecate setDefaultSelectedTab ([#6028](https://github.com/dynamic-labs/DynamicAuth/issues/6028)) ([eb71787](https://github.com/dynamic-labs/DynamicAuth/commit/eb717877cb6604504d10802a3aecc6055f95caa0))
18
+
19
+ ### [2.1.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.4...v2.1.5) (2024-06-16)
20
+
21
+ * Improve handling of unknown wallets, css fixes and copy updates in multi wallet experience
22
+
23
+ ### [2.1.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.3...v2.1.4) (2024-06-14)
12
24
 
13
25
 
14
26
  ### Bug Fixes
15
27
 
16
- * btc getBalance should use ordinal address if payment not available ([#5882](https://github.com/dynamic-labs/DynamicAuth/issues/5882)) ([803a055](https://github.com/dynamic-labs/DynamicAuth/commit/803a05518ae9d2353d50f51b29047dff01136710))
17
- * connect prompt when switching to xverse ([#5888](https://github.com/dynamic-labs/DynamicAuth/issues/5888)) ([181a7c4](https://github.com/dynamic-labs/DynamicAuth/commit/181a7c4af8217dab7ed2776d56ec2e3725a0ee6a))
28
+ * close sign modal when signing in with a wallet when embedded wallet is enabled ([#6012](https://github.com/dynamic-labs/DynamicAuth/issues/6012)) ([d473cc8](https://github.com/dynamic-labs/DynamicAuth/commit/d473cc83ac378b7bc43e2546020c02a297d4595b))
29
+ * display custom network name in network picker even if it doesn't have a valid icon ([#6020](https://github.com/dynamic-labs/DynamicAuth/issues/6020)) ([5e1539e](https://github.com/dynamic-labs/DynamicAuth/commit/5e1539e1e6920fb1fdbf96c938f40e785b3ee680))
18
30
 
19
- ## [2.2.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0-alpha.2...v2.2.0-alpha.3) (2024-06-05)
31
+ ### [2.1.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.2...v2.1.3) (2024-06-14)
20
32
 
21
33
 
22
34
  ### Features
23
35
 
24
- * farcaster linking ([#5869](https://github.com/dynamic-labs/DynamicAuth/issues/5869)) ([191d1d2](https://github.com/dynamic-labs/DynamicAuth/commit/191d1d29e436e7d453d533c9c330ac5cef2e2a1c))
36
+ * add in-app browser navigation support for sats-connect ([#5990](https://github.com/dynamic-labs/DynamicAuth/issues/5990)) ([7ea15b9](https://github.com/dynamic-labs/DynamicAuth/commit/7ea15b93d1864164acb82c1e73aae7f9130e1d44))
25
37
 
26
38
 
27
39
  ### Bug Fixes
28
40
 
29
- * phone number in kyc step ([#5875](https://github.com/dynamic-labs/DynamicAuth/issues/5875)) ([d73f3b1](https://github.com/dynamic-labs/DynamicAuth/commit/d73f3b158e794727e7bed5d558a43d937951ce56))
41
+ * cache getGenesisHash call to prevent over calling ([#5966](https://github.com/dynamic-labs/DynamicAuth/issues/5966)) ([#5970](https://github.com/dynamic-labs/DynamicAuth/issues/5970)) ([b624b2e](https://github.com/dynamic-labs/DynamicAuth/commit/b624b2ea5b398bf464d3098e7d81d83c7b5bf659))
42
+ * improvements to embedded solana wallet ([#6001](https://github.com/dynamic-labs/DynamicAuth/issues/6001)) ([a6437c9](https://github.com/dynamic-labs/DynamicAuth/commit/a6437c93e1946bca609d3d99d282123275022376)) ([#5815](https://github.com/dynamic-labs/DynamicAuth/issues/5815)) ([#5978](https://github.com/dynamic-labs/DynamicAuth/issues/5978)) ([dd92973](https://github.com/dynamic-labs/DynamicAuth/commit/dd9297365f0ccbee1217325328e173ae7ee9a922))
43
+ * show linked wallets with unavailable providers in user wallets list ([#6005](https://github.com/dynamic-labs/DynamicAuth/issues/6005)) ([79796d1](https://github.com/dynamic-labs/DynamicAuth/commit/79796d1b73670265ca9897314252b620afaa2e8a))
44
+ * close switch network modal after switching to a supported network ([#5987](https://github.com/dynamic-labs/DynamicAuth/issues/5987)) ([a7e762e](https://github.com/dynamic-labs/DynamicAuth/commit/a7e762ef63a72492d0c083a344111589a6fbc455))
30
45
 
31
- ## [2.2.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0-alpha.1...v2.2.0-alpha.2) (2024-06-05)
46
+ ### [2.1.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.2-alpha.1...v2.1.2) (2024-06-10)
32
47
 
33
48
 
34
49
  ### Features
35
50
 
36
- * display enabled countries in phone number field ([#5825](https://github.com/dynamic-labs/DynamicAuth/issues/5825)) ([a1ea0e1](https://github.com/dynamic-labs/DynamicAuth/commit/a1ea0e1ac1cf48ec348a243fd986991361b3b54f))
51
+ * hide wallets from wallet list that can't have multiple accounts linked ([#5935](https://github.com/dynamic-labs/DynamicAuth/issues/5935)) ([20f9b15](https://github.com/dynamic-labs/DynamicAuth/commit/20f9b15b145cbc57519155691b3640149eec3689))
37
52
 
38
53
 
39
54
  ### Bug Fixes
40
55
 
41
- * bump @solana/web3.js containing new version of rpc-websockets ([#5853](https://github.com/dynamic-labs/DynamicAuth/issues/5853)) ([dd5bc12](https://github.com/dynamic-labs/DynamicAuth/commit/dd5bc121c35d86dca52f5574ebc30ab30f35b626)), closes [solana-labs/solana-web3.js#2762](https://github.com/solana-labs/solana-web3.js/issues/2762)
56
+ * ensure sign message will not show 2 times ([#5938](https://github.com/dynamic-labs/DynamicAuth/issues/5938)) ([#5941](https://github.com/dynamic-labs/DynamicAuth/issues/5941)) ([2c5a156](https://github.com/dynamic-labs/DynamicAuth/commit/2c5a156ead565bd25067b3bc2b23cbc704f9b314))
57
+ * improve logic related to embedded wallets and emailVerifcation ([#5947](https://github.com/dynamic-labs/DynamicAuth/issues/5947)) ([b885a14](https://github.com/dynamic-labs/DynamicAuth/commit/b885a14dcf200f05233e4ab42b8b518d877d291a))
58
+ * init coinbase provider adhoc ([#5907](https://github.com/dynamic-labs/DynamicAuth/issues/5907)) ([#5933](https://github.com/dynamic-labs/DynamicAuth/issues/5933)) ([2fa1f52](https://github.com/dynamic-labs/DynamicAuth/commit/2fa1f528b27113ee108252ee874ee7f5ead88329))
59
+ * remove force consent and account selection even for returning google users ([#5912](https://github.com/dynamic-labs/DynamicAuth/issues/5912)) ([26a07f2](https://github.com/dynamic-labs/DynamicAuth/commit/26a07f29bdb8bf32a080396906a21d8b084c202f))
60
+ * resolve the default phone country based on enabled countries ([#5](https://github.com/dynamic-labs/DynamicAuth/issues/5)… ([#5916](https://github.com/dynamic-labs/DynamicAuth/issues/5916)) ([8f27c00](https://github.com/dynamic-labs/DynamicAuth/commit/8f27c0082edb77b964b8402cfa75c6a896b061d3)), closes [#5910](https://github.com/dynamic-labs/DynamicAuth/issues/5910)
61
+ * versioned tx needs address lookup table ([#5909](https://github.com/dynamic-labs/DynamicAuth/issues/5909)) ([#5919](https://github.com/dynamic-labs/DynamicAuth/issues/5919)) ([22e3ca2](https://github.com/dynamic-labs/DynamicAuth/commit/22e3ca2d0b27d15efb50e3092a7bc3a0c0d255a5))
62
+
63
+ ### [2.1.2-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.2-alpha.0...v2.1.2-alpha.1) (2024-06-07)
42
64
 
43
- ## [2.2.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0-alpha.0...v2.2.0-alpha.1) (2024-06-04)
44
65
 
45
- ## [2.2.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0...v2.2.0-alpha.0) (2024-06-04)
66
+ ### Bug Fixes
67
+
68
+ * find phantom solana provider when opening dapp on new tab ([#5902](https://github.com/dynamic-labs/DynamicAuth/issues/5902)) ([99daf87](https://github.com/dynamic-labs/DynamicAuth/commit/99daf87f17caed870a76e4f89a257a14da37c7ab)), closes [#5895](https://github.com/dynamic-labs/DynamicAuth/issues/5895) [#5896](https://github.com/dynamic-labs/DynamicAuth/issues/5896) [#5897](https://github.com/dynamic-labs/DynamicAuth/issues/5897)
69
+
70
+ ### [2.1.2-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.1...v2.1.2-alpha.0) (2024-06-07)
46
71
 
47
72
 
48
73
  ### Features
49
74
 
50
- * add multi-asset wallet header ([#5608](https://github.com/dynamic-labs/DynamicAuth/issues/5608)) ([47998b1](https://github.com/dynamic-labs/DynamicAuth/commit/47998b1999ddf786bf88b86248c79fc92f278331)), closes [#5655](https://github.com/dynamic-labs/DynamicAuth/issues/5655) [#5643](https://github.com/dynamic-labs/DynamicAuth/issues/5643) [#5673](https://github.com/dynamic-labs/DynamicAuth/issues/5673) [#5762](https://github.com/dynamic-labs/DynamicAuth/issues/5762) [#5766](https://github.com/dynamic-labs/DynamicAuth/issues/5766) [#5777](https://github.com/dynamic-labs/DynamicAuth/issues/5777)
75
+ * display enabled countries in phone number field ([#5825](https://github.com/dynamic-labs/DynamicAuth/issues/5825)) ([#5868](https://github.com/dynamic-labs/DynamicAuth/issues/5868)) ([640a4a7](https://github.com/dynamic-labs/DynamicAuth/commit/640a4a77c994390ceed759faf186717b38f393a4))
76
+
77
+
78
+ ### Bug Fixes
79
+
80
+ * btc getBalance should use ordinal address if payment not available ([#5883](https://github.com/dynamic-labs/DynamicAuth/issues/5883)) ([bc5ac55](https://github.com/dynamic-labs/DynamicAuth/commit/bc5ac5589e90193d41282d23ce037db360dd23e6))
81
+ * phone number in kyc step ([#5875](https://github.com/dynamic-labs/DynamicAuth/issues/5875)) ([#5879](https://github.com/dynamic-labs/DynamicAuth/issues/5879)) ([3d8a5be](https://github.com/dynamic-labs/DynamicAuth/commit/3d8a5bef35d4a13a1068aaf80d2c39e795b097cd))
82
+
83
+ ### [2.1.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0...v2.1.1) (2024-06-04)
51
84
 
52
85
  ## [2.1.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.32...v2.1.0) (2024-06-04)
53
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/bitcoin",
3
- "version": "2.2.0-alpha.5",
3
+ "version": "2.2.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -32,9 +32,9 @@
32
32
  "@wallet-standard/base": "1.0.1",
33
33
  "bitcoinjs-lib": "6.1.5",
34
34
  "sats-connect": "2.0.0",
35
- "@dynamic-labs/utils": "2.2.0-alpha.5",
36
- "@dynamic-labs/wallet-book": "2.2.0-alpha.5",
37
- "@dynamic-labs/wallet-connector-core": "2.2.0-alpha.5",
35
+ "@dynamic-labs/utils": "2.2.1",
36
+ "@dynamic-labs/wallet-book": "2.2.1",
37
+ "@dynamic-labs/wallet-connector-core": "2.2.1",
38
38
  "stream": "0.0.2"
39
39
  },
40
40
  "peerDependencies": {}
@@ -15,6 +15,10 @@ export declare class BitcoinProviderHelper {
15
15
  features: string[];
16
16
  name: string;
17
17
  } | undefined;
18
+ walletStandardLocators?: {
19
+ name: string;
20
+ locator: string;
21
+ }[] | undefined;
18
22
  windowLocations?: string[] | undefined;
19
23
  } | undefined;
20
24
  getProvider(): any;
@@ -6,9 +6,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var _tslib = require('../../../_virtual/_tslib.cjs');
7
7
  var bitcoinjsLib = require('bitcoinjs-lib');
8
8
  var satsConnect = require('sats-connect');
9
- var sdkApiCore = require('@dynamic-labs/sdk-api-core');
9
+ var utils = require('@dynamic-labs/utils');
10
+ var walletBook = require('@dynamic-labs/wallet-book');
10
11
  var _const = require('../../const.cjs');
11
- require('@dynamic-labs/utils');
12
12
  require('@dynamic-labs/wallet-connector-core');
13
13
  var BitcoinWalletConnector = require('../BitcoinWalletConnector.cjs');
14
14
  var validatePsbt = require('../../utils/psbt/validator/validatePsbt.cjs');
@@ -20,10 +20,9 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector.BitcoinWalletCo
20
20
  constructor(opts) {
21
21
  super(opts);
22
22
  this.currentNetwork = satsConnect.BitcoinNetworkType.Mainnet;
23
- this.canFetchConnectedAccounts = true;
24
- // xverse does't support fetching connected accounts without prompting
25
- // for a connection, so we handle getConnectedAccounts differently
26
- this.canFetchConnectedAccounts = this.key !== 'xverse';
23
+ // satsconnect wallets don't support fetching connected accounts without prompting
24
+ // for a connection, so we handle getConnectedAccounts differently.
25
+ this.canFetchConnectedAccounts = false;
27
26
  }
28
27
  getAddress() {
29
28
  return _tslib.__awaiter(this, void 0, void 0, function* () {
@@ -36,11 +35,15 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector.BitcoinWalletCo
36
35
  if (!supportsSatsConnect.supportsSatsConnect(this)) {
37
36
  return;
38
37
  }
39
- const cachedActiveAccount = yield this.cache.getActiveAccount();
40
- if (cachedActiveAccount) {
41
- const ordinalsAddress = cachedActiveAccount.additionalAddresses.find((address) => address.type === sdkApiCore.WalletAddressType.Ordinals);
42
- const paymentAddress = cachedActiveAccount.additionalAddresses.find((address) => address.type === sdkApiCore.WalletAddressType.Payment);
43
- return (_a = ordinalsAddress === null || ordinalsAddress === void 0 ? void 0 : ordinalsAddress.address) !== null && _a !== void 0 ? _a : paymentAddress === null || paymentAddress === void 0 ? void 0 : paymentAddress.address;
38
+ const wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
39
+ const inAppBrowserUrl = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.mobile) === null || _a === void 0 ? void 0 : _a.inAppBrowser;
40
+ if (utils.isMobile() && !this.isInstalledOnBrowser() && inAppBrowserUrl) {
41
+ const inAppBrowserTemplate = utils.template(inAppBrowserUrl);
42
+ const deepLink = inAppBrowserTemplate({
43
+ encodedDappURI: encodeURIComponent(window.location.toString()),
44
+ });
45
+ window.location.href = deepLink;
46
+ return;
44
47
  }
45
48
  return new Promise((resolve, reject) => {
46
49
  satsConnect.getAddress({
@@ -2,9 +2,9 @@
2
2
  import { __awaiter } from '../../../_virtual/_tslib.js';
3
3
  import { Psbt } from 'bitcoinjs-lib';
4
4
  import { BitcoinNetworkType, getAddress, AddressPurpose, signMessage, sendBtcTransaction, signTransaction } from 'sats-connect';
5
- import { WalletAddressType } from '@dynamic-labs/sdk-api-core';
5
+ import { isMobile, template } from '@dynamic-labs/utils';
6
+ import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
6
7
  import { SATSCONNECT_FEATURE } from '../../const.js';
7
- import '@dynamic-labs/utils';
8
8
  import '@dynamic-labs/wallet-connector-core';
9
9
  import { BitcoinWalletConnector } from '../BitcoinWalletConnector.js';
10
10
  import { validatePsbt } from '../../utils/psbt/validator/validatePsbt.js';
@@ -16,10 +16,9 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
16
16
  constructor(opts) {
17
17
  super(opts);
18
18
  this.currentNetwork = BitcoinNetworkType.Mainnet;
19
- this.canFetchConnectedAccounts = true;
20
- // xverse does't support fetching connected accounts without prompting
21
- // for a connection, so we handle getConnectedAccounts differently
22
- this.canFetchConnectedAccounts = this.key !== 'xverse';
19
+ // satsconnect wallets don't support fetching connected accounts without prompting
20
+ // for a connection, so we handle getConnectedAccounts differently.
21
+ this.canFetchConnectedAccounts = false;
23
22
  }
24
23
  getAddress() {
25
24
  return __awaiter(this, void 0, void 0, function* () {
@@ -32,11 +31,15 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
32
31
  if (!supportsSatsConnect(this)) {
33
32
  return;
34
33
  }
35
- const cachedActiveAccount = yield this.cache.getActiveAccount();
36
- if (cachedActiveAccount) {
37
- const ordinalsAddress = cachedActiveAccount.additionalAddresses.find((address) => address.type === WalletAddressType.Ordinals);
38
- const paymentAddress = cachedActiveAccount.additionalAddresses.find((address) => address.type === WalletAddressType.Payment);
39
- return (_a = ordinalsAddress === null || ordinalsAddress === void 0 ? void 0 : ordinalsAddress.address) !== null && _a !== void 0 ? _a : paymentAddress === null || paymentAddress === void 0 ? void 0 : paymentAddress.address;
34
+ const wallet = findWalletBookWallet(this.walletBook, this.key);
35
+ const inAppBrowserUrl = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.mobile) === null || _a === void 0 ? void 0 : _a.inAppBrowser;
36
+ if (isMobile() && !this.isInstalledOnBrowser() && inAppBrowserUrl) {
37
+ const inAppBrowserTemplate = template(inAppBrowserUrl);
38
+ const deepLink = inAppBrowserTemplate({
39
+ encodedDappURI: encodeURIComponent(window.location.toString()),
40
+ });
41
+ window.location.href = deepLink;
42
+ return;
40
43
  }
41
44
  return new Promise((resolve, reject) => {
42
45
  getAddress({
@@ -53,7 +53,10 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
53
53
  }
54
54
  endSession() {
55
55
  return _tslib.__awaiter(this, void 0, void 0, function* () {
56
- yield this.cache.clearLastBalance();
56
+ yield Promise.all([
57
+ this.cache.clearConnectedAcccounts(),
58
+ this.cache.clearLastBalance(),
59
+ ]);
57
60
  });
58
61
  }
59
62
  getBalance() {
@@ -49,7 +49,10 @@ class BitcoinWalletConnector extends WalletConnectorBase {
49
49
  }
50
50
  endSession() {
51
51
  return __awaiter(this, void 0, void 0, function* () {
52
- yield this.cache.clearLastBalance();
52
+ yield Promise.all([
53
+ this.cache.clearConnectedAcccounts(),
54
+ this.cache.clearLastBalance(),
55
+ ]);
53
56
  });
54
57
  }
55
58
  getBalance() {
@@ -0,0 +1,38 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _tslib = require('../../../_virtual/_tslib.cjs');
7
+ var BitcoinWalletConnector = require('../BitcoinWalletConnector.cjs');
8
+
9
+ class FallbackBitcoinConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
10
+ constructor(opts) {
11
+ super(Object.assign(Object.assign({}, opts), { overrideKey: 'fallbackconnector' }));
12
+ this.name = 'Fallback Connector';
13
+ this.overrideKey = 'fallbackconnector';
14
+ this.isAvailable = false;
15
+ this.canFetchConnectedAccounts = false;
16
+ }
17
+ getAddress() {
18
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
19
+ return;
20
+ });
21
+ }
22
+ signPsbt(
23
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
24
+ _request) {
25
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
26
+ return;
27
+ });
28
+ }
29
+ sendBitcoin(
30
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
31
+ _transaction) {
32
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
33
+ return;
34
+ });
35
+ }
36
+ }
37
+
38
+ exports.FallbackBitcoinConnector = FallbackBitcoinConnector;
@@ -0,0 +1,12 @@
1
+ import { BitcoinSignPsbtRequest, BitcoinSignPsbtResponse, BitcoinTransaction } from '../../types';
2
+ import { BitcoinWalletConnector, BitcoinWalletConnectorOpts } from '../BitcoinWalletConnector';
3
+ export declare class FallbackBitcoinConnector extends BitcoinWalletConnector {
4
+ name: string;
5
+ overrideKey: string;
6
+ isAvailable: boolean;
7
+ canFetchConnectedAccounts: boolean;
8
+ constructor(opts: BitcoinWalletConnectorOpts);
9
+ getAddress(): Promise<string | undefined>;
10
+ signPsbt(_request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
11
+ sendBitcoin(_transaction: BitcoinTransaction): Promise<string | undefined>;
12
+ }
@@ -0,0 +1,34 @@
1
+ 'use client'
2
+ import { __awaiter } from '../../../_virtual/_tslib.js';
3
+ import { BitcoinWalletConnector } from '../BitcoinWalletConnector.js';
4
+
5
+ class FallbackBitcoinConnector extends BitcoinWalletConnector {
6
+ constructor(opts) {
7
+ super(Object.assign(Object.assign({}, opts), { overrideKey: 'fallbackconnector' }));
8
+ this.name = 'Fallback Connector';
9
+ this.overrideKey = 'fallbackconnector';
10
+ this.isAvailable = false;
11
+ this.canFetchConnectedAccounts = false;
12
+ }
13
+ getAddress() {
14
+ return __awaiter(this, void 0, void 0, function* () {
15
+ return;
16
+ });
17
+ }
18
+ signPsbt(
19
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
20
+ _request) {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ return;
23
+ });
24
+ }
25
+ sendBitcoin(
26
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
27
+ _transaction) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return;
30
+ });
31
+ }
32
+ }
33
+
34
+ export { FallbackBitcoinConnector };
@@ -0,0 +1 @@
1
+ export { FallbackBitcoinConnector } from './FallbackBitcoinConnector';
@@ -5,3 +5,4 @@ export * from './PhantomConnector';
5
5
  export * from './OkxConnector';
6
6
  export * from './UnisatConnector';
7
7
  export * from './UnknownInjected';
8
+ export * from './FallbackBitcoinConnector';
package/src/index.cjs CHANGED
@@ -9,7 +9,7 @@ require('sats-connect');
9
9
  require('bitcoinjs-lib');
10
10
  require('@dynamic-labs/wallet-connector-core');
11
11
  require('@dynamic-labs/utils');
12
- require('@dynamic-labs/sdk-api-core');
12
+ require('@dynamic-labs/wallet-book');
13
13
  var fetchBtcKitConnectors = require('./utils/fetchBtcKitConnectors/fetchBtcKitConnectors.cjs');
14
14
  var fetchSatsConnectConnectors = require('./utils/fetchSatsConnectConnectors/fetchSatsConnectConnectors.cjs');
15
15
  var hasSatsConnectFeature = require('./utils/hasSatsConnectFeature.cjs');
@@ -19,6 +19,7 @@ var PhantomConnector = require('./connectors/PhantomConnector/PhantomConnector.c
19
19
  var OkxConnector = require('./connectors/OkxConnector/OkxConnector.cjs');
20
20
  var UnisatConnector = require('./connectors/UnisatConnector/UnisatConnector.cjs');
21
21
  var UnknownInjected = require('./connectors/UnknownInjected/UnknownInjected.cjs');
22
+ var FallbackBitcoinConnector = require('./connectors/FallbackBitcoinConnector/FallbackBitcoinConnector.cjs');
22
23
 
23
24
  const BitcoinWalletConnectors = (props) => [
24
25
  ...fetchSatsConnectConnectors.fetchSatsConnectConnectors(props),
@@ -27,6 +28,7 @@ const BitcoinWalletConnectors = (props) => [
27
28
  OkxConnector.OkxConnector,
28
29
  UnisatConnector.UnisatConnector,
29
30
  UnknownInjected.UnknownInjectedConnector,
31
+ FallbackBitcoinConnector.FallbackBitcoinConnector,
30
32
  ];
31
33
 
32
34
  exports.BitcoinWalletConnector = BitcoinWalletConnector.BitcoinWalletConnector;
package/src/index.js CHANGED
@@ -5,7 +5,7 @@ import 'sats-connect';
5
5
  import 'bitcoinjs-lib';
6
6
  import '@dynamic-labs/wallet-connector-core';
7
7
  import '@dynamic-labs/utils';
8
- import '@dynamic-labs/sdk-api-core';
8
+ import '@dynamic-labs/wallet-book';
9
9
  import { fetchBtcKitConnectors } from './utils/fetchBtcKitConnectors/fetchBtcKitConnectors.js';
10
10
  export { fetchBtcKitConnectors } from './utils/fetchBtcKitConnectors/fetchBtcKitConnectors.js';
11
11
  import { fetchSatsConnectConnectors } from './utils/fetchSatsConnectConnectors/fetchSatsConnectConnectors.js';
@@ -17,6 +17,7 @@ import { PhantomConnector } from './connectors/PhantomConnector/PhantomConnector
17
17
  import { OkxConnector } from './connectors/OkxConnector/OkxConnector.js';
18
18
  import { UnisatConnector } from './connectors/UnisatConnector/UnisatConnector.js';
19
19
  import { UnknownInjectedConnector } from './connectors/UnknownInjected/UnknownInjected.js';
20
+ import { FallbackBitcoinConnector } from './connectors/FallbackBitcoinConnector/FallbackBitcoinConnector.js';
20
21
 
21
22
  const BitcoinWalletConnectors = (props) => [
22
23
  ...fetchSatsConnectConnectors(props),
@@ -25,6 +26,7 @@ const BitcoinWalletConnectors = (props) => [
25
26
  OkxConnector,
26
27
  UnisatConnector,
27
28
  UnknownInjectedConnector,
29
+ FallbackBitcoinConnector,
28
30
  ];
29
31
 
30
32
  export { BitcoinWalletConnectors };