@dynamic-labs-wallet/btc 1.1.18 → 1.1.20

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
@@ -240,55 +240,10 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
240
240
  signedSessionId
241
241
  });
242
242
  try {
243
- if (!accountAddress) {
244
- throw new Error(browser.ERROR_ACCOUNT_ADDRESS_REQUIRED);
245
- }
246
- const walletProperties = this.getWalletFromMap(accountAddress);
247
- if (!walletProperties) {
248
- throw new Error('Wallet not found in walletMap');
249
- }
250
- const derivationPath = walletProperties.derivationPath;
251
- if (derivationPath === undefined || derivationPath === null) {
252
- throw new Error('Derivation path missing in walletMap');
253
- }
254
- const addressType = btcUtils.resolveBitcoinAddressType({
243
+ const { addressType, completeBitcoinConfig, formattedMessage, pubKey, toSignPsbt } = await this.prepareBip322SignMessage({
255
244
  accountAddress,
256
- addressType: walletProperties.addressType,
257
- derivationPath
258
- });
259
- const clientKeyShares = await this.getClientKeySharesFromStorage({
260
- accountAddress
261
- });
262
- if (!clientKeyShares || clientKeyShares.length === 0) {
263
- throw new Error('No key shares found');
264
- }
265
- const bitcoinConfig = {
266
- addressType,
245
+ message,
267
246
  network
268
- };
269
- const walletDerivationPath = parseDerivationPath(derivationPath);
270
- const derivedPublicKey = await this.derivePublicKey({
271
- chainName: this.chainName,
272
- keyShare: clientKeyShares[0],
273
- derivationPath: walletDerivationPath,
274
- bitcoinConfig
275
- });
276
- if (!derivedPublicKey) {
277
- throw new Error('Failed to derive public key');
278
- }
279
- const pubKey = btcUtils.normalizePublicKey(derivedPublicKey, addressType);
280
- this.verifyWalletAddress(derivedPublicKey, addressType, network, accountAddress);
281
- // Prepare BIP-322 Transactions and calculate hash
282
- const { formattedMessage, toSignPsbt } = btcUtils.calculateBip322Hash(message, pubKey, addressType, network, ecc);
283
- // Prepare tweak for Taproot in case of BIP340
284
- let tweak;
285
- if (addressType === browser.BitcoinAddressType.TAPROOT) {
286
- tweak = btcUtils.calculateTaprootTweak(pubKey);
287
- }
288
- // Build complete bitcoinConfig with addressType and tweak
289
- const completeBitcoinConfig = _extends({}, bitcoinConfig, {
290
- addressType: addressType,
291
- tweak
292
247
  });
293
248
  // Sign the message using MPC
294
249
  const signature = await this.sign({
@@ -322,6 +277,58 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
322
277
  });
323
278
  }
324
279
  }
280
+ async prepareSignMessage({ accountAddress, message, network }) {
281
+ const { formattedMessage } = await this.prepareBip322SignMessage({
282
+ accountAddress,
283
+ message,
284
+ network
285
+ });
286
+ return `0x${Buffer.from(formattedMessage).toString('hex')}`;
287
+ }
288
+ async prepareBip322SignMessage({ accountAddress, message, network }) {
289
+ if (!accountAddress) throw new Error(browser.ERROR_ACCOUNT_ADDRESS_REQUIRED);
290
+ const walletProperties = this.getWalletFromMap(accountAddress);
291
+ if (!walletProperties) throw new Error('Wallet not found in walletMap');
292
+ const derivationPath = walletProperties.derivationPath;
293
+ if (derivationPath === undefined || derivationPath === null) {
294
+ throw new Error('Derivation path missing in walletMap');
295
+ }
296
+ const addressType = btcUtils.resolveBitcoinAddressType({
297
+ accountAddress,
298
+ addressType: walletProperties.addressType,
299
+ derivationPath
300
+ });
301
+ const clientKeyShares = await this.getClientKeySharesFromStorage({
302
+ accountAddress
303
+ });
304
+ if (!clientKeyShares || clientKeyShares.length === 0) throw new Error('No key shares found');
305
+ const bitcoinConfig = {
306
+ addressType,
307
+ network
308
+ };
309
+ const derivedPublicKey = await this.derivePublicKey({
310
+ chainName: this.chainName,
311
+ keyShare: clientKeyShares[0],
312
+ derivationPath: parseDerivationPath(derivationPath),
313
+ bitcoinConfig
314
+ });
315
+ if (!derivedPublicKey) throw new Error('Failed to derive public key');
316
+ const pubKey = btcUtils.normalizePublicKey(derivedPublicKey, addressType);
317
+ this.verifyWalletAddress(derivedPublicKey, addressType, network, accountAddress);
318
+ const { formattedMessage, toSignPsbt } = btcUtils.calculateBip322Hash(message, pubKey, addressType, network, ecc);
319
+ const tweak = addressType === browser.BitcoinAddressType.TAPROOT ? btcUtils.calculateTaprootTweak(pubKey) : undefined;
320
+ const completeBitcoinConfig = _extends({}, bitcoinConfig, {
321
+ addressType: addressType,
322
+ tweak
323
+ });
324
+ return {
325
+ addressType,
326
+ completeBitcoinConfig,
327
+ formattedMessage,
328
+ pubKey,
329
+ toSignPsbt
330
+ };
331
+ }
325
332
  /**
326
333
  * Verifies that the derived address matches the expected address
327
334
  * @param rawPublicKey - The raw public key
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
- import { DynamicWalletClient, BitcoinNetwork, BitcoinAddressType, getMPCChainConfig, ERROR_CREATE_WALLET_ACCOUNT, ERROR_PASSWORD_MISMATCH, ERROR_MULTIPLE_WALLETS_PER_CHAIN, ERROR_ACCOUNT_ADDRESS_REQUIRED, ERROR_SIGN_MESSAGE, ERROR_IMPORT_PRIVATE_KEY } from '@dynamic-labs-wallet/browser';
1
+ import { DynamicWalletClient, BitcoinNetwork, BitcoinAddressType, getMPCChainConfig, ERROR_CREATE_WALLET_ACCOUNT, ERROR_PASSWORD_MISMATCH, ERROR_MULTIPLE_WALLETS_PER_CHAIN, ERROR_SIGN_MESSAGE, ERROR_ACCOUNT_ADDRESS_REQUIRED, ERROR_IMPORT_PRIVATE_KEY } from '@dynamic-labs-wallet/browser';
2
2
  import * as bitcoin from 'bitcoinjs-lib';
3
3
  import ecc from '@bitcoinerlab/secp256k1';
4
- import { extractPublicKeyHex, normalizePublicKey, publicKeyToBitcoinAddress, resolveBitcoinAddressType, calculateTaprootTweak, calculateBip322Hash, encodeBip322Signature, wifToPrivateKey, getPublicKeyFromPrivateKey, privateKeyToWIF, doesInputBelongToAddress, filterInputsBySigningIndexes, assertSighashAllowed, collectPSBTInputData, getSigHashType, convertSignatureToTaprootBuffer, getSegwitV0ScriptCode, getBitcoinNetwork, convertSignatureToDER, getFeeRates, getUTXOs, selectUTXOs, getDefaultRpcUrl, initEccLib } from '@dynamic-labs-wallet/btc-utils';
4
+ import { extractPublicKeyHex, normalizePublicKey, publicKeyToBitcoinAddress, resolveBitcoinAddressType, calculateTaprootTweak, encodeBip322Signature, calculateBip322Hash, wifToPrivateKey, getPublicKeyFromPrivateKey, privateKeyToWIF, doesInputBelongToAddress, filterInputsBySigningIndexes, assertSighashAllowed, collectPSBTInputData, getSigHashType, convertSignatureToTaprootBuffer, getSegwitV0ScriptCode, getBitcoinNetwork, convertSignatureToDER, getFeeRates, getUTXOs, selectUTXOs, getDefaultRpcUrl, initEccLib } from '@dynamic-labs-wallet/btc-utils';
5
5
 
6
6
  function _extends() {
7
7
  _extends = Object.assign || function assign(target) {
@@ -219,55 +219,10 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
219
219
  signedSessionId
220
220
  });
221
221
  try {
222
- if (!accountAddress) {
223
- throw new Error(ERROR_ACCOUNT_ADDRESS_REQUIRED);
224
- }
225
- const walletProperties = this.getWalletFromMap(accountAddress);
226
- if (!walletProperties) {
227
- throw new Error('Wallet not found in walletMap');
228
- }
229
- const derivationPath = walletProperties.derivationPath;
230
- if (derivationPath === undefined || derivationPath === null) {
231
- throw new Error('Derivation path missing in walletMap');
232
- }
233
- const addressType = resolveBitcoinAddressType({
222
+ const { addressType, completeBitcoinConfig, formattedMessage, pubKey, toSignPsbt } = await this.prepareBip322SignMessage({
234
223
  accountAddress,
235
- addressType: walletProperties.addressType,
236
- derivationPath
237
- });
238
- const clientKeyShares = await this.getClientKeySharesFromStorage({
239
- accountAddress
240
- });
241
- if (!clientKeyShares || clientKeyShares.length === 0) {
242
- throw new Error('No key shares found');
243
- }
244
- const bitcoinConfig = {
245
- addressType,
224
+ message,
246
225
  network
247
- };
248
- const walletDerivationPath = parseDerivationPath(derivationPath);
249
- const derivedPublicKey = await this.derivePublicKey({
250
- chainName: this.chainName,
251
- keyShare: clientKeyShares[0],
252
- derivationPath: walletDerivationPath,
253
- bitcoinConfig
254
- });
255
- if (!derivedPublicKey) {
256
- throw new Error('Failed to derive public key');
257
- }
258
- const pubKey = normalizePublicKey(derivedPublicKey, addressType);
259
- this.verifyWalletAddress(derivedPublicKey, addressType, network, accountAddress);
260
- // Prepare BIP-322 Transactions and calculate hash
261
- const { formattedMessage, toSignPsbt } = calculateBip322Hash(message, pubKey, addressType, network, ecc);
262
- // Prepare tweak for Taproot in case of BIP340
263
- let tweak;
264
- if (addressType === BitcoinAddressType.TAPROOT) {
265
- tweak = calculateTaprootTweak(pubKey);
266
- }
267
- // Build complete bitcoinConfig with addressType and tweak
268
- const completeBitcoinConfig = _extends({}, bitcoinConfig, {
269
- addressType: addressType,
270
- tweak
271
226
  });
272
227
  // Sign the message using MPC
273
228
  const signature = await this.sign({
@@ -301,6 +256,58 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
301
256
  });
302
257
  }
303
258
  }
259
+ async prepareSignMessage({ accountAddress, message, network }) {
260
+ const { formattedMessage } = await this.prepareBip322SignMessage({
261
+ accountAddress,
262
+ message,
263
+ network
264
+ });
265
+ return `0x${Buffer.from(formattedMessage).toString('hex')}`;
266
+ }
267
+ async prepareBip322SignMessage({ accountAddress, message, network }) {
268
+ if (!accountAddress) throw new Error(ERROR_ACCOUNT_ADDRESS_REQUIRED);
269
+ const walletProperties = this.getWalletFromMap(accountAddress);
270
+ if (!walletProperties) throw new Error('Wallet not found in walletMap');
271
+ const derivationPath = walletProperties.derivationPath;
272
+ if (derivationPath === undefined || derivationPath === null) {
273
+ throw new Error('Derivation path missing in walletMap');
274
+ }
275
+ const addressType = resolveBitcoinAddressType({
276
+ accountAddress,
277
+ addressType: walletProperties.addressType,
278
+ derivationPath
279
+ });
280
+ const clientKeyShares = await this.getClientKeySharesFromStorage({
281
+ accountAddress
282
+ });
283
+ if (!clientKeyShares || clientKeyShares.length === 0) throw new Error('No key shares found');
284
+ const bitcoinConfig = {
285
+ addressType,
286
+ network
287
+ };
288
+ const derivedPublicKey = await this.derivePublicKey({
289
+ chainName: this.chainName,
290
+ keyShare: clientKeyShares[0],
291
+ derivationPath: parseDerivationPath(derivationPath),
292
+ bitcoinConfig
293
+ });
294
+ if (!derivedPublicKey) throw new Error('Failed to derive public key');
295
+ const pubKey = normalizePublicKey(derivedPublicKey, addressType);
296
+ this.verifyWalletAddress(derivedPublicKey, addressType, network, accountAddress);
297
+ const { formattedMessage, toSignPsbt } = calculateBip322Hash(message, pubKey, addressType, network, ecc);
298
+ const tweak = addressType === BitcoinAddressType.TAPROOT ? calculateTaprootTweak(pubKey) : undefined;
299
+ const completeBitcoinConfig = _extends({}, bitcoinConfig, {
300
+ addressType: addressType,
301
+ tweak
302
+ });
303
+ return {
304
+ addressType,
305
+ completeBitcoinConfig,
306
+ formattedMessage,
307
+ pubKey,
308
+ toSignPsbt
309
+ };
310
+ }
304
311
  /**
305
312
  * Verifies that the derived address matches the expected address
306
313
  * @param rawPublicKey - The raw public key
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/btc",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "dependencies": {
8
8
  "@dynamic-labs/sdk-api-core": "0.50.0",
9
- "@dynamic-labs-wallet/browser": "1.1.18",
10
- "@dynamic-labs-wallet/btc-utils": "1.1.18",
9
+ "@dynamic-labs-wallet/browser": "1.1.20",
10
+ "@dynamic-labs-wallet/btc-utils": "1.1.20",
11
11
  "@bitcoinerlab/secp256k1": "^1.2.0",
12
12
  "bitcoinjs-lib": "^7.0.0"
13
13
  },
@@ -1,4 +1,4 @@
1
- import { BitcoinAddressType, BitcoinNetwork, DynamicWalletClient, type BIP340KeygenResult, type BitcoinConfig, type DynamicWalletClientInternalOptions, type DynamicWalletClientProps, type EcdsaPublicKey, type EcdsaSignature, type ThresholdSignatureScheme, type RequestWithElevatedAccessToken, type BaseSignParams } from '@dynamic-labs-wallet/browser';
1
+ import { BitcoinAddressType, BitcoinNetwork, DynamicWalletClient, type BIP340KeygenResult, type BitcoinConfig, type DynamicWalletClientInternalOptions, type DynamicWalletClientProps, type EcdsaPublicKey, type EcdsaSignature, type ThresholdSignatureScheme, type RequestWithElevatedAccessToken, type BaseSignParams, type ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/browser';
2
2
  export declare class DynamicBtcWalletClient extends DynamicWalletClient {
3
3
  readonly chainName = "BTC";
4
4
  /**
@@ -82,6 +82,12 @@ export declare class DynamicBtcWalletClient extends DynamicWalletClient {
82
82
  accountAddress: string;
83
83
  network: BitcoinNetwork;
84
84
  } & BaseSignParams): Promise<string>;
85
+ prepareSignMessage({ accountAddress, message, network, }: {
86
+ accountAddress: string;
87
+ message: string;
88
+ network: BitcoinNetwork;
89
+ }): Promise<string>;
90
+ private prepareBip322SignMessage;
85
91
  /**
86
92
  * Verifies that the derived address matches the expected address
87
93
  * @param rawPublicKey - The raw public key
@@ -174,7 +180,9 @@ export declare class DynamicBtcWalletClient extends DynamicWalletClient {
174
180
  allowedSighash?: number[];
175
181
  /** Hex-encoded witnessScripts the wallet may co-sign (P2WSH opt-in). */
176
182
  allowedWitnessScripts?: string[];
177
- } & BaseSignParams): Promise<string>;
183
+ } & Omit<BaseSignParams, 'approvalQuorum'> & {
184
+ approvalQuorum?: ApprovalQuorumRequestContext;
185
+ }): Promise<string>;
178
186
  /**
179
187
  * Creates a PSBT for a transaction
180
188
  * @param receiverAddress - The address to send funds to
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EAQnB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,kCAAkC,EACvC,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,cAAc,EAEpB,MAAM,8BAA8B,CAAC;AAgCtC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