@dynamic-labs/starknet 4.61.1 → 4.61.2
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 +10 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/wallets/injected/braavos.cjs +32 -4
- package/src/wallets/injected/braavos.d.ts +8 -3
- package/src/wallets/injected/braavos.js +32 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.61.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.61.1...v4.61.2) (2026-02-12)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* export wallet password hook ([#10433](https://github.com/dynamic-labs/dynamic-auth/issues/10433)) ([dd6170e](https://github.com/dynamic-labs/dynamic-auth/commit/dd6170ec42a863b33baea92f9716083e3c4941d0))
|
|
8
|
+
* only prompt braavos wallet once to connect ([#10405](https://github.com/dynamic-labs/dynamic-auth/issues/10405)) ([2aff336](https://github.com/dynamic-labs/dynamic-auth/commit/2aff336a6222404b7907be65ef9af6806c357a07))
|
|
9
|
+
* remove signedSessionId from validateActiveWallet ([#10422](https://github.com/dynamic-labs/dynamic-auth/issues/10422)) ([700a953](https://github.com/dynamic-labs/dynamic-auth/commit/700a95383c8754f1cc0c87f53c50d04b57ef1b52))
|
|
10
|
+
* ton wallets not showing download links ([#10421](https://github.com/dynamic-labs/dynamic-auth/issues/10421)) ([cc8a8f8](https://github.com/dynamic-labs/dynamic-auth/commit/cc8a8f82485e4cc94aacd63d2e6a1bd8ca291f9c))
|
|
11
|
+
|
|
2
12
|
### [4.61.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.61.0...v4.61.1) (2026-02-11)
|
|
3
13
|
|
|
4
14
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/starknet",
|
|
3
|
-
"version": "4.61.
|
|
3
|
+
"version": "4.61.2",
|
|
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",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"starknetkit": "2.10.4",
|
|
25
25
|
"text-encoding": "0.7.0",
|
|
26
26
|
"@dynamic-labs/sdk-api-core": "0.0.864",
|
|
27
|
-
"@dynamic-labs/assert-package-version": "4.61.
|
|
28
|
-
"@dynamic-labs/logger": "4.61.
|
|
29
|
-
"@dynamic-labs/rpc-providers": "4.61.
|
|
30
|
-
"@dynamic-labs/starknet-core": "4.61.
|
|
31
|
-
"@dynamic-labs/types": "4.61.
|
|
32
|
-
"@dynamic-labs/utils": "4.61.
|
|
33
|
-
"@dynamic-labs/wallet-book": "4.61.
|
|
34
|
-
"@dynamic-labs/wallet-connector-core": "4.61.
|
|
27
|
+
"@dynamic-labs/assert-package-version": "4.61.2",
|
|
28
|
+
"@dynamic-labs/logger": "4.61.2",
|
|
29
|
+
"@dynamic-labs/rpc-providers": "4.61.2",
|
|
30
|
+
"@dynamic-labs/starknet-core": "4.61.2",
|
|
31
|
+
"@dynamic-labs/types": "4.61.2",
|
|
32
|
+
"@dynamic-labs/utils": "4.61.2",
|
|
33
|
+
"@dynamic-labs/wallet-book": "4.61.2",
|
|
34
|
+
"@dynamic-labs/wallet-connector-core": "4.61.2",
|
|
35
35
|
"assert": "2.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
6
7
|
var utils = require('@dynamic-labs/utils');
|
|
7
8
|
var injected = require('./injected.cjs');
|
|
8
9
|
|
|
@@ -12,14 +13,41 @@ class Braavos extends injected.Injected {
|
|
|
12
13
|
this.overrideKey = 'braavos';
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
-
* the
|
|
17
|
-
* the
|
|
16
|
+
* Overrides getConnectedAccounts to always use silent mode, preventing
|
|
17
|
+
* the wallet popup from appearing during account discovery. This avoids
|
|
18
|
+
* a double-popup issue where the Braavos extension would prompt the user
|
|
19
|
+
* both during getConnectedAccounts (via shouldPromptSilently detecting
|
|
20
|
+
* existing permissions) and the subsequent connect flow.
|
|
21
|
+
*
|
|
22
|
+
* Also adds a timeout to prevent the SDK from becoming unresponsive
|
|
23
|
+
* when Braavos is locked and does not prompt the user to unlock.
|
|
18
24
|
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
19
25
|
* will timeout and return an empty array.
|
|
20
26
|
*/
|
|
21
27
|
getConnectedAccounts() {
|
|
22
|
-
return utils.retryableFn(() =>
|
|
28
|
+
return utils.retryableFn(() => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
var _a;
|
|
30
|
+
if ((_a = this.walletData) === null || _a === void 0 ? void 0 : _a.account) {
|
|
31
|
+
this.logger.debug('[getConnectedAccounts] Found existing account:', this.walletData.account);
|
|
32
|
+
return [this.walletData.account];
|
|
33
|
+
}
|
|
34
|
+
this.logger.debug('[getConnectedAccounts] No existing account, attempting to connect with silent mode: true');
|
|
35
|
+
try {
|
|
36
|
+
const { data, wallet } = yield this.prompt({ silently: true });
|
|
37
|
+
this.logger.debug(`[getConnectedAccounts] Connect returned account: ${data === null || data === void 0 ? void 0 : data.account}`);
|
|
38
|
+
if (!(data === null || data === void 0 ? void 0 : data.account) || !wallet) {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
this.walletData = data;
|
|
42
|
+
this.wallet = wallet;
|
|
43
|
+
this.setupEventListeners();
|
|
44
|
+
return [data.account];
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
this.logger.debug(`[getConnectedAccounts] Silent connect errored out: ${error}`);
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
}), {
|
|
23
51
|
fallbackValue: [],
|
|
24
52
|
maxRetries: 0,
|
|
25
53
|
retryStrategy: 'timeout-only',
|
|
@@ -3,9 +3,14 @@ export declare class Braavos extends Injected {
|
|
|
3
3
|
overrideKey: string;
|
|
4
4
|
constructor(opts: any);
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* the
|
|
8
|
-
* the
|
|
6
|
+
* Overrides getConnectedAccounts to always use silent mode, preventing
|
|
7
|
+
* the wallet popup from appearing during account discovery. This avoids
|
|
8
|
+
* a double-popup issue where the Braavos extension would prompt the user
|
|
9
|
+
* both during getConnectedAccounts (via shouldPromptSilently detecting
|
|
10
|
+
* existing permissions) and the subsequent connect flow.
|
|
11
|
+
*
|
|
12
|
+
* Also adds a timeout to prevent the SDK from becoming unresponsive
|
|
13
|
+
* when Braavos is locked and does not prompt the user to unlock.
|
|
9
14
|
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
10
15
|
* will timeout and return an empty array.
|
|
11
16
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
|
+
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
2
3
|
import { retryableFn } from '@dynamic-labs/utils';
|
|
3
4
|
import { Injected } from './injected.js';
|
|
4
5
|
|
|
@@ -8,14 +9,41 @@ class Braavos extends Injected {
|
|
|
8
9
|
this.overrideKey = 'braavos';
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
* the
|
|
13
|
-
* the
|
|
12
|
+
* Overrides getConnectedAccounts to always use silent mode, preventing
|
|
13
|
+
* the wallet popup from appearing during account discovery. This avoids
|
|
14
|
+
* a double-popup issue where the Braavos extension would prompt the user
|
|
15
|
+
* both during getConnectedAccounts (via shouldPromptSilently detecting
|
|
16
|
+
* existing permissions) and the subsequent connect flow.
|
|
17
|
+
*
|
|
18
|
+
* Also adds a timeout to prevent the SDK from becoming unresponsive
|
|
19
|
+
* when Braavos is locked and does not prompt the user to unlock.
|
|
14
20
|
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
15
21
|
* will timeout and return an empty array.
|
|
16
22
|
*/
|
|
17
23
|
getConnectedAccounts() {
|
|
18
|
-
return retryableFn(() =>
|
|
24
|
+
return retryableFn(() => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
var _a;
|
|
26
|
+
if ((_a = this.walletData) === null || _a === void 0 ? void 0 : _a.account) {
|
|
27
|
+
this.logger.debug('[getConnectedAccounts] Found existing account:', this.walletData.account);
|
|
28
|
+
return [this.walletData.account];
|
|
29
|
+
}
|
|
30
|
+
this.logger.debug('[getConnectedAccounts] No existing account, attempting to connect with silent mode: true');
|
|
31
|
+
try {
|
|
32
|
+
const { data, wallet } = yield this.prompt({ silently: true });
|
|
33
|
+
this.logger.debug(`[getConnectedAccounts] Connect returned account: ${data === null || data === void 0 ? void 0 : data.account}`);
|
|
34
|
+
if (!(data === null || data === void 0 ? void 0 : data.account) || !wallet) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
this.walletData = data;
|
|
38
|
+
this.wallet = wallet;
|
|
39
|
+
this.setupEventListeners();
|
|
40
|
+
return [data.account];
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
this.logger.debug(`[getConnectedAccounts] Silent connect errored out: ${error}`);
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
}), {
|
|
19
47
|
fallbackValue: [],
|
|
20
48
|
maxRetries: 0,
|
|
21
49
|
retryStrategy: 'timeout-only',
|