@dynamic-labs-sdk/client 0.24.1 → 0.25.1
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/android/build.gradle +71 -0
- package/android/src/main/java/xyz/dynamic/client/DynamicClientPackage.kt +42 -0
- package/android/src/main/java/xyz/dynamic/client/keychain/KeyStoreKeyManager.kt +147 -0
- package/android/src/main/java/xyz/dynamic/client/keychain/KeychainModule.kt +85 -0
- package/android/src/main/java/xyz/dynamic/client/manifest/ReactNativeManifestModule.kt +25 -0
- package/dist/InvalidParamError-BDHw6nr1.native.esm.js +1178 -0
- package/dist/InvalidParamError-BDHw6nr1.native.esm.js.map +1 -0
- package/dist/{InvalidParamError-9IR2C0up.cjs.js → InvalidParamError-BqDEZ6er.cjs.js} +5 -5
- package/dist/InvalidParamError-BqDEZ6er.cjs.js.map +1 -0
- package/dist/{InvalidParamError-Bq5zAFj4.esm.js → InvalidParamError-DcN56mC-.esm.js} +4 -4
- package/dist/InvalidParamError-DcN56mC-.esm.js.map +1 -0
- package/dist/NotWaasWalletAccountError-B_TYSgak.native.esm.js +50 -0
- package/dist/NotWaasWalletAccountError-B_TYSgak.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-CIJRq-EG.esm.js → NotWaasWalletAccountError-CQ7CMol4.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-CIJRq-EG.esm.js.map → NotWaasWalletAccountError-CQ7CMol4.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-DpRIY6Pd.cjs.js → NotWaasWalletAccountError-ftYfHk_N.cjs.js} +3 -3
- package/dist/{NotWaasWalletAccountError-DpRIY6Pd.cjs.js.map → NotWaasWalletAccountError-ftYfHk_N.cjs.js.map} +1 -1
- package/dist/client/core/createCore/createCore.d.ts.map +1 -1
- package/dist/client/core/types/DynamicCore.d.ts +4 -0
- package/dist/client/core/types/DynamicCore.d.ts.map +1 -1
- package/dist/client/types/DynamicClientConfig.d.ts +10 -0
- package/dist/client/types/DynamicClientConfig.d.ts.map +1 -1
- package/dist/core.cjs.js +36 -6
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.esm.js +34 -6
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +417 -0
- package/dist/core.native.esm.js.map +1 -0
- package/dist/errors/APIError/APIError.d.ts.map +1 -1
- package/dist/errors/InvalidParamError.d.ts.map +1 -1
- package/dist/errors/InvalidStorageValue.d.ts.map +1 -1
- package/dist/errors/InvalidWalletProviderKeyError.d.ts.map +1 -1
- package/dist/errors/MethodNotImplementedError.d.ts.map +1 -1
- package/dist/errors/MissingSocialUrlParamError.d.ts.map +1 -1
- package/dist/errors/NativeModuleNotLinkedError.d.ts +9 -0
- package/dist/errors/NativeModuleNotLinkedError.d.ts.map +1 -0
- package/dist/errors/NoSmartWalletAccountSignerFoundError.d.ts.map +1 -1
- package/dist/errors/ReactNativeOnlyError.d.ts +9 -0
- package/dist/errors/ReactNativeOnlyError.d.ts.map +1 -0
- package/dist/errors/UnavailableInServerSideError.d.ts.map +1 -1
- package/dist/errors/ValueMustBeDefinedError.d.ts.map +1 -1
- package/dist/errors/WalletAccountAlreadyVerifiedError.d.ts.map +1 -1
- package/dist/exports/core.d.ts +8 -2
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +4 -4
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/getNetworkProviderFromNetworkId-BRWuk0I8.native.esm.js +1557 -0
- package/dist/getNetworkProviderFromNetworkId-BRWuk0I8.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-C4aba1hS.esm.js → getNetworkProviderFromNetworkId-COHxfpo-.esm.js} +275 -48
- package/dist/getNetworkProviderFromNetworkId-COHxfpo-.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-COxYamJy.cjs.js → getNetworkProviderFromNetworkId-ClfETwqS.cjs.js} +304 -53
- package/dist/getNetworkProviderFromNetworkId-ClfETwqS.cjs.js.map +1 -0
- package/dist/{getSignedSessionId-_vjv5TNw.esm.js → getSignedSessionId-B6ry-rvs.esm.js} +3 -3
- package/dist/{getSignedSessionId-_vjv5TNw.esm.js.map → getSignedSessionId-B6ry-rvs.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-D7uV3dw0.cjs.js → getSignedSessionId-Bkw9TATj.cjs.js} +3 -3
- package/dist/{getSignedSessionId-D7uV3dw0.cjs.js.map → getSignedSessionId-Bkw9TATj.cjs.js.map} +1 -1
- package/dist/getSignedSessionId-C58DvQAd.native.esm.js +67 -0
- package/dist/getSignedSessionId-C58DvQAd.native.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-Df_wN20i.cjs.js → getVerifiedCredentialForWalletAccount-DEiU9FZG.cjs.js} +11 -10
- package/dist/getVerifiedCredentialForWalletAccount-DEiU9FZG.cjs.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-Y-aJ2rY7.esm.js → getVerifiedCredentialForWalletAccount-DP4VQBly.esm.js} +10 -9
- package/dist/getVerifiedCredentialForWalletAccount-DP4VQBly.esm.js.map +1 -0
- package/dist/getVerifiedCredentialForWalletAccount-d_bHvLLE.native.esm.js +784 -0
- package/dist/getVerifiedCredentialForWalletAccount-d_bHvLLE.native.esm.js.map +1 -0
- package/dist/index.cjs.js +143 -320
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +139 -316
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +6799 -0
- package/dist/index.native.esm.js.map +1 -0
- package/dist/isMfaRequiredForAction-Cjbuyen3.native.esm.js +89 -0
- package/dist/isMfaRequiredForAction-Cjbuyen3.native.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-Cc6jkbY5.esm.js → isMfaRequiredForAction-D8GPFYzv.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-Cc6jkbY5.esm.js.map → isMfaRequiredForAction-D8GPFYzv.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-cfGmMd_g.cjs.js → isMfaRequiredForAction-mZub0YwI.cjs.js} +2 -2
- package/dist/{isMfaRequiredForAction-cfGmMd_g.cjs.js.map → isMfaRequiredForAction-mZub0YwI.cjs.js.map} +1 -1
- package/dist/modules/auth/decodeJwt/decodeJwt.d.ts.map +1 -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/extractSessionId/extractSessionId.d.ts.map +1 -1
- package/dist/modules/auth/initializeAuth/initializeAuth.d.ts +1 -1
- package/dist/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.d.ts +8 -2
- package/dist/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.d.ts.map +1 -1
- package/dist/modules/auth/logout/logout.d.ts +1 -1
- package/dist/modules/auth/logout/logout.d.ts.map +1 -1
- package/dist/modules/auth/logoutReason.d.ts +4 -7
- package/dist/modules/auth/logoutReason.d.ts.map +1 -1
- package/dist/modules/auth/logoutWithReason/index.d.ts +2 -0
- package/dist/modules/auth/logoutWithReason/index.d.ts.map +1 -0
- package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts +24 -0
- package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.d.ts +7 -4
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/buildOAuthUrl.d.ts.map +1 -1
- package/dist/modules/auth/social/removeDynamicOauthParamsFromUrl/removeDynamicOauthParamsFromUrl.d.ts.map +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/normalizeScopes.d.ts.map +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.d.ts +6 -4
- package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.d.ts.map +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
- package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts +34 -6
- package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts.map +1 -1
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts +11 -3
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/checkout.types.d.ts +1 -0
- package/dist/modules/checkout/checkout.types.d.ts.map +1 -1
- package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts +7 -3
- package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.d.ts.map +1 -1
- package/dist/modules/checkout/utils/subscribeToCheckoutTransaction/subscribeToCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
- package/dist/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.d.ts +6 -2
- package/dist/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.d.ts.map +1 -1
- package/dist/modules/keychainMigration/migrateSessionKeyToKeychain/KeyMigrationError.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts +9 -5
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.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/storageSync/schema.d.ts.map +1 -1
- package/dist/modules/user/deleteUser/deleteUser.d.ts +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/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
- package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
- package/dist/modules/waas/getWaasChainNameFromChain/getWaasChainNameFromChain.d.ts.map +1 -1
- package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getSdkChainFromApiChainName/getSdkChainFromApiChainName.d.ts.map +1 -1
- package/dist/modules/wallets/utils/assertWalletProviderMethodDefined/assertWalletProviderMethodDefined.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getAllProvidersFromWindow/getAllProvidersFromWindow.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getInjectedProviderFromWindow/getInjectedProviderFromWindow.d.ts.map +1 -1
- package/dist/modules/wallets/utils/isSameAddress/isSameAddress.d.ts +9 -1
- package/dist/modules/wallets/utils/isSameAddress/isSameAddress.d.ts.map +1 -1
- package/dist/modules/wallets/utils/normalizeAddress/normalizeAddress.d.ts +7 -1
- package/dist/modules/wallets/utils/normalizeAddress/normalizeAddress.d.ts.map +1 -1
- package/dist/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/splitWalletProviderKey/splitWalletProviderKey.d.ts.map +1 -1
- package/dist/services/instrumentation/createInstrumentation/createInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentFunction/extractParams/extractParams.d.ts.map +1 -1
- package/dist/services/keychain/createKeychainService/ImportKeyNotSupportedError.d.ts +5 -0
- package/dist/services/keychain/createKeychainService/ImportKeyNotSupportedError.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/KeyNotFoundError.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/createKeychainService.d.ts +4 -0
- package/dist/services/keychain/createKeychainService/createKeychainService.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/createKeychainService.types.d.ts +11 -0
- package/dist/services/keychain/createKeychainService/createKeychainService.types.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/index.d.ts +2 -0
- package/dist/services/keychain/createKeychainService/index.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/utils/constants.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/utils/deleteIndexedDBItem.d.ts +9 -0
- package/dist/services/keychain/createKeychainService/utils/deleteIndexedDBItem.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/utils/getIndexedDBItem.d.ts +10 -0
- package/dist/services/keychain/createKeychainService/utils/getIndexedDBItem.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/utils/openDatabase.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/utils/setIndexedDBItem.d.ts +10 -0
- package/dist/services/keychain/createKeychainService/utils/setIndexedDBItem.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/utils/withDatabase/index.d.ts.map +1 -0
- package/dist/services/keychain/createKeychainService/utils/withDatabase/withDatabase.d.ts.map +1 -0
- package/dist/services/keychain/index.d.ts +1 -1
- package/dist/services/keychain/index.d.ts.map +1 -1
- package/dist/services/logger/createLogger/createLogger.d.ts.map +1 -1
- package/dist/services/nativeManifest/getReactNativeManifest/getReactNativeManifest.d.ts +11 -0
- package/dist/services/nativeManifest/getReactNativeManifest/getReactNativeManifest.d.ts.map +1 -0
- package/dist/services/nativeManifest/getReactNativeManifest/index.d.ts +2 -0
- package/dist/services/nativeManifest/getReactNativeManifest/index.d.ts.map +1 -0
- package/dist/services/nativeManifest/nativeManifest.types.d.ts +14 -0
- package/dist/services/nativeManifest/nativeManifest.types.d.ts.map +1 -0
- package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts.map +1 -1
- package/dist/services/realtime/realtime.types.d.ts +1 -0
- package/dist/services/realtime/realtime.types.d.ts.map +1 -1
- package/dist/services/runtimeServices/createRuntimeServiceAccessKey/createRuntimeServiceAccessKey.d.ts.map +1 -1
- package/dist/services/runtimeServices/createRuntimeServices/createRuntimeServices.d.ts.map +1 -1
- package/dist/services/storage/createLocalStorageAdapter/createLocalStorageAdapter.d.ts +2 -2
- package/dist/services/storage/createStorage/createStorage.d.ts +4 -2
- package/dist/services/storage/createStorage/createStorage.d.ts.map +1 -1
- package/dist/services/storage/createStorage/formatForStorage/isValidDateISOString/isValidDateISOString.d.ts.map +1 -1
- package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts +2 -1
- package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts.map +1 -1
- package/dist/services/storage/index.d.ts +1 -1
- package/dist/services/storage/index.d.ts.map +1 -1
- package/dist/services/storage/storage.types.d.ts +27 -3
- package/dist/services/storage/storage.types.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/assertDefined/assertDefined.d.ts.map +1 -1
- package/dist/utils/base64UrlDecode/base64UrlDecode.d.ts.map +1 -1
- package/dist/utils/base64urlFromBytes/base64urlFromBytes.d.ts +8 -0
- package/dist/utils/base64urlFromBytes/base64urlFromBytes.d.ts.map +1 -0
- package/dist/utils/base64urlFromBytes/index.d.ts +2 -0
- package/dist/utils/base64urlFromBytes/index.d.ts.map +1 -0
- package/dist/utils/bytesFromBase64url/bytesFromBase64url.d.ts +8 -0
- package/dist/utils/bytesFromBase64url/bytesFromBase64url.d.ts.map +1 -0
- package/dist/utils/bytesFromBase64url/index.d.ts +2 -0
- package/dist/utils/bytesFromBase64url/index.d.ts.map +1 -0
- package/dist/utils/derToP1363/InvalidDERSignatureError.d.ts +5 -0
- package/dist/utils/derToP1363/InvalidDERSignatureError.d.ts.map +1 -0
- package/dist/utils/derToP1363/derToP1363.d.ts +8 -0
- package/dist/utils/derToP1363/derToP1363.d.ts.map +1 -0
- package/dist/utils/derToP1363/index.d.ts +2 -0
- package/dist/utils/derToP1363/index.d.ts.map +1 -0
- package/dist/utils/digestSHA256/digestSHA256.d.ts.map +1 -1
- package/dist/utils/getChainFromVerifiedCredentialChain/getChainFromVerifiedCredentialChain.d.ts.map +1 -1
- package/dist/utils/isEqualShallow/isEqualShallow.d.ts.map +1 -1
- package/dist/utils/isErrorWithCode/isErrorWithCode.d.ts.map +1 -1
- package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
- package/dist/utils/observable/createObservableState/createObservableState.d.ts.map +1 -1
- package/dist/utils/observable/subscribeWithSelector/subscribeWithSelector.d.ts.map +1 -1
- package/dist/utils/randomString/randomString.d.ts +1 -1
- package/dist/utils/randomString/randomString.d.ts.map +1 -1
- package/dist/utils/retryOnFail/InvalidRetryOnFailCallError.d.ts.map +1 -1
- package/dist/utils/setCookie/setCookie.d.ts.map +1 -1
- package/dist/waas.cjs.js +4 -4
- package/dist/waas.esm.js +3 -3
- package/dist/waas.native.esm.js +506 -0
- package/dist/waas.native.esm.js.map +1 -0
- package/dist/waasCore.cjs.js +7 -5
- package/dist/waasCore.cjs.js.map +1 -1
- package/dist/waasCore.esm.js +6 -4
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +253 -0
- package/dist/waasCore.native.esm.js.map +1 -0
- package/dynamic-labs-sdk-client.podspec +27 -0
- package/ios/Keychain.h +4 -0
- package/ios/Keychain.mm +101 -0
- package/ios/ReactNativeManifest.h +4 -0
- package/ios/ReactNativeManifest.mm +45 -0
- package/ios/ReactNativeManifestImpl.swift +20 -0
- package/ios/SecureEnclaveKeyManager.swift +180 -0
- package/package.json +40 -6
- package/react-native.config.cjs +14 -0
- package/dist/InvalidParamError-9IR2C0up.cjs.js.map +0 -1
- package/dist/InvalidParamError-Bq5zAFj4.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-C4aba1hS.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-COxYamJy.cjs.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-Df_wN20i.cjs.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-Y-aJ2rY7.esm.js.map +0 -1
- package/dist/modules/auth/handleSessionExpiration/handleSessionExpiration.d.ts +0 -11
- package/dist/modules/auth/handleSessionExpiration/handleSessionExpiration.d.ts.map +0 -1
- package/dist/modules/auth/handleSessionExpiration/index.d.ts +0 -2
- package/dist/modules/auth/handleSessionExpiration/index.d.ts.map +0 -1
- package/dist/modules/auth/performLogout/index.d.ts +0 -2
- package/dist/modules/auth/performLogout/index.d.ts.map +0 -1
- package/dist/modules/auth/performLogout/performLogout.d.ts +0 -12
- package/dist/modules/auth/performLogout/performLogout.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/KeyNotFoundError.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.d.ts +0 -8
- package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.types.d.ts +0 -6
- package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.types.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/index.d.ts +0 -2
- package/dist/services/keychain/createIndexedDBKeychainService/index.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/utils/constants.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/utils/deleteIndexedDBItem.d.ts +0 -3
- package/dist/services/keychain/createIndexedDBKeychainService/utils/deleteIndexedDBItem.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/utils/getIndexedDBItem.d.ts +0 -4
- package/dist/services/keychain/createIndexedDBKeychainService/utils/getIndexedDBItem.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/utils/openDatabase.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/utils/setIndexedDBItem.d.ts +0 -4
- package/dist/services/keychain/createIndexedDBKeychainService/utils/setIndexedDBItem.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/index.d.ts.map +0 -1
- package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/withDatabase.d.ts.map +0 -1
- /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/KeyNotFoundError.d.ts +0 -0
- /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/utils/constants.d.ts +0 -0
- /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/utils/openDatabase.d.ts +0 -0
- /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/utils/withDatabase/index.d.ts +0 -0
- /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/utils/withDatabase/withDatabase.d.ts +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { F as getDefaultClient, k as assertDefined, u as __createApiClient_wrapped, w as instrumentFunction, z as getCore } from "./InvalidParamError-BDHw6nr1.native.esm.js";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
|
+
/**
|
|
5
|
+
* Consumes and clears the current MFA token from the client state.
|
|
6
|
+
*
|
|
7
|
+
* This function retrieves the MFA token obtained from a successful MFA authentication,
|
|
8
|
+
* and removes it from the client, to prevent it from being used again.
|
|
9
|
+
*
|
|
10
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
11
|
+
* @returns The MFA token that was consumed.
|
|
12
|
+
* @throws Error if no MFA token is found.
|
|
13
|
+
* @instrumented
|
|
14
|
+
*/
|
|
15
|
+
const consumeMfaToken = (client = getDefaultClient()) => {
|
|
16
|
+
const core = getCore(client);
|
|
17
|
+
const mfaToken = core.state.get().mfaToken;
|
|
18
|
+
assertDefined(mfaToken, "No MFA token found");
|
|
19
|
+
core.state.set({ mfaToken: null });
|
|
20
|
+
return mfaToken;
|
|
21
|
+
};
|
|
22
|
+
const __consumeMfaToken_impl = consumeMfaToken;
|
|
23
|
+
const __consumeMfaToken_wrapped = instrumentFunction({
|
|
24
|
+
fn: __consumeMfaToken_impl,
|
|
25
|
+
functionName: "consumeMfaToken",
|
|
26
|
+
getCore: () => {
|
|
27
|
+
try {
|
|
28
|
+
return getCore(getDefaultClient());
|
|
29
|
+
} catch {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/modules/mfa/getMfaMethods/getMfaMethods.ts
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the available MFA methods for the current user.
|
|
39
|
+
*
|
|
40
|
+
* This function fetches information about which multi-factor authentication
|
|
41
|
+
* methods are available and configured for the user's account.
|
|
42
|
+
*
|
|
43
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
44
|
+
* @returns A promise that resolves to the user's MFA methods configuration.
|
|
45
|
+
* @instrumented
|
|
46
|
+
*/
|
|
47
|
+
const getMfaMethods = async (client = getDefaultClient()) => {
|
|
48
|
+
const core = getCore(client);
|
|
49
|
+
return await __createApiClient_wrapped({}, client).getUserMfaMethods({
|
|
50
|
+
environmentId: core.environmentId,
|
|
51
|
+
verifiedOnly: true
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const __getMfaMethods_impl = getMfaMethods;
|
|
55
|
+
const __getMfaMethods_wrapped = instrumentFunction({
|
|
56
|
+
fn: __getMfaMethods_impl,
|
|
57
|
+
functionName: "getMfaMethods",
|
|
58
|
+
getCore: () => {
|
|
59
|
+
try {
|
|
60
|
+
return getCore(getDefaultClient());
|
|
61
|
+
} catch {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts
|
|
69
|
+
/**
|
|
70
|
+
* Checks if MFA is required for a specific action.
|
|
71
|
+
*
|
|
72
|
+
* This function determines whether multi-factor authentication is required
|
|
73
|
+
* for the specified action based on project settings and user configuration.
|
|
74
|
+
*
|
|
75
|
+
* @param params.mfaAction - The action to check MFA requirements for.
|
|
76
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
77
|
+
* @returns A promise that resolves to true if MFA is required for the action, false otherwise.
|
|
78
|
+
* @not-instrumented
|
|
79
|
+
*/
|
|
80
|
+
const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()) => {
|
|
81
|
+
const projectSettings = client.projectSettings;
|
|
82
|
+
if (!projectSettings?.security?.mfa?.actions?.some((action) => action.action === mfaAction && action.required)) return false;
|
|
83
|
+
if (projectSettings?.security?.mfa?.required) return true;
|
|
84
|
+
return (await __getMfaMethods_wrapped(client)).userHasVerifiedMfaMethods;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { __getMfaMethods_wrapped as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
|
|
89
|
+
//# sourceMappingURL=isMfaRequiredForAction-Cjbuyen3.native.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-Cjbuyen3.native.esm.js","names":["getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,QAAe,OAAO;QAG1B,MAFe,0BAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAMA,wBAAc,OAAO,EAG5B"}
|
package/dist/{isMfaRequiredForAction-Cc6jkbY5.esm.js → isMfaRequiredForAction-D8GPFYzv.esm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as getDefaultClient, k as assertDefined, u as __createApiClient_wrapped, w as instrumentFunction, z as getCore } from "./InvalidParamError-
|
|
1
|
+
import { F as getDefaultClient, k as assertDefined, u as __createApiClient_wrapped, w as instrumentFunction, z as getCore } from "./InvalidParamError-DcN56mC-.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -86,4 +86,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
|
|
|
86
86
|
|
|
87
87
|
//#endregion
|
|
88
88
|
export { __getMfaMethods_wrapped as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
|
|
89
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
89
|
+
//# sourceMappingURL=isMfaRequiredForAction-D8GPFYzv.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-D8GPFYzv.esm.js","names":["getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,QAAe,OAAO;QAG1B,MAFe,0BAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAMA,wBAAc,OAAO,EAG5B"}
|
package/dist/{isMfaRequiredForAction-cfGmMd_g.cjs.js → isMfaRequiredForAction-mZub0YwI.cjs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
1
|
+
const require_InvalidParamError = require('./InvalidParamError-BqDEZ6er.cjs.js');
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -103,4 +103,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
|
|
|
103
103
|
return isMfaRequiredForAction;
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
106
|
+
//# sourceMappingURL=isMfaRequiredForAction-mZub0YwI.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-mZub0YwI.cjs.js","names":["getDefaultClient","getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,4CAAU,KAAA;;;AAK1C,yCAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,kCAAe,OAAO;QAG1B,MAFe,oDAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASA,4CAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAMC,wBAAc,OAAO,EAG5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decodeJwt.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/decodeJwt/decodeJwt.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"decodeJwt.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/decodeJwt/decodeJwt.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,UA4BvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestExternalAuthElevatedToken.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.ts"],"names":[],"mappings":"AAMA,KAAK,sCAAsC,GAAG;IAC5C,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,oBAC1B,sCAAsC,
|
|
1
|
+
{"version":3,"file":"requestExternalAuthElevatedToken.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.ts"],"names":[],"mappings":"AAMA,KAAK,sCAAsC,GAAG;IAC5C,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,oBAC1B,sCAAsC,sIA2BxD,CAAC"}
|
|
@@ -12,7 +12,6 @@ type SignInWithExternalJwtParams = {
|
|
|
12
12
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
13
13
|
* @returns A promise that resolves to the authentication response from the server.
|
|
14
14
|
* @instrumented
|
|
15
|
-
|
|
16
15
|
* @redact-params
|
|
17
16
|
*/
|
|
18
17
|
export declare const signInWithExternalJwt: ({ externalJwt, sessionPublicKey }?: SignInWithExternalJwtParams, client?: import("../../../../exports").DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").VerifyResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signInWithExternalJwt.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.ts"],"names":[],"mappings":"AAKA,KAAK,2BAA2B,GAAG;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"signInWithExternalJwt.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.ts"],"names":[],"mappings":"AAKA,KAAK,2BAA2B,GAAG;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,uCACG,2BAA2B,uHAiB/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractSessionId.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/extractSessionId/extractSessionId.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"extractSessionId.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/extractSessionId/extractSessionId.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,MAAM,GAAG,IASzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DynamicClient } from '../../../client/types';
|
|
2
2
|
/**
|
|
3
3
|
* Sets up a timeout to log out the user when their token expires.
|
|
4
|
-
|
|
4
|
+
* @not-instrumented
|
|
5
5
|
*/
|
|
6
6
|
export declare const initializeAuth: (client: DynamicClient) => void;
|
|
7
7
|
//# sourceMappingURL=initializeAuth.d.ts.map
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
export type SetLongTimeoutOptions = {
|
|
2
|
+
/** The function to invoke after the delay elapses. */
|
|
3
|
+
callback: () => void;
|
|
4
|
+
/** The delay in milliseconds before invoking the callback. */
|
|
5
|
+
delay: number;
|
|
6
|
+
};
|
|
1
7
|
/**
|
|
2
8
|
* A replacement for setTimeout that supports delays longer than 2147483647ms (~24.8 days).
|
|
3
|
-
|
|
9
|
+
* @not-instrumented
|
|
4
10
|
*/
|
|
5
|
-
export declare const setLongTimeout: (callback
|
|
11
|
+
export declare const setLongTimeout: ({ callback, delay, }: SetLongTimeoutOptions) => VoidFunction;
|
|
6
12
|
//# sourceMappingURL=setLongTimeout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setLongTimeout.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"setLongTimeout.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,sDAAsD;IACtD,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,yBAGxB,qBAAqB,KAAG,YAyB1B,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5
5
|
* @returns A promise that resolves when the logout process is complete.
|
|
6
|
-
* @instrumented
|
|
6
|
+
* @not-instrumented
|
|
7
7
|
*/
|
|
8
8
|
export declare const logout: (client?: import("../../../exports").DynamicClient) => Promise<void>;
|
|
9
9
|
//# sourceMappingURL=logout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logout/logout.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logout/logout.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,sEAQlB,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The reason a logout was triggered.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - `'user-intent'` — The user explicitly requested logout.
|
|
8
|
-
* - `'token-expired'` — The session token expired automatically.
|
|
4
|
+
* Surfaced in Datadog logout events so we can understand why users are being
|
|
5
|
+
* signed out.
|
|
9
6
|
*/
|
|
10
|
-
export type LogoutReason = 'token-expired' | 'user-
|
|
7
|
+
export type LogoutReason = 'user-intent' | 'token-expired' | 'keychain-migration-failed' | 'keychain-key-missing' | 'session-refresh-unauthorized' | 'user-refresh-failed' | 'user-deleted' | 'device-revoked' | 'all-devices-revoked';
|
|
11
8
|
//# sourceMappingURL=logoutReason.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logoutReason.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/logoutReason.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"logoutReason.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/logoutReason.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,eAAe,GACf,2BAA2B,GAC3B,sBAAsB,GACtB,8BAA8B,GAC9B,qBAAqB,GACrB,cAAc,GACd,gBAAgB,GAChB,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logoutWithReason/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../client/types';
|
|
2
|
+
import type { LogoutReason } from '../logoutReason';
|
|
3
|
+
/**
|
|
4
|
+
* Logs the user out with an explicit reason.
|
|
5
|
+
*
|
|
6
|
+
* Revokes the session, clears auth state, terminates wallet providers, and
|
|
7
|
+
* emits the `logout` client event with the given reason. The reason is also
|
|
8
|
+
* captured as an argument on the function-instrumentation event, which is
|
|
9
|
+
* how Datadog distinguishes between different logout causes.
|
|
10
|
+
*
|
|
11
|
+
* Use this instead of the public `logout` when triggering a logout from
|
|
12
|
+
* internal or extension code — the caller owns the reason string, so the
|
|
13
|
+
* telemetry correctly attributes *why* the logout happened.
|
|
14
|
+
*
|
|
15
|
+
* @param params - The logout params.
|
|
16
|
+
* @param params.reason - Why the logout is being triggered. Extension authors
|
|
17
|
+
* needing a reason outside the SDK catalog can cast with `as LogoutReason`.
|
|
18
|
+
* @param client - The Dynamic client instance.
|
|
19
|
+
* @instrumented
|
|
20
|
+
*/
|
|
21
|
+
export declare const logoutWithReason: ({ reason }: {
|
|
22
|
+
reason: LogoutReason;
|
|
23
|
+
}, client: DynamicClient) => Promise<void>;
|
|
24
|
+
//# sourceMappingURL=logoutWithReason.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logoutWithReason.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logoutWithReason/logoutWithReason.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,eACf;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,UAC5B,aAAa,kBAmDtB,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { type Provider } from '@dynamic-labs/sdk-api-core';
|
|
2
|
-
type AddOAuthUrlParamsOptions = {
|
|
2
|
+
export type AddOAuthUrlParamsOptions = {
|
|
3
|
+
/** The base URL to add OAuth parameters to. */
|
|
4
|
+
baseUrl: URL;
|
|
3
5
|
/** When true, adds prompt=consent to force Google to return a fresh refresh token. * @not-instrumented
|
|
4
|
-
|
|
6
|
+
*/
|
|
5
7
|
isGoogleDriveBackupEnabled?: boolean;
|
|
8
|
+
/** The provider configuration to build the URL for. */
|
|
9
|
+
provider: Provider;
|
|
6
10
|
};
|
|
7
11
|
/** Helper function to add OAuth URL parameters to a given base URL. * @not-instrumented
|
|
8
12
|
*/
|
|
9
|
-
export declare const addOAuthUrlParams: (
|
|
10
|
-
export {};
|
|
13
|
+
export declare const addOAuthUrlParams: ({ baseUrl, isGoogleDriveBackupEnabled, provider, }: AddOAuthUrlParamsOptions) => URL;
|
|
11
14
|
//# sourceMappingURL=addOAuthUrlParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addOAuthUrlParams.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,4BAA4B,CAAC;AAOzE,
|
|
1
|
+
{"version":3,"file":"addOAuthUrlParams.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,4BAA4B,CAAC;AAOzE,MAAM,MAAM,wBAAwB,GAAG;IACrC,+CAA+C;IAC/C,OAAO,EAAE,GAAG,CAAC;IAEb;OACG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,uDAAuD;IACvD,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;GACG;AACH,eAAO,MAAM,iBAAiB,uDAI3B,wBAAwB,KAAG,GAmC7B,CAAC"}
|
package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/buildOAuthUrl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildOAuthUrl.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/buildOAuthUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAUvE,KAAK,QAAQ,GAAG;IACd;KACC;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IAEd,4CAA4C;IAC5C,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;GACG;
|
|
1
|
+
{"version":3,"file":"buildOAuthUrl.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/buildOAuthUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAUvE,KAAK,QAAQ,GAAG;IACd;KACC;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IAEd,4CAA4C;IAC5C,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;GACG;AAEH,eAAO,MAAM,aAAa,SAElB,WAAW,YAGP,YAAY,KACrB,OAAO,CAAC,QAAQ,CAkDlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeDynamicOauthParamsFromUrl.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/social/removeDynamicOauthParamsFromUrl/removeDynamicOauthParamsFromUrl.ts"],"names":[],"mappings":"AAAA,wBAAwB;
|
|
1
|
+
{"version":3,"file":"removeDynamicOauthParamsFromUrl.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/social/removeDynamicOauthParamsFromUrl/removeDynamicOauthParamsFromUrl.ts"],"names":[],"mappings":"AAAA,wBAAwB;AAExB,eAAO,MAAM,+BAA+B,QAAS,MAAM,WAO1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeScopes.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/normalizeScopes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"normalizeScopes.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/normalizeScopes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,eAAe,WAAY,MAAM,EAAE,KAAG,MAAM,EAExD,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { ParsedElevatedAccessToken } from '../elevatedAccessTokens.types';
|
|
2
|
+
export type ParseElevatedAccessTokenOptions = {
|
|
3
|
+
/** JWT string containing the elevated access token. */
|
|
4
|
+
token: string;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* Validates and parses an elevated access token from a JWT string.
|
|
4
8
|
* Extracts scopes, expiration, and validates the token structure.
|
|
@@ -9,10 +13,8 @@ import type { ParsedElevatedAccessToken } from '../elevatedAccessTokens.types';
|
|
|
9
13
|
* - Tokens without exp field are rejected (returns null)
|
|
10
14
|
* - Expired tokens are rejected (returns null)
|
|
11
15
|
*
|
|
12
|
-
* @param token - JWT string containing the elevated access token
|
|
13
|
-
* @param now - Current date for expiration validation (defaults to new Date())
|
|
14
16
|
* @returns Parsed token data or null if token is invalid/expired
|
|
15
|
-
|
|
17
|
+
* @not-instrumented
|
|
16
18
|
*/
|
|
17
|
-
export declare const parseElevatedAccessToken: (token
|
|
19
|
+
export declare const parseElevatedAccessToken: ({ token, }: ParseElevatedAccessTokenOptions) => ParsedElevatedAccessToken | null;
|
|
18
20
|
//# sourceMappingURL=parseElevatedAccessToken.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E
|
|
1
|
+
{"version":3,"file":"parseElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,eAElC,+BAA+B,KAAG,yBAAyB,GAAG,IAgChE,CAAC"}
|
package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAuthFromVerifyResponse.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,KAAK,kCAAkC,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,oBAAoB;AACpB,eAAO,MAAM,4BAA4B,iBACzB,kCAAkC,UACxC,aAAa,
|
|
1
|
+
{"version":3,"file":"updateAuthFromVerifyResponse.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,KAAK,kCAAkC,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,oBAAoB;AACpB,eAAO,MAAM,4BAA4B,iBACzB,kCAAkC,UACxC,aAAa,SAiEtB,CAAC"}
|
package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts
CHANGED
|
@@ -1,18 +1,46 @@
|
|
|
1
1
|
import type { Chain } from '../../chain';
|
|
2
|
-
import type { CheckoutTransaction } from '../checkout.types';
|
|
3
|
-
|
|
2
|
+
import type { CheckoutSupportedExchangeProvider, CheckoutTransaction } from '../checkout.types';
|
|
3
|
+
type AttachCheckoutTransactionSourceWalletParams = {
|
|
4
|
+
/** The address of the user's wallet. */
|
|
4
5
|
fromAddress: string;
|
|
6
|
+
/** The network id for the token that the user is paying with. */
|
|
5
7
|
fromChainId: string;
|
|
8
|
+
/** The chain name of the user's wallet. */
|
|
6
9
|
fromChainName: Chain;
|
|
10
|
+
/** @defaultValue `'wallet'` */
|
|
11
|
+
sourceType?: 'wallet';
|
|
7
12
|
transactionId: string;
|
|
8
13
|
};
|
|
14
|
+
type AttachCheckoutTransactionSourceExchangeParams = {
|
|
15
|
+
/**
|
|
16
|
+
* The exchange provider key (e.g. `'coinbase'`).
|
|
17
|
+
* The backend uses this to look up the exchange configuration,
|
|
18
|
+
* generate a buy URL, and create the exchange source record.
|
|
19
|
+
*/
|
|
20
|
+
exchangeProvider: CheckoutSupportedExchangeProvider;
|
|
21
|
+
sourceType: 'exchange';
|
|
22
|
+
transactionId: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Parameters for {@link attachCheckoutTransactionSource}.
|
|
26
|
+
*
|
|
27
|
+
* This is a discriminated union on `sourceType`:
|
|
28
|
+
* - `'wallet'` (default) — requires `fromAddress`, `fromChainId`, `fromChainName`
|
|
29
|
+
* - `'exchange'` — requires `exchangeProvider`
|
|
30
|
+
*/
|
|
31
|
+
export type AttachCheckoutTransactionSourceParams = AttachCheckoutTransactionSourceWalletParams | AttachCheckoutTransactionSourceExchangeParams;
|
|
9
32
|
/**
|
|
10
|
-
* Attaches a
|
|
33
|
+
* Attaches a payment source to a checkout transaction.
|
|
34
|
+
*
|
|
35
|
+
* For exchange sources, the backend generates the buy URL and creates the
|
|
36
|
+
* exchange source record. The response includes `exchangeSource.metadata.url`
|
|
37
|
+
* which can be embedded in an iframe for the user to complete payment.
|
|
11
38
|
*
|
|
12
39
|
* @param params AttachCheckoutTransactionSourceParams - The source details to attach.
|
|
13
40
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
14
|
-
* @returns The updated checkout transaction
|
|
15
|
-
|
|
41
|
+
* @returns The updated checkout transaction (with exchangeSource if sourceType is 'exchange')
|
|
42
|
+
* @instrumented
|
|
16
43
|
*/
|
|
17
|
-
export declare const attachCheckoutTransactionSource: (
|
|
44
|
+
export declare const attachCheckoutTransactionSource: (params: AttachCheckoutTransactionSourceParams, client?: import("../../../exports").DynamicClient) => Promise<CheckoutTransaction>;
|
|
45
|
+
export {};
|
|
18
46
|
//# sourceMappingURL=attachCheckoutTransactionSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachCheckoutTransactionSource.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attachCheckoutTransactionSource.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EACV,iCAAiC,EACjC,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAG3B,KAAK,2CAA2C,GAAG;IACjD,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,aAAa,EAAE,KAAK,CAAC;IACrB,+BAA+B;IAC/B,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,6CAA6C,GAAG;IACnD;;;;OAIG;IACH,gBAAgB,EAAE,iCAAiC,CAAC;IACpD,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,qCAAqC,GAC7C,2CAA2C,GAC3C,6CAA6C,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,+BAA+B,WAClC,qCAAqC,wDAE5C,OAAO,CAAC,mBAAmB,CA0B7B,CAAC"}
|
package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts
CHANGED
|
@@ -2,12 +2,20 @@ import type { CheckoutTransaction } from '@dynamic-labs/sdk-api-core';
|
|
|
2
2
|
import type { DynamicClient } from '../../../client/types';
|
|
3
3
|
export type BroadcastCheckoutTransactionParams = {
|
|
4
4
|
transactionId: string;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The on-chain transaction hash. Required for wallet sources, optional
|
|
7
|
+
* for exchange sources (the user may not have it).
|
|
8
|
+
*/
|
|
9
|
+
txHash?: string;
|
|
6
10
|
};
|
|
7
11
|
/**
|
|
8
|
-
* Records
|
|
12
|
+
* Records that a checkout transaction has been broadcasted.
|
|
9
13
|
*
|
|
10
|
-
*
|
|
14
|
+
* For wallet sources, pass the `txHash` from the on-chain transaction.
|
|
15
|
+
* For exchange sources, `txHash` can be omitted — the user confirms
|
|
16
|
+
* they completed the payment and the transaction moves to `broadcasted`.
|
|
17
|
+
*
|
|
18
|
+
* @param params BroadcastCheckoutTransactionParams - The transaction ID and optional tx hash.
|
|
11
19
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
12
20
|
* @returns The updated checkout transaction
|
|
13
21
|
* @instrumented
|
package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcastCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,MAAM,kCAAkC,GAAG;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"broadcastCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,MAAM,kCAAkC,GAAG;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B,8BACZ,kCAAkC,WACrD,aAAa,KACpB,OAAO,CAAC,mBAAmB,CAU7B,CAAC"}
|
|
@@ -4,4 +4,5 @@ export type CheckoutExecutionState = `${CheckoutExecutionStateEnum}`;
|
|
|
4
4
|
export type CheckoutSettlementState = `${CheckoutSettlementStateEnum}`;
|
|
5
5
|
export type CheckoutRiskState = `${CheckoutRiskStateEnum}`;
|
|
6
6
|
export type CheckoutSourceType = `${CheckoutSourceTypeEnum}`;
|
|
7
|
+
export type CheckoutSupportedExchangeProvider = 'coinbase';
|
|
7
8
|
//# sourceMappingURL=checkout.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.types.d.ts","sourceRoot":"","sources":["../../../src/modules/checkout/checkout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAGpC,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,MAAM,sBAAsB,GAAG,GAAG,0BAA0B,EAAE,CAAC;AACrE,MAAM,MAAM,uBAAuB,GAAG,GAAG,2BAA2B,EAAE,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,GAAG,qBAAqB,EAAE,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,GAAG,sBAAsB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"checkout.types.d.ts","sourceRoot":"","sources":["../../../src/modules/checkout/checkout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAGpC,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,MAAM,sBAAsB,GAAG,GAAG,0BAA0B,EAAE,CAAC;AACrE,MAAM,MAAM,uBAAuB,GAAG,GAAG,2BAA2B,EAAE,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,GAAG,qBAAqB,EAAE,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,GAAG,sBAAsB,EAAE,CAAC;AAE7D,MAAM,MAAM,iCAAiC,GAAG,UAAU,CAAC"}
|
|
@@ -2,10 +2,14 @@ export type TrackCheckoutTransactionParams = {
|
|
|
2
2
|
transactionId: string;
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
5
|
-
* Subscribes to realtime
|
|
5
|
+
* Subscribes to realtime `checkoutTransactionExecutionStateChanged` and
|
|
6
|
+
* `checkoutTransactionSettlementStateChanged` events for an existing
|
|
7
|
+
* checkout transaction.
|
|
6
8
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
+
* This is only needed after a page refresh to re-establish the subscription.
|
|
10
|
+
* Transactions created with {@link createCheckoutTransaction} are automatically
|
|
11
|
+
* subscribed — calling this again for those is unnecessary unless the page
|
|
12
|
+
* has been reloaded.
|
|
9
13
|
*
|
|
10
14
|
* @param params.transactionId - The ID of the checkout transaction to track.
|
|
11
15
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trackCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,8BAA8B,GAAG;IAC3C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"trackCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,8BAA8B,GAAG;IAC3C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,sBAChB,8BAA8B,wDAEhD,OAAO,CAAC,IAAI,CAA8D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCheckoutSessionTokenStorageKey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts"],"names":[],"mappings":"AAIA,wBAAwB;
|
|
1
|
+
{"version":3,"file":"createCheckoutSessionTokenStorageKey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts"],"names":[],"mappings":"AAIA,wBAAwB;AAExB,eAAO,MAAM,oCAAoC,kBAAmB,MAAM,oEAKzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribeToCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/utils/subscribeToCheckoutTransaction/subscribeToCheckoutTransaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAO9D,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"subscribeToCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/utils/subscribeToCheckoutTransaction/subscribeToCheckoutTransaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAO9D,OAAO,cAAc,CAAC;AAgBtB,MAAM,MAAM,oCAAoC,GAAG;IACjD,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AAEH,eAAO,MAAM,8BAA8B,sBACtB,oCAAoC,UAC/C,aAAa,KACpB,OAAO,CAAC,IAAI,CA4Dd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeClient.d.ts","sourceRoot":"","sources":["../../../src/modules/initializeClient/initializeClient.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"initializeClient.d.ts","sourceRoot":"","sources":["../../../src/modules/initializeClient/initializeClient.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,mEAkK5B,CAAC"}
|
package/dist/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { DynamicClient } from '../../../client/types';
|
|
2
|
+
export type SetInstrumentationEnabledOptions = {
|
|
3
|
+
/** Whether event collection should be active. */
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* Enables or disables event collection for the client's instrumentation service.
|
|
4
8
|
*
|
|
5
9
|
* When enabled, events are forwarded to the configured transport on every
|
|
6
10
|
* instrumented function call. When disabled, instrumented functions run
|
|
7
11
|
* normally but emit no telemetry.
|
|
8
|
-
|
|
12
|
+
* @instrumented
|
|
9
13
|
*/
|
|
10
|
-
export declare const setInstrumentationEnabled: (enabled:
|
|
14
|
+
export declare const setInstrumentationEnabled: ({ enabled }: SetInstrumentationEnabledOptions, client?: DynamicClient) => void;
|
|
11
15
|
//# sourceMappingURL=setInstrumentationEnabled.d.ts.map
|
package/dist/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setInstrumentationEnabled.d.ts","sourceRoot":"","sources":["../../../../src/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"setInstrumentationEnabled.d.ts","sourceRoot":"","sources":["../../../../src/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,gCAAgC,GAAG;IAC7C,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,gBACvB,gCAAgC,WACrC,aAAa,SAGtB,CAAC"}
|
package/dist/modules/keychainMigration/migrateSessionKeyToKeychain/KeyMigrationError.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyMigrationError.d.ts","sourceRoot":"","sources":["../../../../src/modules/keychainMigration/migrateSessionKeyToKeychain/KeyMigrationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,qBAAa,iBAAkB,SAAQ,SAAS;
|
|
1
|
+
{"version":3,"file":"KeyMigrationError.d.ts","sourceRoot":"","sources":["../../../../src/modules/keychainMigration/migrateSessionKeyToKeychain/KeyMigrationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,qBAAa,iBAAkB,SAAQ,SAAS;gBAElC,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM;CASjE"}
|