@dynamic-labs/starknet 4.95.1 → 4.96.0
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 +20 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/StarknetWalletConnector.cjs +1 -1
- package/src/StarknetWalletConnector.js +1 -1
- package/src/index.cjs +0 -2
- package/src/index.js +0 -2
- package/src/wallets/injected/fetchStarknetInjectedWalletConnectors.cjs +0 -2
- package/src/wallets/injected/fetchStarknetInjectedWalletConnectors.js +0 -2
- package/src/wallets/injected/braavos.cjs +0 -59
- package/src/wallets/injected/braavos.d.ts +0 -18
- package/src/wallets/injected/braavos.js +0 -55
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.96.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.95.2...v4.96.0) (2026-08-03)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **midnight:** add contract wallet provider support ([#12133](https://github.com/dynamic-labs/dynamic-auth/issues/12133)) ([f649ce4](https://github.com/dynamic-labs/dynamic-auth/commit/f649ce47101b439542e8db1c802a4a372fb45eb2))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **starknet:** restore Braavos L2 session after lock and unlock ([#12125](https://github.com/dynamic-labs/dynamic-auth/issues/12125)) ([9ea226f](https://github.com/dynamic-labs/dynamic-auth/commit/9ea226f1dd2a58e3087c267d74cfe79452ddaeff))
|
|
13
|
+
* **wallet-book:** add universal deep link for Exodus Solana WalletConnect ([168dba5](https://github.com/dynamic-labs/dynamic-auth/commit/168dba5aa6076a769b78394eef093c91948b3c91)), closes [#12123](https://github.com/dynamic-labs/dynamic-auth/issues/12123)
|
|
14
|
+
|
|
15
|
+
### [4.95.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.95.1...v4.95.2) (2026-07-30)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **ethereum-aa:** resolve chainId from network for ZeroDev v2 multichain projects ([#12106](https://github.com/dynamic-labs/dynamic-auth/issues/12106)) ([76f18b0](https://github.com/dynamic-labs/dynamic-auth/commit/76f18b0a861aa916f949a919e65a185c6c32673f)), closes [#12105](https://github.com/dynamic-labs/dynamic-auth/issues/12105) [#12105](https://github.com/dynamic-labs/dynamic-auth/issues/12105)
|
|
21
|
+
|
|
2
22
|
### [4.95.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.95.0...v4.95.1) (2026-07-28)
|
|
3
23
|
|
|
4
24
|
|
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.
|
|
3
|
+
"version": "4.96.0",
|
|
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.1093",
|
|
27
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
28
|
-
"@dynamic-labs/logger": "4.
|
|
29
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
30
|
-
"@dynamic-labs/starknet-core": "4.
|
|
31
|
-
"@dynamic-labs/types": "4.
|
|
32
|
-
"@dynamic-labs/utils": "4.
|
|
33
|
-
"@dynamic-labs/wallet-book": "4.
|
|
34
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
27
|
+
"@dynamic-labs/assert-package-version": "4.96.0",
|
|
28
|
+
"@dynamic-labs/logger": "4.96.0",
|
|
29
|
+
"@dynamic-labs/rpc-providers": "4.96.0",
|
|
30
|
+
"@dynamic-labs/starknet-core": "4.96.0",
|
|
31
|
+
"@dynamic-labs/types": "4.96.0",
|
|
32
|
+
"@dynamic-labs/utils": "4.96.0",
|
|
33
|
+
"@dynamic-labs/wallet-book": "4.96.0",
|
|
34
|
+
"@dynamic-labs/wallet-connector-core": "4.96.0",
|
|
35
35
|
"assert": "2.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {}
|
|
@@ -156,7 +156,7 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
156
156
|
this.handleAccountChange = (accounts) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
157
157
|
var _a;
|
|
158
158
|
this.logger.debug(`[accountsChanged] Received argument: ${accounts === null || accounts === void 0 ? void 0 : accounts.toString()}`);
|
|
159
|
-
if (!accounts || accounts[0] === null) {
|
|
159
|
+
if (!accounts || accounts.length === 0 || accounts[0] === null) {
|
|
160
160
|
this.emit('disconnect');
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
@@ -152,7 +152,7 @@ class StarknetWalletConnector extends WalletConnectorBase {
|
|
|
152
152
|
this.handleAccountChange = (accounts) => __awaiter(this, void 0, void 0, function* () {
|
|
153
153
|
var _a;
|
|
154
154
|
this.logger.debug(`[accountsChanged] Received argument: ${accounts === null || accounts === void 0 ? void 0 : accounts.toString()}`);
|
|
155
|
-
if (!accounts || accounts[0] === null) {
|
|
155
|
+
if (!accounts || accounts.length === 0 || accounts[0] === null) {
|
|
156
156
|
this.emit('disconnect');
|
|
157
157
|
return;
|
|
158
158
|
}
|
package/src/index.cjs
CHANGED
|
@@ -9,7 +9,6 @@ var argentx = require('./wallets/argent/injected/argentx.cjs');
|
|
|
9
9
|
var webwallet = require('./wallets/argent/webwallet/webwallet.cjs');
|
|
10
10
|
var metamask = require('./wallets/injected/metamask.cjs');
|
|
11
11
|
var fetchStarknetInjectedWalletConnectors = require('./wallets/injected/fetchStarknetInjectedWalletConnectors.cjs');
|
|
12
|
-
var braavos = require('./wallets/injected/braavos.cjs');
|
|
13
12
|
var FallbackStarknetConnector = require('./wallets/injected/FallbackStarknetConnector.cjs');
|
|
14
13
|
require('@dynamic-labs/starknet-core');
|
|
15
14
|
var StarknetWallet = require('./wallet/StarknetWallet.cjs');
|
|
@@ -24,7 +23,6 @@ const StarknetWalletConnectors = (props) => [
|
|
|
24
23
|
argentx.ArgentX,
|
|
25
24
|
webwallet.WebWallet,
|
|
26
25
|
metamask.MetaMask,
|
|
27
|
-
braavos.Braavos,
|
|
28
26
|
FallbackStarknetConnector.FallbackStarknetConnector,
|
|
29
27
|
];
|
|
30
28
|
|
package/src/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import { ArgentX } from './wallets/argent/injected/argentx.js';
|
|
|
5
5
|
import { WebWallet } from './wallets/argent/webwallet/webwallet.js';
|
|
6
6
|
import { MetaMask } from './wallets/injected/metamask.js';
|
|
7
7
|
import { fetchStarknetInjectedWalletConnectors } from './wallets/injected/fetchStarknetInjectedWalletConnectors.js';
|
|
8
|
-
import { Braavos } from './wallets/injected/braavos.js';
|
|
9
8
|
import { FallbackStarknetConnector } from './wallets/injected/FallbackStarknetConnector.js';
|
|
10
9
|
import '@dynamic-labs/starknet-core';
|
|
11
10
|
export { StarknetWallet } from './wallet/StarknetWallet.js';
|
|
@@ -20,7 +19,6 @@ const StarknetWalletConnectors = (props) => [
|
|
|
20
19
|
ArgentX,
|
|
21
20
|
WebWallet,
|
|
22
21
|
MetaMask,
|
|
23
|
-
Braavos,
|
|
24
22
|
FallbackStarknetConnector,
|
|
25
23
|
];
|
|
26
24
|
|
|
@@ -8,8 +8,6 @@ var injected = require('./injected.cjs');
|
|
|
8
8
|
const filteredStarknetWalletKeysOverrides = [
|
|
9
9
|
// TODO(starknet-v6): Remove once these wallets support v6
|
|
10
10
|
'bitgetstarknet',
|
|
11
|
-
// Braavos has its own connector to implement specific logic
|
|
12
|
-
'braavos',
|
|
13
11
|
];
|
|
14
12
|
const fetchStarknetInjectedWalletConnectors = ({ walletBook, }) => {
|
|
15
13
|
var _a;
|
|
@@ -4,8 +4,6 @@ import { Injected } from './injected.js';
|
|
|
4
4
|
const filteredStarknetWalletKeysOverrides = [
|
|
5
5
|
// TODO(starknet-v6): Remove once these wallets support v6
|
|
6
6
|
'bitgetstarknet',
|
|
7
|
-
// Braavos has its own connector to implement specific logic
|
|
8
|
-
'braavos',
|
|
9
7
|
];
|
|
10
8
|
const fetchStarknetInjectedWalletConnectors = ({ walletBook, }) => {
|
|
11
9
|
var _a;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
7
|
-
var utils = require('@dynamic-labs/utils');
|
|
8
|
-
var injected = require('./injected.cjs');
|
|
9
|
-
|
|
10
|
-
class Braavos extends injected.Injected {
|
|
11
|
-
constructor(opts) {
|
|
12
|
-
super('Braavos', 'braavos', 'braavos', opts);
|
|
13
|
-
this.overrideKey = 'braavos';
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
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.
|
|
24
|
-
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
25
|
-
* will timeout and return an empty array.
|
|
26
|
-
*/
|
|
27
|
-
getConnectedAccounts() {
|
|
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
|
-
}), {
|
|
51
|
-
fallbackValue: [],
|
|
52
|
-
maxRetries: 0,
|
|
53
|
-
retryStrategy: 'timeout-only',
|
|
54
|
-
timeoutMs: 3000,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
exports.Braavos = Braavos;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Injected } from './injected';
|
|
2
|
-
export declare class Braavos extends Injected {
|
|
3
|
-
overrideKey: string;
|
|
4
|
-
constructor(opts: any);
|
|
5
|
-
/**
|
|
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.
|
|
14
|
-
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
15
|
-
* will timeout and return an empty array.
|
|
16
|
-
*/
|
|
17
|
-
getConnectedAccounts(): Promise<string[]>;
|
|
18
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
3
|
-
import { retryableFn } from '@dynamic-labs/utils';
|
|
4
|
-
import { Injected } from './injected.js';
|
|
5
|
-
|
|
6
|
-
class Braavos extends Injected {
|
|
7
|
-
constructor(opts) {
|
|
8
|
-
super('Braavos', 'braavos', 'braavos', opts);
|
|
9
|
-
this.overrideKey = 'braavos';
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
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.
|
|
20
|
-
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
21
|
-
* will timeout and return an empty array.
|
|
22
|
-
*/
|
|
23
|
-
getConnectedAccounts() {
|
|
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
|
-
}), {
|
|
47
|
-
fallbackValue: [],
|
|
48
|
-
maxRetries: 0,
|
|
49
|
-
retryStrategy: 'timeout-only',
|
|
50
|
-
timeoutMs: 3000,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { Braavos };
|