@dynamic-labs/bitcoin 2.0.2 → 2.1.0-alpha.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +14 -12
  2. package/_virtual/_tslib.cjs +1 -0
  3. package/_virtual/_tslib.js +1 -0
  4. package/package.json +5 -5
  5. package/src/BitcoinBtcKitConnector.cjs +6 -1
  6. package/src/BitcoinBtcKitConnector.js +6 -1
  7. package/src/BitcoinLocalStorageCache.cjs +1 -0
  8. package/src/BitcoinLocalStorageCache.js +1 -0
  9. package/src/BitcoinSatsConnectConnector.cjs +8 -0
  10. package/src/BitcoinSatsConnectConnector.js +8 -0
  11. package/src/BitcoinWalletConnector.cjs +15 -0
  12. package/src/BitcoinWalletConnector.d.ts +6 -1
  13. package/src/BitcoinWalletConnector.js +17 -2
  14. package/src/OkxConnector.cjs +1 -0
  15. package/src/OkxConnector.js +1 -0
  16. package/src/UnisatConnector.cjs +1 -0
  17. package/src/UnisatConnector.js +1 -0
  18. package/src/bitcoinProviderHelper.cjs +1 -0
  19. package/src/bitcoinProviderHelper.js +1 -0
  20. package/src/bitcoinWalletStandardWallets.cjs +1 -0
  21. package/src/bitcoinWalletStandardWallets.js +1 -0
  22. package/src/const.cjs +1 -0
  23. package/src/const.js +1 -0
  24. package/src/index.cjs +1 -0
  25. package/src/index.js +1 -0
  26. package/src/utils/fetchBtcKitConnectors/fetchBtcKitConnectors.cjs +1 -0
  27. package/src/utils/fetchBtcKitConnectors/fetchBtcKitConnectors.js +1 -0
  28. package/src/utils/fetchSatsConnectConnectors/fetchSatsConnectConnectors.cjs +1 -0
  29. package/src/utils/fetchSatsConnectConnectors/fetchSatsConnectConnectors.js +1 -0
  30. package/src/utils/getMempoolApiUrl.cjs +1 -0
  31. package/src/utils/getMempoolApiUrl.js +1 -0
  32. package/src/utils/hasSatsConnectFeature.cjs +1 -0
  33. package/src/utils/hasSatsConnectFeature.js +1 -0
  34. package/src/utils/psbt/bitcoinNetworkTypeToNetworks.cjs +1 -0
  35. package/src/utils/psbt/bitcoinNetworkTypeToNetworks.js +1 -0
  36. package/src/utils/psbt/createSignPsbtOptions.cjs +1 -0
  37. package/src/utils/psbt/createSignPsbtOptions.js +1 -0
  38. package/src/utils/psbt/extractAddressFromInput.cjs +1 -0
  39. package/src/utils/psbt/extractAddressFromInput.js +1 -0
  40. package/src/utils/psbt/getSigHashType.cjs +1 -0
  41. package/src/utils/psbt/getSigHashType.js +1 -0
  42. package/src/utils/psbt/validator/validateAddress.cjs +1 -0
  43. package/src/utils/psbt/validator/validateAddress.js +1 -0
  44. package/src/utils/psbt/validator/validatePsbt.cjs +1 -0
  45. package/src/utils/psbt/validator/validatePsbt.js +1 -0
  46. package/src/utils/psbt/validator/validateSigHash.cjs +1 -0
  47. package/src/utils/psbt/validator/validateSigHash.js +1 -0
  48. package/src/utils/supportsSatsConnect.cjs +1 -0
  49. package/src/utils/supportsSatsConnect.js +1 -0
package/CHANGELOG.md CHANGED
@@ -1,24 +1,26 @@
1
1
 
