@dynamic-labs/embedded-wallet-bitcoin 4.91.3 → 4.91.4

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,12 @@
1
1
 
2
+ ### [4.91.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.3...v4.91.4) (2026-07-01)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * conditionally use /op/ route for AA transactions based on block explorer support ([#11628](https://github.com/dynamic-labs/dynamic-auth/issues/11628)) ([95822dc](https://github.com/dynamic-labs/dynamic-auth/commit/95822dc0edbcd739afe870f0b3881555fdb17eb6))
8
+ * require error codes in all SDK error classes ([#11761](https://github.com/dynamic-labs/dynamic-auth/issues/11761)) ([5744811](https://github.com/dynamic-labs/dynamic-auth/commit/5744811efdd1e415aaf51eec5b3300b323ec1347))
9
+
2
10
  ### [4.91.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.2...v4.91.3) (2026-06-30)
3
11
 
4
12
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.91.3";
6
+ var version = "4.91.4";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.91.3";
2
+ var version = "4.91.4";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/embedded-wallet-bitcoin",
3
- "version": "4.91.3",
3
+ "version": "4.91.4",
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",
@@ -19,17 +19,17 @@
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
21
  "@bitcoinerlab/secp256k1": "1.1.1",
22
- "@dynamic-labs/bitcoin": "4.91.3",
22
+ "@dynamic-labs/bitcoin": "4.91.4",
23
23
  "@dynamic-labs/sdk-api-core": "0.0.1046",
24
- "@dynamic-labs/types": "4.91.3",
25
- "@dynamic-labs/utils": "4.91.3",
24
+ "@dynamic-labs/types": "4.91.4",
25
+ "@dynamic-labs/utils": "4.91.4",
26
26
  "@turnkey/http": "3.10.0",
27
27
  "bitcoinjs-lib": "6.1.5",
28
28
  "ecpair": "2.1.0",
29
- "@dynamic-labs/assert-package-version": "4.91.3",
30
- "@dynamic-labs/embedded-wallet": "4.91.3",
31
- "@dynamic-labs/wallet-book": "4.91.3",
32
- "@dynamic-labs/wallet-connector-core": "4.91.3"
29
+ "@dynamic-labs/assert-package-version": "4.91.4",
30
+ "@dynamic-labs/embedded-wallet": "4.91.4",
31
+ "@dynamic-labs/wallet-book": "4.91.4",
32
+ "@dynamic-labs/wallet-connector-core": "4.91.4"
33
33
  },
34
34
  "peerDependencies": {}
35
35
  }
@@ -56,7 +56,7 @@ class TurnkeyBitcoinWalletConnector extends embeddedWallet.TurnkeyWalletConnecto
56
56
  if (!isWalletActive) {
57
57
  const targetActiveAccount = (_b = this.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.find((vc) => (vc === null || vc === void 0 ? void 0 : vc.address) === expectedAddress);
58
58
  if (!targetActiveAccount) {
59
- throw new utils.DynamicError('Account not found');
59
+ throw new utils.DynamicError('Account not found', 'account_not_found');
60
60
  }
61
61
  this.verifiedCredential = targetActiveAccount;
62
62
  this.refreshTurnkeyAccount();
@@ -110,11 +110,11 @@ class TurnkeyBitcoinWalletConnector extends embeddedWallet.TurnkeyWalletConnecto
110
110
  sendRawTransaction(rawTransaction) {
111
111
  return _tslib.__awaiter(this, void 0, void 0, function* () {
112
112
  if (!rawTransaction) {
113
- throw new utils.DynamicError('No transaction specified!');
113
+ throw new utils.DynamicError('No transaction specified!', 'no_transaction_specified');
114
114
  }
115
115
  const accountAddress = this.getAccount();
116
116
  if (!accountAddress) {
117
- throw new utils.DynamicError('No account address found!');
117
+ throw new utils.DynamicError('No account address found!', 'no_account_address_found');
118
118
  }
119
119
  const API_URL = bitcoin.getMempoolApiUrl(accountAddress);
120
120
  const response = yield fetch(`${API_URL}/tx`, {
@@ -126,11 +126,11 @@ class TurnkeyBitcoinWalletConnector extends embeddedWallet.TurnkeyWalletConnecto
126
126
  });
127
127
  if (!response.ok) {
128
128
  if (response.status === 429) {
129
- throw new utils.DynamicError('sendRawTransaction - mempool api rate limit exceeded');
129
+ throw new utils.DynamicError('sendRawTransaction - mempool api rate limit exceeded', 'sendrawtransaction_mempool_api_rate_limit_exceeded');
130
130
  }
131
131
  const error = yield response.text();
132
132
  embeddedWallet.logger.debug(`sendRawTransaction - response not ok: ${JSON.stringify(error)}`);
133
- throw new utils.DynamicError('sendRawTransaction - failed to send transaction');
133
+ throw new utils.DynamicError('sendRawTransaction - failed to send transaction', 'sendrawtransaction_failed_to_send_transaction');
134
134
  }
135
135
  // this endpoint returns the transaction ID
136
136
  return response.text();
@@ -48,7 +48,7 @@ class TurnkeyBitcoinWalletConnector extends TurnkeyWalletConnectorBase {
48
48
  if (!isWalletActive) {
49
49
  const targetActiveAccount = (_b = this.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.find((vc) => (vc === null || vc === void 0 ? void 0 : vc.address) === expectedAddress);
50
50
  if (!targetActiveAccount) {
51
- throw new DynamicError('Account not found');
51
+ throw new DynamicError('Account not found', 'account_not_found');
52
52
  }
53
53
  this.verifiedCredential = targetActiveAccount;
54
54
  this.refreshTurnkeyAccount();
@@ -102,11 +102,11 @@ class TurnkeyBitcoinWalletConnector extends TurnkeyWalletConnectorBase {
102
102
  sendRawTransaction(rawTransaction) {
103
103
  return __awaiter(this, void 0, void 0, function* () {
104
104
  if (!rawTransaction) {
105
- throw new DynamicError('No transaction specified!');
105
+ throw new DynamicError('No transaction specified!', 'no_transaction_specified');
106
106
  }
107
107
  const accountAddress = this.getAccount();
108
108
  if (!accountAddress) {
109
- throw new DynamicError('No account address found!');
109
+ throw new DynamicError('No account address found!', 'no_account_address_found');
110
110
  }
111
111
  const API_URL = getMempoolApiUrl(accountAddress);
112
112
  const response = yield fetch(`${API_URL}/tx`, {
@@ -118,11 +118,11 @@ class TurnkeyBitcoinWalletConnector extends TurnkeyWalletConnectorBase {
118
118
  });
119
119
  if (!response.ok) {
120
120
  if (response.status === 429) {
121
- throw new DynamicError('sendRawTransaction - mempool api rate limit exceeded');
121
+ throw new DynamicError('sendRawTransaction - mempool api rate limit exceeded', 'sendrawtransaction_mempool_api_rate_limit_exceeded');
122
122
  }
123
123
  const error = yield response.text();
124
124
  logger.debug(`sendRawTransaction - response not ok: ${JSON.stringify(error)}`);
125
- throw new DynamicError('sendRawTransaction - failed to send transaction');
125
+ throw new DynamicError('sendRawTransaction - failed to send transaction', 'sendrawtransaction_failed_to_send_transaction');
126
126
  }
127
127
  // this endpoint returns the transaction ID
128
128
  return response.text();