@dynamic-labs-wallet/browser-wallet-client 1.0.41 → 1.0.43
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/index.cjs
CHANGED
|
@@ -715,11 +715,18 @@ class IframeManager {
|
|
|
715
715
|
* sandbox host is rebuilt (needed by the recovery flow — the transport
|
|
716
716
|
* survives the rebuild and would otherwise accumulate stale listeners).
|
|
717
717
|
*/ setupWaasSDKContainerBridge(transport, waasSDKContainer) {
|
|
718
|
-
// Forward outgoing host messages to the sandbox host
|
|
718
|
+
// Forward outgoing host messages to the sandbox host.
|
|
719
719
|
const transportListener = (message)=>{
|
|
720
|
-
if (message.origin
|
|
721
|
-
|
|
720
|
+
if (message.origin !== 'host') return;
|
|
721
|
+
// Skip (don't throw) a send to a torn-down captured container: a stale
|
|
722
|
+
// bridge from a logged-out instance would otherwise throw "iframe not
|
|
723
|
+
// loaded" uncaught. Don't reroute to the current shared container — that
|
|
724
|
+
// would leak a stale session's message into another session's iframe.
|
|
725
|
+
if (!waasSDKContainer.isAlive()) {
|
|
726
|
+
this.logger.warn('(setupWaasSDKContainerBridge) captured container not alive — skipping host→iframe send');
|
|
727
|
+
return;
|
|
722
728
|
}
|
|
729
|
+
waasSDKContainer.sendMessage(message);
|
|
723
730
|
};
|
|
724
731
|
transport.on(transportListener);
|
|
725
732
|
// Forward incoming messages from the sandbox host to the transport
|
|
@@ -806,6 +813,8 @@ class IframeManager {
|
|
|
806
813
|
// real dead-container case below falls through to the rebuild.
|
|
807
814
|
if ((_IframeManager_sharedWaasSDKContainer = IframeManager.sharedWaasSDKContainer) == null ? void 0 : _IframeManager_sharedWaasSDKContainer.isAlive()) {
|
|
808
815
|
this.logger.info('(recoverIframe) Container still alive — request-channel timeout, skipping rebuild');
|
|
816
|
+
// Ensure we're tracked before re-pointing the bridge (idempotent).
|
|
817
|
+
IframeManager.sharedContainerUsers.add(this);
|
|
809
818
|
if (this.waasSDKContainer !== IframeManager.sharedWaasSDKContainer) {
|
|
810
819
|
// A concurrent recovery already swapped in a fresh shared container. Our
|
|
811
820
|
// bridge still forwards to the old (now-dead) one, so re-point it before
|
|
@@ -824,10 +833,7 @@ class IframeManager {
|
|
|
824
833
|
// retry that we want to flush after rebuild.
|
|
825
834
|
this.cleanupBridge == null ? void 0 : this.cleanupBridge.call(this);
|
|
826
835
|
this.cleanupBridge = null;
|
|
827
|
-
|
|
828
|
-
IframeManager.sharedWaasSDKContainer.destroy();
|
|
829
|
-
IframeManager.sharedWaasSDKContainer = null;
|
|
830
|
-
}
|
|
836
|
+
IframeManager.destroySharedContainer();
|
|
831
837
|
IframeManager.iframeLoadPromise = null;
|
|
832
838
|
this.waasSDKContainer = null;
|
|
833
839
|
// Defer the rebuild + concurrency control to loadIframe(): the first
|
|
@@ -946,17 +952,16 @@ class IframeManager {
|
|
|
946
952
|
}
|
|
947
953
|
}
|
|
948
954
|
/**
|
|
949
|
-
* Reset the shared provider and iframe load promise, and
|
|
955
|
+
* Reset the shared provider and iframe load promise, and drop this instance
|
|
956
|
+
* from the shared-container user set
|
|
950
957
|
*/ resetSharedWaasSDKContainer() {
|
|
951
958
|
this.cleanupBridge == null ? void 0 : this.cleanupBridge.call(this);
|
|
952
959
|
this.cleanupBridge = null;
|
|
953
960
|
this.cleanupRecoverySubscription == null ? void 0 : this.cleanupRecoverySubscription.call(this);
|
|
954
961
|
this.cleanupRecoverySubscription = null;
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
}
|
|
959
|
-
IframeManager.iframeInstanceCount = 0;
|
|
962
|
+
IframeManager.destroySharedContainer();
|
|
963
|
+
// Drop only this failed instance; siblings stay (they re-adopt on recovery).
|
|
964
|
+
IframeManager.sharedContainerUsers.delete(this);
|
|
960
965
|
IframeManager.iframeLoadPromise = null;
|
|
961
966
|
this.waasSDKContainer = null;
|
|
962
967
|
this.iframeMessageHandler = null;
|
|
@@ -964,6 +969,25 @@ class IframeManager {
|
|
|
964
969
|
// Double the timeout to give more time for slow networks, capped at the configured maximum.
|
|
965
970
|
IframeManager.iframeLoadTimeout = Math.min(IframeManager.iframeLoadTimeout * 2, IframeManager.maxIframeLoadTimeout);
|
|
966
971
|
}
|
|
972
|
+
/** Bind to the shared container and join the user set together, so the
|
|
973
|
+
* destroy-when-empty invariant can't drift (see {@link sharedContainerUsers}). */ adoptSharedContainer() {
|
|
974
|
+
this.waasSDKContainer = IframeManager.sharedWaasSDKContainer;
|
|
975
|
+
IframeManager.sharedContainerUsers.add(this);
|
|
976
|
+
}
|
|
977
|
+
/** Destroy the (already dead/replaced) shared container. Deliberately leaves the
|
|
978
|
+
* user set intact — live users re-point to the rebuilt container on recovery. */ static destroySharedContainer() {
|
|
979
|
+
var _IframeManager_sharedWaasSDKContainer;
|
|
980
|
+
(_IframeManager_sharedWaasSDKContainer = IframeManager.sharedWaasSDKContainer) == null ? void 0 : _IframeManager_sharedWaasSDKContainer.destroy();
|
|
981
|
+
IframeManager.sharedWaasSDKContainer = null;
|
|
982
|
+
}
|
|
983
|
+
/** Release this instance; destroy the container only once no user remains, so a
|
|
984
|
+
* logout can't tear it out from under a concurrent login's eager recovery. */ releaseSharedContainer() {
|
|
985
|
+
IframeManager.sharedContainerUsers.delete(this);
|
|
986
|
+
if (IframeManager.sharedWaasSDKContainer && IframeManager.sharedContainerUsers.size === 0) {
|
|
987
|
+
IframeManager.destroySharedContainer();
|
|
988
|
+
IframeManager.iframeLoadPromise = null;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
967
991
|
async loadIframe() {
|
|
968
992
|
var _IframeManager_sharedWaasSDKContainer;
|
|
969
993
|
// If the shared container is still alive, reuse it. The alive check (not
|
|
@@ -971,24 +995,19 @@ class IframeManager {
|
|
|
971
995
|
// loadIframe again on a dead container: we fall through to the remount
|
|
972
996
|
// branch below instead of adopting the corpse.
|
|
973
997
|
if ((_IframeManager_sharedWaasSDKContainer = IframeManager.sharedWaasSDKContainer) == null ? void 0 : _IframeManager_sharedWaasSDKContainer.isAlive()) {
|
|
974
|
-
this.
|
|
975
|
-
IframeManager.iframeInstanceCount++;
|
|
998
|
+
this.adoptSharedContainer();
|
|
976
999
|
return Promise.resolve();
|
|
977
1000
|
}
|
|
978
1001
|
// If a load is in progress, wait for it, then assign
|
|
979
1002
|
if (IframeManager.iframeLoadPromise) {
|
|
980
1003
|
return IframeManager.iframeLoadPromise.then(()=>{
|
|
981
|
-
this.
|
|
982
|
-
IframeManager.iframeInstanceCount++;
|
|
1004
|
+
this.adoptSharedContainer();
|
|
983
1005
|
});
|
|
984
1006
|
}
|
|
985
1007
|
// sharedWaasSDKContainer is dead (or never existed) and no load is in
|
|
986
1008
|
// flight. Destroy the stale corpse so createWaasSDKContainerLoadPromise
|
|
987
1009
|
// mounts a fresh one.
|
|
988
|
-
|
|
989
|
-
IframeManager.sharedWaasSDKContainer.destroy();
|
|
990
|
-
IframeManager.sharedWaasSDKContainer = null;
|
|
991
|
-
}
|
|
1010
|
+
IframeManager.destroySharedContainer();
|
|
992
1011
|
const loadPromise = IframeManager.iframeLoadPromise = this.createWaasSDKContainerLoadPromise();
|
|
993
1012
|
// Clear iframeLoadPromise once the load settles so the "in flight" branch
|
|
994
1013
|
// above only fires while a load is actually pending. Otherwise it would
|
|
@@ -1061,8 +1080,7 @@ class IframeManager {
|
|
|
1061
1080
|
unsubscribeHandshake();
|
|
1062
1081
|
unsubscribeError();
|
|
1063
1082
|
IframeManager.sharedWaasSDKContainer = waasSDKContainer;
|
|
1064
|
-
this.
|
|
1065
|
-
IframeManager.iframeInstanceCount++;
|
|
1083
|
+
this.adoptSharedContainer();
|
|
1066
1084
|
IframeManager.iframeLoadAttempts = 0; // Reset retry counter on success
|
|
1067
1085
|
resolve();
|
|
1068
1086
|
this.logger.debug('Iframe loaded successfully...', this.getIframeContext());
|
|
@@ -1149,7 +1167,7 @@ class IframeManager {
|
|
|
1149
1167
|
}
|
|
1150
1168
|
clearTimeout(iframeTimeoutId);
|
|
1151
1169
|
this.iframe = iframe;
|
|
1152
|
-
|
|
1170
|
+
// display iframe is per-instance — intentionally not a sharedContainerUsers member
|
|
1153
1171
|
resolve(iframe);
|
|
1154
1172
|
var _this_sdkVersion;
|
|
1155
1173
|
this.logger.debug('Iframe loaded successfully...', {
|
|
@@ -1300,59 +1318,37 @@ class IframeManager {
|
|
|
1300
1318
|
}
|
|
1301
1319
|
}
|
|
1302
1320
|
async cleanup() {
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
//
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
// `sign-message-new-wallet` re-login flow.
|
|
1317
|
-
//
|
|
1318
|
-
// Swallow the error: we're about to remove the iframe from the DOM
|
|
1319
|
-
// (or another instance is, when iframeInstanceCount drops to 0),
|
|
1320
|
-
// which obsoletes anything the cleanup handler would have cleared.
|
|
1321
|
-
// Stale storage from a missed cleanup is cleared by the next iframe
|
|
1322
|
-
// init's __resetInitializationState anyway.
|
|
1323
|
-
try {
|
|
1324
|
-
await this.iframeMessageHandler.cleanup();
|
|
1325
|
-
} catch (error) {
|
|
1326
|
-
this.logger.warn('(cleanup) iframeMessageHandler.cleanup() failed; proceeding with DOM teardown', {
|
|
1327
|
-
error: error instanceof Error ? error.message : error
|
|
1328
|
-
});
|
|
1321
|
+
// Best-effort ACK (the iframe clears its storage), only if already
|
|
1322
|
+
// initialized. Do NOT initialize here: that mounts a fresh container just to
|
|
1323
|
+
// ACK and then tears it down, churning the shared container across
|
|
1324
|
+
// logout→relogin and starving the next login's eager recovery. May reject on
|
|
1325
|
+
// a 5s timeout — swallow it; stale storage is cleared by the next init anyway.
|
|
1326
|
+
if (this.waasSDKContainer && this.iframeMessageHandler) {
|
|
1327
|
+
try {
|
|
1328
|
+
await this.iframeMessageHandler.cleanup();
|
|
1329
|
+
} catch (error) {
|
|
1330
|
+
this.logger.warn('(cleanup) iframeMessageHandler.cleanup() failed; proceeding with DOM teardown', {
|
|
1331
|
+
error: error instanceof Error ? error.message : error
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1329
1334
|
}
|
|
1335
|
+
// Always detach bridge + recovery subscription, even if the container is gone:
|
|
1336
|
+
// a dangling subscription's retry timer can fire recovery into a torn-down
|
|
1337
|
+
// container next session ("iframe not loaded").
|
|
1338
|
+
this.cleanupBridge == null ? void 0 : this.cleanupBridge.call(this);
|
|
1339
|
+
this.cleanupBridge = null;
|
|
1340
|
+
this.cleanupRecoverySubscription == null ? void 0 : this.cleanupRecoverySubscription.call(this);
|
|
1341
|
+
this.cleanupRecoverySubscription = null;
|
|
1330
1342
|
if (this.waasSDKContainer) {
|
|
1331
|
-
|
|
1332
|
-
// Always detach THIS instance's bridge + recovery subscription, even when
|
|
1333
|
-
// other instances keep the shared container alive (multi-chain sessions
|
|
1334
|
-
// share one static container). Leaving them attached lets a logged-out
|
|
1335
|
-
// transport's retry timer fire recovery and flush a queued message into a
|
|
1336
|
-
// torn-down container on the next session — the "iframe not loaded" pageerror.
|
|
1337
|
-
this.cleanupBridge == null ? void 0 : this.cleanupBridge.call(this);
|
|
1338
|
-
this.cleanupBridge = null;
|
|
1339
|
-
this.cleanupRecoverySubscription == null ? void 0 : this.cleanupRecoverySubscription.call(this);
|
|
1340
|
-
this.cleanupRecoverySubscription = null;
|
|
1341
|
-
if (IframeManager.sharedWaasSDKContainer && IframeManager.iframeInstanceCount === 0) {
|
|
1342
|
-
IframeManager.sharedWaasSDKContainer.destroy();
|
|
1343
|
-
IframeManager.sharedWaasSDKContainer = null;
|
|
1344
|
-
IframeManager.iframeLoadPromise = null;
|
|
1345
|
-
}
|
|
1343
|
+
this.releaseSharedContainer();
|
|
1346
1344
|
this.waasSDKContainer = null;
|
|
1347
|
-
// Drop the transport + handler so the next operation re-inits and rebuilds a
|
|
1348
|
-
// fresh bridge instead of short-circuiting on initializeMessageTransport's
|
|
1349
|
-
// "already initialized" guard with a now-detached bridge.
|
|
1350
|
-
this.messageTransport = null;
|
|
1351
|
-
this.iframeMessageHandler = null;
|
|
1352
|
-
this.iframeRequestChannel = undefined;
|
|
1353
|
-
// Re-arm the unauthorized guard so a future session can trigger logout again.
|
|
1354
|
-
this.unauthorizedHandled = false;
|
|
1355
1345
|
}
|
|
1346
|
+
// Drop transport/handler so the next op re-inits a fresh bridge (not a
|
|
1347
|
+
// detached one); re-arm the unauthorized guard for a future session.
|
|
1348
|
+
this.messageTransport = null;
|
|
1349
|
+
this.iframeMessageHandler = null;
|
|
1350
|
+
this.iframeRequestChannel = undefined;
|
|
1351
|
+
this.unauthorizedHandled = false;
|
|
1356
1352
|
}
|
|
1357
1353
|
constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, chainName, sdkVersion, authMode = core.AuthMode.HEADER, authToken, debug, baseClientKeysharesRelayApiUrl, additionalTrustedOrigins, hostOrigin, iframeLoadTimeout, maxRetryAttempts, eagerlyRecoverKeyShares }, internalOptions){
|
|
1358
1354
|
this.logger = logger;
|
|
@@ -1439,7 +1435,13 @@ IframeManager.minIframeLoadTimeout = 1000;
|
|
|
1439
1435
|
IframeManager.maxIframeLoadTimeout = 60000;
|
|
1440
1436
|
IframeManager.maxAllowedRetryAttempts = 10;
|
|
1441
1437
|
IframeManager.sharedWaasSDKContainer = null;
|
|
1442
|
-
|
|
1438
|
+
/**
|
|
1439
|
+
* Instances bound to the live shared container; it's destroyed only when this
|
|
1440
|
+
* empties. A set (vs the old counter) can't drift negative — a logged-out
|
|
1441
|
+
* instance's cleanup once decremented past zero and destroyed a container the
|
|
1442
|
+
* next login still needed. Live users are carried across a rebuild (not
|
|
1443
|
+
* cleared), so the fresh container isn't torn down before they re-point to it.
|
|
1444
|
+
*/ IframeManager.sharedContainerUsers = new Set();
|
|
1443
1445
|
IframeManager.maxAdditionalTrustedOrigins = 32;
|
|
1444
1446
|
IframeManager.maxTrustedOriginStringLength = 200;
|
|
1445
1447
|
|
package/index.esm.js
CHANGED
|
@@ -714,11 +714,18 @@ class IframeManager {
|
|
|
714
714
|
* sandbox host is rebuilt (needed by the recovery flow — the transport
|
|
715
715
|
* survives the rebuild and would otherwise accumulate stale listeners).
|
|
716
716
|
*/ setupWaasSDKContainerBridge(transport, waasSDKContainer) {
|
|
717
|
-
// Forward outgoing host messages to the sandbox host
|
|
717
|
+
// Forward outgoing host messages to the sandbox host.
|
|
718
718
|
const transportListener = (message)=>{
|
|
719
|
-
if (message.origin
|
|
720
|
-
|
|
719
|
+
if (message.origin !== 'host') return;
|
|
720
|
+
// Skip (don't throw) a send to a torn-down captured container: a stale
|
|
721
|
+
// bridge from a logged-out instance would otherwise throw "iframe not
|
|
722
|
+
// loaded" uncaught. Don't reroute to the current shared container — that
|
|
723
|
+
// would leak a stale session's message into another session's iframe.
|
|
724
|
+
if (!waasSDKContainer.isAlive()) {
|
|
725
|
+
this.logger.warn('(setupWaasSDKContainerBridge) captured container not alive — skipping host→iframe send');
|
|
726
|
+
return;
|
|
721
727
|
}
|
|
728
|
+
waasSDKContainer.sendMessage(message);
|
|
722
729
|
};
|
|
723
730
|
transport.on(transportListener);
|
|
724
731
|
// Forward incoming messages from the sandbox host to the transport
|
|
@@ -805,6 +812,8 @@ class IframeManager {
|
|
|
805
812
|
// real dead-container case below falls through to the rebuild.
|
|
806
813
|
if ((_IframeManager_sharedWaasSDKContainer = IframeManager.sharedWaasSDKContainer) == null ? void 0 : _IframeManager_sharedWaasSDKContainer.isAlive()) {
|
|
807
814
|
this.logger.info('(recoverIframe) Container still alive — request-channel timeout, skipping rebuild');
|
|
815
|
+
// Ensure we're tracked before re-pointing the bridge (idempotent).
|
|
816
|
+
IframeManager.sharedContainerUsers.add(this);
|
|
808
817
|
if (this.waasSDKContainer !== IframeManager.sharedWaasSDKContainer) {
|
|
809
818
|
// A concurrent recovery already swapped in a fresh shared container. Our
|
|
810
819
|
// bridge still forwards to the old (now-dead) one, so re-point it before
|
|
@@ -823,10 +832,7 @@ class IframeManager {
|
|
|
823
832
|
// retry that we want to flush after rebuild.
|
|
824
833
|
this.cleanupBridge == null ? void 0 : this.cleanupBridge.call(this);
|
|
825
834
|
this.cleanupBridge = null;
|
|
826
|
-
|
|
827
|
-
IframeManager.sharedWaasSDKContainer.destroy();
|
|
828
|
-
IframeManager.sharedWaasSDKContainer = null;
|
|
829
|
-
}
|
|
835
|
+
IframeManager.destroySharedContainer();
|
|
830
836
|
IframeManager.iframeLoadPromise = null;
|
|
831
837
|
this.waasSDKContainer = null;
|
|
832
838
|
// Defer the rebuild + concurrency control to loadIframe(): the first
|
|
@@ -945,17 +951,16 @@ class IframeManager {
|
|
|
945
951
|
}
|
|
946
952
|
}
|
|
947
953
|
/**
|
|
948
|
-
* Reset the shared provider and iframe load promise, and
|
|
954
|
+
* Reset the shared provider and iframe load promise, and drop this instance
|
|
955
|
+
* from the shared-container user set
|
|
949
956
|
*/ resetSharedWaasSDKContainer() {
|
|
950
957
|
this.cleanupBridge == null ? void 0 : this.cleanupBridge.call(this);
|
|
951
958
|
this.cleanupBridge = null;
|
|
952
959
|
this.cleanupRecoverySubscription == null ? void 0 : this.cleanupRecoverySubscription.call(this);
|
|
953
960
|
this.cleanupRecoverySubscription = null;
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
}
|
|
958
|
-
IframeManager.iframeInstanceCount = 0;
|
|
961
|
+
IframeManager.destroySharedContainer();
|
|
962
|
+
// Drop only this failed instance; siblings stay (they re-adopt on recovery).
|
|
963
|
+
IframeManager.sharedContainerUsers.delete(this);
|
|
959
964
|
IframeManager.iframeLoadPromise = null;
|
|
960
965
|
this.waasSDKContainer = null;
|
|
961
966
|
this.iframeMessageHandler = null;
|
|
@@ -963,6 +968,25 @@ class IframeManager {
|
|
|
963
968
|
// Double the timeout to give more time for slow networks, capped at the configured maximum.
|
|
964
969
|
IframeManager.iframeLoadTimeout = Math.min(IframeManager.iframeLoadTimeout * 2, IframeManager.maxIframeLoadTimeout);
|
|
965
970
|
}
|
|
971
|
+
/** Bind to the shared container and join the user set together, so the
|
|
972
|
+
* destroy-when-empty invariant can't drift (see {@link sharedContainerUsers}). */ adoptSharedContainer() {
|
|
973
|
+
this.waasSDKContainer = IframeManager.sharedWaasSDKContainer;
|
|
974
|
+
IframeManager.sharedContainerUsers.add(this);
|
|
975
|
+
}
|
|
976
|
+
/** Destroy the (already dead/replaced) shared container. Deliberately leaves the
|
|
977
|
+
* user set intact — live users re-point to the rebuilt container on recovery. */ static destroySharedContainer() {
|
|
978
|
+
var _IframeManager_sharedWaasSDKContainer;
|
|
979
|
+
(_IframeManager_sharedWaasSDKContainer = IframeManager.sharedWaasSDKContainer) == null ? void 0 : _IframeManager_sharedWaasSDKContainer.destroy();
|
|
980
|
+
IframeManager.sharedWaasSDKContainer = null;
|
|
981
|
+
}
|
|
982
|
+
/** Release this instance; destroy the container only once no user remains, so a
|
|
983
|
+
* logout can't tear it out from under a concurrent login's eager recovery. */ releaseSharedContainer() {
|
|
984
|
+
IframeManager.sharedContainerUsers.delete(this);
|
|
985
|
+
if (IframeManager.sharedWaasSDKContainer && IframeManager.sharedContainerUsers.size === 0) {
|
|
986
|
+
IframeManager.destroySharedContainer();
|
|
987
|
+
IframeManager.iframeLoadPromise = null;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
966
990
|
async loadIframe() {
|
|
967
991
|
var _IframeManager_sharedWaasSDKContainer;
|
|
968
992
|
// If the shared container is still alive, reuse it. The alive check (not
|
|
@@ -970,24 +994,19 @@ class IframeManager {
|
|
|
970
994
|
// loadIframe again on a dead container: we fall through to the remount
|
|
971
995
|
// branch below instead of adopting the corpse.
|
|
972
996
|
if ((_IframeManager_sharedWaasSDKContainer = IframeManager.sharedWaasSDKContainer) == null ? void 0 : _IframeManager_sharedWaasSDKContainer.isAlive()) {
|
|
973
|
-
this.
|
|
974
|
-
IframeManager.iframeInstanceCount++;
|
|
997
|
+
this.adoptSharedContainer();
|
|
975
998
|
return Promise.resolve();
|
|
976
999
|
}
|
|
977
1000
|
// If a load is in progress, wait for it, then assign
|
|
978
1001
|
if (IframeManager.iframeLoadPromise) {
|
|
979
1002
|
return IframeManager.iframeLoadPromise.then(()=>{
|
|
980
|
-
this.
|
|
981
|
-
IframeManager.iframeInstanceCount++;
|
|
1003
|
+
this.adoptSharedContainer();
|
|
982
1004
|
});
|
|
983
1005
|
}
|
|
984
1006
|
// sharedWaasSDKContainer is dead (or never existed) and no load is in
|
|
985
1007
|
// flight. Destroy the stale corpse so createWaasSDKContainerLoadPromise
|
|
986
1008
|
// mounts a fresh one.
|
|
987
|
-
|
|
988
|
-
IframeManager.sharedWaasSDKContainer.destroy();
|
|
989
|
-
IframeManager.sharedWaasSDKContainer = null;
|
|
990
|
-
}
|
|
1009
|
+
IframeManager.destroySharedContainer();
|
|
991
1010
|
const loadPromise = IframeManager.iframeLoadPromise = this.createWaasSDKContainerLoadPromise();
|
|
992
1011
|
// Clear iframeLoadPromise once the load settles so the "in flight" branch
|
|
993
1012
|
// above only fires while a load is actually pending. Otherwise it would
|
|
@@ -1060,8 +1079,7 @@ class IframeManager {
|
|
|
1060
1079
|
unsubscribeHandshake();
|
|
1061
1080
|
unsubscribeError();
|
|
1062
1081
|
IframeManager.sharedWaasSDKContainer = waasSDKContainer;
|
|
1063
|
-
this.
|
|
1064
|
-
IframeManager.iframeInstanceCount++;
|
|
1082
|
+
this.adoptSharedContainer();
|
|
1065
1083
|
IframeManager.iframeLoadAttempts = 0; // Reset retry counter on success
|
|
1066
1084
|
resolve();
|
|
1067
1085
|
this.logger.debug('Iframe loaded successfully...', this.getIframeContext());
|
|
@@ -1148,7 +1166,7 @@ class IframeManager {
|
|
|
1148
1166
|
}
|
|
1149
1167
|
clearTimeout(iframeTimeoutId);
|
|
1150
1168
|
this.iframe = iframe;
|
|
1151
|
-
|
|
1169
|
+
// display iframe is per-instance — intentionally not a sharedContainerUsers member
|
|
1152
1170
|
resolve(iframe);
|
|
1153
1171
|
var _this_sdkVersion;
|
|
1154
1172
|
this.logger.debug('Iframe loaded successfully...', {
|
|
@@ -1299,59 +1317,37 @@ class IframeManager {
|
|
|
1299
1317
|
}
|
|
1300
1318
|
}
|
|
1301
1319
|
async cleanup() {
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
//
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
// `sign-message-new-wallet` re-login flow.
|
|
1316
|
-
//
|
|
1317
|
-
// Swallow the error: we're about to remove the iframe from the DOM
|
|
1318
|
-
// (or another instance is, when iframeInstanceCount drops to 0),
|
|
1319
|
-
// which obsoletes anything the cleanup handler would have cleared.
|
|
1320
|
-
// Stale storage from a missed cleanup is cleared by the next iframe
|
|
1321
|
-
// init's __resetInitializationState anyway.
|
|
1322
|
-
try {
|
|
1323
|
-
await this.iframeMessageHandler.cleanup();
|
|
1324
|
-
} catch (error) {
|
|
1325
|
-
this.logger.warn('(cleanup) iframeMessageHandler.cleanup() failed; proceeding with DOM teardown', {
|
|
1326
|
-
error: error instanceof Error ? error.message : error
|
|
1327
|
-
});
|
|
1320
|
+
// Best-effort ACK (the iframe clears its storage), only if already
|
|
1321
|
+
// initialized. Do NOT initialize here: that mounts a fresh container just to
|
|
1322
|
+
// ACK and then tears it down, churning the shared container across
|
|
1323
|
+
// logout→relogin and starving the next login's eager recovery. May reject on
|
|
1324
|
+
// a 5s timeout — swallow it; stale storage is cleared by the next init anyway.
|
|
1325
|
+
if (this.waasSDKContainer && this.iframeMessageHandler) {
|
|
1326
|
+
try {
|
|
1327
|
+
await this.iframeMessageHandler.cleanup();
|
|
1328
|
+
} catch (error) {
|
|
1329
|
+
this.logger.warn('(cleanup) iframeMessageHandler.cleanup() failed; proceeding with DOM teardown', {
|
|
1330
|
+
error: error instanceof Error ? error.message : error
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1328
1333
|
}
|
|
1334
|
+
// Always detach bridge + recovery subscription, even if the container is gone:
|
|
1335
|
+
// a dangling subscription's retry timer can fire recovery into a torn-down
|
|
1336
|
+
// container next session ("iframe not loaded").
|
|
1337
|
+
this.cleanupBridge == null ? void 0 : this.cleanupBridge.call(this);
|
|
1338
|
+
this.cleanupBridge = null;
|
|
1339
|
+
this.cleanupRecoverySubscription == null ? void 0 : this.cleanupRecoverySubscription.call(this);
|
|
1340
|
+
this.cleanupRecoverySubscription = null;
|
|
1329
1341
|
if (this.waasSDKContainer) {
|
|
1330
|
-
|
|
1331
|
-
// Always detach THIS instance's bridge + recovery subscription, even when
|
|
1332
|
-
// other instances keep the shared container alive (multi-chain sessions
|
|
1333
|
-
// share one static container). Leaving them attached lets a logged-out
|
|
1334
|
-
// transport's retry timer fire recovery and flush a queued message into a
|
|
1335
|
-
// torn-down container on the next session — the "iframe not loaded" pageerror.
|
|
1336
|
-
this.cleanupBridge == null ? void 0 : this.cleanupBridge.call(this);
|
|
1337
|
-
this.cleanupBridge = null;
|
|
1338
|
-
this.cleanupRecoverySubscription == null ? void 0 : this.cleanupRecoverySubscription.call(this);
|
|
1339
|
-
this.cleanupRecoverySubscription = null;
|
|
1340
|
-
if (IframeManager.sharedWaasSDKContainer && IframeManager.iframeInstanceCount === 0) {
|
|
1341
|
-
IframeManager.sharedWaasSDKContainer.destroy();
|
|
1342
|
-
IframeManager.sharedWaasSDKContainer = null;
|
|
1343
|
-
IframeManager.iframeLoadPromise = null;
|
|
1344
|
-
}
|
|
1342
|
+
this.releaseSharedContainer();
|
|
1345
1343
|
this.waasSDKContainer = null;
|
|
1346
|
-
// Drop the transport + handler so the next operation re-inits and rebuilds a
|
|
1347
|
-
// fresh bridge instead of short-circuiting on initializeMessageTransport's
|
|
1348
|
-
// "already initialized" guard with a now-detached bridge.
|
|
1349
|
-
this.messageTransport = null;
|
|
1350
|
-
this.iframeMessageHandler = null;
|
|
1351
|
-
this.iframeRequestChannel = undefined;
|
|
1352
|
-
// Re-arm the unauthorized guard so a future session can trigger logout again.
|
|
1353
|
-
this.unauthorizedHandled = false;
|
|
1354
1344
|
}
|
|
1345
|
+
// Drop transport/handler so the next op re-inits a fresh bridge (not a
|
|
1346
|
+
// detached one); re-arm the unauthorized guard for a future session.
|
|
1347
|
+
this.messageTransport = null;
|
|
1348
|
+
this.iframeMessageHandler = null;
|
|
1349
|
+
this.iframeRequestChannel = undefined;
|
|
1350
|
+
this.unauthorizedHandled = false;
|
|
1355
1351
|
}
|
|
1356
1352
|
constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, chainName, sdkVersion, authMode = AuthMode.HEADER, authToken, debug, baseClientKeysharesRelayApiUrl, additionalTrustedOrigins, hostOrigin, iframeLoadTimeout, maxRetryAttempts, eagerlyRecoverKeyShares }, internalOptions){
|
|
1357
1353
|
this.logger = logger;
|
|
@@ -1438,7 +1434,13 @@ IframeManager.minIframeLoadTimeout = 1000;
|
|
|
1438
1434
|
IframeManager.maxIframeLoadTimeout = 60000;
|
|
1439
1435
|
IframeManager.maxAllowedRetryAttempts = 10;
|
|
1440
1436
|
IframeManager.sharedWaasSDKContainer = null;
|
|
1441
|
-
|
|
1437
|
+
/**
|
|
1438
|
+
* Instances bound to the live shared container; it's destroyed only when this
|
|
1439
|
+
* empties. A set (vs the old counter) can't drift negative — a logged-out
|
|
1440
|
+
* instance's cleanup once decremented past zero and destroyed a container the
|
|
1441
|
+
* next login still needed. Live users are carried across a rebuild (not
|
|
1442
|
+
* cleared), so the fresh container isn't torn down before they re-point to it.
|
|
1443
|
+
*/ IframeManager.sharedContainerUsers = new Set();
|
|
1442
1444
|
IframeManager.maxAdditionalTrustedOrigins = 32;
|
|
1443
1445
|
IframeManager.maxTrustedOriginStringLength = 200;
|
|
1444
1446
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/browser-wallet-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/core": "1.0.
|
|
7
|
+
"@dynamic-labs-wallet/core": "1.0.43",
|
|
8
8
|
"@dynamic-labs/logger": "^4.81.0",
|
|
9
9
|
"@dynamic-labs/message-transport": "^4.81.0"
|
|
10
10
|
},
|
|
@@ -53,7 +53,14 @@ export declare class IframeManager {
|
|
|
53
53
|
private static readonly maxAllowedRetryAttempts;
|
|
54
54
|
baseClientKeysharesRelayApiUrl: string | undefined;
|
|
55
55
|
private static sharedWaasSDKContainer;
|
|
56
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Instances bound to the live shared container; it's destroyed only when this
|
|
58
|
+
* empties. A set (vs the old counter) can't drift negative — a logged-out
|
|
59
|
+
* instance's cleanup once decremented past zero and destroyed a container the
|
|
60
|
+
* next login still needed. Live users are carried across a rebuild (not
|
|
61
|
+
* cleared), so the fresh container isn't torn down before they re-point to it.
|
|
62
|
+
*/
|
|
63
|
+
private static readonly sharedContainerUsers;
|
|
57
64
|
sdkVersion: string | undefined;
|
|
58
65
|
/**
|
|
59
66
|
* When true, the iframe eagerly recovers all wallet key shares itself once
|
|
@@ -229,9 +236,19 @@ export declare class IframeManager {
|
|
|
229
236
|
*/
|
|
230
237
|
private initAuthToken;
|
|
231
238
|
/**
|
|
232
|
-
* Reset the shared provider and iframe load promise, and
|
|
239
|
+
* Reset the shared provider and iframe load promise, and drop this instance
|
|
240
|
+
* from the shared-container user set
|
|
233
241
|
*/
|
|
234
242
|
private resetSharedWaasSDKContainer;
|
|
243
|
+
/** Bind to the shared container and join the user set together, so the
|
|
244
|
+
* destroy-when-empty invariant can't drift (see {@link sharedContainerUsers}). */
|
|
245
|
+
private adoptSharedContainer;
|
|
246
|
+
/** Destroy the (already dead/replaced) shared container. Deliberately leaves the
|
|
247
|
+
* user set intact — live users re-point to the rebuilt container on recovery. */
|
|
248
|
+
private static destroySharedContainer;
|
|
249
|
+
/** Release this instance; destroy the container only once no user remains, so a
|
|
250
|
+
* logout can't tear it out from under a concurrent login's eager recovery. */
|
|
251
|
+
private releaseSharedContainer;
|
|
235
252
|
private loadIframe;
|
|
236
253
|
private createWaasSDKContainerLoadPromise;
|
|
237
254
|
private getIframeContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IframeManager.d.ts","sourceRoot":"","sources":["../../../src/client/iframeManager/IframeManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,sBAAsB,EAK3B,KAAK,qBAAqB,EAG1B,KAAK,oBAAoB,EAEzB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAOL,KAAK,iCAAiC,EACtC,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAuC9E,qBAAa,aAAa;IACxB,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,MAAM,wCAAU;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,aAAa,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAMhD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,gBAAgB,EAAE,iCAAiC,GAAG,IAAI,CAAQ;IAC5E,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,IAAI,CAAQ;IACnE;;oDAEgD;IAChD,OAAO,CAAC,aAAa,CAA6B;IAClD;;oDAEgD;IAChD,OAAO,CAAC,2BAA2B,CAA6B;IAChE,OAAO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