2
- ### [2.0.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.1...v2.0.2) (2024-04-19)
3
-
4
-
5
- ### Bug Fixes
6
-
7
- * buffer polyfill for utils package ([#5404](https://github.com/dynamic-labs/DynamicAuth/issues/5404)) ([#5405](https://github.com/dynamic-labs/DynamicAuth/issues/5405)) ([679c197](https://github.com/dynamic-labs/DynamicAuth/commit/679c197a52969a0db614ed280d7b9a0bf172bf72))
8
-
9
- ### [2.0.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0...v2.0.1) (2024-04-18)
2
+ ## [2.1.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.0...v2.1.0-alpha.1) (2024-04-18)
10
3
 
11
4
 
12
5
  ### Features
13
6
 
14
- * add redirectUri to farcaster connect ([#5373](https://github.com/dynamic-labs/DynamicAuth/issues/5373)) ([#5383](https://github.com/dynamic-labs/DynamicAuth/issues/5383)) ([d031d7e](https://github.com/dynamic-labs/DynamicAuth/commit/d031d7ee5705de5ec83ef328f03633d5f3524786))
7
+ * add frame metadata to demo index page ([#5327](https://github.com/dynamic-labs/DynamicAuth/issues/5327)) ([34a071a](https://github.com/dynamic-labs/DynamicAuth/commit/34a071af8faa8a867ad747ec2a607056a883568d))
8
+ * add MfaChooseDeviceView and MfaSecureDeviceView ([#5343](https://github.com/dynamic-labs/DynamicAuth/issues/5343)) ([4c39b1c](https://github.com/dynamic-labs/DynamicAuth/commit/4c39b1c34b5091190b095770e95a733c8f458ca2)), closes [#5356](https://github.com/dynamic-labs/DynamicAuth/issues/5356)
9
+ * add redirectUri to farcaster connect ([#5373](https://github.com/dynamic-labs/DynamicAuth/issues/5373)) ([ed13fc2](https://github.com/dynamic-labs/DynamicAuth/commit/ed13fc2948e06df0017ac122db54aca44f264a6d))
10
+ * add useMfa hook ([#5337](https://github.com/dynamic-labs/DynamicAuth/issues/5337)) ([a7682ba](https://github.com/dynamic-labs/DynamicAuth/commit/a7682ba10fd0f0809af802e0172154726f1bd857))
11
+ * headless create session and is session active ([#5346](https://github.com/dynamic-labs/DynamicAuth/issues/5346)) ([a787bbc](https://github.com/dynamic-labs/DynamicAuth/commit/a787bbcbb44104d2d0bd263579bd87a78453681d))
12
+ * secure enclave wallet generate one-time code headless ([#5329](https://github.com/dynamic-labs/DynamicAuth/issues/5329)) ([cab80a2](https://github.com/dynamic-labs/DynamicAuth/commit/cab80a2bfa77e48263d47cdcb813c54ef5b831d5))
15
13
 
16
14
 
17
15
  ### Bug Fixes
18
16
 
19
- * copy and ui fixes ([#5367](https://github.com/dynamic-labs/DynamicAuth/issues/5367)) ([e39ea97](https://github.com/dynamic-labs/DynamicAuth/commit/e39ea97d98de6b7087c24f2326a5fdc07ab9c8c3))
20
- * bitcoin connector improvements
21
- * solana package improvements ([#5360](https://github.com/dynamic-labs/DynamicAuth/issues/5360)) ([#5385](https://github.com/dynamic-labs/DynamicAuth/issues/5385)) ([9010bce](https://github.com/dynamic-labs/DynamicAuth/commit/9010bcebb4b0f2d293d517347187d38accbac0d3))
17
+ * always stringify the message before signing a message using walletUiUtils ([#5325](https://github.com/dynamic-labs/DynamicAuth/issues/5325)) ([7abf094](https://github.com/dynamic-labs/DynamicAuth/commit/7abf09456e30ad0657892e9ba58d7391f0f430e6))
18
+ * bitcoin network connector sendBitcoin methods updates ([#5369](https://github.com/dynamic-labs/DynamicAuth/issues/5369)) ([e9bf444](https://github.com/dynamic-labs/DynamicAuth/commit/e9bf444122ee86030d85b84ede96bdfb9772425e))
19
+ * buffer missing when using buffer util function ([#5360](https://github.com/dynamic-labs/DynamicAuth/issues/5360)) ([e998e46](https://github.com/dynamic-labs/DynamicAuth/commit/e998e464bd2671a82aa271b407a7d8fc49a16bd0))
20
+ * embedded solana send transaction shouldn't sign a signed transaction ([#5357](https://github.com/dynamic-labs/DynamicAuth/issues/5357)) ([c2ae2fa](https://github.com/dynamic-labs/DynamicAuth/commit/c2ae2faa509b62fc5ceb345fbc0f0b47217bf4b0))
21
+ * use network.name if vanity name is missing ([#5338](https://github.com/dynamic-labs/DynamicAuth/issues/5338)) ([34ec2ae](https://github.com/dynamic-labs/DynamicAuth/commit/34ec2ae5c4dad5376a3b9c5a07221f68a2f7756c))
22
+
23
+ ## [2.1.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.32...v2.1.0-alpha.0) (2024-04-15)
22
24
 
23
25
  ## [2.0.0-alpha.32](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2024-04-15)
24
26
 
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  /******************************************************************************
2
3
  Copyright (c) Microsoft Corporation.
3
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/bitcoin",
3
- "version": "2.0.2",
3
+ "version": "2.1.0-alpha.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,14 +27,14 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@btckit/types": "0.0.19",
30
- "@dynamic-labs/sdk-api-core": "0.0.418",
30
+ "@dynamic-labs/sdk-api-core": "0.0.422",
31
31
  "@wallet-standard/app": "1.0.1",
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.0.2",
36
- "@dynamic-labs/wallet-book": "2.0.2",
37
- "@dynamic-labs/wallet-connector-core": "2.0.2",
35
+ "@dynamic-labs/utils": "2.1.0-alpha.1",
36
+ "@dynamic-labs/wallet-book": "2.1.0-alpha.1",
37
+ "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.1",
38
38
  "stream": "0.0.2"
39
39
  },
40
40
  "peerDependencies": {}
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -54,7 +55,11 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector.BitcoinWalletConnect
54
55
  walletConnectorCore.logger.error('Signature error', response);
55
56
  throw new Error('Failed to sign message');
56
57
  }
57
- return response.result.signature;
58
+ const { signature } = response.result;
59
+ if (this.isHardwareWalletEnabled) {
60
+ return JSON.stringify({ signedTransaction: { data: signature } });
61
+ }
62
+ return signature;
58
63
  });
59
64
  }
60
65
  sendBitcoin(transaction) {
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { __awaiter } from '../_virtual/_tslib.js';
2
3
  import { BitcoinNetworkType } from 'sats-connect';
3
4
  import { Psbt } from 'bitcoinjs-lib';
@@ -50,7 +51,11 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector {
50
51
  logger.error('Signature error', response);
51
52
  throw new Error('Failed to sign message');
52
53
  }
53
- return response.result.signature;
54
+ const { signature } = response.result;
55
+ if (this.isHardwareWalletEnabled) {
56
+ return JSON.stringify({ signedTransaction: { data: signature } });
57
+ }
58
+ return signature;
54
59
  });
55
60
  }
56
61
  sendBitcoin(transaction) {
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { __awaiter } from '../_virtual/_tslib.js';
2
3
  import { getItemAsync, setItemAsync, removeItemAsync } from '@dynamic-labs/utils';
3
4
 
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -82,6 +83,13 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector.BitcoinWalletCo
82
83
  reject(error);
83
84
  },
84
85
  onFinish: (response) => _tslib.__awaiter(this, void 0, void 0, function* () {
86
+ if (this.isHardwareWalletEnabled) {
87
+ return resolve(JSON.stringify({
88
+ signedTransaction: {
89
+ data: response,
90
+ },
91
+ }));
92
+ }
85
93
  resolve(response);
86
94
  }),
87
95
  payload: {
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { __awaiter } from '../_virtual/_tslib.js';
2
3
  import { BitcoinNetworkType, getAddress, AddressPurpose, signMessage, sendBtcTransaction, signTransaction } from 'sats-connect';
3
4
  import { Psbt } from 'bitcoinjs-lib';
@@ -78,6 +79,13 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
78
79
  reject(error);
79
80
  },
80
81
  onFinish: (response) => __awaiter(this, void 0, void 0, function* () {
82
+ if (this.isHardwareWalletEnabled) {
83
+ return resolve(JSON.stringify({
84
+ signedTransaction: {
85
+ data: response,
86
+ },
87
+ }));
88
+ }
81
89
  resolve(response);
82
90
  }),
83
91
  payload: {
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -20,12 +21,20 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
20
21
  this.supportedChains = ['BTC'];
21
22
  // some wallets don't support fetching connected accounts without prompting for a connection
22
23
  this.canFetchConnectedAccounts = false;
24
+ this.isHardwareWalletEnabled = false;
25
+ this.verifiedCredentials = [];
23
26
  // this is the key from the wallet book entry so that we don't purely rely on the normalized name
24
27
  this.overrideKey = (_a = opts.overrideKey) !== null && _a !== void 0 ? _a : this.key;
25
28
  this.bitcoinProviderHelper = new bitcoinProviderHelper.BitcoinProviderHelper(opts.walletData || walletBook.getWalletBookWallet(this.walletBook, this.key));
26
29
  this.wallet = this.bitcoinProviderHelper.findWallet();
27
30
  this.cache = new BitcoinLocalStorageCache.BitcoinLocalStorageCache(this.overrideKey);
28
31
  }
32
+ canConnectWithHardwareWallet() {
33
+ const wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
34
+ if (!wallet || !wallet.hardwareWallets)
35
+ return false;
36
+ return wallet.hardwareWallets.includes('ledger');
37
+ }
29
38
  isInstalledOnBrowser() {
30
39
  var _a;
31
40
  return (Boolean(this.wallet) || Boolean((_a = this.bitcoinProviderHelper) === null || _a === void 0 ? void 0 : _a.getProvider()));
@@ -199,6 +208,12 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
199
208
  };
200
209
  this.teardownEventListeners = tearDownEventListeners;
201
210
  }
211
+ setVerifiedCredentials(verifiedCredentials) {
212
+ this.verifiedCredentials = verifiedCredentials;
213
+ }
214
+ isLedgerAddress(address) {
215
+ return utils.isLedgerAddressViaVerifiedCredentials(address, this.verifiedCredentials);
216
+ }
202
217
  }
203
218
 
204
219
  exports.BitcoinWalletConnector = BitcoinWalletConnector;
@@ -4,7 +4,7 @@ import { EventEmitter } from 'stream';
4
4
  import type { Wallet } from '@wallet-standard/base';
5
5
  import { Chain, IBitcoinWalletConnector, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
6
6
  import { WalletBookSchema, WalletSchema } from '@dynamic-labs/wallet-book';
7
- import { WalletAdditionalAddress } from '@dynamic-labs/sdk-api-core';
7
+ import { JwtVerifiedCredential, WalletAdditionalAddress } from '@dynamic-labs/sdk-api-core';
8
8
  import { IBitcoinSessionCache } from './BitcoinLocalStorageCache';
9
9
  import { BitcoinAddress, BitcoinTransaction, BitcoinSignPsbtRequest, BitcoinSignPsbtResponse } from './types';
10
10
  export type BitcoinWalletConnectorOpts = {
@@ -19,7 +19,10 @@ export declare abstract class BitcoinWalletConnector extends WalletConnectorBase
19
19
  private bitcoinProviderHelper;
20
20
  wallet: Wallet | undefined;
21
21
  canFetchConnectedAccounts: boolean;
22
+ isHardwareWalletEnabled: boolean;
23
+ verifiedCredentials: JwtVerifiedCredential[];
22
24
  constructor(opts: BitcoinWalletConnectorOpts);
25
+ canConnectWithHardwareWallet(): boolean;
23
26
  isInstalledOnBrowser(): boolean;
24
27
  getDeepLink(): string | undefined;
25
28
  endSession(): Promise<void>;
@@ -34,4 +37,6 @@ export declare abstract class BitcoinWalletConnector extends WalletConnectorBase
34
37
  abstract signPsbt(request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
35
38
  setConnectedAccountWithAddresses(mainAddress?: string, ordinalsAddress?: BitcoinAddress, paymentAddress?: BitcoinAddress, active?: boolean): Promise<void>;
36
39
  setupEventListeners(): void;
40
+ setVerifiedCredentials(verifiedCredentials: JwtVerifiedCredential[]): void;
41
+ isLedgerAddress(address: string): boolean;
37
42
  }
@@ -1,7 +1,8 @@
1
+ 'use client'
1
2
  import { __awaiter } from '../_virtual/_tslib.js';
2
3
  import { WalletConnectorBase, eventListenerHandlers, logger } from '@dynamic-labs/wallet-connector-core';
3
- import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
4
- import { DynamicError } from '@dynamic-labs/utils';
4
+ import { getWalletBookWallet, findWalletBookWallet } from '@dynamic-labs/wallet-book';
5
+ import { isLedgerAddressViaVerifiedCredentials, DynamicError } from '@dynamic-labs/utils';
5
6
  import { WalletAddressType } from '@dynamic-labs/sdk-api-core';
6
7
  import { BitcoinProviderHelper } from './bitcoinProviderHelper.js';
7
8
  import { BitcoinLocalStorageCache } from './BitcoinLocalStorageCache.js';
@@ -16,12 +17,20 @@ class BitcoinWalletConnector extends WalletConnectorBase {
16
17
  this.supportedChains = ['BTC'];
17
18
  // some wallets don't support fetching connected accounts without prompting for a connection
18
19
  this.canFetchConnectedAccounts = false;
20
+ this.isHardwareWalletEnabled = false;
21
+ this.verifiedCredentials = [];
19
22
  // this is the key from the wallet book entry so that we don't purely rely on the normalized name
20
23
  this.overrideKey = (_a = opts.overrideKey) !== null && _a !== void 0 ? _a : this.key;
21
24
  this.bitcoinProviderHelper = new BitcoinProviderHelper(opts.walletData || getWalletBookWallet(this.walletBook, this.key));
22
25
  this.wallet = this.bitcoinProviderHelper.findWallet();
23
26
  this.cache = new BitcoinLocalStorageCache(this.overrideKey);
24
27
  }
28
+ canConnectWithHardwareWallet() {
29
+ const wallet = findWalletBookWallet(this.walletBook, this.key);
30
+ if (!wallet || !wallet.hardwareWallets)
31
+ return false;
32
+ return wallet.hardwareWallets.includes('ledger');
33
+ }
25
34
  isInstalledOnBrowser() {
26
35
  var _a;
27
36
  return (Boolean(this.wallet) || Boolean((_a = this.bitcoinProviderHelper) === null || _a === void 0 ? void 0 : _a.getProvider()));
@@ -195,6 +204,12 @@ class BitcoinWalletConnector extends WalletConnectorBase {
195
204
  };
196
205
  this.teardownEventListeners = tearDownEventListeners;
197
206
  }
207
+ setVerifiedCredentials(verifiedCredentials) {
208
+ this.verifiedCredentials = verifiedCredentials;
209
+ }
210
+ isLedgerAddress(address) {
211
+ return isLedgerAddressViaVerifiedCredentials(address, this.verifiedCredentials);
212
+ }
198
213
  }
199
214
 
200
215
  export { BitcoinWalletConnector };
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { __awaiter } from '../_virtual/_tslib.js';
2
3
  import { Psbt } from 'bitcoinjs-lib';
3
4
  import { BitcoinWalletConnector } from './BitcoinWalletConnector.js';
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { __awaiter } from '../_virtual/_tslib.js';
2
3
  import { Psbt } from 'bitcoinjs-lib';
3
4
  import { BitcoinWalletConnector } from './BitcoinWalletConnector.js';
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { getProvidersFromWindow } from '@dynamic-labs/utils';
2
3
  import { BitcoinWalletStandardWalletsSingleton } from './bitcoinWalletStandardWallets.js';
3
4
 
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { getWallets } from '@wallet-standard/app';
2
3
 
3
4
  class BitcoinWalletStandardWallets {
package/src/const.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
package/src/const.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  const XVERSE_KEY = 'xverse';
2
3
  const SATSCONNECT_FEATURE = 'sats-connect:';
3
4
  const BTCKIT_INTERFACE = 'btckit';
package/src/index.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { OkxConnector } from './OkxConnector.js';
2
3
  import { UnisatConnector } from './UnisatConnector.js';
3
4
  export { BitcoinWalletConnector } from './BitcoinWalletConnector.js';
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { getProvidersFromWindow } from '@dynamic-labs/utils';
2
3
  import { BitcoinBtcKitConnector } from '../../BitcoinBtcKitConnector.js';
3
4
  import { BTCKIT_INTERFACE } from '../../const.js';
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { SATSCONNECT_FEATURE } from '../../const.js';
2
3
  import { BitcoinSatsConnectConnector } from '../../BitcoinSatsConnectConnector.js';
3
4
 
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { MEMPOOL_API_URL_TESTNET, MEMPOOL_API_URL } from '../const.js';
2
3
 
3
4
  const getMempoolApiUrl = (address) => address.startsWith('t') ? MEMPOOL_API_URL_TESTNET : MEMPOOL_API_URL;
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { SATSCONNECT_FEATURE } from '../const.js';
2
3
 
3
4
  const hasSatsConnectFeature = (features) => SATSCONNECT_FEATURE in features;
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { BitcoinNetworkType } from 'sats-connect';
2
3
  import { networks } from 'bitcoinjs-lib';
3
4
 
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { validatePsbt } from './validator/validatePsbt.js';
2
3
  import 'bitcoinjs-lib';
3
4
  import '@dynamic-labs/wallet-connector-core';
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { Transaction, address } from 'bitcoinjs-lib';
2
3
 
3
4
  /**
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { payments, Transaction } from 'bitcoinjs-lib';
2
3
  import { logger } from '@dynamic-labs/wallet-connector-core';
3
4
 
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { DynamicError } from '@dynamic-labs/utils';
2
3
  import { extractAddressFromInput } from '../extractAddressFromInput.js';
3
4
 
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { validateAddress } from './validateAddress.js';
2
3
  import { validateSigHash } from './validateSigHash.js';
3
4
 
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { getSigHashType } from '../getSigHashType.js';
2
3
 
3
4
  const validateSigHash = (allowedSigHashTypes, selectedInput) => {
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { XVERSE_KEY } from '../const.js';
2
3
  import '@dynamic-labs/utils';
3
4
  import '../../_virtual/_tslib.js';