@unicitylabs/sphere-sdk 0.16.0-dev.1 → 0.16.0-dev.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/dist/connect/index.cjs +13 -3
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +13 -3
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +2 -2
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +3 -3
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +3 -3
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +2 -2
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +2 -2
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/connect/index.cjs +2 -2
- package/dist/impl/nodejs/connect/index.cjs.map +1 -1
- package/dist/impl/nodejs/connect/index.js +2 -2
- package/dist/impl/nodejs/connect/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +2 -2
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +2 -2
- package/dist/impl/nodejs/index.d.ts +2 -2
- package/dist/impl/nodejs/index.js +2 -2
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -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: "
|
|
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: "
|
|
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.
|
|
449
|
+
var SDK_VERSION = "0.16.0-dev.2";
|
|
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);
|