@dynamic-labs/tron 4.62.0 → 4.63.1
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 +31 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +6 -6
- package/src/connectors/TronWalletAdapterConnector/TronWalletAdapterConnector.cjs +30 -7
- package/src/connectors/TronWalletAdapterConnector/TronWalletAdapterConnector.d.ts +5 -2
- package/src/connectors/TronWalletAdapterConnector/TronWalletAdapterConnector.js +31 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.63.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.63.0...v4.63.1) (2026-02-24)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add elevated access token to WaaS export ([#10481](https://github.com/dynamic-labs/dynamic-auth/issues/10481)) ([9a3c6a6](https://github.com/dynamic-labs/dynamic-auth/commit/9a3c6a6eaa4bd7ced5aeb873fe7872717d0e25d9))
|
|
8
|
+
* add multi-wallet delegation support with React parity ([#10450](https://github.com/dynamic-labs/dynamic-auth/issues/10450)) ([e4d5135](https://github.com/dynamic-labs/dynamic-auth/commit/e4d5135c50595c022dfb02da2d9f05a389c0ee09))
|
|
9
|
+
* add Stellar chain support with balance fetching and network mapping ([#10494](https://github.com/dynamic-labs/dynamic-auth/issues/10494)) ([f12553c](https://github.com/dynamic-labs/dynamic-auth/commit/f12553ce864a56a75f87d1d55c087e1fc9378cc6))
|
|
10
|
+
* add Stellar WaaS transaction signing and broadcast UI ([#10495](https://github.com/dynamic-labs/dynamic-auth/issues/10495)) ([f87a860](https://github.com/dynamic-labs/dynamic-auth/commit/f87a860f59cdf5b0c4f99586c61e60186efc19f2))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* cancel authFlowClose timeout when navigation occurs during delay ([#10487](https://github.com/dynamic-labs/dynamic-auth/issues/10487)) ([aef92b4](https://github.com/dynamic-labs/dynamic-auth/commit/aef92b4a80827c517819cc63414acdf3e9ad7b05))
|
|
16
|
+
* **e2e:** update gating test to expect user:basic scope ([#10505](https://github.com/dynamic-labs/dynamic-auth/issues/10505)) ([56f449a](https://github.com/dynamic-labs/dynamic-auth/commit/56f449a282f37b33d365d60380c7a68c1cf5eced)), closes [dynamic-labs/redcoast#8339](https://github.com/dynamic-labs/redcoast/issues/8339)
|
|
17
|
+
* use selected network for Horizon server and include WaaS connector in StellarWalletConnectors ([#10493](https://github.com/dynamic-labs/dynamic-auth/issues/10493)) ([f340c09](https://github.com/dynamic-labs/dynamic-auth/commit/f340c094f08afb39829f2d90db2ec665a69ba469))
|
|
18
|
+
* **waas:** normalize SOL to SVM chain name when looking up WaaS connector ([#10506](https://github.com/dynamic-labs/dynamic-auth/issues/10506)) ([102d314](https://github.com/dynamic-labs/dynamic-auth/commit/102d3142d65d0e67338884affc736e5151a8e296))
|
|
19
|
+
|
|
20
|
+
## [4.63.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.62.0...v4.63.0) (2026-02-24)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **react-native:** raise walletReturnFromDeepLink event to allow redirecting back to the same route as before ([#10364](https://github.com/dynamic-labs/dynamic-auth/issues/10364)) ([cd56fd0](https://github.com/dynamic-labs/dynamic-auth/commit/cd56fd089e867bb5ed09a7c999b04480d8f59f81))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **react-native:** include redirectUrl in WalletConnect connection deep links on iOS and add session redirect metadata for Solana ([#10479](https://github.com/dynamic-labs/dynamic-auth/issues/10479)) ([68829f9](https://github.com/dynamic-labs/dynamic-auth/commit/68829f9ef39c845917ce49bfd63922e5252c2299))
|
|
31
|
+
* ton external wallet connection ([#10460](https://github.com/dynamic-labs/dynamic-auth/issues/10460)) ([7431a74](https://github.com/dynamic-labs/dynamic-auth/commit/7431a74fcd0bcd04755e6a81b49aa24dfc261f09))
|
|
32
|
+
|
|
2
33
|
## [4.62.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.61.7...v4.62.0) (2026-02-23)
|
|
3
34
|
|
|
4
35
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/tron",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.63.1",
|
|
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",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "4.63.1",
|
|
22
22
|
"@tronweb3/tronwallet-abstract-adapter": "1.1.10",
|
|
23
23
|
"@tronweb3/tronwallet-adapters": "1.2.17",
|
|
24
24
|
"tronweb": "6.1.1",
|
|
25
|
-
"@dynamic-labs/types": "4.
|
|
26
|
-
"@dynamic-labs/utils": "4.
|
|
27
|
-
"@dynamic-labs/wallet-book": "4.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
25
|
+
"@dynamic-labs/types": "4.63.1",
|
|
26
|
+
"@dynamic-labs/utils": "4.63.1",
|
|
27
|
+
"@dynamic-labs/wallet-book": "4.63.1",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "4.63.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {}
|
|
31
31
|
}
|
|
@@ -45,6 +45,7 @@ class TronWalletAdapterConnector extends walletConnectorCore.WalletConnectorBase
|
|
|
45
45
|
this.supportedChains = ['TRON'];
|
|
46
46
|
this.switchNetworkOnlyFromWallet = true;
|
|
47
47
|
this.adapter = undefined;
|
|
48
|
+
this._isInstalledOnBrowser = undefined;
|
|
48
49
|
this.balanceCache = new Map();
|
|
49
50
|
this.networkCache = null;
|
|
50
51
|
this.tronNetworks = getBackwardsCompatibilityTronNetworks.getBackwardsCompatibilityTronNetworks(opts.tronNetworks);
|
|
@@ -65,12 +66,17 @@ class TronWalletAdapterConnector extends walletConnectorCore.WalletConnectorBase
|
|
|
65
66
|
return this.adapter;
|
|
66
67
|
}
|
|
67
68
|
/**
|
|
68
|
-
* Check if the specific wallet is installed on the browser
|
|
69
|
-
*
|
|
69
|
+
* Check if the specific wallet is installed on the browser.
|
|
70
|
+
* Returns false while the adapter is still determining readyState (Loading).
|
|
71
|
+
* Once readyStateChanged fires with Found, emits providerReady and caches true.
|
|
72
|
+
* Once readyStateChanged fires with NotFound, caches false.
|
|
70
73
|
*/
|
|
71
74
|
isInstalledOnBrowser() {
|
|
75
|
+
// null = subscribed and waiting; false/true = resolved
|
|
76
|
+
if (this._isInstalledOnBrowser !== undefined) {
|
|
77
|
+
return this._isInstalledOnBrowser === true;
|
|
78
|
+
}
|
|
72
79
|
try {
|
|
73
|
-
// Create the adapter to check if the wallet is installed
|
|
74
80
|
if (!this.adapter) {
|
|
75
81
|
const AdapterClass = ADAPTER_REGISTRY[this.overrideKey];
|
|
76
82
|
if (!AdapterClass) {
|
|
@@ -78,10 +84,27 @@ class TronWalletAdapterConnector extends walletConnectorCore.WalletConnectorBase
|
|
|
78
84
|
}
|
|
79
85
|
this.adapter = new AdapterClass();
|
|
80
86
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
const { readyState } = this.adapter;
|
|
88
|
+
if (readyState === 'Found') {
|
|
89
|
+
this._isInstalledOnBrowser = true;
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
if (readyState === 'NotFound') {
|
|
93
|
+
this._isInstalledOnBrowser = false;
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
// readyState is Loading — mark as pending so we don't subscribe twice
|
|
97
|
+
this._isInstalledOnBrowser = null;
|
|
98
|
+
this.adapter.once('readyStateChanged', (state) => {
|
|
99
|
+
if (state === 'Found') {
|
|
100
|
+
this._isInstalledOnBrowser = true;
|
|
101
|
+
walletConnectorCore.walletConnectorEvents.emit('providerReady', { connector: this });
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
this._isInstalledOnBrowser = false;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return false;
|
|
85
108
|
}
|
|
86
109
|
catch (_a) {
|
|
87
110
|
return false;
|
|
@@ -26,6 +26,7 @@ export declare abstract class TronWalletAdapterConnector extends WalletConnector
|
|
|
26
26
|
switchNetworkOnlyFromWallet: boolean;
|
|
27
27
|
protected tronNetworks: GenericNetwork[];
|
|
28
28
|
protected adapter?: TronAdapterWithNetwork;
|
|
29
|
+
private _isInstalledOnBrowser;
|
|
29
30
|
private balanceCache;
|
|
30
31
|
private networkCache;
|
|
31
32
|
/**
|
|
@@ -42,8 +43,10 @@ export declare abstract class TronWalletAdapterConnector extends WalletConnector
|
|
|
42
43
|
*/
|
|
43
44
|
getAdapter(): TronAdapterWithNetwork;
|
|
44
45
|
/**
|
|
45
|
-
* Check if the specific wallet is installed on the browser
|
|
46
|
-
*
|
|
46
|
+
* Check if the specific wallet is installed on the browser.
|
|
47
|
+
* Returns false while the adapter is still determining readyState (Loading).
|
|
48
|
+
* Once readyStateChanged fires with Found, emits providerReady and caches true.
|
|
49
|
+
* Once readyStateChanged fires with NotFound, caches false.
|
|
47
50
|
*/
|
|
48
51
|
isInstalledOnBrowser(): boolean;
|
|
49
52
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
3
3
|
import { TronLinkAdapter, BitKeepAdapter, OkxWalletAdapter, TokenPocketAdapter, TrustAdapter } from '@tronweb3/tronwallet-adapters';
|
|
4
|
-
import { WalletConnectorBase, logger } from '@dynamic-labs/wallet-connector-core';
|
|
4
|
+
import { WalletConnectorBase, logger, walletConnectorEvents } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
6
6
|
import { TronWallet } from '../../wallet/TronWallet/TronWallet.js';
|
|
7
7
|
import { TronUiTransaction } from '../../utils/TronUiTransaction/TronUiTransaction.js';
|
|
@@ -41,6 +41,7 @@ class TronWalletAdapterConnector extends WalletConnectorBase {
|
|
|
41
41
|
this.supportedChains = ['TRON'];
|
|
42
42
|
this.switchNetworkOnlyFromWallet = true;
|
|
43
43
|
this.adapter = undefined;
|
|
44
|
+
this._isInstalledOnBrowser = undefined;
|
|
44
45
|
this.balanceCache = new Map();
|
|
45
46
|
this.networkCache = null;
|
|
46
47
|
this.tronNetworks = getBackwardsCompatibilityTronNetworks(opts.tronNetworks);
|
|
@@ -61,12 +62,17 @@ class TronWalletAdapterConnector extends WalletConnectorBase {
|
|
|
61
62
|
return this.adapter;
|
|
62
63
|
}
|
|
63
64
|
/**
|
|
64
|
-
* Check if the specific wallet is installed on the browser
|
|
65
|
-
*
|
|
65
|
+
* Check if the specific wallet is installed on the browser.
|
|
66
|
+
* Returns false while the adapter is still determining readyState (Loading).
|
|
67
|
+
* Once readyStateChanged fires with Found, emits providerReady and caches true.
|
|
68
|
+
* Once readyStateChanged fires with NotFound, caches false.
|
|
66
69
|
*/
|
|
67
70
|
isInstalledOnBrowser() {
|
|
71
|
+
// null = subscribed and waiting; false/true = resolved
|
|
72
|
+
if (this._isInstalledOnBrowser !== undefined) {
|
|
73
|
+
return this._isInstalledOnBrowser === true;
|
|
74
|
+
}
|
|
68
75
|
try {
|
|
69
|
-
// Create the adapter to check if the wallet is installed
|
|
70
76
|
if (!this.adapter) {
|
|
71
77
|
const AdapterClass = ADAPTER_REGISTRY[this.overrideKey];
|
|
72
78
|
if (!AdapterClass) {
|
|
@@ -74,10 +80,27 @@ class TronWalletAdapterConnector extends WalletConnectorBase {
|
|
|
74
80
|
}
|
|
75
81
|
this.adapter = new AdapterClass();
|
|
76
82
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
const { readyState } = this.adapter;
|
|
84
|
+
if (readyState === 'Found') {
|
|
85
|
+
this._isInstalledOnBrowser = true;
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
if (readyState === 'NotFound') {
|
|
89
|
+
this._isInstalledOnBrowser = false;
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
// readyState is Loading — mark as pending so we don't subscribe twice
|
|
93
|
+
this._isInstalledOnBrowser = null;
|
|
94
|
+
this.adapter.once('readyStateChanged', (state) => {
|
|
95
|
+
if (state === 'Found') {
|
|
96
|
+
this._isInstalledOnBrowser = true;
|
|
97
|
+
walletConnectorEvents.emit('providerReady', { connector: this });
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
this._isInstalledOnBrowser = false;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
return false;
|
|
81
104
|
}
|
|
82
105
|
catch (_a) {
|
|
83
106
|
return false;
|