@dynamic-labs/stellar 4.63.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 CHANGED
@@ -1,4 +1,22 @@
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
+
2
20
  ## [4.63.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.62.0...v4.63.0) (2026-02-24)
3
21
 
4
22
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.63.0";
6
+ var version = "4.63.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.63.0";
2
+ var version = "4.63.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/stellar",
3
- "version": "4.63.0",
3
+ "version": "4.63.1",
4
4
  "description": "A React SDK for implementing Stellar wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -20,15 +20,15 @@
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.0.875",
22
22
  "@stellar/stellar-sdk": "14.4.3",
23
- "@dynamic-labs/wallet-connector-core": "4.63.0",
24
- "@dynamic-labs/assert-package-version": "4.63.0",
23
+ "@dynamic-labs/wallet-connector-core": "4.63.1",
24
+ "@dynamic-labs/assert-package-version": "4.63.1",
25
25
  "@lobstrco/signer-extension-api": "2.0.0",
26
26
  "@stellar/freighter-api": "6.0.1",
27
- "@dynamic-labs/logger": "4.63.0",
28
- "@dynamic-labs/types": "4.63.0",
29
- "@dynamic-labs/utils": "4.63.0",
30
- "@dynamic-labs/waas": "4.63.0",
31
- "@dynamic-labs/wallet-book": "4.63.0",
27
+ "@dynamic-labs/logger": "4.63.1",
28
+ "@dynamic-labs/types": "4.63.1",
29
+ "@dynamic-labs/utils": "4.63.1",
30
+ "@dynamic-labs/waas": "4.63.1",
31
+ "@dynamic-labs/wallet-book": "4.63.1",
32
32
  "eventemitter3": "5.0.1"
33
33
  },
34
34
  "peerDependencies": {}
@@ -19,6 +19,9 @@ declare const DynamicWaasStellarConnector_base: (abstract new (...args: any[]) =
19
19
  } | undefined) => Promise<string | undefined>) | undefined;
20
20
  getWalletPassword?: import("@dynamic-labs/wallet-connector-core").GetWalletPasswordFn | undefined;
21
21
  getAuthToken?: (() => string) | undefined;
22
+ getElevatedAccessToken?: ((props: {
23
+ scope: import("@dynamic-labs/sdk-api-core").TokenScope;
24
+ }) => Promise<string | undefined>) | undefined;
22
25
  environmentId?: string | undefined;
23
26
  baseApiUrl?: string | undefined;
24
27
  relayUrl?: string | undefined;
