@dynamic-labs/bitcoin 5.11.0 → 5.12.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 +18 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -10
- package/src/connectors/BitcoinWalletConnector.cjs +2 -2
- package/src/connectors/BitcoinWalletConnector.d.ts +8 -2
- package/src/connectors/BitcoinWalletConnector.js +2 -2
- package/src/connectors/DynamicWaasBitcoinConnector/DynamicWaasBitcoinConnector.cjs +6 -4
- package/src/connectors/DynamicWaasBitcoinConnector/DynamicWaasBitcoinConnector.d.ts +14 -3
- package/src/connectors/DynamicWaasBitcoinConnector/DynamicWaasBitcoinConnector.js +6 -4
- package/src/index.d.ts +2 -2
- package/src/wallet/BitcoinWallet.cjs +5 -4
- package/src/wallet/BitcoinWallet.d.ts +8 -2
- package/src/wallet/BitcoinWallet.js +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
|
|
2
|
+
### [5.12.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.12.0...v5.12.1) (2026-10-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* rabby not using native rabby:// scheme when redirecting on android devices [main] ([#12541](https://github.com/dynamic-labs/dynamic-auth/issues/12541)) ([923a372](https://github.com/dynamic-labs/dynamic-auth/commit/923a3724eae5e82ef896de78641320b7320933df))
|
|
8
|
+
* **sui,ton:** sign serialized Sui txs without parsing; native TON balance for jetton sends ([#12503](https://github.com/dynamic-labs/dynamic-auth/issues/12503)) ([6a5bfd6](https://github.com/dynamic-labs/dynamic-auth/commit/6a5bfd6bd0118b8ed7ce079159c10ac47cade337))
|
|
9
|
+
|
|
10
|
+
## [5.12.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.11.0...v5.12.0) (2026-10-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **embedded-wallet-solana:** add getSolanaSponsorAddress ([#12517](https://github.com/dynamic-labs/dynamic-auth/issues/12517)) ([b95c550](https://github.com/dynamic-labs/dynamic-auth/commit/b95c550e3dab783b7ff0b019051a17b22ea44f97))
|
|
16
|
+
* **embedded-wallet:** show chain and wallet in private key export modal ([#12507](https://github.com/dynamic-labs/dynamic-auth/issues/12507)) ([4bfb6d6](https://github.com/dynamic-labs/dynamic-auth/commit/4bfb6d6168aac3f800792fde933e0597f288058f))
|
|
17
|
+
* **sdk-react-core:** send OTP purpose from step-up flows ([#12511](https://github.com/dynamic-labs/dynamic-auth/issues/12511)) ([0d2d8a3](https://github.com/dynamic-labs/dynamic-auth/commit/0d2d8a31058b3e75c71af7a34f459e2a3ddf383b)), closes [#12898](https://github.com/dynamic-labs/dynamic-auth/issues/12898) [#816](https://github.com/dynamic-labs/dynamic-auth/issues/816) [#203](https://github.com/dynamic-labs/dynamic-auth/issues/203) [#12512](https://github.com/dynamic-labs/dynamic-auth/issues/12512)
|
|
18
|
+
* **wallet-connect:** back WalletConnect storage with native secure storage on mobile ([#12515](https://github.com/dynamic-labs/dynamic-auth/issues/12515)) ([7b57903](https://github.com/dynamic-labs/dynamic-auth/commit/7b5790325fce707d73d591483a0130b960ed055c))
|
|
19
|
+
|
|
2
20
|
## [5.11.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.10.0...v5.11.0) (2026-10-14)
|
|
3
21
|
|
|
4
22
|
|
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.12.1",
|
|
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,24 +18,25 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs-wallet/browser-wallet-client": "1.1.
|
|
21
|
+
"@dynamic-labs-wallet/browser-wallet-client": "1.1.43",
|
|
22
|
+
"@dynamic-labs-wallet/core": "1.1.43",
|
|
22
23
|
"@dynamic-labs-wallet/forward-mpc-client": "1.0.2",
|
|
23
24
|
"@bitcoinerlab/secp256k1": "1.1.1",
|
|
24
25
|
"@btckit/types": "0.0.19",
|
|
25
|
-
"@dynamic-labs/sdk-api-core": "0.
|
|
26
|
+
"@dynamic-labs/sdk-api-core": "0.104.0",
|
|
26
27
|
"@wallet-standard/app": "1.0.1",
|
|
27
28
|
"@wallet-standard/base": "1.0.1",
|
|
28
29
|
"bitcoinjs-lib": "6.1.5",
|
|
29
30
|
"ecpair": "2.1.0",
|
|
30
31
|
"sats-connect": "4.2.1",
|
|
31
32
|
"jsontokens": "4.0.1",
|
|
32
|
-
"@dynamic-labs/assert-package-version": "5.
|
|
33
|
-
"@dynamic-labs/logger": "5.
|
|
34
|
-
"@dynamic-labs/types": "5.
|
|
35
|
-
"@dynamic-labs/utils": "5.
|
|
36
|
-
"@dynamic-labs/waas": "5.
|
|
37
|
-
"@dynamic-labs/wallet-book": "5.
|
|
38
|
-
"@dynamic-labs/wallet-connector-core": "5.
|
|
33
|
+
"@dynamic-labs/assert-package-version": "5.12.1",
|
|
34
|
+
"@dynamic-labs/logger": "5.12.1",
|
|
35
|
+
"@dynamic-labs/types": "5.12.1",
|
|
36
|
+
"@dynamic-labs/utils": "5.12.1",
|
|
37
|
+
"@dynamic-labs/waas": "5.12.1",
|
|
38
|
+
"@dynamic-labs/wallet-book": "5.12.1",
|
|
39
|
+
"@dynamic-labs/wallet-connector-core": "5.12.1",
|
|
39
40
|
"eventemitter3": "5.0.1"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {}
|
|
@@ -224,11 +224,11 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
224
224
|
var _a;
|
|
225
225
|
return (_a = this.bitcoinProviderHelper) === null || _a === void 0 ? void 0 : _a.getProvider();
|
|
226
226
|
}
|
|
227
|
-
signPsbts(requests) {
|
|
227
|
+
signPsbts(requests, options) {
|
|
228
228
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
229
229
|
const signedPsbtResponses = [];
|
|
230
230
|
for (const request of requests) {
|
|
231
|
-
const signedPsbtResponse = yield this.signPsbt(request);
|
|
231
|
+
const signedPsbtResponse = yield this.signPsbt(request, options);
|
|
232
232
|
if (signedPsbtResponse) {
|
|
233
233
|
signedPsbtResponses.push(signedPsbtResponse);
|
|
234
234
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type EventEmitter } from 'eventemitter3';
|
|
2
2
|
import type { Wallet } from '@wallet-standard/base';
|
|
3
|
+
import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
|
|
3
4
|
import { Chain, IBitcoinWalletConnector, WalletConnectorBase, WalletMetadata } from '@dynamic-labs/wallet-connector-core';
|
|
4
5
|
import { WalletBookSchema, WalletSchema } from '@dynamic-labs/wallet-book';
|
|
5
6
|
import { JwtVerifiedCredential, WalletAdditionalAddress } from '@dynamic-labs/sdk-api-core';
|
|
@@ -44,14 +45,19 @@ export declare abstract class BitcoinWalletConnector extends WalletConnectorBase
|
|
|
44
45
|
sendBitcoinWithConfirmation?(transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
45
46
|
buildPsbt(transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
46
47
|
getProvider<T>(): T & EventEmitter<string | symbol, any>;
|
|
47
|
-
abstract signPsbt(request: BitcoinSignPsbtRequest | EmbeddedWalletSignPsbtRequest
|
|
48
|
-
|
|
48
|
+
abstract signPsbt(request: BitcoinSignPsbtRequest | EmbeddedWalletSignPsbtRequest, options?: {
|
|
49
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
50
|
+
}): Promise<BitcoinSignPsbtResponse | undefined>;
|
|
51
|
+
signPsbts(requests: BitcoinSignPsbtRequest[], options?: {
|
|
52
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
53
|
+
}): Promise<string[] | undefined>;
|
|
49
54
|
setConnectedAccountWithAddresses({ mainAddress, ordinalsAddress, paymentAddress, active, }: ConnectedAccountWithAddressesProps): Promise<void>;
|
|
50
55
|
setupEventListeners(): void;
|
|
51
56
|
setVerifiedCredentials(verifiedCredentials: JwtVerifiedCredential[]): void;
|
|
52
57
|
isLedgerAddress(address: string): boolean;
|
|
53
58
|
signMessage(messageToSign: string, options?: {
|
|
54
59
|
address?: string;
|
|
60
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
55
61
|
protocol?: BitcoinSignProtocol;
|
|
56
62
|
}): Promise<string | undefined>;
|
|
57
63
|
proveOwnership(address: string, messageToSign: string): Promise<string | undefined>;
|
|
@@ -220,11 +220,11 @@ class BitcoinWalletConnector extends WalletConnectorBase {
|
|
|
220
220
|
var _a;
|
|
221
221
|
return (_a = this.bitcoinProviderHelper) === null || _a === void 0 ? void 0 : _a.getProvider();
|
|
222
222
|
}
|
|
223
|
-
signPsbts(requests) {
|
|
223
|
+
signPsbts(requests, options) {
|
|
224
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
225
|
const signedPsbtResponses = [];
|
|
226
226
|
for (const request of requests) {
|
|
227
|
-
const signedPsbtResponse = yield this.signPsbt(request);
|
|
227
|
+
const signedPsbtResponse = yield this.signPsbt(request, options);
|
|
228
228
|
if (signedPsbtResponse) {
|
|
229
229
|
signedPsbtResponses.push(signedPsbtResponse);
|
|
230
230
|
}
|
|
@@ -357,10 +357,10 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
|
|
|
357
357
|
* @param message - The message to sign
|
|
358
358
|
* @returns The signed message as a string
|
|
359
359
|
*/
|
|
360
|
-
signMessage(message) {
|
|
360
|
+
signMessage(message, options) {
|
|
361
361
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
362
362
|
return this.walletUiUtils.signMessage({
|
|
363
|
-
handler: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
|
|
363
|
+
handler: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message, options === null || options === void 0 ? void 0 : options.approvalQuorum); }),
|
|
364
364
|
message,
|
|
365
365
|
walletConnector: this,
|
|
366
366
|
});
|
|
@@ -381,7 +381,7 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
|
|
|
381
381
|
* @throws {DynamicError} If active account address is not set
|
|
382
382
|
* @throws {DynamicError} If signed session ID is not available
|
|
383
383
|
*/
|
|
384
|
-
signPsbt(request) {
|
|
384
|
+
signPsbt(request, options) {
|
|
385
385
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
386
386
|
var _a, _b, _c, _d;
|
|
387
387
|
const walletClient = yield this.getWaasWalletClient();
|
|
@@ -404,6 +404,7 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
|
|
|
404
404
|
});
|
|
405
405
|
const signedTransaction = yield walletClient.signTransaction({
|
|
406
406
|
allowedSighash: request.allowedSighash,
|
|
407
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
407
408
|
authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
|
|
408
409
|
bitcoinConfig: { network: yield this.getBitcoinNetworkEnum() },
|
|
409
410
|
elevatedAccessToken,
|
|
@@ -868,7 +869,7 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
|
|
|
868
869
|
* @throws {DynamicError} If active account address is not set
|
|
869
870
|
* @throws {DynamicError} If signed session ID is not available
|
|
870
871
|
*/
|
|
871
|
-
internalSignMessage(message) {
|
|
872
|
+
internalSignMessage(message, approvalQuorum) {
|
|
872
873
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
873
874
|
var _a, _b, _c, _d;
|
|
874
875
|
const walletClient = yield this.getWaasWalletClient();
|
|
@@ -890,6 +891,7 @@ class DynamicWaasBitcoinConnector extends waas.withDynamicWaas(BitcoinWalletConn
|
|
|
890
891
|
});
|
|
891
892
|
return walletClient.signMessage({
|
|
892
893
|
accountAddress: this.getWalletIdentityAddress(),
|
|
894
|
+
approvalQuorum,
|
|
893
895
|
authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
|
|
894
896
|
bitcoinConfig: {
|
|
895
897
|
addressType: this.getAddressTypeForSigning(this.getWalletIdentityAddress()),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
|
|
1
2
|
import { Logger } from '@dynamic-labs/logger';
|
|
2
3
|
import { JwtVerifiedCredential, MFAAction, SignMessageContext, TokenScope } from '@dynamic-labs/sdk-api-core';
|
|
3
4
|
import { GenericNetwork, IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
|
|
@@ -85,6 +86,11 @@ declare const DynamicWaasBitcoinConnector_base: (abstract new (...args: any[]) =
|
|
|
85
86
|
signerType?: "endUser" | "server" | undefined;
|
|
86
87
|
password?: string | undefined;
|
|
87
88
|
targetSignerPassword?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Maps the selected networkId to the BitcoinNetwork enum for internal WaaS
|
|
91
|
+
* API calls (signing) — balance/UTXO/broadcast are address-driven and follow
|
|
92
|
+
* the active address automatically.
|
|
93
|
+
*/
|
|
88
94
|
intent?: import("@dynamic-labs-wallet/core").BusinessAccountIntent | undefined;
|
|
89
95
|
intentSignature?: string | undefined;
|
|
90
96
|
}): Promise<import("@dynamic-labs-wallet/core").BusinessAccountActionRequired | {
|
|
@@ -149,8 +155,9 @@ declare const DynamicWaasBitcoinConnector_base: (abstract new (...args: any[]) =
|
|
|
149
155
|
accountAddress: string;
|
|
150
156
|
newPassword: string;
|
|
151
157
|
}): Promise<void>;
|
|
152
|
-
signRawMessage({ accountAddress, context, message, password, }: {
|
|
158
|
+
signRawMessage({ accountAddress, approvalQuorum, context, message, password, }: {
|
|
153
159
|
accountAddress: string;
|
|
160
|
+
approvalQuorum?: ApprovalQuorumRequestContext | undefined;
|
|
154
161
|
context?: SignMessageContext | undefined;
|
|
155
162
|
message: string;
|
|
156
163
|
password?: string | undefined;
|
|
@@ -374,7 +381,9 @@ export declare class DynamicWaasBitcoinConnector extends DynamicWaasBitcoinConne
|
|
|
374
381
|
* @param message - The message to sign
|
|
375
382
|
* @returns The signed message as a string
|
|
376
383
|
*/
|
|
377
|
-
signMessage(message: string
|
|
384
|
+
signMessage(message: string, options?: {
|
|
385
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
386
|
+
}): Promise<string>;
|
|
378
387
|
/**
|
|
379
388
|
* Signs a Partially Signed Bitcoin Transaction (PSBT) for embedded wallets
|
|
380
389
|
*
|
|
@@ -390,7 +399,9 @@ export declare class DynamicWaasBitcoinConnector extends DynamicWaasBitcoinConne
|
|
|
390
399
|
* @throws {DynamicError} If active account address is not set
|
|
391
400
|
* @throws {DynamicError} If signed session ID is not available
|
|
392
401
|
*/
|
|
393
|
-
signPsbt(request: EmbeddedWalletSignPsbtRequest
|
|
402
|
+
signPsbt(request: EmbeddedWalletSignPsbtRequest, options?: {
|
|
403
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
404
|
+
}): Promise<BitcoinSignPsbtResponse>;
|
|
394
405
|
/**
|
|
395
406
|
* Sends a raw Bitcoin transaction to the mempool
|
|
396
407
|
* @param rawTransaction - The raw transaction in hex format
|
|
@@ -353,10 +353,10 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
|
|
|
353
353
|
* @param message - The message to sign
|
|
354
354
|
* @returns The signed message as a string
|
|
355
355
|
*/
|
|
356
|
-
signMessage(message) {
|
|
356
|
+
signMessage(message, options) {
|
|
357
357
|
return __awaiter(this, void 0, void 0, function* () {
|
|
358
358
|
return this.walletUiUtils.signMessage({
|
|
359
|
-
handler: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
|
|
359
|
+
handler: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message, options === null || options === void 0 ? void 0 : options.approvalQuorum); }),
|
|
360
360
|
message,
|
|
361
361
|
walletConnector: this,
|
|
362
362
|
});
|
|
@@ -377,7 +377,7 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
|
|
|
377
377
|
* @throws {DynamicError} If active account address is not set
|
|
378
378
|
* @throws {DynamicError} If signed session ID is not available
|
|
379
379
|
*/
|
|
380
|
-
signPsbt(request) {
|
|
380
|
+
signPsbt(request, options) {
|
|
381
381
|
return __awaiter(this, void 0, void 0, function* () {
|
|
382
382
|
var _a, _b, _c, _d;
|
|
383
383
|
const walletClient = yield this.getWaasWalletClient();
|
|
@@ -400,6 +400,7 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
|
|
|
400
400
|
});
|
|
401
401
|
const signedTransaction = yield walletClient.signTransaction({
|
|
402
402
|
allowedSighash: request.allowedSighash,
|
|
403
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
403
404
|
authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
|
|
404
405
|
bitcoinConfig: { network: yield this.getBitcoinNetworkEnum() },
|
|
405
406
|
elevatedAccessToken,
|
|
@@ -864,7 +865,7 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
|
|
|
864
865
|
* @throws {DynamicError} If active account address is not set
|
|
865
866
|
* @throws {DynamicError} If signed session ID is not available
|
|
866
867
|
*/
|
|
867
|
-
internalSignMessage(message) {
|
|
868
|
+
internalSignMessage(message, approvalQuorum) {
|
|
868
869
|
return __awaiter(this, void 0, void 0, function* () {
|
|
869
870
|
var _a, _b, _c, _d;
|
|
870
871
|
const walletClient = yield this.getWaasWalletClient();
|
|
@@ -886,6 +887,7 @@ class DynamicWaasBitcoinConnector extends withDynamicWaas(BitcoinWalletConnector
|
|
|
886
887
|
});
|
|
887
888
|
return walletClient.signMessage({
|
|
888
889
|
accountAddress: this.getWalletIdentityAddress(),
|
|
890
|
+
approvalQuorum,
|
|
889
891
|
authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
|
|
890
892
|
bitcoinConfig: {
|
|
891
893
|
addressType: this.getAddressTypeForSigning(this.getWalletIdentityAddress()),
|
package/src/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OkxConnector, DynamicWaasBitcoinConnector } from './connectors';
|
|
1
|
+
import { OkxConnector, OylConnector, PhantomConnector, DynamicWaasBitcoinConnector } from './connectors';
|
|
2
2
|
export { BitcoinWalletConnector, type BitcoinWalletConnectorOpts, } from './connectors';
|
|
3
3
|
export type { BitcoinTransaction, BitcoinSignProtocol, BitcoinSignPsbtRequest, BitcoinSignPsbtResponse, BitcoinWalletStandardMethods, SignPsbtOptions, EmbeddedWalletSignPsbtRequest, } from './types';
|
|
4
4
|
export * from './utils';
|
|
5
5
|
export * from './wallet';
|
|
6
6
|
export { UnisatConnector, BitcoinSatsConnectConnector, DynamicWaasBitcoinConnector, } from './connectors';
|
|
7
|
-
export declare const BitcoinWalletConnectors: (props: any) => (import("dist/packages/wallet-connector-core/src").WalletConnectorConstructor | typeof OkxConnector | typeof DynamicWaasBitcoinConnector)[];
|
|
7
|
+
export declare const BitcoinWalletConnectors: (props: any) => (import("dist/packages/wallet-connector-core/src").WalletConnectorConstructor | typeof PhantomConnector | typeof OkxConnector | typeof OylConnector | typeof DynamicWaasBitcoinConnector)[];
|
|
8
8
|
export { BitcoinProviderHelper } from './bitcoinProviderHelper';
|
|
9
9
|
export { DUST_LIMIT, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_TOO_MANY_REQUESTS, } from './const';
|
|
@@ -86,6 +86,7 @@ class BitcoinWallet extends walletConnectorCore.Wallet {
|
|
|
86
86
|
: this.address;
|
|
87
87
|
return this._connector.signMessage(messageToSign, {
|
|
88
88
|
address,
|
|
89
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
89
90
|
protocol: options === null || options === void 0 ? void 0 : options.protocol,
|
|
90
91
|
});
|
|
91
92
|
});
|
|
@@ -95,13 +96,13 @@ class BitcoinWallet extends walletConnectorCore.Wallet {
|
|
|
95
96
|
* @returns A promise that resolves to an object with the signed PSBT
|
|
96
97
|
* or undefined if no provider is available
|
|
97
98
|
*/
|
|
98
|
-
signPsbt(request) {
|
|
99
|
+
signPsbt(request, options) {
|
|
99
100
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
100
101
|
yield this.sync();
|
|
101
102
|
if (this._connector.transactionScreening) {
|
|
102
103
|
yield this.screenBeforeSigning({ psbt: request.unsignedPsbtBase64 });
|
|
103
104
|
}
|
|
104
|
-
return this._connector.signPsbt(request);
|
|
105
|
+
return this._connector.signPsbt(request, options);
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
/**
|
|
@@ -109,13 +110,13 @@ class BitcoinWallet extends walletConnectorCore.Wallet {
|
|
|
109
110
|
* @returns A promise that resolves to an array of signed PSBTs in base64
|
|
110
111
|
* or undefined if no provider is available
|
|
111
112
|
*/
|
|
112
|
-
signPsbts(requests) {
|
|
113
|
+
signPsbts(requests, options) {
|
|
113
114
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
114
115
|
yield this.sync();
|
|
115
116
|
if (this._connector.transactionScreening) {
|
|
116
117
|
yield Promise.all(requests.map((request) => this.screenBeforeSigning({ psbt: request.unsignedPsbtBase64 })));
|
|
117
118
|
}
|
|
118
|
-
return this._connector.signPsbts(requests);
|
|
119
|
+
return this._connector.signPsbts(requests, options);
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
122
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
|
|
1
2
|
import { Wallet } from '@dynamic-labs/wallet-connector-core';
|
|
2
3
|
import { type WalletAddressType } from '@dynamic-labs/types';
|
|
3
4
|
import { BitcoinWalletConnector } from '../connectors';
|
|
@@ -41,6 +42,7 @@ export declare class BitcoinWallet extends Wallet<BitcoinWalletConnector> {
|
|
|
41
42
|
*/
|
|
42
43
|
signMessage(messageToSign: string, options?: {
|
|
43
44
|
addressType?: WalletAddressType;
|
|
45
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
44
46
|
protocol?: BitcoinSignProtocol;
|
|
45
47
|
}): Promise<string | undefined>;
|
|
46
48
|
/**
|
|
@@ -48,13 +50,17 @@ export declare class BitcoinWallet extends Wallet<BitcoinWalletConnector> {
|
|
|
48
50
|
* @returns A promise that resolves to an object with the signed PSBT
|
|
49
51
|
* or undefined if no provider is available
|
|
50
52
|
*/
|
|
51
|
-
signPsbt(request: BitcoinSignPsbtRequest | EmbeddedWalletSignPsbtRequest
|
|
53
|
+
signPsbt(request: BitcoinSignPsbtRequest | EmbeddedWalletSignPsbtRequest, options?: {
|
|
54
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
55
|
+
}): Promise<BitcoinSignPsbtResponse | undefined>;
|
|
52
56
|
/**
|
|
53
57
|
* Sings multiple PSBTs
|
|
54
58
|
* @returns A promise that resolves to an array of signed PSBTs in base64
|
|
55
59
|
* or undefined if no provider is available
|
|
56
60
|
*/
|
|
57
|
-
signPsbts(requests: BitcoinSignPsbtRequest[]
|
|
61
|
+
signPsbts(requests: BitcoinSignPsbtRequest[], options?: {
|
|
62
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
63
|
+
}): Promise<string[] | undefined>;
|
|
58
64
|
/**
|
|
59
65
|
* Builds a PSBT for a Bitcoin transaction
|
|
60
66
|
* @param transaction - The Bitcoin transaction containing recipient address and amount in satoshis
|
|
@@ -82,6 +82,7 @@ class BitcoinWallet extends Wallet {
|
|
|
82
82
|
: this.address;
|
|
83
83
|
return this._connector.signMessage(messageToSign, {
|
|
84
84
|
address,
|
|
85
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
85
86
|
protocol: options === null || options === void 0 ? void 0 : options.protocol,
|
|
86
87
|
});
|
|
87
88
|
});
|
|
@@ -91,13 +92,13 @@ class BitcoinWallet extends Wallet {
|
|
|
91
92
|
* @returns A promise that resolves to an object with the signed PSBT
|
|
92
93
|
* or undefined if no provider is available
|
|
93
94
|
*/
|
|
94
|
-
signPsbt(request) {
|
|
95
|
+
signPsbt(request, options) {
|
|
95
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
97
|
yield this.sync();
|
|
97
98
|
if (this._connector.transactionScreening) {
|
|
98
99
|
yield this.screenBeforeSigning({ psbt: request.unsignedPsbtBase64 });
|
|
99
100
|
}
|
|
100
|
-
return this._connector.signPsbt(request);
|
|
101
|
+
return this._connector.signPsbt(request, options);
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
/**
|
|
@@ -105,13 +106,13 @@ class BitcoinWallet extends Wallet {
|
|
|
105
106
|
* @returns A promise that resolves to an array of signed PSBTs in base64
|
|
106
107
|
* or undefined if no provider is available
|
|
107
108
|
*/
|
|
108
|
-
signPsbts(requests) {
|
|
109
|
+
signPsbts(requests, options) {
|
|
109
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
111
|
yield this.sync();
|
|
111
112
|
if (this._connector.transactionScreening) {
|
|
112
113
|
yield Promise.all(requests.map((request) => this.screenBeforeSigning({ psbt: request.unsignedPsbtBase64 })));
|
|
113
114
|
}
|
|
114
|
-
return this._connector.signPsbts(requests);
|
|
115
|
+
return this._connector.signPsbts(requests, options);
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
118
|
/**
|