@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.js
CHANGED
|
@@ -210,7 +210,7 @@ var NETWORKS = {
|
|
|
210
210
|
// old goggregator testnet spoke the removed v1 protocol — a v2 engine cannot
|
|
211
211
|
// run against it. 'testnet2' stays as an alias of the same configuration.
|
|
212
212
|
testnet: {
|
|
213
|
-
name: "
|
|
213
|
+
name: "Testnet",
|
|
214
214
|
networkId: 4,
|
|
215
215
|
// v2 state-transition gateway (networkId 4 comes from the trust base). apiKey is env-injected.
|
|
216
216
|
aggregatorUrl: "https://gateway.testnet2.unicity.network",
|
|
@@ -220,7 +220,7 @@ var NETWORKS = {
|
|
|
220
220
|
tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.testnet2.json"
|
|
221
221
|
},
|
|
222
222
|
testnet2: {
|
|
223
|
-
name: "
|
|
223
|
+
name: "Testnet",
|
|
224
224
|
networkId: 4,
|
|
225
225
|
// v2 state-transition gateway (networkId 4 comes from the trust base). apiKey is env-injected.
|
|
226
226
|
aggregatorUrl: "https://gateway.testnet2.unicity.network",
|
|
@@ -397,7 +397,7 @@ function checkCompatibility(input) {
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
// connect/version.ts
|
|
400
|
-
var SDK_VERSION = "0.16.0-dev.
|
|
400
|
+
var SDK_VERSION = "0.16.0-dev.2";
|
|
401
401
|
|
|
402
402
|
// connect/permissions.ts
|
|
403
403
|
var PERMISSION_SCOPES = {
|
|
@@ -848,6 +848,16 @@ var ConnectHost = class {
|
|
|
848
848
|
return;
|
|
849
849
|
}
|
|
850
850
|
if (this._walletState === "live") {
|
|
851
|
+
if (this.session?.active && (this.snapshot.networkId ?? null) !== (next.networkId ?? null)) {
|
|
852
|
+
logger.warn(
|
|
853
|
+
"ConnectHost",
|
|
854
|
+
`Network changed under a live session \u2014 revoking instead of rebinding (origin=${this.config.origin ?? "unverified"})`
|
|
855
|
+
);
|
|
856
|
+
this.sphere = next;
|
|
857
|
+
this.snapshot = buildWalletSnapshot(next);
|
|
858
|
+
this.revokeSession();
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
851
861
|
this.sphere = next;
|
|
852
862
|
this.snapshot = buildWalletSnapshot(next);
|
|
853
863
|
const existing = this.eventSubscriptions.get(WALLET_EVENTS.IDENTITY_CHANGED);
|