@dynamic-labs/bitcoin 5.12.4 → 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 +23 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/connectors/DynamicWaasBitcoinConnector/DynamicWaasBitcoinConnector.cjs +4 -0
- package/src/connectors/DynamicWaasBitcoinConnector/DynamicWaasBitcoinConnector.d.ts +3 -0
- package/src/connectors/DynamicWaasBitcoinConnector/DynamicWaasBitcoinConnector.js +4 -0
- package/src/types.d.ts +10 -1
- package/src/utils/BitcoinUiTransaction/BitcoinUiTransaction.cjs +1 -1
- package/src/utils/BitcoinUiTransaction/BitcoinUiTransaction.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
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
|
+
|
|
12
|
+
## [5.13.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.12.4...v5.13.0) (2026-10-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* surface wallet creation error on backup-unsuccessful view ([#12600](https://github.com/dynamic-labs/dynamic-auth/issues/12600)) ([660be5d](https://github.com/dynamic-labs/dynamic-auth/commit/660be5dd1b883a848ee23b9df6dcdbc500b13f19))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **bitcoin:** format BTC amounts with a fixed locale in the confirmation modal ([#12598](https://github.com/dynamic-labs/dynamic-auth/issues/12598)) ([51baede](https://github.com/dynamic-labs/dynamic-auth/commit/51baede580dfe49c1c3cd80147b02f391f5c471c))
|
|
23
|
+
* **react-native-extension:** vendor NativeICloudBackup TurboModule spec ([#12613](https://github.com/dynamic-labs/dynamic-auth/issues/12613)) ([27b3d6e](https://github.com/dynamic-labs/dynamic-auth/commit/27b3d6e70a87129ff5a2eecb048c9dbb307dc5a0))
|
|
24
|
+
|
|
2
25
|
### [5.12.4](https://github.com/dynamic-labs/dynamic-auth/compare/v5.12.3...v5.12.4) (2026-10-24)
|
|
3
26
|
|
|
4
27
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/bitcoin",
|
|
3
|
-
"version": "5.
|
|
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",
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"@dynamic-labs-wallet/forward-mpc-client": "1.0.2",
|
|
24
24
|
"@bitcoinerlab/secp256k1": "1.1.1",
|
|
25
25
|
"@btckit/types": "0.0.19",
|
|
26
|
-
"@dynamic-labs/sdk-api-core": "0.
|
|
26
|
+
"@dynamic-labs/sdk-api-core": "0.136.0",
|
|
27
27
|
"@wallet-standard/app": "1.0.1",
|
|
28
28
|
"@wallet-standard/base": "1.0.1",
|
|
29
29
|
"bitcoinjs-lib": "6.1.5",
|
|
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.
|
|
34
|
-
"@dynamic-labs/logger": "5.
|
|
35
|
-
"@dynamic-labs/types": "5.
|
|
36
|
-
"@dynamic-labs/utils": "5.
|
|
37
|
-
"@dynamic-labs/waas": "5.
|
|
38
|
-
"@dynamic-labs/wallet-book": "5.
|
|
39
|
-
"@dynamic-labs/wallet-connector-core": "5.
|
|
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
|
-
* -
|
|
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;
|
|
@@ -99,7 +99,7 @@ class BitcoinUiTransaction {
|
|
|
99
99
|
*/
|
|
100
100
|
format(value, { precision } = {}) {
|
|
101
101
|
const btcValue = Number(value) / _const.SATOSHIS_PER_BTC;
|
|
102
|
-
const decimalString = btcValue.toLocaleString('
|
|
102
|
+
const decimalString = btcValue.toLocaleString('en-US', {
|
|
103
103
|
maximumFractionDigits: 20,
|
|
104
104
|
minimumFractionDigits: 0,
|
|
105
105
|
useGrouping: false,
|
|
@@ -95,7 +95,7 @@ class BitcoinUiTransaction {
|
|
|
95
95
|
*/
|
|
96
96
|
format(value, { precision } = {}) {
|
|
97
97
|
const btcValue = Number(value) / SATOSHIS_PER_BTC;
|
|
98
|
-
const decimalString = btcValue.toLocaleString('
|
|
98
|
+
const decimalString = btcValue.toLocaleString('en-US', {
|
|
99
99
|
maximumFractionDigits: 20,
|
|
100
100
|
minimumFractionDigits: 0,
|
|
101
101
|
useGrouping: false,
|