@dynamic-labs/bitcoin 5.13.0 → 5.14.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
+ ## [5.14.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.13.0...v5.14.0) (2026-10-30)
3
+
4
+
5
+ ### Features
6
+
7
+ * **bitcoin:** add allowedWitnessScripts to embedded wallet signPsbt ([#12575](https://github.com/dynamic-labs/dynamic-auth/issues/12575)) ([e7709bc](https://github.com/dynamic-labs/dynamic-auth/commit/e7709bc226bc78caa8c7aaae9b25858ca689176e)), closes [#1647](https://github.com/dynamic-labs/dynamic-auth/issues/1647) [#1648](https://github.com/dynamic-labs/dynamic-auth/issues/1648)
8
+ * **legacy-embedded-wallet-migration:** offer passkey recovery when export fails in upgrade flow ([#12640](https://github.com/dynamic-labs/dynamic-auth/issues/12640)) ([eda1d1a](https://github.com/dynamic-labs/dynamic-auth/commit/eda1d1a24f40c5850ae3ffd8049b4a9df45d489e))
9
+ * **webview:** forward policiesConsentLabels manifest field to SDK settings ([#12607](https://github.com/dynamic-labs/dynamic-auth/issues/12607)) ([ce3a9a0](https://github.com/dynamic-labs/dynamic-auth/commit/ce3a9a0840bd80c18401a94cd175c89ade5cc7cc))
10
+
11
+
2
12
  ## [5.13.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.12.4...v5.13.0) (2026-10-27)
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 = "5.13.0";
6
+ var version = "5.14.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "5.13.0";
2
+ var version = "5.14.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": "5.13.0",
3
+ "version": "5.14.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",
@@ -30,13 +30,13 @@
30
30
  "ecpair": "2.1.0",
31
31
  "sats-connect": "4.2.1",
32
32
  "jsontokens": "4.0.1",
33
- "@dynamic-labs/assert-package-version": "5.13.0",
34
- "@dynamic-labs/logger": "5.13.0",
35
- "@dynamic-labs/types": "5.13.0",
36
- "@dynamic-labs/utils": "5.13.0",
37
- "@dynamic-labs/waas": "5.13.0",
38
- "@dynamic-labs/wallet-book": "5.13.0",
39
- "@dynamic-labs/wallet-connector-core": "5.13.0",
33
+ "@dynamic-labs/assert-package-version": "5.14.0",
34
+ "@dynamic-labs/logger": "5.14.0",
35
+ "@dynamic-labs/types": "5.14.0",
36
+ "@dynamic-labs/utils": "5.14.0",
37
+ "@dynamic-labs/waas": "5.14.0",
38
+ "@dynamic-labs/wallet-book": "5.14.0",
39
+ "@dynamic-labs/wallet-connector-core": "5.14.0",
40
40
  "eventemitter3": "5.0.1"
41
41
  },
42
42
  "peerDependencies": {}
@@ -376,6 +376,9 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
376
376
  * SIGHASH_DEFAULT (0x00) for Taproot and SIGHASH_ALL (0x01) otherwise.
377
377
  * `allowedSighash` restricts which declared types are accepted.
378
378
  *
379
+ * P2WSH multisig inputs are signed only when their witnessScript is listed in
380
+ * `allowedWitnessScripts` and the wallet is a Native SegWit wallet.
381
+ *
379
382
  * @param request - The PSBT signing request. Only unsignedPsbtBase64 is required.
380
383
  * @returns The signed (but not finalized) PSBT response
381
384
  * @throws {DynamicError} If active account address is not set
@@ -404,6 +407,7 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
404
407
  });
405
408
  const signedTransaction = yield walletClient.signTransaction({
406
409
  allowedSighash: request.allowedSighash,
410
+ allowedWitnessScripts: request.allowedWitnessScripts,
407
411
  approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
408
412
  authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
409
413
  bitcoinConfig: { network: yield this.getBitcoinNetworkEnum() },
@@ -395,6 +395,9 @@ export declare class DynamicWaasBitcoinConnector extends DynamicWaasBitcoinConne
395
395
  * SIGHASH_DEFAULT (0x00) for Taproot and SIGHASH_ALL (0x01) otherwise.
396
396
  * `allowedSighash` restricts which declared types are accepted.
397
397
  *
398
+ * P2WSH multisig inputs are signed only when their witnessScript is listed in
399
+ * `allowedWitnessScripts` and the wallet is a Native SegWit wallet.
400
+ *
398
401
  * @param request - The PSBT signing request. Only unsignedPsbtBase64 is required.
399
402
  * @returns The signed (but not finalized) PSBT response
400
403
  * @throws {DynamicError} If active account address is not set
@@ -372,6 +372,9 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
372
372
  * SIGHASH_DEFAULT (0x00) for Taproot and SIGHASH_ALL (0x01) otherwise.
373
373
  * `allowedSighash` restricts which declared types are accepted.
374
374
  *
375
+ * P2WSH multisig inputs are signed only when their witnessScript is listed in
376
+ * `allowedWitnessScripts` and the wallet is a Native SegWit wallet.
377
+ *
375
378
  * @param request - The PSBT signing request. Only unsignedPsbtBase64 is required.
376
379
  * @returns The signed (but not finalized) PSBT response
377
380
  * @throws {DynamicError} If active account address is not set
@@ -400,6 +403,7 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
400
403
  });
401
404
  const signedTransaction = yield walletClient.signTransaction({
402
405
  allowedSighash: request.allowedSighash,
406
+ allowedWitnessScripts: request.allowedWitnessScripts,
403
407
  approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
404
408
  authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
405
409
  bitcoinConfig: { network: yield this.getBitcoinNetworkEnum() },
package/src/types.d.ts CHANGED
@@ -59,7 +59,8 @@ export type BitcoinSignPsbtRequestSignature = {
59
59
  * Embedded wallets:
60
60
  * - Only support PSBT format (Base64)
61
61
  * - Automatically sign all inputs that belong to the wallet address
62
- * - Always use SIGHASH_ALL (0x01)
62
+ * - Read the sighash type from the PSBT, defaulting to SIGHASH_DEFAULT (0x00)
63
+ * for Taproot and SIGHASH_ALL (0x01) otherwise
63
64
  */
64
65
  export type EmbeddedWalletSignPsbtRequest = {
65
66
  /**
@@ -80,6 +81,14 @@ export type EmbeddedWalletSignPsbtRequest = {
80
81
  * outside the list. When omitted, any declared type is signed.
81
82
  */
82
83
  allowedSighash?: number[];
84
+ /**
85
+ * Optional hex-encoded witnessScripts the wallet may co-sign (P2WSH multisig
86
+ * opt-in). An input is signed only when its witnessScript is in this list,
87
+ * matches the input's scriptPubKey, is a canonical m-of-n multisig and
88
+ * contains the wallet's public key. When omitted, P2WSH inputs are not signed.
89
+ * Only Native SegWit wallets can co-sign P2WSH inputs.
90
+ */
91
+ allowedWitnessScripts?: string[];
83
92
  };
84
93
  export type SatsConnectSignTransactionInput = {
85
94
  message?: string;