@dynamic-labs-sdk/client 1.17.1 → 1.18.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.
- package/dist/core.cjs +7 -5
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +8 -8
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +8 -8
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/DeviceRegistrationIdentityMismatchError.d.ts +5 -0
- package/dist/errors/DeviceRegistrationIdentityMismatchError.d.ts.map +1 -0
- package/dist/errors/UnsafeDeeplinkUrlError.d.ts +17 -0
- package/dist/errors/UnsafeDeeplinkUrlError.d.ts.map +1 -0
- package/dist/errors/UnsafeNavigationUrlError.d.ts +16 -0
- package/dist/errors/UnsafeNavigationUrlError.d.ts.map +1 -0
- package/dist/errors/WalletScreeningBlockedError.d.ts +14 -0
- package/dist/errors/WalletScreeningBlockedError.d.ts.map +1 -0
- package/dist/exports/core.d.ts +4 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +5 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-Bfg-NkNJ.native.esm.js → getNetworkProviderFromNetworkId-C6DBO0OX.native.esm.js} +87 -13
- package/dist/getNetworkProviderFromNetworkId-C6DBO0OX.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-pknqqhk1.esm.js → getNetworkProviderFromNetworkId-CEs4SGW4.esm.js} +105 -22
- package/dist/getNetworkProviderFromNetworkId-CEs4SGW4.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-CS4r9hi7.cjs → getNetworkProviderFromNetworkId-CMIgKqEH.cjs} +119 -18
- package/dist/getNetworkProviderFromNetworkId-CMIgKqEH.cjs.map +1 -0
- package/dist/{getSignedSessionId-CUw7LJ35.esm.js → getSignedSessionId-CUqILBh8.esm.js} +3 -3
- package/dist/{getSignedSessionId-CUw7LJ35.esm.js.map → getSignedSessionId-CUqILBh8.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-cMGkmojJ.cjs → getSignedSessionId-De_N_Ofg.cjs} +3 -3
- package/dist/{getSignedSessionId-cMGkmojJ.cjs.map → getSignedSessionId-De_N_Ofg.cjs.map} +1 -1
- package/dist/{getSignedSessionId-Cl3PEqa8.native.esm.js → getSignedSessionId-Hp1nSbaW.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-Cl3PEqa8.native.esm.js.map → getSignedSessionId-Hp1nSbaW.native.esm.js.map} +1 -1
- package/dist/{getWalletProviderByKey-lQVfIGFi.esm.js → getWalletProviderByKey-CKORCA8l.esm.js} +2 -2
- package/dist/{getWalletProviderByKey-lQVfIGFi.esm.js.map → getWalletProviderByKey-CKORCA8l.esm.js.map} +1 -1
- package/dist/{getWalletProviderByKey-CP9Te5Sz.cjs → getWalletProviderByKey-D3e0XMjs.cjs} +2 -2
- package/dist/{getWalletProviderByKey-CP9Te5Sz.cjs.map → getWalletProviderByKey-D3e0XMjs.cjs.map} +1 -1
- package/dist/{getWalletProviderByKey-24co0tBE.native.esm.js → getWalletProviderByKey-D5M801xH.native.esm.js} +2 -2
- package/dist/{getWalletProviderByKey-24co0tBE.native.esm.js.map → getWalletProviderByKey-D5M801xH.native.esm.js.map} +1 -1
- package/dist/index.cjs +232 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +227 -75
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +227 -75
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isDynamicWaasEnabled-BwP1oowd.cjs → isDynamicWaasEnabled-BQuXZne_.cjs} +4 -6
- package/dist/isDynamicWaasEnabled-BQuXZne_.cjs.map +1 -0
- package/dist/{isDynamicWaasEnabled-BYaqAOml.esm.js → isDynamicWaasEnabled-BaY09iv6.native.esm.js} +3 -5
- package/dist/isDynamicWaasEnabled-BaY09iv6.native.esm.js.map +1 -0
- package/dist/{isDynamicWaasEnabled-BXe0VyI4.native.esm.js → isDynamicWaasEnabled-BlVIlXMZ.esm.js} +3 -5
- package/dist/isDynamicWaasEnabled-BlVIlXMZ.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-Demz9zlH.native.esm.js → isMfaRequiredForAction-CwOGwiDz.native.esm.js} +3 -5
- package/dist/isMfaRequiredForAction-CwOGwiDz.native.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-Btejc5g3.cjs → isMfaRequiredForAction-Dghiguch.cjs} +4 -6
- package/dist/{isMfaRequiredForAction-Btejc5g3.cjs.map → isMfaRequiredForAction-Dghiguch.cjs.map} +1 -1
- package/dist/{isMfaRequiredForAction-CqEcCTIe.esm.js → isMfaRequiredForAction-r9aDdmK5.esm.js} +4 -6
- package/dist/{isMfaRequiredForAction-CqEcCTIe.esm.js.map → isMfaRequiredForAction-r9aDdmK5.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-Cr-YTpcU.native.esm.js → isUserOnboardingComplete-BMNAbXk1.esm.js} +6 -3
- package/dist/isUserOnboardingComplete-BMNAbXk1.esm.js.map +1 -0
- package/dist/{isUserOnboardingComplete-CBrAH0ZF.esm.js → isUserOnboardingComplete-C-ioFLRR.native.esm.js} +6 -3
- package/dist/isUserOnboardingComplete-C-ioFLRR.native.esm.js.map +1 -0
- package/dist/{isUserOnboardingComplete-C86NDY7I.cjs → isUserOnboardingComplete-j4b_q9Pf.cjs} +7 -4
- package/dist/isUserOnboardingComplete-j4b_q9Pf.cjs.map +1 -0
- package/dist/{migrateFromFireblocks-Bbx2wHZD.esm.js → migrateFromFireblocks-D--uqWp5.esm.js} +3 -3
- package/dist/{migrateFromFireblocks-Bbx2wHZD.esm.js.map → migrateFromFireblocks-D--uqWp5.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-D-J6-gRo.native.esm.js → migrateFromFireblocks-D8Y5h0hz.native.esm.js} +3 -3
- package/dist/{migrateFromFireblocks-D-J6-gRo.native.esm.js.map → migrateFromFireblocks-D8Y5h0hz.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-B_q8Oawb.cjs → migrateFromFireblocks-D9pJIgt5.cjs} +3 -3
- package/dist/{migrateFromFireblocks-B_q8Oawb.cjs.map → migrateFromFireblocks-D9pJIgt5.cjs.map} +1 -1
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts +0 -1
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts.map +1 -1
- package/dist/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.d.ts +0 -1
- package/dist/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.d.ts.map +1 -1
- package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts +0 -1
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts +0 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts +0 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts.map +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
- package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.d.ts +14 -0
- package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.d.ts.map +1 -0
- package/dist/modules/captcha/getCaptchaSettings/index.d.ts +3 -0
- package/dist/modules/captcha/getCaptchaSettings/index.d.ts.map +1 -0
- package/dist/modules/captcha/isCaptchaRequired/isCaptchaRequired.d.ts.map +1 -1
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts +0 -1
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts.map +1 -1
- package/dist/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.d.ts.map +1 -1
- package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts +1 -0
- package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts.map +1 -1
- package/dist/modules/flow/attachFlowSource/attachFlowSource.instrumentation.d.ts +9 -0
- package/dist/modules/flow/attachFlowSource/attachFlowSource.instrumentation.d.ts.map +1 -0
- package/dist/modules/flow/broadcastFlow/broadcastFlow.instrumentation.d.ts +9 -0
- package/dist/modules/flow/broadcastFlow/broadcastFlow.instrumentation.d.ts.map +1 -0
- package/dist/modules/flow/cancelFlow/cancelFlow.instrumentation.d.ts +8 -0
- package/dist/modules/flow/cancelFlow/cancelFlow.instrumentation.d.ts.map +1 -0
- package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.instrumentation.d.ts +9 -0
- package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.instrumentation.d.ts.map +1 -0
- package/dist/modules/flow/submitFlowTransaction/submitFlowTransaction.instrumentation.d.ts +9 -0
- package/dist/modules/flow/submitFlowTransaction/submitFlowTransaction.instrumentation.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts +0 -4
- package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts.map +1 -1
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts +0 -1
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts.map +1 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts +0 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts.map +1 -1
- package/dist/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.d.ts +1 -0
- package/dist/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.d.ts.map +1 -1
- package/dist/modules/mfa/isUserMissingMfaAuth/isUserMissingMfaAuth.d.ts +1 -0
- package/dist/modules/mfa/isUserMissingMfaAuth/isUserMissingMfaAuth.d.ts.map +1 -1
- package/dist/modules/mfa/registerTotpMfaDevice/registerTotpMfaDevice.d.ts +0 -3
- package/dist/modules/mfa/registerTotpMfaDevice/registerTotpMfaDevice.d.ts.map +1 -1
- package/dist/modules/otp/sendEmailOTP/sendEmailOTP.d.ts +0 -1
- package/dist/modules/otp/sendEmailOTP/sendEmailOTP.d.ts.map +1 -1
- package/dist/modules/otp/sendSmsOTP/sendSmsOTP.d.ts +0 -1
- package/dist/modules/otp/sendSmsOTP/sendSmsOTP.d.ts.map +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts +0 -1
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts.map +1 -1
- package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts +1 -0
- package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts.map +1 -1
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts +0 -1
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts.map +1 -1
- package/dist/modules/user/updateUser/updateUser.d.ts +0 -1
- package/dist/modules/user/updateUser/updateUser.d.ts.map +1 -1
- package/dist/modules/wallets/getWalletProviderDataByKey/getWalletProviderDataByKey.d.ts +2 -1
- package/dist/modules/wallets/getWalletProviderDataByKey/getWalletProviderDataByKey.d.ts.map +1 -1
- package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts +2 -0
- package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts.map +1 -1
- package/dist/services/instrumentation/createInstrumentation/createInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts +40 -34
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentation.types.d.ts +50 -19
- package/dist/services/instrumentation/instrumentation.types.d.ts.map +1 -1
- package/dist/services/keychain/createKeychainService/createKeychainService.d.ts.map +1 -1
- package/dist/services/navigate/createNavigationHandler/createNavigationHandler.d.ts.map +1 -1
- package/dist/services/openDeeplink/createWebDeeplinkOpener/createWebDeeplinkOpener.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{updateAuthFromVerifyResponse-azIi_3FB.esm.js → updateAuthFromVerifyResponse-BQes11vz.esm.js} +145 -145
- package/dist/updateAuthFromVerifyResponse-BQes11vz.esm.js.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-CElYpi97.cjs → updateAuthFromVerifyResponse-Deg9em9o.cjs} +151 -145
- package/dist/updateAuthFromVerifyResponse-Deg9em9o.cjs.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-D1w-Aw9P.native.esm.js → updateAuthFromVerifyResponse-wVY_DoiL.native.esm.js} +145 -145
- package/dist/updateAuthFromVerifyResponse-wVY_DoiL.native.esm.js.map +1 -0
- package/dist/utils/assertSafeDeeplinkUrl/assertSafeDeeplinkUrl.d.ts +12 -0
- package/dist/utils/assertSafeDeeplinkUrl/assertSafeDeeplinkUrl.d.ts.map +1 -0
- package/dist/utils/assertSafeDeeplinkUrl/index.d.ts +2 -0
- package/dist/utils/assertSafeDeeplinkUrl/index.d.ts.map +1 -0
- package/dist/utils/assertSafeNavigationUrl/assertSafeNavigationUrl.d.ts +12 -0
- package/dist/utils/assertSafeNavigationUrl/assertSafeNavigationUrl.d.ts.map +1 -0
- package/dist/utils/assertSafeNavigationUrl/index.d.ts +2 -0
- package/dist/utils/assertSafeNavigationUrl/index.d.ts.map +1 -0
- package/dist/utils/getSecureCookieAttribute/getSecureCookieAttribute.d.ts +18 -0
- package/dist/utils/getSecureCookieAttribute/getSecureCookieAttribute.d.ts.map +1 -0
- package/dist/utils/getSecureCookieAttribute/index.d.ts +2 -0
- package/dist/utils/getSecureCookieAttribute/index.d.ts.map +1 -0
- package/dist/waas.cjs +5 -5
- package/dist/waas.esm.js +4 -4
- package/dist/waas.native.esm.js +4 -4
- package/dist/waasCore.cjs +6 -6
- package/dist/waasCore.esm.js +6 -6
- package/dist/waasCore.native.esm.js +6 -6
- package/package.json +3 -3
- package/dist/getNetworkProviderFromNetworkId-Bfg-NkNJ.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-CS4r9hi7.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-pknqqhk1.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-BXe0VyI4.native.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-BYaqAOml.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-BwP1oowd.cjs.map +0 -1
- package/dist/isMfaRequiredForAction-Demz9zlH.native.esm.js.map +0 -1
- package/dist/isUserOnboardingComplete-C86NDY7I.cjs.map +0 -1
- package/dist/isUserOnboardingComplete-CBrAH0ZF.esm.js.map +0 -1
- package/dist/isUserOnboardingComplete-Cr-YTpcU.native.esm.js.map +0 -1
- package/dist/services/instrumentation/instrumentFunction/extractParams/extractParams.d.ts +0 -28
- package/dist/services/instrumentation/instrumentFunction/extractParams/extractParams.d.ts.map +0 -1
- package/dist/services/instrumentation/instrumentFunction/scrubResolvedValue/scrubResolvedValue.d.ts +0 -15
- package/dist/services/instrumentation/instrumentFunction/scrubResolvedValue/scrubResolvedValue.d.ts.map +0 -1
- package/dist/updateAuthFromVerifyResponse-CElYpi97.cjs.map +0 -1
- package/dist/updateAuthFromVerifyResponse-D1w-Aw9P.native.esm.js.map +0 -1
- package/dist/updateAuthFromVerifyResponse-azIi_3FB.esm.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-
|
|
2
|
-
const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-
|
|
3
|
-
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-
|
|
4
|
-
const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-
|
|
5
|
-
const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-
|
|
6
|
-
const require_getWalletProviderByKey = require('./getWalletProviderByKey-
|
|
1
|
+
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-Dghiguch.cjs');
|
|
2
|
+
const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-Deg9em9o.cjs');
|
|
3
|
+
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-CMIgKqEH.cjs');
|
|
4
|
+
const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-BQuXZne_.cjs');
|
|
5
|
+
const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-j4b_q9Pf.cjs');
|
|
6
|
+
const require_getWalletProviderByKey = require('./getWalletProviderByKey-D3e0XMjs.cjs');
|
|
7
7
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
8
8
|
let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
|
|
9
9
|
let zod_mini = require("zod/mini");
|
|
@@ -751,10 +751,67 @@ const createDynamicTransport = (params) => {
|
|
|
751
751
|
const createNavigationHandler = () => {
|
|
752
752
|
if (require_getNetworkProviderFromNetworkId.isServerSideRendering()) return () => Promise.reject(new UnavailableInServerSideError("createNavigationHandler"));
|
|
753
753
|
return async (url) => {
|
|
754
|
+
require_getNetworkProviderFromNetworkId.assertSafeNavigationUrl(url);
|
|
754
755
|
window.location.href = url;
|
|
755
756
|
};
|
|
756
757
|
};
|
|
757
758
|
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region src/errors/UnsafeDeeplinkUrlError.ts
|
|
761
|
+
/**
|
|
762
|
+
* Thrown when a deeplink is opened with a URL whose scheme can execute script
|
|
763
|
+
* in the current origin (`javascript:`, `data:`, `vbscript:`). Unlike
|
|
764
|
+
* navigation, deeplinks legitimately use custom app schemes (e.g. `phantom:`,
|
|
765
|
+
* `metamask:`), so this guards via a denylist of dangerous schemes rather than
|
|
766
|
+
* an `http(s)` allowlist, preventing DOM XSS through the `window.location.assign`
|
|
767
|
+
* sink while leaving valid wallet deeplinks untouched.
|
|
768
|
+
*/
|
|
769
|
+
var UnsafeDeeplinkUrlError = class extends require_updateAuthFromVerifyResponse.BaseError {
|
|
770
|
+
constructor({ scheme }) {
|
|
771
|
+
super({
|
|
772
|
+
cause: null,
|
|
773
|
+
code: "unsafe_deeplink_url_error",
|
|
774
|
+
docsUrl: null,
|
|
775
|
+
name: "UnsafeDeeplinkUrlError",
|
|
776
|
+
shortMessage: `Refusing to open a deeplink with an unsafe scheme "${scheme}". Script-executing schemes (javascript:, data:, vbscript:) are not allowed. This may indicate a compromised or misconfigured deeplink URL.`
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region src/utils/assertSafeDeeplinkUrl/assertSafeDeeplinkUrl.ts
|
|
783
|
+
/**
|
|
784
|
+
* Schemes that can execute script in the current origin and must never reach a
|
|
785
|
+
* deeplink navigation sink. Deeplinks legitimately use arbitrary custom app
|
|
786
|
+
* schemes (e.g. `phantom:`, `metamask:`), so a denylist of dangerous schemes is
|
|
787
|
+
* used here instead of the `http(s)` allowlist applied to standard navigation.
|
|
788
|
+
*/
|
|
789
|
+
const DANGEROUS_DEEPLINK_SCHEMES = new Set([
|
|
790
|
+
"javascript:",
|
|
791
|
+
"data:",
|
|
792
|
+
"vbscript:",
|
|
793
|
+
"blob:"
|
|
794
|
+
]);
|
|
795
|
+
/**
|
|
796
|
+
* Asserts that the given deeplink URL is safe to open, i.e. its scheme is not
|
|
797
|
+
* one that can execute script (`javascript:`, `data:`, `vbscript:`, `blob:`). Used as a
|
|
798
|
+
* defense-in-depth guard on the `window.location.assign` deeplink sink to
|
|
799
|
+
* prevent DOM XSS, while still permitting custom wallet app schemes.
|
|
800
|
+
*
|
|
801
|
+
* @param url - The deeplink URL string to validate.
|
|
802
|
+
* @throws {UnsafeDeeplinkUrlError} If the URL cannot be parsed or its scheme can execute script.
|
|
803
|
+
* @notInstrumented
|
|
804
|
+
*/
|
|
805
|
+
const assertSafeDeeplinkUrl = (url) => {
|
|
806
|
+
let parsed;
|
|
807
|
+
try {
|
|
808
|
+
parsed = new URL(url);
|
|
809
|
+
} catch {
|
|
810
|
+
throw new UnsafeDeeplinkUrlError({ scheme: "unknown" });
|
|
811
|
+
}
|
|
812
|
+
if (DANGEROUS_DEEPLINK_SCHEMES.has(parsed.protocol)) throw new UnsafeDeeplinkUrlError({ scheme: parsed.protocol });
|
|
813
|
+
};
|
|
814
|
+
|
|
758
815
|
//#endregion
|
|
759
816
|
//#region src/services/openDeeplink/createWebDeeplinkOpener/createWebDeeplinkOpener.ts
|
|
760
817
|
/**
|
|
@@ -774,6 +831,7 @@ const createNavigationHandler = () => {
|
|
|
774
831
|
const createWebDeeplinkOpener = () => {
|
|
775
832
|
if (require_getNetworkProviderFromNetworkId.isServerSideRendering()) return () => Promise.reject(new UnavailableInServerSideError("createWebDeeplinkOpener"));
|
|
776
833
|
return async (url) => {
|
|
834
|
+
assertSafeDeeplinkUrl(url);
|
|
777
835
|
window.location.assign(url);
|
|
778
836
|
};
|
|
779
837
|
};
|
|
@@ -1130,6 +1188,21 @@ var DeeplinkConnectAndVerifyUnsupportedError = class extends require_updateAuthF
|
|
|
1130
1188
|
}
|
|
1131
1189
|
};
|
|
1132
1190
|
|
|
1191
|
+
//#endregion
|
|
1192
|
+
//#region src/errors/DeviceRegistrationIdentityMismatchError.ts
|
|
1193
|
+
var DeviceRegistrationIdentityMismatchError = class extends require_updateAuthFromVerifyResponse.BaseError {
|
|
1194
|
+
constructor() {
|
|
1195
|
+
super({
|
|
1196
|
+
cause: null,
|
|
1197
|
+
code: "device_registration_identity_mismatch_error",
|
|
1198
|
+
docsUrl: null,
|
|
1199
|
+
metaMessages: ["The device registration token resolved to a different user than the one currently authenticated.", "This can indicate a login-CSRF / session-fixation attempt, so the returned session was rejected and the current session was left untouched."],
|
|
1200
|
+
name: "DeviceRegistrationIdentityMismatchError",
|
|
1201
|
+
shortMessage: "Device registration completion was rejected because it would have replaced the current session with a different identity."
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1133
1206
|
//#endregion
|
|
1134
1207
|
//#region src/errors/FeeEstimationFailedError.ts
|
|
1135
1208
|
var FeeEstimationFailedError = class extends require_updateAuthFromVerifyResponse.BaseError {
|
|
@@ -1577,7 +1650,6 @@ const __checkStepUpAuth_wrapped = require_updateAuthFromVerifyResponse.instrumen
|
|
|
1577
1650
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1578
1651
|
* @returns A promise that resolves to the assertion response containing the elevated access token.
|
|
1579
1652
|
* @instrumented
|
|
1580
|
-
* @redact-params
|
|
1581
1653
|
*/
|
|
1582
1654
|
const requestExternalAuthElevatedToken = async ({ externalJwt }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
1583
1655
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -1605,8 +1677,7 @@ const __requestExternalAuthElevatedToken_wrapped = require_updateAuthFromVerifyR
|
|
|
1605
1677
|
} catch {
|
|
1606
1678
|
return;
|
|
1607
1679
|
}
|
|
1608
|
-
}
|
|
1609
|
-
redactAll: true
|
|
1680
|
+
}
|
|
1610
1681
|
});
|
|
1611
1682
|
|
|
1612
1683
|
//#endregion
|
|
@@ -1621,7 +1692,6 @@ const __requestExternalAuthElevatedToken_wrapped = require_updateAuthFromVerifyR
|
|
|
1621
1692
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1622
1693
|
* @returns A promise that resolves to the authentication response from the server.
|
|
1623
1694
|
* @instrumented
|
|
1624
|
-
* @redact-params
|
|
1625
1695
|
*/
|
|
1626
1696
|
const signInWithExternalJwt = async ({ externalJwt, sessionPublicKey } = {}, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
1627
1697
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -1645,8 +1715,7 @@ const __signInWithExternalJwt_wrapped = require_updateAuthFromVerifyResponse.ins
|
|
|
1645
1715
|
} catch {
|
|
1646
1716
|
return;
|
|
1647
1717
|
}
|
|
1648
|
-
}
|
|
1649
|
-
redactAll: true
|
|
1718
|
+
}
|
|
1650
1719
|
});
|
|
1651
1720
|
|
|
1652
1721
|
//#endregion
|
|
@@ -1758,7 +1827,6 @@ const serverRegisterPasskey = async ({ registration, createMfaToken }, client) =
|
|
|
1758
1827
|
* @returns A promise that resolves to the registration response.
|
|
1759
1828
|
* @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
|
|
1760
1829
|
* @instrumented
|
|
1761
|
-
* @redact-params
|
|
1762
1830
|
*/
|
|
1763
1831
|
const registerPasskey = async ({ createMfaToken } = {}, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
1764
1832
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -1781,8 +1849,7 @@ const __registerPasskey_wrapped = require_updateAuthFromVerifyResponse.instrumen
|
|
|
1781
1849
|
} catch {
|
|
1782
1850
|
return;
|
|
1783
1851
|
}
|
|
1784
|
-
}
|
|
1785
|
-
redactAll: true
|
|
1852
|
+
}
|
|
1786
1853
|
});
|
|
1787
1854
|
|
|
1788
1855
|
//#endregion
|
|
@@ -1827,7 +1894,6 @@ const serverSigninPasskey = async ({ authentication, createMfaToken }, client) =
|
|
|
1827
1894
|
* @returns A promise that resolves to the authentication response.
|
|
1828
1895
|
* @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
|
|
1829
1896
|
* @instrumented
|
|
1830
|
-
* @redact-params
|
|
1831
1897
|
*/
|
|
1832
1898
|
const signInWithPasskey = async ({ relatedOriginRpId } = {}, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
1833
1899
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -1847,8 +1913,7 @@ const __signInWithPasskey_wrapped = require_updateAuthFromVerifyResponse.instrum
|
|
|
1847
1913
|
} catch {
|
|
1848
1914
|
return;
|
|
1849
1915
|
}
|
|
1850
|
-
}
|
|
1851
|
-
redactAll: true
|
|
1916
|
+
}
|
|
1852
1917
|
});
|
|
1853
1918
|
|
|
1854
1919
|
//#endregion
|
|
@@ -1952,22 +2017,29 @@ const addOAuthUrlParams = ({ baseUrl, isGoogleDriveBackupEnabled, provider }) =>
|
|
|
1952
2017
|
|
|
1953
2018
|
//#endregion
|
|
1954
2019
|
//#region src/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.ts
|
|
1955
|
-
/**
|
|
2020
|
+
/**
|
|
2021
|
+
* Resolves the raw base URL string for a provider before parsing/validation.
|
|
1956
2022
|
*/
|
|
1957
|
-
const
|
|
2023
|
+
const resolveBaseUrl = (provider) => {
|
|
1958
2024
|
require_updateAuthFromVerifyResponse.assertDefined(provider.provider, "Provider type not found");
|
|
1959
2025
|
const providerType = provider.provider;
|
|
1960
2026
|
if (providerType === _dynamic_labs_sdk_api_core.ProviderEnum.Telegram) {
|
|
1961
2027
|
require_updateAuthFromVerifyResponse.assertDefined(provider.authorizationUrl, "Telegram authorization URL not found");
|
|
1962
|
-
return
|
|
2028
|
+
return provider.authorizationUrl;
|
|
1963
2029
|
}
|
|
1964
2030
|
require_updateAuthFromVerifyResponse.assertDefined(provider.baseAuthUrl, "Base auth URL not found");
|
|
1965
2031
|
if (providerType === _dynamic_labs_sdk_api_core.ProviderEnum.Shopify) {
|
|
1966
2032
|
require_updateAuthFromVerifyResponse.assertDefined(provider.shopifyStore, "Shopify store value not found in provider");
|
|
1967
|
-
|
|
1968
|
-
return new URL(loginBaseUrl);
|
|
2033
|
+
return provider.baseAuthUrl.replace("{{shopifyStore}}", provider.shopifyStore);
|
|
1969
2034
|
}
|
|
1970
|
-
return
|
|
2035
|
+
return provider.baseAuthUrl;
|
|
2036
|
+
};
|
|
2037
|
+
/** Helper function to build the OAuth base URL for a given provider. * @notInstrumented
|
|
2038
|
+
*/
|
|
2039
|
+
const getOAuthBaseUrl = (provider) => {
|
|
2040
|
+
const urlString = resolveBaseUrl(provider);
|
|
2041
|
+
require_getNetworkProviderFromNetworkId.assertSafeNavigationUrl(urlString);
|
|
2042
|
+
return new URL(urlString);
|
|
1971
2043
|
};
|
|
1972
2044
|
|
|
1973
2045
|
//#endregion
|
|
@@ -2302,7 +2374,6 @@ const getPrimaryWalletAccount = (client = require_updateAuthFromVerifyResponse.g
|
|
|
2302
2374
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2303
2375
|
* @returns A promise that resolves to the verify response.
|
|
2304
2376
|
* @instrumented
|
|
2305
|
-
* @redact-params
|
|
2306
2377
|
*/
|
|
2307
2378
|
const unlinkSocialAccount = async ({ verifiedCredentialId }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
2308
2379
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -2330,8 +2401,7 @@ const __unlinkSocialAccount_wrapped = require_updateAuthFromVerifyResponse.instr
|
|
|
2330
2401
|
} catch {
|
|
2331
2402
|
return;
|
|
2332
2403
|
}
|
|
2333
|
-
}
|
|
2334
|
-
redactAll: true
|
|
2404
|
+
}
|
|
2335
2405
|
});
|
|
2336
2406
|
|
|
2337
2407
|
//#endregion
|
|
@@ -2423,6 +2493,32 @@ const getMultichainTokenBalances = async ({ balanceRequest }, client = require_u
|
|
|
2423
2493
|
*/
|
|
2424
2494
|
const getMultichainBalances = (params, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => getMultichainTokenBalances(params, client);
|
|
2425
2495
|
|
|
2496
|
+
//#endregion
|
|
2497
|
+
//#region src/modules/captcha/getCaptchaSettings/getCaptchaSettings.ts
|
|
2498
|
+
/**
|
|
2499
|
+
* Returns the active captcha provider and site key, or undefined if captcha is not enabled.
|
|
2500
|
+
* Use this to determine which captcha widget to render and which site key to pass it.
|
|
2501
|
+
*
|
|
2502
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2503
|
+
* @notInstrumented
|
|
2504
|
+
*/
|
|
2505
|
+
const getCaptchaSettings = (client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
2506
|
+
const projectSettings = client.projectSettings;
|
|
2507
|
+
if (!projectSettings) return void 0;
|
|
2508
|
+
const { security } = projectSettings;
|
|
2509
|
+
if (security.captcha) {
|
|
2510
|
+
if (security.captcha.enabled) return {
|
|
2511
|
+
provider: security.captcha.provider ?? _dynamic_labs_sdk_api_core.CaptchaProviderEnum.Hcaptcha,
|
|
2512
|
+
siteKey: security.captcha.siteKey
|
|
2513
|
+
};
|
|
2514
|
+
return;
|
|
2515
|
+
}
|
|
2516
|
+
if (security.hCaptcha?.enabled) return {
|
|
2517
|
+
provider: _dynamic_labs_sdk_api_core.CaptchaProviderEnum.Hcaptcha,
|
|
2518
|
+
siteKey: security.hCaptcha.siteKey
|
|
2519
|
+
};
|
|
2520
|
+
};
|
|
2521
|
+
|
|
2426
2522
|
//#endregion
|
|
2427
2523
|
//#region src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts
|
|
2428
2524
|
/** @notInstrumented */
|
|
@@ -2989,7 +3085,9 @@ const DEVICE_REGISTRATION_TOKEN_HEADER = "x-dynamic-device-registration-token";
|
|
|
2989
3085
|
const completeDeviceRegistration = async ({ deviceToken }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
2990
3086
|
require_updateAuthFromVerifyResponse.assertDefined(deviceToken, "deviceToken is required");
|
|
2991
3087
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
3088
|
+
const currentUser = core.state.get().user;
|
|
2992
3089
|
const response = await require_updateAuthFromVerifyResponse.createApiClient({ headers: { [DEVICE_REGISTRATION_TOKEN_HEADER]: deviceToken } }, client).deviceRegistration({ environmentId: core.environmentId });
|
|
3090
|
+
if (currentUser && response.user?.id !== currentUser.id) throw new DeviceRegistrationIdentityMismatchError();
|
|
2993
3091
|
require_updateAuthFromVerifyResponse.updateAuthFromVerifyResponse({ response }, client);
|
|
2994
3092
|
require_updateAuthFromVerifyResponse.emitEvent({ event: "deviceRegistrationCompleted" }, client);
|
|
2995
3093
|
return response;
|
|
@@ -3170,6 +3268,22 @@ const withFlowSessionTokenCleanupOn401 = async ({ call, flowId }, client) => {
|
|
|
3170
3268
|
}
|
|
3171
3269
|
};
|
|
3172
3270
|
|
|
3271
|
+
//#endregion
|
|
3272
|
+
//#region src/modules/flow/attachFlowSource/attachFlowSource.instrumentation.ts
|
|
3273
|
+
/**
|
|
3274
|
+
* Explicit instrumentation payload for attachFlowSource. Reads the nested
|
|
3275
|
+
* `flow` and logs non-sensitive volume and routing dimensions only — never the
|
|
3276
|
+
* wallet address, and never the response's session token.
|
|
3277
|
+
*/
|
|
3278
|
+
const attachFlowSourceInstrumentation = { resolved: ({ flow }) => ({
|
|
3279
|
+
amount: flow.amount ?? null,
|
|
3280
|
+
currency: flow.currency ?? null,
|
|
3281
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3282
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3283
|
+
mode: flow.mode ?? null,
|
|
3284
|
+
sourceType: flow.sourceType ?? null
|
|
3285
|
+
}) };
|
|
3286
|
+
|
|
3173
3287
|
//#endregion
|
|
3174
3288
|
//#region src/modules/flow/attachFlowSource/attachFlowSource.ts
|
|
3175
3289
|
/**
|
|
@@ -3222,7 +3336,8 @@ const __attachFlowSource_wrapped = require_updateAuthFromVerifyResponse.instrume
|
|
|
3222
3336
|
} catch {
|
|
3223
3337
|
return;
|
|
3224
3338
|
}
|
|
3225
|
-
}
|
|
3339
|
+
},
|
|
3340
|
+
selectors: attachFlowSourceInstrumentation
|
|
3226
3341
|
});
|
|
3227
3342
|
|
|
3228
3343
|
//#endregion
|
|
@@ -3240,6 +3355,22 @@ const createFlowApiClient = async ({ flowId }, client) => {
|
|
|
3240
3355
|
};
|
|
3241
3356
|
};
|
|
3242
3357
|
|
|
3358
|
+
//#endregion
|
|
3359
|
+
//#region src/modules/flow/broadcastFlow/broadcastFlow.instrumentation.ts
|
|
3360
|
+
/**
|
|
3361
|
+
* Explicit instrumentation payload for broadcastFlow. Logs non-sensitive
|
|
3362
|
+
* volume and routing dimensions only — never the wallet address or any
|
|
3363
|
+
* session token — so we can understand volume moved through the flow product.
|
|
3364
|
+
*/
|
|
3365
|
+
const broadcastFlowInstrumentation = { resolved: (flow) => ({
|
|
3366
|
+
amount: flow.amount ?? null,
|
|
3367
|
+
currency: flow.currency ?? null,
|
|
3368
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3369
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3370
|
+
mode: flow.mode ?? null,
|
|
3371
|
+
sourceType: flow.sourceType ?? null
|
|
3372
|
+
}) };
|
|
3373
|
+
|
|
3243
3374
|
//#endregion
|
|
3244
3375
|
//#region src/modules/flow/broadcastFlow/broadcastFlow.ts
|
|
3245
3376
|
/**
|
|
@@ -3276,9 +3407,25 @@ const __broadcastFlow_wrapped = require_updateAuthFromVerifyResponse.instrumentF
|
|
|
3276
3407
|
} catch {
|
|
3277
3408
|
return;
|
|
3278
3409
|
}
|
|
3279
|
-
}
|
|
3410
|
+
},
|
|
3411
|
+
selectors: broadcastFlowInstrumentation
|
|
3280
3412
|
});
|
|
3281
3413
|
|
|
3414
|
+
//#endregion
|
|
3415
|
+
//#region src/modules/flow/cancelFlow/cancelFlow.instrumentation.ts
|
|
3416
|
+
/**
|
|
3417
|
+
* Explicit instrumentation payload for cancelFlow. Logs non-sensitive volume
|
|
3418
|
+
* and routing dimensions only — never the wallet address or any session token.
|
|
3419
|
+
*/
|
|
3420
|
+
const cancelFlowInstrumentation = { resolved: (flow) => ({
|
|
3421
|
+
amount: flow.amount ?? null,
|
|
3422
|
+
currency: flow.currency ?? null,
|
|
3423
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3424
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3425
|
+
mode: flow.mode ?? null,
|
|
3426
|
+
sourceType: flow.sourceType ?? null
|
|
3427
|
+
}) };
|
|
3428
|
+
|
|
3282
3429
|
//#endregion
|
|
3283
3430
|
//#region src/modules/flow/cancelFlow/cancelFlow.ts
|
|
3284
3431
|
/**
|
|
@@ -3312,7 +3459,8 @@ const __cancelFlow_wrapped = require_updateAuthFromVerifyResponse.instrumentFunc
|
|
|
3312
3459
|
} catch {
|
|
3313
3460
|
return;
|
|
3314
3461
|
}
|
|
3315
|
-
}
|
|
3462
|
+
},
|
|
3463
|
+
selectors: cancelFlowInstrumentation
|
|
3316
3464
|
});
|
|
3317
3465
|
|
|
3318
3466
|
//#endregion
|
|
@@ -3360,6 +3508,22 @@ const getFlowQuote = async ({ flowId, fromChainId, fromTokenAddress, slippage },
|
|
|
3360
3508
|
}, client);
|
|
3361
3509
|
};
|
|
3362
3510
|
|
|
3511
|
+
//#endregion
|
|
3512
|
+
//#region src/modules/flow/prepareFlowSigning/prepareFlowSigning.instrumentation.ts
|
|
3513
|
+
/**
|
|
3514
|
+
* Explicit instrumentation payload for prepareFlowSigning. Logs non-sensitive
|
|
3515
|
+
* volume and routing dimensions only — never the wallet address or any
|
|
3516
|
+
* session token.
|
|
3517
|
+
*/
|
|
3518
|
+
const prepareFlowSigningInstrumentation = { resolved: (flow) => ({
|
|
3519
|
+
amount: flow.amount ?? null,
|
|
3520
|
+
currency: flow.currency ?? null,
|
|
3521
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3522
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3523
|
+
mode: flow.mode ?? null,
|
|
3524
|
+
sourceType: flow.sourceType ?? null
|
|
3525
|
+
}) };
|
|
3526
|
+
|
|
3363
3527
|
//#endregion
|
|
3364
3528
|
//#region src/modules/flow/prepareFlowSigning/prepareFlowSigning.ts
|
|
3365
3529
|
/**
|
|
@@ -3397,9 +3561,26 @@ const __prepareFlowSigning_wrapped = require_updateAuthFromVerifyResponse.instru
|
|
|
3397
3561
|
} catch {
|
|
3398
3562
|
return;
|
|
3399
3563
|
}
|
|
3400
|
-
}
|
|
3564
|
+
},
|
|
3565
|
+
selectors: prepareFlowSigningInstrumentation
|
|
3401
3566
|
});
|
|
3402
3567
|
|
|
3568
|
+
//#endregion
|
|
3569
|
+
//#region src/modules/flow/submitFlowTransaction/submitFlowTransaction.instrumentation.ts
|
|
3570
|
+
/**
|
|
3571
|
+
* Explicit instrumentation payload for submitFlowTransaction. Logs
|
|
3572
|
+
* non-sensitive volume and routing dimensions only — never the wallet address
|
|
3573
|
+
* or any session token — so executed flow volume is measurable.
|
|
3574
|
+
*/
|
|
3575
|
+
const submitFlowTransactionInstrumentation = { resolved: (flow) => ({
|
|
3576
|
+
amount: flow.amount ?? null,
|
|
3577
|
+
currency: flow.currency ?? null,
|
|
3578
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3579
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3580
|
+
mode: flow.mode ?? null,
|
|
3581
|
+
sourceType: flow.sourceType ?? null
|
|
3582
|
+
}) };
|
|
3583
|
+
|
|
3403
3584
|
//#endregion
|
|
3404
3585
|
//#region src/modules/flow/submitFlowTransaction/submitFlowTransaction.ts
|
|
3405
3586
|
/**
|
|
@@ -3443,7 +3624,8 @@ const __submitFlowTransaction_wrapped = require_updateAuthFromVerifyResponse.ins
|
|
|
3443
3624
|
} catch {
|
|
3444
3625
|
return;
|
|
3445
3626
|
}
|
|
3446
|
-
}
|
|
3627
|
+
},
|
|
3628
|
+
selectors: submitFlowTransactionInstrumentation
|
|
3447
3629
|
});
|
|
3448
3630
|
|
|
3449
3631
|
//#endregion
|
|
@@ -3675,18 +3857,6 @@ const createKrakenExchangeTransfer = async (transferParams, client = require_upd
|
|
|
3675
3857
|
exchangeKey: _dynamic_labs_sdk_api_core.ExchangeKeyEnum.Kraken
|
|
3676
3858
|
});
|
|
3677
3859
|
};
|
|
3678
|
-
const __createKrakenExchangeTransfer_impl = createKrakenExchangeTransfer;
|
|
3679
|
-
const __createKrakenExchangeTransfer_wrapped = require_updateAuthFromVerifyResponse.instrumentFunction({
|
|
3680
|
-
fn: __createKrakenExchangeTransfer_impl,
|
|
3681
|
-
functionName: "createKrakenExchangeTransfer",
|
|
3682
|
-
getCore: () => {
|
|
3683
|
-
try {
|
|
3684
|
-
return require_updateAuthFromVerifyResponse.getCore(require_updateAuthFromVerifyResponse.getDefaultClient());
|
|
3685
|
-
} catch {
|
|
3686
|
-
return;
|
|
3687
|
-
}
|
|
3688
|
-
}
|
|
3689
|
-
});
|
|
3690
3860
|
|
|
3691
3861
|
//#endregion
|
|
3692
3862
|
//#region src/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.ts
|
|
@@ -3798,10 +3968,6 @@ var MoonPayProviderNotAvailableError = class extends require_updateAuthFromVerif
|
|
|
3798
3968
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3799
3969
|
* @returns The signed MoonPay URL.
|
|
3800
3970
|
* @instrumented
|
|
3801
|
-
* @redact-params - the return is a bare signed onramp URL whose query string
|
|
3802
|
-
* carries the provider signature plus the user's wallet address; a bare-string
|
|
3803
|
-
* return is logged under the synthetic `result` key, which no key-based rule
|
|
3804
|
-
* covers, so redact the whole event.
|
|
3805
3971
|
*/
|
|
3806
3972
|
const getMoonPayUrl = async (params, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
3807
3973
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -3835,8 +4001,7 @@ const __getMoonPayUrl_wrapped = require_updateAuthFromVerifyResponse.instrumentF
|
|
|
3835
4001
|
} catch {
|
|
3836
4002
|
return;
|
|
3837
4003
|
}
|
|
3838
|
-
}
|
|
3839
|
-
redactAll: true
|
|
4004
|
+
}
|
|
3840
4005
|
});
|
|
3841
4006
|
|
|
3842
4007
|
//#endregion
|
|
@@ -4420,7 +4585,6 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
4420
4585
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4421
4586
|
* @returns A promise that resolves to OTP verification details if verification is required, or undefined.
|
|
4422
4587
|
* @instrumented
|
|
4423
|
-
* @redact-params
|
|
4424
4588
|
*/
|
|
4425
4589
|
const updateUser = async ({ userFields }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
4426
4590
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -4450,8 +4614,7 @@ const __updateUser_wrapped = require_updateAuthFromVerifyResponse.instrumentFunc
|
|
|
4450
4614
|
} catch {
|
|
4451
4615
|
return;
|
|
4452
4616
|
}
|
|
4453
|
-
}
|
|
4454
|
-
redactAll: true
|
|
4617
|
+
}
|
|
4455
4618
|
});
|
|
4456
4619
|
|
|
4457
4620
|
//#endregion
|
|
@@ -4665,7 +4828,6 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
4665
4828
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4666
4829
|
* @returns A promise that resolves to the newly generated recovery codes.
|
|
4667
4830
|
* @instrumented
|
|
4668
|
-
* @redact-params
|
|
4669
4831
|
*/
|
|
4670
4832
|
const createNewMfaRecoveryCodes = async (client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
4671
4833
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -4681,8 +4843,7 @@ const __createNewMfaRecoveryCodes_wrapped = require_updateAuthFromVerifyResponse
|
|
|
4681
4843
|
} catch {
|
|
4682
4844
|
return;
|
|
4683
4845
|
}
|
|
4684
|
-
}
|
|
4685
|
-
redactAll: true
|
|
4846
|
+
}
|
|
4686
4847
|
});
|
|
4687
4848
|
|
|
4688
4849
|
//#endregion
|
|
@@ -4776,9 +4937,6 @@ const getMfaRecoveryCodes = async (client = require_updateAuthFromVerifyResponse
|
|
|
4776
4937
|
* @returns A promise that resolves to the TOTP registration response containing setup information,
|
|
4777
4938
|
* like the secret key and the OTP Auth URI.
|
|
4778
4939
|
* @instrumented
|
|
4779
|
-
* @redact-params - the response embeds the TOTP shared secret in both `secret`
|
|
4780
|
-
* and the `uri` (`otpauth://...?secret=...`); redact the whole event so the
|
|
4781
|
-
* seed never reaches logs via the un-keyed `uri` field.
|
|
4782
4940
|
*/
|
|
4783
4941
|
const registerTotpMfaDevice = async (client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
4784
4942
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -4794,8 +4952,7 @@ const __registerTotpMfaDevice_wrapped = require_updateAuthFromVerifyResponse.ins
|
|
|
4794
4952
|
} catch {
|
|
4795
4953
|
return;
|
|
4796
4954
|
}
|
|
4797
|
-
}
|
|
4798
|
-
redactAll: true
|
|
4955
|
+
}
|
|
4799
4956
|
});
|
|
4800
4957
|
|
|
4801
4958
|
//#endregion
|
|
@@ -4844,7 +5001,6 @@ const __setDefaultMfaDevice_wrapped = require_updateAuthFromVerifyResponse.instr
|
|
|
4844
5001
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4845
5002
|
* @returns A promise that resolves to an OTPVerification object containing the email and verification UUID.
|
|
4846
5003
|
* @instrumented
|
|
4847
|
-
* @redact-params
|
|
4848
5004
|
*/
|
|
4849
5005
|
const sendEmailOTP = async ({ email }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
4850
5006
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -4872,8 +5028,7 @@ const __sendEmailOTP_wrapped = require_updateAuthFromVerifyResponse.instrumentFu
|
|
|
4872
5028
|
} catch {
|
|
4873
5029
|
return;
|
|
4874
5030
|
}
|
|
4875
|
-
}
|
|
4876
|
-
redactAll: true
|
|
5031
|
+
}
|
|
4877
5032
|
});
|
|
4878
5033
|
|
|
4879
5034
|
//#endregion
|
|
@@ -5807,7 +5962,6 @@ const supportedCountries = {
|
|
|
5807
5962
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5808
5963
|
* @returns A promise that resolves to an OTPVerification object containing the phone details and verification UUID.
|
|
5809
5964
|
* @instrumented
|
|
5810
|
-
* @redact-params
|
|
5811
5965
|
*/
|
|
5812
5966
|
const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
5813
5967
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
@@ -5840,8 +5994,7 @@ const __sendSmsOTP_wrapped = require_updateAuthFromVerifyResponse.instrumentFunc
|
|
|
5840
5994
|
} catch {
|
|
5841
5995
|
return;
|
|
5842
5996
|
}
|
|
5843
|
-
}
|
|
5844
|
-
redactAll: true
|
|
5997
|
+
}
|
|
5845
5998
|
});
|
|
5846
5999
|
|
|
5847
6000
|
//#endregion
|
|
@@ -5898,7 +6051,6 @@ const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requ
|
|
|
5898
6051
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5899
6052
|
* @returns A promise that resolves to the verify response object upon successful verification.
|
|
5900
6053
|
* @instrumented
|
|
5901
|
-
* @redact-params
|
|
5902
6054
|
*/
|
|
5903
6055
|
const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
5904
6056
|
require_isUserOnboardingComplete.preconnectWaasIframe(client);
|
|
@@ -5925,8 +6077,7 @@ const __verifyOTP_wrapped = require_updateAuthFromVerifyResponse.instrumentFunct
|
|
|
5925
6077
|
} catch {
|
|
5926
6078
|
return;
|
|
5927
6079
|
}
|
|
5928
|
-
}
|
|
5929
|
-
redactAll: true
|
|
6080
|
+
}
|
|
5930
6081
|
});
|
|
5931
6082
|
|
|
5932
6083
|
//#endregion
|
|
@@ -7756,6 +7907,7 @@ const getWalletAccountAddressByType = ({ type, walletAccount }) => {
|
|
|
7756
7907
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7757
7908
|
* @returns The data for the wallet provider.
|
|
7758
7909
|
* @notInstrumented
|
|
7910
|
+
* @hook Exposed as a hook so consumers get reactive wallet provider data, updated when the wallet provider registry changes.
|
|
7759
7911
|
*/
|
|
7760
7912
|
const getWalletProviderDataByKey = ({ walletProviderKey }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
7761
7913
|
const { chain, groupKey, key, metadata, walletProviderType } = require_getWalletProviderByKey.getWalletProviderByKey({ walletProviderKey }, client);
|
|
@@ -8415,9 +8567,16 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
8415
8567
|
|
|
8416
8568
|
//#endregion
|
|
8417
8569
|
exports.BaseError = require_updateAuthFromVerifyResponse.BaseError;
|
|
8570
|
+
Object.defineProperty(exports, 'CaptchaProviderEnum', {
|
|
8571
|
+
enumerable: true,
|
|
8572
|
+
get: function () {
|
|
8573
|
+
return _dynamic_labs_sdk_api_core.CaptchaProviderEnum;
|
|
8574
|
+
}
|
|
8575
|
+
});
|
|
8418
8576
|
exports.CheckoutSessionTokenMissingError = CheckoutSessionTokenMissingError;
|
|
8419
8577
|
exports.ClientAlreadyInitializedError = ClientAlreadyInitializedError;
|
|
8420
8578
|
exports.DeeplinkConnectAndVerifyUnsupportedError = DeeplinkConnectAndVerifyUnsupportedError;
|
|
8579
|
+
exports.DeviceRegistrationIdentityMismatchError = DeviceRegistrationIdentityMismatchError;
|
|
8421
8580
|
exports.FeeEstimationFailedError = FeeEstimationFailedError;
|
|
8422
8581
|
exports.FlowSessionTokenMissingError = FlowSessionTokenMissingError;
|
|
8423
8582
|
exports.GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES = GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES;
|
|
@@ -8479,6 +8638,7 @@ exports.WalletAccountAlreadyVerifiedError = WalletAccountAlreadyVerifiedError;
|
|
|
8479
8638
|
exports.WalletAccountNotSelectedError = WalletAccountNotSelectedError;
|
|
8480
8639
|
exports.WalletAlreadyLinkedToAnotherUserError = require_getNetworkProviderFromNetworkId.WalletAlreadyLinkedToAnotherUserError;
|
|
8481
8640
|
exports.WalletProviderMethodUnavailableError = WalletProviderMethodUnavailableError;
|
|
8641
|
+
exports.WalletScreeningBlockedError = require_getNetworkProviderFromNetworkId.WalletScreeningBlockedError;
|
|
8482
8642
|
exports.acknowledgeRecoveryCodes = __acknowledgeRecoveryCodes_wrapped;
|
|
8483
8643
|
exports.addCoinbaseOnrampOrderEventListener = addCoinbaseOnrampOrderEventListener;
|
|
8484
8644
|
exports.addNetwork = __addNetwork_wrapped;
|
|
@@ -8508,7 +8668,7 @@ exports.createCheckoutTransaction = __createCheckoutTransaction_wrapped;
|
|
|
8508
8668
|
exports.createCoinbaseOnrampOrder = __createCoinbaseOnrampOrder_wrapped;
|
|
8509
8669
|
exports.createCryptoDotComPayment = __createCryptoDotComPayment_wrapped;
|
|
8510
8670
|
exports.createDynamicClient = __createDynamicClient_wrapped;
|
|
8511
|
-
exports.createKrakenExchangeTransfer =
|
|
8671
|
+
exports.createKrakenExchangeTransfer = createKrakenExchangeTransfer;
|
|
8512
8672
|
exports.createNewMfaRecoveryCodes = __createNewMfaRecoveryCodes_wrapped;
|
|
8513
8673
|
exports.deleteMfaDevice = __deleteMfaDevice_wrapped;
|
|
8514
8674
|
exports.deletePasskey = __deletePasskey_wrapped;
|
|
@@ -8526,6 +8686,7 @@ exports.getAvailableWalletProvidersData = getAvailableWalletProvidersData;
|
|
|
8526
8686
|
exports.getBalance = getBalance;
|
|
8527
8687
|
exports.getBalanceForAddress = getBalanceForAddress;
|
|
8528
8688
|
exports.getBalances = getBalances;
|
|
8689
|
+
exports.getCaptchaSettings = getCaptchaSettings;
|
|
8529
8690
|
exports.getCheckoutTransaction = getCheckoutTransaction;
|
|
8530
8691
|
exports.getCheckoutTransactionQuote = getCheckoutTransactionQuote;
|
|
8531
8692
|
exports.getCoinbaseBuyUrl = getCoinbaseBuyUrl;
|