@dynamic-labs-wallet/node-btc 1.1.63 → 1.1.64

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/index.cjs CHANGED
@@ -463,14 +463,14 @@ class DynamicBtcWalletClient extends node.DynamicWalletClient {
463
463
  }
464
464
  /**
465
465
  * Exports the private key for a wallet
466
- * @param accountAddress - The account address to export the private key for
466
+ * @param walletMetadata - The wallet metadata of the wallet to export
467
467
  * @param password - The password for encrypted backup shares
468
468
  * @param externalServerKeyShares - Optional external server key shares
469
+ * @param network - Network the WIF is encoded for. Defaults to mainnet. `walletMetadata` does not record a network, so pass `BitcoinNetwork.TESTNET` for a wallet you use on testnet
469
470
  * @returns The private key in WIF format
470
- */ async exportPrivateKey({ walletMetadata, password = undefined, externalServerKeyShares }) {
471
+ */ async exportPrivateKey({ walletMetadata, password = undefined, externalServerKeyShares, network = core.BitcoinNetwork.MAINNET }) {
471
472
  const { accountAddress } = walletMetadata;
472
473
  const { addressType } = this.getDerivationInfoFromMetadata(walletMetadata);
473
- const network = core.BitcoinNetwork.MAINNET; // Default to mainnet, could be derived from wallet
474
474
  const bitcoinConfig = {
475
475
  addressType,
476
476
  network
@@ -495,17 +495,19 @@ class DynamicBtcWalletClient extends node.DynamicWalletClient {
495
495
  * @param keyShares - The key shares to export the private key for
496
496
  * @param derivationPath - Optional derivation path
497
497
  * @param bitcoinConfig - Bitcoin configuration (address type, network)
498
+ * @param thresholdSignatureScheme - The wallet's scheme. When given, at least that scheme's threshold of shares is required (2 for TWO_OF_TWO and TWO_OF_THREE, 3 for THREE_OF_FIVE). A TWO_OF_TWO wallet cannot be exported offline from the external server's shares alone, because it holds only one of the two
498
499
  * @returns The private key in WIF format
499
500
  *
500
501
  * `derivationPath` is the JSON-serialized index map that
501
502
  * `walletMetadata.derivationPath` carries (e.g. `'{"0":44,"1":60,"2":0,"3":0,"4":0}'`
502
503
  * or `'[44,60,0,0,0]'`). BIP-32 strings such as `"m/44'/60'/0'/0/0"` are rejected.
503
504
  * Omit it to export without path derivation.
504
- */ async offlineExportPrivateKey({ keyShares, derivationPath, bitcoinConfig }) {
505
+ */ async offlineExportPrivateKey({ keyShares, derivationPath, bitcoinConfig, thresholdSignatureScheme }) {
505
506
  const { derivedPrivateKey } = await this.offlineExportKey({
506
507
  chainName: this.chainName,
507
508
  keyShares,
508
- derivationPath
509
+ derivationPath,
510
+ thresholdSignatureScheme
509
511
  });
510
512
  if (!derivedPrivateKey) {
511
513
  throw new Error('Derived private key is undefined');
@@ -537,10 +539,13 @@ class DynamicBtcWalletClient extends node.DynamicWalletClient {
537
539
  let resolvedWalletId;
538
540
  let resolvedShareSetId;
539
541
  let ceremonyCeremonyCompleteResolver;
542
+ let ceremonyCeremonyCompleteRejecter;
540
543
  let ceremonyAccountAddress;
541
- const ceremonyCompletePromise = new Promise((resolve)=>{
544
+ const ceremonyCompletePromise = new Promise((resolve, reject)=>{
542
545
  ceremonyCeremonyCompleteResolver = resolve;
546
+ ceremonyCeremonyCompleteRejecter = reject;
543
547
  });
548
+ ceremonyCompletePromise.catch(()=>undefined);
544
549
  // Convert WIF to private key hex
545
550
  const formattedPrivateKey = btcUtils.wifToPrivateKey(privateKey, network);
546
551
  // Get public key from private key to verify address
@@ -550,6 +555,12 @@ class DynamicBtcWalletClient extends node.DynamicWalletClient {
550
555
  addressType,
551
556
  network
552
557
  });
558
+ const { accountAddress: identityAddress } = this.deriveAccountAddress({
559
+ rawPublicKey: derivedPublicKey,
560
+ addressType,
561
+ network: core.BitcoinNetwork.MAINNET
562
+ });
563
+ const isExpectedAddress = (address)=>address === expectedAddress || address === identityAddress;
553
564
  const { rawPublicKey, externalServerKeyShares } = await this.importRawPrivateKey({
554
565
  chainName,
555
566
  privateKey: formattedPrivateKey,
@@ -557,14 +568,18 @@ class DynamicBtcWalletClient extends node.DynamicWalletClient {
557
568
  bitcoinConfig,
558
569
  password,
559
570
  backUpToDynamic,
560
- onError,
571
+ onError: (error)=>{
572
+ ceremonyCeremonyCompleteRejecter(error);
573
+ onError == null ? void 0 : onError(error);
574
+ },
561
575
  onCeremonyComplete: (accountAddress, walletId, shareSetId)=>{
562
576
  ceremonyAccountAddress = accountAddress;
563
577
  resolvedWalletId = walletId;
564
578
  resolvedShareSetId = shareSetId;
565
- // Verify address matches
566
- if (accountAddress !== expectedAddress) {
567
- throw new Error(`Public address mismatch: derived address ${accountAddress} !== expected address ${expectedAddress}`);
579
+ if (!isExpectedAddress(accountAddress)) {
580
+ const mismatch = new Error(`Public address mismatch: derived address ${accountAddress} !== expected address ${expectedAddress}`);
581
+ ceremonyCeremonyCompleteRejecter(mismatch);
582
+ throw mismatch;
568
583
  }
569
584
  ceremonyCeremonyCompleteResolver(undefined);
570
585
  }
@@ -580,7 +595,7 @@ class DynamicBtcWalletClient extends node.DynamicWalletClient {
580
595
  addressType,
581
596
  network
582
597
  }).accountAddress;
583
- if (accountAddress !== expectedAddress) {
598
+ if (!isExpectedAddress(accountAddress)) {
584
599
  throw new Error(`Public address mismatch: derived address ${accountAddress} !== expected address ${expectedAddress}`);
585
600
  }
586
601
  const walletMetadata = this.buildWalletMetadata({
package/index.esm.js CHANGED
@@ -441,14 +441,14 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
441
441
  }
442
442
  /**
443
443
  * Exports the private key for a wallet
444
- * @param accountAddress - The account address to export the private key for
444
+ * @param walletMetadata - The wallet metadata of the wallet to export
445
445
  * @param password - The password for encrypted backup shares
446
446
  * @param externalServerKeyShares - Optional external server key shares
447
+ * @param network - Network the WIF is encoded for. Defaults to mainnet. `walletMetadata` does not record a network, so pass `BitcoinNetwork.TESTNET` for a wallet you use on testnet
447
448
  * @returns The private key in WIF format
448
- */ async exportPrivateKey({ walletMetadata, password = undefined, externalServerKeyShares }) {
449
+ */ async exportPrivateKey({ walletMetadata, password = undefined, externalServerKeyShares, network = BitcoinNetwork.MAINNET }) {
449
450
  const { accountAddress } = walletMetadata;
450
451
  const { addressType } = this.getDerivationInfoFromMetadata(walletMetadata);
451
- const network = BitcoinNetwork.MAINNET; // Default to mainnet, could be derived from wallet
452
452
  const bitcoinConfig = {
453
453
  addressType,
454
454
  network
@@ -473,17 +473,19 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
473
473
  * @param keyShares - The key shares to export the private key for
474
474
  * @param derivationPath - Optional derivation path
475
475
  * @param bitcoinConfig - Bitcoin configuration (address type, network)
476
+ * @param thresholdSignatureScheme - The wallet's scheme. When given, at least that scheme's threshold of shares is required (2 for TWO_OF_TWO and TWO_OF_THREE, 3 for THREE_OF_FIVE). A TWO_OF_TWO wallet cannot be exported offline from the external server's shares alone, because it holds only one of the two
476
477
  * @returns The private key in WIF format
477
478
  *
478
479
  * `derivationPath` is the JSON-serialized index map that
479
480
  * `walletMetadata.derivationPath` carries (e.g. `'{"0":44,"1":60,"2":0,"3":0,"4":0}'`
480
481
  * or `'[44,60,0,0,0]'`). BIP-32 strings such as `"m/44'/60'/0'/0/0"` are rejected.
481
482
  * Omit it to export without path derivation.
482
- */ async offlineExportPrivateKey({ keyShares, derivationPath, bitcoinConfig }) {
483
+ */ async offlineExportPrivateKey({ keyShares, derivationPath, bitcoinConfig, thresholdSignatureScheme }) {
483
484
  const { derivedPrivateKey } = await this.offlineExportKey({
484
485
  chainName: this.chainName,
485
486
  keyShares,
486
- derivationPath
487
+ derivationPath,
488
+ thresholdSignatureScheme
487
489
  });
488
490
  if (!derivedPrivateKey) {
489
491
  throw new Error('Derived private key is undefined');
@@ -515,10 +517,13 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
515
517
  let resolvedWalletId;
516
518
  let resolvedShareSetId;
517
519
  let ceremonyCeremonyCompleteResolver;
520
+ let ceremonyCeremonyCompleteRejecter;
518
521
  let ceremonyAccountAddress;
519
- const ceremonyCompletePromise = new Promise((resolve)=>{
522
+ const ceremonyCompletePromise = new Promise((resolve, reject)=>{
520
523
  ceremonyCeremonyCompleteResolver = resolve;
524
+ ceremonyCeremonyCompleteRejecter = reject;
521
525
  });
526
+ ceremonyCompletePromise.catch(()=>undefined);
522
527
  // Convert WIF to private key hex
523
528
  const formattedPrivateKey = wifToPrivateKey(privateKey, network);
524
529
  // Get public key from private key to verify address
@@ -528,6 +533,12 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
528
533
  addressType,
529
534
  network
530
535
  });
536
+ const { accountAddress: identityAddress } = this.deriveAccountAddress({
537
+ rawPublicKey: derivedPublicKey,
538
+ addressType,
539
+ network: BitcoinNetwork.MAINNET
540
+ });
541
+ const isExpectedAddress = (address)=>address === expectedAddress || address === identityAddress;
531
542
  const { rawPublicKey, externalServerKeyShares } = await this.importRawPrivateKey({
532
543
  chainName,
533
544
  privateKey: formattedPrivateKey,
@@ -535,14 +546,18 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
535
546
  bitcoinConfig,
536
547
  password,
537
548
  backUpToDynamic,
538
- onError,
549
+ onError: (error)=>{
550
+ ceremonyCeremonyCompleteRejecter(error);
551
+ onError == null ? void 0 : onError(error);
552
+ },
539
553
  onCeremonyComplete: (accountAddress, walletId, shareSetId)=>{
540
554
  ceremonyAccountAddress = accountAddress;
541
555
  resolvedWalletId = walletId;
542
556
  resolvedShareSetId = shareSetId;
543
- // Verify address matches
544
- if (accountAddress !== expectedAddress) {
545
- throw new Error(`Public address mismatch: derived address ${accountAddress} !== expected address ${expectedAddress}`);
557
+ if (!isExpectedAddress(accountAddress)) {
558
+ const mismatch = new Error(`Public address mismatch: derived address ${accountAddress} !== expected address ${expectedAddress}`);
559
+ ceremonyCeremonyCompleteRejecter(mismatch);
560
+ throw mismatch;
546
561
  }
547
562
  ceremonyCeremonyCompleteResolver(undefined);
548
563
  }
@@ -558,7 +573,7 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
558
573
  addressType,
559
574
  network
560
575
  }).accountAddress;
561
- if (accountAddress !== expectedAddress) {
576
+ if (!isExpectedAddress(accountAddress)) {
562
577
  throw new Error(`Public address mismatch: derived address ${accountAddress} !== expected address ${expectedAddress}`);
563
578
  }
564
579
  const walletMetadata = this.buildWalletMetadata({
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/node-btc",
3
- "version": "1.1.63",
3
+ "version": "1.1.64",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@dynamic-labs-wallet/core": "1.1.63",
8
- "@dynamic-labs-wallet/node": "1.1.63",
9
- "@dynamic-labs-wallet/btc-utils": "1.1.63",
7
+ "@dynamic-labs-wallet/core": "1.1.64",
8
+ "@dynamic-labs-wallet/node": "1.1.64",
9
+ "@dynamic-labs-wallet/btc-utils": "1.1.64",
10
10
  "@dynamic-labs/sdk-api-core": "0.144.0",
11
11
  "bitcoinjs-lib": "^7.0.0",
12
12
  "tiny-secp256k1": "^2.2.3"
@@ -125,21 +125,24 @@ export declare class DynamicBtcWalletClient extends DynamicWalletClient {
125
125
  }): Promise<string>;
126
126
  /**
127
127
  * Exports the private key for a wallet
128
- * @param accountAddress - The account address to export the private key for
128
+ * @param walletMetadata - The wallet metadata of the wallet to export
129
129
  * @param password - The password for encrypted backup shares
130
130
  * @param externalServerKeyShares - Optional external server key shares
131
+ * @param network - Network the WIF is encoded for. Defaults to mainnet. `walletMetadata` does not record a network, so pass `BitcoinNetwork.TESTNET` for a wallet you use on testnet
131
132
  * @returns The private key in WIF format
132
133
  */
133
- exportPrivateKey({ walletMetadata, password, externalServerKeyShares, }: {
134
+ exportPrivateKey({ walletMetadata, password, externalServerKeyShares, network, }: {
134
135
  walletMetadata: WalletMetadata;
135
136
  password?: string;
136
137
  externalServerKeyShares?: ServerKeyShare[];
138
+ network?: BitcoinNetwork;
137
139
  }): Promise<string>;
138
140
  /**
139
141
  * Exports the private key for a given account address offline using key shares
140
142
  * @param keyShares - The key shares to export the private key for
141
143
  * @param derivationPath - Optional derivation path
142
144
  * @param bitcoinConfig - Bitcoin configuration (address type, network)
145
+ * @param thresholdSignatureScheme - The wallet's scheme. When given, at least that scheme's threshold of shares is required (2 for TWO_OF_TWO and TWO_OF_THREE, 3 for THREE_OF_FIVE). A TWO_OF_TWO wallet cannot be exported offline from the external server's shares alone, because it holds only one of the two
143
146
  * @returns The private key in WIF format
144
147
  *
145
148
  * `derivationPath` is the JSON-serialized index map that
@@ -147,10 +150,11 @@ export declare class DynamicBtcWalletClient extends DynamicWalletClient {
147
150
  * or `'[44,60,0,0,0]'`). BIP-32 strings such as `"m/44'/60'/0'/0/0"` are rejected.
148
151
  * Omit it to export without path derivation.
149
152
  */
150
- offlineExportPrivateKey({ keyShares, derivationPath, bitcoinConfig, }: {
153
+ offlineExportPrivateKey({ keyShares, derivationPath, bitcoinConfig, thresholdSignatureScheme, }: {
151
154
  keyShares: (EcdsaKeygenResult | BIP340KeygenResult)[];
152
155
  derivationPath?: string;
153
156
  bitcoinConfig?: BitcoinConfig;
157
+ thresholdSignatureScheme?: ThresholdSignatureScheme;
154
158
  }): Promise<string>;
155
159
  /**
156
160
  * Imports a private key and stores the key shares in the wallet map.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAIhC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAuCnC,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;gBAEf,EACV,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,MAAM,EACN,KAAK,GACN,EAAE,wBAAwB;IAW3B;;;;;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