@unicitylabs/sphere-sdk 0.16.0-dev.1 → 0.16.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.
@@ -259,7 +259,7 @@ var NETWORKS = {
259
259
  // old goggregator testnet spoke the removed v1 protocol — a v2 engine cannot
260
260
  // run against it. 'testnet2' stays as an alias of the same configuration.
261
261
  testnet: {
262
- name: "Testnet2",
262
+ name: "Testnet",
263
263
  networkId: 4,
264
264
  // v2 state-transition gateway (networkId 4 comes from the trust base). apiKey is env-injected.
265
265
  aggregatorUrl: "https://gateway.testnet2.unicity.network",
@@ -269,7 +269,7 @@ var NETWORKS = {
269
269
  tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.testnet2.json"
270
270
  },
271
271
  testnet2: {
272
- name: "Testnet2",
272
+ name: "Testnet",
273
273
  networkId: 4,
274
274
  // v2 state-transition gateway (networkId 4 comes from the trust base). apiKey is env-injected.
275
275
  aggregatorUrl: "https://gateway.testnet2.unicity.network",
@@ -446,7 +446,7 @@ function checkCompatibility(input) {
446
446
  }
447
447
 
448
448
  // connect/version.ts
449
- var SDK_VERSION = "0.16.0-dev.1";
449
+ var SDK_VERSION = "0.16.0";
450
450
 
451
451
  // connect/permissions.ts
452
452
  var PERMISSION_SCOPES = {
@@ -897,6 +897,16 @@ var ConnectHost = class {
897
897
  return;
898
898
  }
899
899
  if (this._walletState === "live") {
900
+ if (this.session?.active && (this.snapshot.networkId ?? null) !== (next.networkId ?? null)) {
901
+ logger.warn(
902
+ "ConnectHost",
903
+ `Network changed under a live session \u2014 revoking instead of rebinding (origin=${this.config.origin ?? "unverified"})`
904
+ );
905
+ this.sphere = next;
906
+ this.snapshot = buildWalletSnapshot(next);
907
+ this.revokeSession();
908
+ return;
909
+ }
900
910
  this.sphere = next;
901
911
  this.snapshot = buildWalletSnapshot(next);
902
912
  const existing = this.eventSubscriptions.get(WALLET_EVENTS.IDENTITY_CHANGED);