@@ -34,6 +37,9 @@ declare const DynamicWaasStellarConnector_base: (abstract new (...args: any[]) =
34
37
  setGetMfaTokenFunction(getMfaToken: (props?: {
35
38
  mfaAction?: MFAAction | undefined;
36
39
  } | undefined) => Promise<string | undefined>): void;
40
+ setGetElevatedAccessTokenFunction(getElevatedAccessToken: (params: {
41
+ scope: import("@dynamic-labs/sdk-api-core").TokenScope;
42
+ }) => Promise<string | undefined>): void;
37
43
  setGetWalletPasswordFunction(getWalletPassword: import("@dynamic-labs/wallet-connector-core").GetWalletPasswordFn): void;
38
44
  getPasswordIfNeeded({ accountAddress, }: {
39
45
  accountAddress: string;
@@ -50,8 +50,8 @@ class StellarWalletConnector extends walletConnectorCore.WalletConnectorBase {
50
50
  return this.stellarNetworks.length > 1;
51
51
  }
52
52
  getSelectedNetwork() {
53
- var _a;
54
- return (_a = this.stellarNetworks) === null || _a === void 0 ? void 0 : _a[0];
53
+ var _a, _b;
54
+ return (_a = this.selectedNetwork) !== null && _a !== void 0 ? _a : (_b = this.stellarNetworks) === null || _b === void 0 ? void 0 : _b[0];
55
55
  }
56
56
  switchNetwork(_a) {
57
57
  return _tslib.__awaiter(this, arguments, void 0, function* ({ networkChainId, }) {
@@ -67,22 +67,44 @@ class StellarWalletConnector extends walletConnectorCore.WalletConnectorBase {
67
67
  }
68
68
  getNetwork() {
69
69
  return _tslib.__awaiter(this, void 0, void 0, function* () {
70
+ var _a;
70
71
  if (!this.stellarNetworks.length) {
71
72
  return undefined;
72
73
  }
74
+ // If selectedNetwork is already set, return its chainId
73
75
  if (this.selectedNetwork) {
74
- return this.selectedNetwork.chainId.toString();
76
+ return String(this.selectedNetwork.chainId);
75
77
  }
78
+ // Detect network from address (needed after page reload)
76
79
  const address = yield this.getAddress();
77
80
  if (!address) {
78
81
  return undefined;
79
82
  }
80
- const network = yield getNetworkFromAddress.getNetworkFromAddress(address, this.stellarNetworks[0]);
81
- if (!network) {
83
+ const detectedChainId = yield getNetworkFromAddress.getNetworkFromAddress(address, this.stellarNetworks[0]);
84
+ if (!detectedChainId) {
82
85
  return undefined;
83
86
  }
84
- this.selectedNetwork = this.stellarNetworks.find((n) => n.chainId.toString() === network);
85
- return network;
87
+ // Find and set the selectedNetwork based on detected chainId
88
+ this.selectedNetwork = this.stellarNetworks.find((n) => n.chainId.toString() === detectedChainId);
89
+ // If no exact match found, determine if it's testnet or mainnet based on the chainId
90
+ // and select the appropriate network from stellarNetworks
91
+ if (!this.selectedNetwork) {
92
+ // Testnet chainId starts with 'cee0302d', mainnet with '7ac33997'
93
+ const isTestnet = detectedChainId.startsWith('cee0302d');
94
+ this.selectedNetwork = this.stellarNetworks.find((n) => {
95
+ var _a, _b;
96
+ return isTestnet
97
+ ? (_a = n.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('testnet')
98
+ : !((_b = n.name) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes('testnet'));
99
+ });
100
+ // If still no match, use the first network
101
+ if (!this.selectedNetwork) {
102
+ [this.selectedNetwork] = this.stellarNetworks;
103
+ }
104
+ }
105
+ // Return chainId (the hash) for network validation
106
+ // This matches the chainId/networkId in the enabled networks from the API
107
+ return String((_a = this.selectedNetwork) === null || _a === void 0 ? void 0 : _a.chainId);
86
108
  });
87
109
  }
88
110
  /**
@@ -221,7 +243,8 @@ class StellarWalletConnector extends walletConnectorCore.WalletConnectorBase {
221
243
  getHorizonServer() {
222
244
  return _tslib.__awaiter(this, void 0, void 0, function* () {
223
245
  var _a, _b;
224
- const url = ((_b = (_a = this.stellarNetworks[0]) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes('testnet'))
246
+ const network = (_a = this.selectedNetwork) !== null && _a !== void 0 ? _a : this.stellarNetworks[0];
247
+ const url = ((_b = network === null || network === void 0 ? void 0 : network.name) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes('testnet'))
225
248
  ? HORIZON_TESTNET_URL
226
249
  : HORIZON_MAINNET_URL;
227
250
  return new stellarSdk.Horizon.Server(url);
@@ -46,8 +46,8 @@ class StellarWalletConnector extends WalletConnectorBase {
46
46
  return this.stellarNetworks.length > 1;
47
47
  }
48
48
  getSelectedNetwork() {
49
- var _a;
50
- return (_a = this.stellarNetworks) === null || _a === void 0 ? void 0 : _a[0];
49
+ var _a, _b;
50
+ return (_a = this.selectedNetwork) !== null && _a !== void 0 ? _a : (_b = this.stellarNetworks) === null || _b === void 0 ? void 0 : _b[0];
51
51
  }
52
52
  switchNetwork(_a) {
53
53
  return __awaiter(this, arguments, void 0, function* ({ networkChainId, }) {
@@ -63,22 +63,44 @@ class StellarWalletConnector extends WalletConnectorBase {
63
63
  }
64
64
  getNetwork() {
65
65
  return __awaiter(this, void 0, void 0, function* () {
66
+ var _a;
66
67
  if (!this.stellarNetworks.length) {
67
68
  return undefined;
68
69
  }
70
+ // If selectedNetwork is already set, return its chainId
69
71
  if (this.selectedNetwork) {
70
- return this.selectedNetwork.chainId.toString();
72
+ return String(this.selectedNetwork.chainId);
71
73
  }
74
+ // Detect network from address (needed after page reload)
72
75
  const address = yield this.getAddress();
73
76
  if (!address) {
74
77
  return undefined;
75
78
  }
76
- const network = yield getNetworkFromAddress(address, this.stellarNetworks[0]);
77
- if (!network) {
79
+ const detectedChainId = yield getNetworkFromAddress(address, this.stellarNetworks[0]);
80
+ if (!detectedChainId) {
78
81
  return undefined;
79
82
  }
80
- this.selectedNetwork = this.stellarNetworks.find((n) => n.chainId.toString() === network);
81
- return network;
83
+ // Find and set the selectedNetwork based on detected chainId
84
+ this.selectedNetwork = this.stellarNetworks.find((n) => n.chainId.toString() === detectedChainId);
85
+ // If no exact match found, determine if it's testnet or mainnet based on the chainId
86
+ // and select the appropriate network from stellarNetworks
87
+ if (!this.selectedNetwork) {
88
+ // Testnet chainId starts with 'cee0302d', mainnet with '7ac33997'
89
+ const isTestnet = detectedChainId.startsWith('cee0302d');
90
+ this.selectedNetwork = this.stellarNetworks.find((n) => {
91
+ var _a, _b;
92
+ return isTestnet
93
+ ? (_a = n.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('testnet')
94
+ : !((_b = n.name) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes('testnet'));
95
+ });
96
+ // If still no match, use the first network
97
+ if (!this.selectedNetwork) {
98
+ [this.selectedNetwork] = this.stellarNetworks;
99
+ }
100
+ }
101
+ // Return chainId (the hash) for network validation
102
+ // This matches the chainId/networkId in the enabled networks from the API
103
+ return String((_a = this.selectedNetwork) === null || _a === void 0 ? void 0 : _a.chainId);
82
104
  });
83
105
  }
84
106
  /**
@@ -217,7 +239,8 @@ class StellarWalletConnector extends WalletConnectorBase {
217
239
  getHorizonServer() {
218
240
  return __awaiter(this, void 0, void 0, function* () {
219
241
  var _a, _b;
220
- const url = ((_b = (_a = this.stellarNetworks[0]) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes('testnet'))
242
+ const network = (_a = this.selectedNetwork) !== null && _a !== void 0 ? _a : this.stellarNetworks[0];
243
+ const url = ((_b = network === null || network === void 0 ? void 0 : network.name) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes('testnet'))
221
244
  ? HORIZON_TESTNET_URL
222
245
  : HORIZON_MAINNET_URL;
223
246
  return new Horizon.Server(url);
package/src/index.cjs CHANGED
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var assertPackageVersion = require('@dynamic-labs/assert-package-version');
7
7
  var _package = require('../package.cjs');
8
+ var index = require('./connectors/DynamicWaasStellarConnector/index.cjs');
8
9
  var fetchInjectedWalletConnectors = require('./injected/fetchInjectedWalletConnectors.cjs');
9
10
  var StellarWallet = require('./wallet/StellarWallet.cjs');
10
11
  var isStellarWallet = require('./wallet/isStellarWallet/isStellarWallet.cjs');
@@ -14,7 +15,6 @@ require('@stellar/stellar-sdk');
14
15
  var getNetworkFromAddress = require('./utils/getNetworkFromAddress.cjs');
15
16
  require('../_virtual/_tslib.cjs');
16
17
  require('@dynamic-labs/utils');
17
- var index = require('./connectors/DynamicWaasStellarConnector/index.cjs');
18
18
  var DynamicWaasStellarConnector = require('./connectors/DynamicWaasStellarConnector/DynamicWaasStellarConnector.cjs');
19
19
 
20
20
  assertPackageVersion.assertPackageVersion('@dynamic-labs/stellar', _package.version);
@@ -22,14 +22,14 @@ assertPackageVersion.assertPackageVersion('@dynamic-labs/stellar', _package.vers
22
22
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
23
  const StellarWalletConnectors = (_props) => [
24
24
  ...fetchInjectedWalletConnectors.fetchInjectedWalletConnectors(),
25
- // Specific wallet connectors will be added here by implementers
25
+ DynamicWaasStellarConnector.DynamicWaasStellarConnector,
26
26
  ];
27
27
 
28
+ exports.DynamicWaasStellarConnectors = index.DynamicWaasStellarConnectors;
28
29
  exports.StellarWallet = StellarWallet.StellarWallet;
29
30
  exports.isStellarWallet = isStellarWallet.isStellarWallet;
30
31
  exports.StellarWalletConnector = StellarWalletConnector.StellarWalletConnector;
31
32
  exports.StellarLocalStorageCache = StellarLocalStorageCache.StellarLocalStorageCache;
32
33
  exports.getNetworkFromAddress = getNetworkFromAddress.getNetworkFromAddress;
33
- exports.DynamicWaasStellarConnectors = index.DynamicWaasStellarConnectors;
34
34
  exports.DynamicWaasStellarConnector = DynamicWaasStellarConnector.DynamicWaasStellarConnector;
35
35
  exports.StellarWalletConnectors = StellarWalletConnectors;
package/src/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ import { DynamicWaasStellarConnector } from './connectors/DynamicWaasStellarConnector';
1
2
  export { StellarWallet, isStellarWallet } from './wallet';
2
3
  export { StellarWalletConnector } from './connectors/StellarWalletConnector';
3
4
  export { StellarLocalStorageCache, type IStellarSessionCache, type StellarConnectedAccount, } from './StellarLocalStorageCache';
4
5
  export type { IStellarProvider, StellarConnectionResult, StellarEventCallback, StellarMethodName, StellarNetworkName, StellarProviderEvent, StellarSendBalanceProps, StellarSignTransactionOptions, StellarWalletConnectorProps, } from './types';
5
6
  export { getNetworkFromAddress } from './utils';
6
- export declare const StellarWalletConnectors: (_props?: unknown) => import("dist/packages/wallet-connector-core/src").WalletConnectorConstructor[];
7
+ export declare const StellarWalletConnectors: (_props?: unknown) => (import("dist/packages/wallet-connector-core/src").WalletConnectorConstructor | typeof DynamicWaasStellarConnector)[];
7
8
  export { DynamicWaasStellarConnector, DynamicWaasStellarConnectors, } from './connectors/DynamicWaasStellarConnector';
package/src/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use client'
2
2
  import { assertPackageVersion } from '@dynamic-labs/assert-package-version';
3
3
  import { version } from '../package.js';
4
+ export { DynamicWaasStellarConnectors } from './connectors/DynamicWaasStellarConnector/index.js';
4
5
  import { fetchInjectedWalletConnectors } from './injected/fetchInjectedWalletConnectors.js';
5
6
  export { StellarWallet } from './wallet/StellarWallet.js';
6
7
  export { isStellarWallet } from './wallet/isStellarWallet/isStellarWallet.js';
@@ -10,7 +11,7 @@ import '@stellar/stellar-sdk';
10
11
  export { getNetworkFromAddress } from './utils/getNetworkFromAddress.js';
11
12
  import '../_virtual/_tslib.js';
12
13
  import '@dynamic-labs/utils';
13
- export { DynamicWaasStellarConnectors } from './connectors/DynamicWaasStellarConnector/index.js';
14
+ import { DynamicWaasStellarConnector } from './connectors/DynamicWaasStellarConnector/DynamicWaasStellarConnector.js';
14
15
  export { DynamicWaasStellarConnector } from './connectors/DynamicWaasStellarConnector/DynamicWaasStellarConnector.js';
15
16
 
16
17
  assertPackageVersion('@dynamic-labs/stellar', version);
@@ -18,7 +19,7 @@ assertPackageVersion('@dynamic-labs/stellar', version);
18
19
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
19
20
  const StellarWalletConnectors = (_props) => [
20
21
  ...fetchInjectedWalletConnectors(),
21
- // Specific wallet connectors will be added here by implementers
22
+ DynamicWaasStellarConnector,
22
23
  ];
23
24
 
24
25
  export { StellarWalletConnectors };