@dynamic-labs/bitcoin 4.59.2 → 4.60.0

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,4 +1,14 @@
1
1
 
2
+ ## [4.60.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.59.2...v4.60.0) (2026-02-05)
3
+
4
+
5
+ ### Features
6
+
7
+ * add prompt to unlock wallet when getting encrypted shares ([#10333](https://github.com/dynamic-labs/dynamic-auth/issues/10333)) ([7009dfa](https://github.com/dynamic-labs/dynamic-auth/commit/7009dfa315538f4f4ad27ff37e7902f10e1cf019))
8
+ * add stellar sendBalance method ([#10310](https://github.com/dynamic-labs/dynamic-auth/issues/10310)) ([c083ea0](https://github.com/dynamic-labs/dynamic-auth/commit/c083ea0a7caa0cb9095d32897acf677c1b661cb4))
9
+ * **webview-controller:** add DelegatedAccessController ([#10348](https://github.com/dynamic-labs/dynamic-auth/issues/10348)) ([57599e4](https://github.com/dynamic-labs/dynamic-auth/commit/57599e4dd1ad6f4b22f98d49d7fae1a724b719ee))
10
+ * **webview-messages:** add DelegatedAccessMessages types ([#10347](https://github.com/dynamic-labs/dynamic-auth/issues/10347)) ([b0a1275](https://github.com/dynamic-labs/dynamic-auth/commit/b0a12759016fa6f8a76753c2394d589acb18ccf1))
11
+
2
12
  ### [4.59.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.59.1...v4.59.2) (2026-02-03)
3
13
 
4
14
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.59.2";
6
+ var version = "4.60.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.59.2";
2
+ var version = "4.60.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/bitcoin",
3
- "version": "4.59.2",
3
+ "version": "4.60.0",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs-wallet/browser-wallet-client": "0.0.254",
21
+ "@dynamic-labs-wallet/browser-wallet-client": "0.0.259",
22
22
  "@bitcoinerlab/secp256k1": "1.1.1",
23
23
  "@btckit/types": "0.0.19",
24
24
  "@dynamic-labs/sdk-api-core": "0.0.860",
@@ -28,13 +28,13 @@
28
28
  "ecpair": "2.1.0",
29
29
  "sats-connect": "4.2.1",
30
30
  "jsontokens": "4.0.1",
31
- "@dynamic-labs/assert-package-version": "4.59.2",
32
- "@dynamic-labs/logger": "4.59.2",
33
- "@dynamic-labs/types": "4.59.2",
34
- "@dynamic-labs/utils": "4.59.2",
35
- "@dynamic-labs/waas": "4.59.2",
36
- "@dynamic-labs/wallet-book": "4.59.2",
37
- "@dynamic-labs/wallet-connector-core": "4.59.2",
31
+ "@dynamic-labs/assert-package-version": "4.60.0",
32
+ "@dynamic-labs/logger": "4.60.0",
33
+ "@dynamic-labs/types": "4.60.0",
34
+ "@dynamic-labs/utils": "4.60.0",
35
+ "@dynamic-labs/waas": "4.60.0",
36
+ "@dynamic-labs/wallet-book": "4.60.0",
37
+ "@dynamic-labs/wallet-connector-core": "4.60.0",
38
38
  "eventemitter3": "5.0.1"
39
39
  },
40
40
  "peerDependencies": {}
@@ -5,18 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../../_virtual/_tslib.cjs');
7
7
  var bitcoinjsLib = require('bitcoinjs-lib');
8
- var sdkApiCore = require('@dynamic-labs/sdk-api-core');
9
8
  var logger$1 = require('@dynamic-labs/logger');
9
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
10
10
  var utils = require('@dynamic-labs/utils');
11
11
  var waas = require('@dynamic-labs/waas');
12
12
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
13
- var BitcoinWalletConnector = require('../BitcoinWalletConnector.cjs');
14
13
  var MempoolApiService = require('../../services/MempoolApiService.cjs');
15
14
  var PsbtBuilderService = require('../../services/PsbtBuilderService.cjs');
16
- var PsbtParser = require('../../utils/psbtParser/PsbtParser.cjs');
17
15
  require('sats-connect');
16
+ var BitcoinWalletConnector = require('../BitcoinWalletConnector.cjs');
18
17
  require('jsontokens');
19
18
  var btcToSatoshis = require('../../utils/btcToSatoshis/btcToSatoshis.cjs');
19
+ var PsbtParser = require('../../utils/psbtParser/PsbtParser.cjs');
20
20
  var BitcoinUiTransaction = require('../../utils/BitcoinUiTransaction/BitcoinUiTransaction.cjs');
21
21
 
22
22
  const logger = new logger$1.Logger('DynamicWaasConnector');
@@ -188,9 +188,13 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
188
188
  const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
189
189
  mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
190
190
  }));
191
+ const password = yield this.getPasswordIfNeeded({
192
+ accountAddress: this.activeAccountAddress,
193
+ });
191
194
  const signedTransaction = yield walletClient.signTransaction({
192
195
  authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
193
196
  mfaToken,
197
+ password,
194
198
  senderAddress: this.activeAccountAddress,
195
199
  signedSessionId,
196
200
  transaction: request.unsignedPsbtBase64,
@@ -359,7 +363,7 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
359
363
  */
360
364
  signMessageWithContext(_a) {
361
365
  return _tslib.__awaiter(this, arguments, void 0, function* ({ message, context, }) {
362
- var _b, _c;
366
+ var _b, _c, _d;
363
367
  const walletClient = yield this.getWaasWalletClient();
364
368
  if (!this.activeAccountAddress) {
365
369
  throw new utils.DynamicError('Active account address is required');
@@ -368,12 +372,20 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
368
372
  if (!signedSessionId) {
369
373
  throw new utils.DynamicError('Signed session ID is required');
370
374
  }
375
+ const mfaToken = yield ((_c = this.getMfaToken) === null || _c === void 0 ? void 0 : _c.call(this, {
376
+ mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
377
+ }));
378
+ const password = yield this.getPasswordIfNeeded({
379
+ accountAddress: this.activeAccountAddress,
380
+ });
371
381
  const messageString = typeof message === 'string' ? message : message.raw;
372
382
  return walletClient.signMessage({
373
383
  accountAddress: this.activeAccountAddress,
374
- authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
384
+ authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
375
385
  context,
376
386
  message: messageString,
387
+ mfaToken,
388
+ password,
377
389
  signedSessionId,
378
390
  });
379
391
  });
@@ -572,6 +584,9 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
572
584
  const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
573
585
  mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
574
586
  }));
587
+ const password = yield this.getPasswordIfNeeded({
588
+ accountAddress: this.activeAccountAddress,
589
+ });
575
590
  return walletClient.signMessage({
576
591
  accountAddress: this.activeAccountAddress,
577
592
  authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
@@ -580,6 +595,7 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
580
595
  },
581
596
  message,
582
597
  mfaToken,
598
+ password,
583
599
  signedSessionId,
584
600
  });
585
601
  });
@@ -1,11 +1,11 @@
1
1
  import { BitcoinConfig } from '@dynamic-labs-wallet/browser-wallet-client';
2
- import { JwtVerifiedCredential, MFAAction, SignMessageContext } from '@dynamic-labs/sdk-api-core';
3
2
  import { Logger } from '@dynamic-labs/logger';
4
- import { WalletUiUtils, IUITransaction, GenericNetwork } from '@dynamic-labs/types';
5
- import { IDynamicWaasConnector, InternalWalletConnector, Chain, BitcoinSignPsbtResponse, ISendBalanceWalletConnector } from '@dynamic-labs/wallet-connector-core';
3
+ import { JwtVerifiedCredential, MFAAction, SignMessageContext } from '@dynamic-labs/sdk-api-core';
4
+ import { GenericNetwork, IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
5
+ import { BitcoinSignPsbtResponse, Chain, IDynamicWaasConnector, ISendBalanceWalletConnector, InternalWalletConnector } from '@dynamic-labs/wallet-connector-core';
6
+ import type { DynamicWaasBitcoinConnectorProps, ParsedTransaction } from '../../types';
6
7
  import { BitcoinTransaction, EmbeddedWalletSignPsbtRequest } from '../../types';
7
8
  import { BitcoinWalletConnector } from '../BitcoinWalletConnector';
8
- import type { ParsedTransaction, DynamicWaasBitcoinConnectorProps } from '../../types';
9
9
  declare const DynamicWaasBitcoinConnector_base: (abstract new (...args: any[]) => {
10
10
  [x: string]: any;
11
11
  name: string;
@@ -15,6 +15,7 @@ declare const DynamicWaasBitcoinConnector_base: (abstract new (...args: any[]) =
15
15
  getMfaToken?: ((props?: {
16
16
  mfaAction?: MFAAction | undefined;
17
17
  } | undefined) => Promise<string | undefined>) | undefined;
18
+ getPasswordForSigning?: import("dist/packages/waas/src/DynamicWaasMixin").GetPasswordForSigningFn | undefined;
18
19
  getAuthToken?: (() => string) | undefined;
19
20
  environmentId?: string | undefined;
20
21
  baseApiUrl?: string | undefined;
@@ -31,6 +32,10 @@ declare const DynamicWaasBitcoinConnector_base: (abstract new (...args: any[]) =
31
32
  setGetMfaTokenFunction(getMfaToken: (props?: {
32
33
  mfaAction?: MFAAction | undefined;
33
34
  } | undefined) => Promise<string | undefined>): void;
35
+ setGetPasswordForSigningFunction(getPasswordForSigning: import("dist/packages/waas/src/DynamicWaasMixin").GetPasswordForSigningFn): void;
36
+ getPasswordIfNeeded({ accountAddress, }: {
37
+ accountAddress: string;
38
+ }): Promise<string | undefined>;
34
39
  setEnvironmentId(environmentId: string): void;
35
40
  setBaseApiUrl(baseApiUrl: string): void;
36
41
  setBaseClientKeysharesRelayApiUrl(baseClientKeysharesRelayApiUrl?: string | undefined): void;
@@ -115,8 +120,9 @@ declare const DynamicWaasBitcoinConnector_base: (abstract new (...args: any[]) =
115
120
  accountAddress: string;
116
121
  password: string;
117
122
  }): Promise<import("@dynamic-labs-wallet/browser-wallet-client").GetWalletResponse>;
118
- getWalletRecoveryState({ accountAddress, }: {
123
+ getWalletRecoveryState({ accountAddress, signedSessionId, }: {
119
124
  accountAddress: string;
125
+ signedSessionId: string;
120
126
  }): Promise<import("@dynamic-labs-wallet/browser-wallet-client").WalletRecoveryState>;
121
127
  endSession(): Promise<void>;
122
128
  getActiveAccountAddress(): Promise<string | undefined>;
@@ -1,18 +1,18 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../_virtual/_tslib.js';
3
3
  import { networks, Psbt } from 'bitcoinjs-lib';
4
- import { MFAAction } from '@dynamic-labs/sdk-api-core';
5
4
  import { Logger } from '@dynamic-labs/logger';
5
+ import { MFAAction } from '@dynamic-labs/sdk-api-core';
6
6
  import { DynamicError } from '@dynamic-labs/utils';
7
7
  import { withDynamicWaas } from '@dynamic-labs/waas';
8
8
  import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
9
- import { BitcoinWalletConnector } from '../BitcoinWalletConnector.js';
10
9
  import { MempoolApiService } from '../../services/MempoolApiService.js';
11
10
  import { PsbtBuilderService } from '../../services/PsbtBuilderService.js';
12
- import { PsbtParser } from '../../utils/psbtParser/PsbtParser.js';
13
11
  import 'sats-connect';
12
+ import { BitcoinWalletConnector } from '../BitcoinWalletConnector.js';
14
13
  import 'jsontokens';
15
14
  import { btcToSatoshis } from '../../utils/btcToSatoshis/btcToSatoshis.js';
15
+ import { PsbtParser } from '../../utils/psbtParser/PsbtParser.js';
16
16
  import { BitcoinUiTransaction } from '../../utils/BitcoinUiTransaction/BitcoinUiTransaction.js';
17
17
 
18
18
  const logger = new Logger('DynamicWaasConnector');
@@ -184,9 +184,13 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
184
184
  const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
185
185
  mfaAction: MFAAction.WalletWaasSign,
186
186
  }));
187
+ const password = yield this.getPasswordIfNeeded({
188
+ accountAddress: this.activeAccountAddress,
189
+ });
187
190
  const signedTransaction = yield walletClient.signTransaction({
188
191
  authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
189
192
  mfaToken,
193
+ password,
190
194
  senderAddress: this.activeAccountAddress,
191
195
  signedSessionId,
192
196
  transaction: request.unsignedPsbtBase64,
@@ -355,7 +359,7 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
355
359
  */
356
360
  signMessageWithContext(_a) {
357
361
  return __awaiter(this, arguments, void 0, function* ({ message, context, }) {
358
- var _b, _c;
362
+ var _b, _c, _d;
359
363
  const walletClient = yield this.getWaasWalletClient();
360
364
  if (!this.activeAccountAddress) {
361
365
  throw new DynamicError('Active account address is required');
@@ -364,12 +368,20 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
364
368
  if (!signedSessionId) {
365
369
  throw new DynamicError('Signed session ID is required');
366
370
  }
371
+ const mfaToken = yield ((_c = this.getMfaToken) === null || _c === void 0 ? void 0 : _c.call(this, {
372
+ mfaAction: MFAAction.WalletWaasSign,
373
+ }));
374
+ const password = yield this.getPasswordIfNeeded({
375
+ accountAddress: this.activeAccountAddress,
376
+ });
367
377
  const messageString = typeof message === 'string' ? message : message.raw;
368
378
  return walletClient.signMessage({
369
379
  accountAddress: this.activeAccountAddress,
370
- authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
380
+ authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
371
381
  context,
372
382
  message: messageString,
383
+ mfaToken,
384
+ password,
373
385
  signedSessionId,
374
386
  });
375
387
  });
@@ -568,6 +580,9 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
568
580
  const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
569
581
  mfaAction: MFAAction.WalletWaasSign,
570
582
  }));
583
+ const password = yield this.getPasswordIfNeeded({
584
+ accountAddress: this.activeAccountAddress,
585
+ });
571
586
  return walletClient.signMessage({
572
587
  accountAddress: this.activeAccountAddress,
573
588
  authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
@@ -576,6 +591,7 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
576
591
  },
577
592
  message,
578
593
  mfaToken,
594
+ password,
579
595
  signedSessionId,
580
596
  });
581
597
  });