@dynamic-labs-sdk/client 1.8.1 → 1.8.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/{InvalidParamError-Btv8VGSa.native.esm.js → InvalidParamError-BqFQnYCi.native.esm.js} +23 -10
- package/dist/{InvalidParamError-Btv8VGSa.native.esm.js.map → InvalidParamError-BqFQnYCi.native.esm.js.map} +1 -1
- package/dist/{InvalidParamError-DGBih-LJ.cjs → InvalidParamError-CmwKWCyr.cjs} +24 -11
- package/dist/{InvalidParamError-DGBih-LJ.cjs.map → InvalidParamError-CmwKWCyr.cjs.map} +1 -1
- package/dist/{InvalidParamError-BKnC9rcJ.esm.js → InvalidParamError-c1J0Vmze.esm.js} +23 -10
- package/dist/{InvalidParamError-BKnC9rcJ.esm.js.map → InvalidParamError-c1J0Vmze.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-CRmyVoB3.native.esm.js → NotWaasWalletAccountError-Be0QB89x.native.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-CRmyVoB3.native.esm.js.map → NotWaasWalletAccountError-Be0QB89x.native.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-CHr72wTH.esm.js → NotWaasWalletAccountError-CgwG_c2-.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-CHr72wTH.esm.js.map → NotWaasWalletAccountError-CgwG_c2-.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-i1FozGep.cjs → NotWaasWalletAccountError-DKEpLrGc.cjs} +3 -3
- package/dist/{NotWaasWalletAccountError-i1FozGep.cjs.map → NotWaasWalletAccountError-DKEpLrGc.cjs.map} +1 -1
- package/dist/client/core/createCore/getInitialState.d.ts +1 -1
- package/dist/client/core/createCore/getInitialState.d.ts.map +1 -1
- package/dist/client/createDynamicClient/createDynamicClient.d.ts.map +1 -1
- package/dist/client/types/DynamicClient.d.ts +9 -0
- package/dist/client/types/DynamicClient.d.ts.map +1 -1
- package/dist/core.cjs +5 -5
- package/dist/core.esm.js +5 -5
- package/dist/core.native.esm.js +5 -5
- package/dist/{getNetworkProviderFromNetworkId-CRuh5pgc.esm.js → getNetworkProviderFromNetworkId-CGpE_Y95.esm.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-CRuh5pgc.esm.js.map → getNetworkProviderFromNetworkId-CGpE_Y95.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-Bm41knUq.native.esm.js → getNetworkProviderFromNetworkId-Cke-DBhx.native.esm.js} +4 -4
- package/dist/{getNetworkProviderFromNetworkId-Bm41knUq.native.esm.js.map → getNetworkProviderFromNetworkId-Cke-DBhx.native.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-BdgI7g5U.cjs → getNetworkProviderFromNetworkId-DXzopnuR.cjs} +4 -4
- package/dist/{getNetworkProviderFromNetworkId-BdgI7g5U.cjs.map → getNetworkProviderFromNetworkId-DXzopnuR.cjs.map} +1 -1
- package/dist/{getSignedSessionId-D2w_IRdt.esm.js → getSignedSessionId-C1uLkDjy.esm.js} +3 -3
- package/dist/{getSignedSessionId-D2w_IRdt.esm.js.map → getSignedSessionId-C1uLkDjy.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-S6CBWkOn.native.esm.js → getSignedSessionId-C7YR-jNH.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-S6CBWkOn.native.esm.js.map → getSignedSessionId-C7YR-jNH.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-Cwmt4BkY.cjs → getSignedSessionId-CbWFH_TM.cjs} +3 -3
- package/dist/{getSignedSessionId-Cwmt4BkY.cjs.map → getSignedSessionId-CbWFH_TM.cjs.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-D33r7Drd.native.esm.js → getVerifiedCredentialForWalletAccount-DAmdvMY5.native.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-D33r7Drd.native.esm.js.map → getVerifiedCredentialForWalletAccount-DAmdvMY5.native.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-QwfkKHfr.esm.js → getVerifiedCredentialForWalletAccount-DPTHL1pO.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-QwfkKHfr.esm.js.map → getVerifiedCredentialForWalletAccount-DPTHL1pO.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-CDuP1kaI.cjs → getVerifiedCredentialForWalletAccount-DidFNLGP.cjs} +3 -3
- package/dist/{getVerifiedCredentialForWalletAccount-CDuP1kaI.cjs.map → getVerifiedCredentialForWalletAccount-DidFNLGP.cjs.map} +1 -1
- package/dist/index.cjs +19 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +19 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +19 -7
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-z74isCQ7.cjs → isMfaRequiredForAction-BNipdNF5.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-z74isCQ7.cjs.map → isMfaRequiredForAction-BNipdNF5.cjs.map} +1 -1
- package/dist/{isMfaRequiredForAction-5p3i98-Z.esm.js → isMfaRequiredForAction-DCwLx4Ik.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-5p3i98-Z.esm.js.map → isMfaRequiredForAction-DCwLx4Ik.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-cmElIVof.native.esm.js → isMfaRequiredForAction-Dx4BPJVg.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-cmElIVof.native.esm.js.map → isMfaRequiredForAction-Dx4BPJVg.native.esm.js.map} +1 -1
- package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
- package/dist/modules/initializeClient/state.d.ts +9 -0
- package/dist/modules/initializeClient/state.d.ts.map +1 -1
- package/dist/modules/state/raiseStateEvents/events.d.ts +4 -0
- package/dist/modules/state/raiseStateEvents/events.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts +4 -0
- package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts.map +1 -1
- package/dist/utils/getNonce/state.d.ts +5 -0
- package/dist/utils/getNonce/state.d.ts.map +1 -1
- package/dist/waas.cjs +4 -4
- package/dist/waas.esm.js +3 -3
- package/dist/waas.native.esm.js +3 -3
- package/dist/waasCore.cjs +3 -3
- package/dist/waasCore.esm.js +3 -3
- package/dist/waasCore.native.esm.js +3 -3
- package/package.json +11 -4
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/android/gradlew +0 -251
- package/android/gradlew.bat +0 -94
- package/android/settings.gradle +0 -30
- package/android/src/test/java/xyz/dynamic/client/keychain/KeyStoreKeyManagerTest.kt +0 -288
- package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewClientTest.kt +0 -196
- package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewHostOpenTest.kt +0 -347
- package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewHostTest.kt +0 -171
- package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewModuleTest.kt +0 -191
- package/react-native.config.cjs +0 -14
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-
|
|
2
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
3
|
-
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-
|
|
4
|
-
const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCredentialForWalletAccount-
|
|
5
|
-
const require_NotWaasWalletAccountError = require('./NotWaasWalletAccountError-
|
|
1
|
+
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-BNipdNF5.cjs');
|
|
2
|
+
const require_InvalidParamError = require('./InvalidParamError-CmwKWCyr.cjs');
|
|
3
|
+
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-DXzopnuR.cjs');
|
|
4
|
+
const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCredentialForWalletAccount-DidFNLGP.cjs');
|
|
5
|
+
const require_NotWaasWalletAccountError = require('./NotWaasWalletAccountError-DKEpLrGc.cjs');
|
|
6
6
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
7
7
|
let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
|
|
8
8
|
let zod_mini = require("zod/mini");
|
|
@@ -19,6 +19,7 @@ let _simplewebauthn_browser = require("@simplewebauthn/browser");
|
|
|
19
19
|
* will have to come to this file and remember to add it here and in the interface.
|
|
20
20
|
*/
|
|
21
21
|
const stateChangeEvents = {
|
|
22
|
+
initError: "initErrorChanged",
|
|
22
23
|
initStatus: "initStatusChanged",
|
|
23
24
|
mfaToken: "mfaTokenChanged",
|
|
24
25
|
projectSettings: "projectSettingsChanged",
|
|
@@ -448,7 +449,10 @@ const initializeClient = async (client = require_InvalidParamError.getDefaultCli
|
|
|
448
449
|
const core = require_InvalidParamError.getCore(client);
|
|
449
450
|
core.logger.debug("[initializeClient] Initializing client. Current init status", core.state.get().initStatus);
|
|
450
451
|
if (core.state.get().initStatus !== "uninitialized") throw new ClientAlreadyInitializedError();
|
|
451
|
-
core.state.set({
|
|
452
|
+
core.state.set({
|
|
453
|
+
initError: null,
|
|
454
|
+
initStatus: "in-progress"
|
|
455
|
+
});
|
|
452
456
|
initializeAuth(client);
|
|
453
457
|
raiseStateEvents(client);
|
|
454
458
|
setupCrossTabEventSync(client);
|
|
@@ -535,7 +539,10 @@ const initializeClient = async (client = require_InvalidParamError.getDefaultCli
|
|
|
535
539
|
core.state.set({ initStatus: "finished" });
|
|
536
540
|
} catch (error) {
|
|
537
541
|
core.logger.error("Client initialization failed", error);
|
|
538
|
-
core.state.set({
|
|
542
|
+
core.state.set({
|
|
543
|
+
initError: error instanceof Error ? error : null,
|
|
544
|
+
initStatus: "failed"
|
|
545
|
+
});
|
|
539
546
|
throw error;
|
|
540
547
|
}
|
|
541
548
|
if (client.user) require_getVerifiedCredentialForWalletAccount.restoreUserSharesForAllWalletAccounts(client);
|
|
@@ -953,9 +960,11 @@ const DEFAULT_API_BASE_URL = "https://app.dynamicauth.com/api/v0";
|
|
|
953
960
|
const getInitialState = () => ({
|
|
954
961
|
captchaToken: null,
|
|
955
962
|
elevatedAccessTokens: [],
|
|
963
|
+
initError: null,
|
|
956
964
|
initStatus: "uninitialized",
|
|
957
965
|
legacyToken: null,
|
|
958
966
|
mfaToken: null,
|
|
967
|
+
nonceFetchInFlight: null,
|
|
959
968
|
prefetchedNonces: [],
|
|
960
969
|
prefetchedNoncesExpiration: null,
|
|
961
970
|
projectSettings: null,
|
|
@@ -1066,6 +1075,9 @@ const createDynamicClient = (config) => {
|
|
|
1066
1075
|
get __core() {
|
|
1067
1076
|
return core;
|
|
1068
1077
|
},
|
|
1078
|
+
get initError() {
|
|
1079
|
+
return core.state.get().initError;
|
|
1080
|
+
},
|
|
1069
1081
|
get initStatus() {
|
|
1070
1082
|
return core.state.get().initStatus;
|
|
1071
1083
|
},
|