@dynamic-labs-sdk/client 1.2.0 → 1.3.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/{InvalidParamError-Dhv4EhOy.native.esm.js → InvalidParamError-9kQBK3sP.native.esm.js} +2 -2
- package/dist/{InvalidParamError-Dhv4EhOy.native.esm.js.map → InvalidParamError-9kQBK3sP.native.esm.js.map} +1 -1
- package/dist/{InvalidParamError-CPzPxL0l.cjs → InvalidParamError-DQvZQdQ9.cjs} +3 -3
- package/dist/{InvalidParamError-CPzPxL0l.cjs.map → InvalidParamError-DQvZQdQ9.cjs.map} +1 -1
- package/dist/{InvalidParamError-BWWTxQ9d.esm.js → InvalidParamError-Za4cvW7K.esm.js} +2 -2
- package/dist/{InvalidParamError-BWWTxQ9d.esm.js.map → InvalidParamError-Za4cvW7K.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-D_mLDrYD.native.esm.js → NotWaasWalletAccountError-BTMvHTA8.native.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-D_mLDrYD.native.esm.js.map → NotWaasWalletAccountError-BTMvHTA8.native.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-D1EuiYyR.esm.js → NotWaasWalletAccountError-By3Y4taq.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-D1EuiYyR.esm.js.map → NotWaasWalletAccountError-By3Y4taq.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-BcIbGm0s.cjs → NotWaasWalletAccountError-Ciq7b-Y6.cjs} +3 -3
- package/dist/{NotWaasWalletAccountError-BcIbGm0s.cjs.map → NotWaasWalletAccountError-Ciq7b-Y6.cjs.map} +1 -1
- package/dist/core.cjs +45 -5
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +45 -8
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +43 -6
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/ArrayMustNotBeEmptyError.d.ts +5 -0
- package/dist/errors/ArrayMustNotBeEmptyError.d.ts.map +1 -0
- package/dist/exports/core.d.ts +8 -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-D26TNjm4.cjs → getNetworkProviderFromNetworkId-BA0CHZzu.cjs} +30 -4
- package/dist/getNetworkProviderFromNetworkId-BA0CHZzu.cjs.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-VkHaRqMa.native.esm.js → getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js} +25 -5
- package/dist/getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-C9QzgcLs.esm.js → getNetworkProviderFromNetworkId-RWcIZDgC.esm.js} +29 -9
- package/dist/getNetworkProviderFromNetworkId-RWcIZDgC.esm.js.map +1 -0
- package/dist/{getSignedSessionId-D52QC0hh.cjs → getSignedSessionId-BCU987hO.cjs} +3 -3
- package/dist/{getSignedSessionId-D52QC0hh.cjs.map → getSignedSessionId-BCU987hO.cjs.map} +1 -1
- package/dist/{getSignedSessionId-L0T26uTy.native.esm.js → getSignedSessionId-DzNCj6g_.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-L0T26uTy.native.esm.js.map → getSignedSessionId-DzNCj6g_.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-DcJl2sy8.esm.js → getSignedSessionId-la6RXITX.esm.js} +3 -3
- package/dist/{getSignedSessionId-DcJl2sy8.esm.js.map → getSignedSessionId-la6RXITX.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-Cm2e3Boz.esm.js → getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js} +3 -2
- package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-C94BZhqL.cjs → getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs} +4 -3
- package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-CMEe9e1b.native.esm.js → getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js} +3 -2
- package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js.map +1 -0
- package/dist/index.cjs +967 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +968 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +970 -24
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-vbGFqLFc.esm.js → isMfaRequiredForAction-C1u4Z__n.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-vbGFqLFc.esm.js.map → isMfaRequiredForAction-C1u4Z__n.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-kxGzZLB_.cjs → isMfaRequiredForAction-CMClgbT0.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-kxGzZLB_.cjs.map → isMfaRequiredForAction-CMClgbT0.cjs.map} +1 -1
- package/dist/{isMfaRequiredForAction-B6kjcIA2.native.esm.js → isMfaRequiredForAction-DSX-TV2z.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-B6kjcIA2.native.esm.js.map → isMfaRequiredForAction-DSX-TV2z.native.esm.js.map} +1 -1
- package/dist/modules/balances/getBalances/getBalances.d.ts +22 -10
- package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +6 -2
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/collectInstalledGroupIds/collectInstalledGroupIds.d.ts +26 -0
- package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/collectInstalledGroupIds/collectInstalledGroupIds.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/collectInstalledGroupIds/index.d.ts +2 -0
- package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/collectInstalledGroupIds/index.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/excludeInstalledFromCatalog.d.ts +28 -0
- package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/excludeInstalledFromCatalog.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/index.d.ts +2 -0
- package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/index.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/index.d.ts +2 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/{shouldFilterWallet → shouldFilterWalletForWalletConnect}/index.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts +13 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/index.d.ts +2 -0
- package/dist/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/index.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/matchWalletProvidersToCatalogGroup.d.ts +26 -0
- package/dist/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/matchWalletProvidersToCatalogGroup.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.d.ts +10 -0
- package/dist/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/shouldFilterWallet/index.d.ts +3 -0
- package/dist/modules/legacyWalletBook/shouldFilterWallet/index.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts +34 -0
- package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts +22 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts +18 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.d.ts +2 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.d.ts +2 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts +21 -0
- package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts +27 -0
- package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +23 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts +39 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts +54 -0
- package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts +31 -0
- package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts +18 -0
- package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts +15 -0
- package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts +21 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts +44 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts +20 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts +15 -0
- package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts +16 -0
- package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +24 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts +49 -0
- package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts +18 -0
- package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts +18 -0
- package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts +23 -0
- package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts +22 -0
- package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts +20 -0
- package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +34 -0
- package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +164 -0
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -0
- package/dist/modules/wallets/utils/getSignInMessage/createSignInMessageStatement/createSignInMessageStatement.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getSignInMessage/getSignInMessage.d.ts.map +1 -1
- package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts +20 -0
- package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts.map +1 -0
- package/dist/modules/wallets/walletProviderRegistry/createWalletProviderRegistry/createWalletProviderRegistry.d.ts.map +1 -1
- package/dist/modules/wallets/walletProviderRegistry/index.d.ts +1 -1
- package/dist/modules/wallets/walletProviderRegistry/index.d.ts.map +1 -1
- package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts +19 -0
- package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts.map +1 -1
- package/dist/modules/wallets/walletProviderUriConnection.types.d.ts +23 -0
- package/dist/modules/wallets/walletProviderUriConnection.types.d.ts.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/assertNonEmptyArray/assertNonEmptyArray.d.ts +19 -0
- package/dist/utils/assertNonEmptyArray/assertNonEmptyArray.d.ts.map +1 -0
- package/dist/utils/assertNonEmptyArray/index.d.ts +2 -0
- package/dist/utils/assertNonEmptyArray/index.d.ts.map +1 -0
- package/dist/utils/getAppMetadata/getAppMetadata.d.ts +16 -0
- package/dist/utils/getAppMetadata/getAppMetadata.d.ts.map +1 -0
- package/dist/utils/getAppMetadata/index.d.ts +3 -0
- package/dist/utils/getAppMetadata/index.d.ts.map +1 -0
- package/dist/waas.cjs +6 -5
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +5 -4
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +5 -4
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +4 -4
- package/dist/waasCore.esm.js +3 -3
- package/dist/waasCore.native.esm.js +3 -3
- package/package.json +3 -3
- package/dist/getNetworkProviderFromNetworkId-C9QzgcLs.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-D26TNjm4.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-VkHaRqMa.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-C94BZhqL.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-CMEe9e1b.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-Cm2e3Boz.esm.js.map +0 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/index.d.ts +0 -2
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts +0 -21
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts.map +0 -1
package/dist/{isMfaRequiredForAction-vbGFqLFc.esm.js → isMfaRequiredForAction-C1u4Z__n.esm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-
|
|
1
|
+
import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-Za4cvW7K.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -74,4 +74,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
|
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
76
|
export { getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
|
|
77
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
77
|
+
//# sourceMappingURL=isMfaRequiredForAction-C1u4Z__n.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-C1u4Z__n.esm.js","names":[],"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 * @not-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;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,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,MAAM,cAAc,OAAO,EAG5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
1
|
+
const require_InvalidParamError = require('./InvalidParamError-DQvZQdQ9.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -91,4 +91,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
|
|
|
91
91
|
return isMfaRequiredForAction;
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
94
|
+
//# sourceMappingURL=isMfaRequiredForAction-CMClgbT0.cjs.map
|
package/dist/{isMfaRequiredForAction-kxGzZLB_.cjs.map → isMfaRequiredForAction-CMClgbT0.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-CMClgbT0.cjs","names":["getDefaultClient","getCore","createApiClient","getDefaultClient"],"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 * @not-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;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAASA,4CAAkB,KAAK;CAClE,MAAM,OAAOC,kCAAQ,OAAO;AAQ5B,QALuB,MAFLC,0CAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,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,MAAM,cAAc,OAAO,EAG5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-
|
|
1
|
+
import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-9kQBK3sP.native.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -74,4 +74,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
|
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
76
|
export { getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
|
|
77
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
77
|
+
//# sourceMappingURL=isMfaRequiredForAction-DSX-TV2z.native.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-DSX-TV2z.native.esm.js","names":[],"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 * @not-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;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,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,MAAM,cAAc,OAAO,EAG5B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { TokenBalance } from '@dynamic-labs/sdk-api-core';
|
|
2
2
|
import type { WalletAccount } from '../../wallets/walletAccount';
|
|
3
|
-
|
|
3
|
+
type GetBalancesBaseParams = {
|
|
4
4
|
/**
|
|
5
5
|
* Whether to filter out spam tokens.
|
|
6
6
|
* Defaults to true.
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
* @not-instrumented
|
|
8
|
+
*/
|
|
9
9
|
filterSpamTokens?: boolean;
|
|
10
10
|
/** Whether to force a refresh of the balances instead of using the api cached value. */
|
|
11
11
|
forceRefresh?: boolean;
|
|
@@ -13,16 +13,27 @@ export type GetBalancesParams = {
|
|
|
13
13
|
includeNative?: boolean;
|
|
14
14
|
/** Whether to include the prices of the tokens. */
|
|
15
15
|
includePrices?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* The network ID to get the balances for.
|
|
18
|
-
* If not provided, the active network ID will be used.
|
|
19
|
-
*/
|
|
20
|
-
networkId?: number;
|
|
21
16
|
/** The wallet account to get the balances for. */
|
|
22
17
|
walletAccount: WalletAccount;
|
|
23
18
|
/** If provided, only return balances for the specified contracts. */
|
|
24
19
|
whitelistedContracts?: Array<string>;
|
|
25
20
|
};
|
|
21
|
+
export type GetBalancesParams = GetBalancesBaseParams & ({
|
|
22
|
+
/**
|
|
23
|
+
* The network ID to get the balances for.
|
|
24
|
+
* If neither `networkId` nor `networkIds` is provided, the active network ID will be used.
|
|
25
|
+
* Mutually exclusive with `networkIds`.
|
|
26
|
+
*/
|
|
27
|
+
networkId?: number;
|
|
28
|
+
networkIds?: never;
|
|
29
|
+
} | {
|
|
30
|
+
networkId?: never;
|
|
31
|
+
/**
|
|
32
|
+
* The network IDs to get the balances for.
|
|
33
|
+
* Mutually exclusive with `networkId`.
|
|
34
|
+
*/
|
|
35
|
+
networkIds?: string[];
|
|
36
|
+
});
|
|
26
37
|
/**
|
|
27
38
|
* Retrieves the token balances for a wallet account.
|
|
28
39
|
*
|
|
@@ -31,7 +42,8 @@ export type GetBalancesParams = {
|
|
|
31
42
|
* @param params.walletAccount - The wallet account to get the balances for.
|
|
32
43
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
33
44
|
* @returns A promise that resolves to an array of token balances.
|
|
34
|
-
|
|
45
|
+
* @not-instrumented
|
|
35
46
|
*/
|
|
36
|
-
export declare const getBalances: ({ walletAccount, networkId, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh, }: GetBalancesParams, client?: import("../../../exports").DynamicClient) => Promise<TokenBalance[]>;
|
|
47
|
+
export declare const getBalances: ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh, }: GetBalancesParams, client?: import("../../../exports").DynamicClient) => Promise<TokenBalance[]>;
|
|
48
|
+
export {};
|
|
37
49
|
//# sourceMappingURL=getBalances.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getBalances/getBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,
|
|
1
|
+
{"version":3,"file":"getBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getBalances/getBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,KAAK,qBAAqB,GAAG;IAC3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wFAAwF;IACxF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GACnD,CACI;IACE;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CACJ,CAAC;AAEJ;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,kIAUnB,iBAAiB,wDAEnB,OAAO,CAAC,YAAY,EAAE,CA8BxB,CAAC"}
|
|
@@ -8,7 +8,11 @@ export type GetCheckoutTransactionQuoteParams = {
|
|
|
8
8
|
* or wallets, call attachSource again.
|
|
9
9
|
*/
|
|
10
10
|
fromChainId?: string;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* When omitted, defaults to native token for the chain specified in
|
|
13
|
+
* fromChainName in the attach source step.
|
|
14
|
+
*/
|
|
15
|
+
fromTokenAddress?: string;
|
|
12
16
|
slippage?: number;
|
|
13
17
|
transactionId: string;
|
|
14
18
|
};
|
|
@@ -18,7 +22,7 @@ export type GetCheckoutTransactionQuoteParams = {
|
|
|
18
22
|
* @param params GetCheckoutTransactionQuoteParams - The quote parameters.
|
|
19
23
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
20
24
|
* @returns The updated checkout transaction with quote data
|
|
21
|
-
|
|
25
|
+
* @not-instrumented
|
|
22
26
|
*/
|
|
23
27
|
export declare const getCheckoutTransactionQuote: ({ fromChainId, fromTokenAddress, slippage, transactionId, }: GetCheckoutTransactionQuoteParams, client?: import("../../../exports").DynamicClient) => Promise<CheckoutTransaction>;
|
|
24
28
|
//# sourceMappingURL=getCheckoutTransactionQuote.d.ts.map
|
package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCheckoutTransactionQuote.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"getCheckoutTransactionQuote.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,gEAMnC,iCAAiC,wDAEnC,OAAO,CAAC,mBAAmB,CAc7B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { WalletProviderData } from '../../../wallets/walletProvider/walletProvider.types';
|
|
2
|
+
import type { WalletConnectCatalog } from '../../getWalletConnectCatalog/getWalletConnectCatalog.types';
|
|
3
|
+
type CollectInstalledGroupIdsParams = {
|
|
4
|
+
catalog: WalletConnectCatalog;
|
|
5
|
+
walletProviders: WalletProviderData[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Scans the catalog and returns the set of group identifiers for which at
|
|
9
|
+
* least one installed wallet provider matches.
|
|
10
|
+
*
|
|
11
|
+
* Walks the catalog twice on purpose:
|
|
12
|
+
* - First through `wallets`, to cover wallets that point to a `groupId`
|
|
13
|
+
* with no matching entry in `groups` (we fall back to the wallet's own
|
|
14
|
+
* name for matching in that case).
|
|
15
|
+
* - Then through `groups`, to catch orphan group entries that have no
|
|
16
|
+
* wallet referencing them.
|
|
17
|
+
*
|
|
18
|
+
* The check is skipped for any group already known to be installed, so a
|
|
19
|
+
* multi-chain wallet (same `groupId` across EVM + SOL entries) only runs
|
|
20
|
+
* the match once.
|
|
21
|
+
*
|
|
22
|
+
* @not-instrumented
|
|
23
|
+
*/
|
|
24
|
+
export declare const collectInstalledGroupIds: ({ catalog, walletProviders, }: CollectInstalledGroupIdsParams) => Set<string>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=collectInstalledGroupIds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectInstalledGroupIds.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/excludeInstalledFromCatalog/collectInstalledGroupIds/collectInstalledGroupIds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AAGxG,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,eAAe,EAAE,kBAAkB,EAAE,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,wBAAwB,kCAGlC,8BAA8B,KAAG,GAAG,CAAC,MAAM,CAmC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/excludeInstalledFromCatalog/collectInstalledGroupIds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/excludeInstalledFromCatalog.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WalletProviderData } from '../../wallets/walletProvider/walletProvider.types';
|
|
2
|
+
import type { WalletConnectCatalog } from '../getWalletConnectCatalog/getWalletConnectCatalog.types';
|
|
3
|
+
type ExcludeInstalledFromCatalogParams = {
|
|
4
|
+
catalog: WalletConnectCatalog;
|
|
5
|
+
walletProviders: WalletProviderData[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Returns a new WalletConnect catalog with the wallets and groups that the
|
|
9
|
+
* user already has installed removed.
|
|
10
|
+
*
|
|
11
|
+
* Useful when rendering a combined wallet list (installed + WalletConnect
|
|
12
|
+
* catalog) where each wallet should appear exactly once: installed wallets
|
|
13
|
+
* win and the corresponding catalog entries get hidden.
|
|
14
|
+
*
|
|
15
|
+
* Matching is delegated to {@link collectInstalledGroupIds}, so a single
|
|
16
|
+
* installed provider removes every wallet that shares its group — e.g. an
|
|
17
|
+
* installed MetaMask hides both the EVM and SOL catalog entries.
|
|
18
|
+
*
|
|
19
|
+
* The original catalog object is not mutated.
|
|
20
|
+
*
|
|
21
|
+
* @param params.catalog - The full WalletConnect catalog (typically from `getWalletConnectCatalog`).
|
|
22
|
+
* @param params.walletProviders - Currently available wallet providers.
|
|
23
|
+
* @returns A new catalog with only the wallets and groups the user does not have installed.
|
|
24
|
+
* @not-instrumented
|
|
25
|
+
*/
|
|
26
|
+
export declare const excludeInstalledFromCatalog: ({ catalog, walletProviders, }: ExcludeInstalledFromCatalogParams) => WalletConnectCatalog;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=excludeInstalledFromCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excludeInstalledFromCatalog.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/excludeInstalledFromCatalog/excludeInstalledFromCatalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;AAGrG,KAAK,iCAAiC,GAAG;IACvC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,eAAe,EAAE,kBAAkB,EAAE,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B,kCAGrC,iCAAiC,KAAG,oBA6BtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/excludeInstalledFromCatalog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ShouldFilterWalletParams } from '../../shouldFilterWallet/shouldFilterWallet';
|
|
2
|
+
/**
|
|
3
|
+
* WalletConnect-specific filter. Applies the generic
|
|
4
|
+
* {@link shouldFilterWallet} eligibility rules and additionally drops
|
|
5
|
+
* wallets that do not advertise WalletConnect `sign_v2` support — the
|
|
6
|
+
* protocol version Dynamic pairs against.
|
|
7
|
+
*
|
|
8
|
+
* @returns True if the wallet should be excluded from the WalletConnect
|
|
9
|
+
* catalog, false otherwise.
|
|
10
|
+
* @not-instrumented
|
|
11
|
+
*/
|
|
12
|
+
export declare const shouldFilterWalletForWalletConnect: ({ wallet, walletKey, }: ShouldFilterWalletParams) => boolean;
|
|
13
|
+
//# sourceMappingURL=shouldFilterWalletForWalletConnect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shouldFilterWalletForWalletConnect.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,2BAG5C,wBAAwB,KAAG,OAM7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { WalletProviderData } from '../../wallets/walletProvider/walletProvider.types';
|
|
2
|
+
type MatchWalletProvidersToCatalogGroupParams = {
|
|
3
|
+
catalogGroupKey: string;
|
|
4
|
+
catalogGroupName?: string;
|
|
5
|
+
walletProviders: WalletProviderData[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Returns the wallet providers that belong to the same wallet group as the
|
|
9
|
+
* given WalletConnect catalog entry. Useful for de-duplicating "installed"
|
|
10
|
+
* vs "available via WalletConnect" wallets when rendering a combined list.
|
|
11
|
+
*
|
|
12
|
+
* Matching is done on normalized identifiers — lowercased, whitespace removed,
|
|
13
|
+
* and the literal substring "wallet" stripped — so that variations like:
|
|
14
|
+
* - catalog key `"trust"` + catalog name `"Trust Wallet"`
|
|
15
|
+
* - provider `groupKey: "trustwallet"` + `displayName: "Trust Wallet"`
|
|
16
|
+
* collapse into a single match.
|
|
17
|
+
*
|
|
18
|
+
* @param params.catalogGroupKey - Key of the catalog group (e.g. `"metamask"`).
|
|
19
|
+
* @param [params.catalogGroupName] - Optional display name (e.g. `"Trust Wallet"`); matched as a fallback when the key is opaque.
|
|
20
|
+
* @param params.walletProviders - Currently available wallet providers (from `getAvailableWalletProvidersData`).
|
|
21
|
+
* @returns The subset of `walletProviders` that match the catalog group.
|
|
22
|
+
* @not-instrumented
|
|
23
|
+
*/
|
|
24
|
+
export declare const matchWalletProvidersToCatalogGroup: ({ catalogGroupKey, catalogGroupName, walletProviders, }: MatchWalletProvidersToCatalogGroupParams) => WalletProviderData[];
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=matchWalletProvidersToCatalogGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchWalletProvidersToCatalogGroup.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/matchWalletProvidersToCatalogGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAE5F,KAAK,wCAAwC,GAAG;IAC9C,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,kBAAkB,EAAE,CAAC;CACvC,CAAC;AAKF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kCAAkC,4DAI5C,wCAAwC,KAAG,kBAAkB,EAW/D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-curated list of wallet book group keys that should surface at the top
|
|
3
|
+
* of catalogue listings. Lower index = higher priority. Anything not in this
|
|
4
|
+
* list falls through to the secondary sort (alphabetical by name).
|
|
5
|
+
*
|
|
6
|
+
* Used by `sortWalletOptions` (relevance mode) and by the react-demo's
|
|
7
|
+
* WalletConnect picker. Keep both in sync when adding entries.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PRIORITY_WALLET_KEYS: readonly string[];
|
|
10
|
+
//# sourceMappingURL=priorityWalletKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priorityWalletKeys.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAmBjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/shouldFilterWallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WalletSchema } from '../legacyWalletBook.types';
|
|
2
|
+
/**
|
|
3
|
+
* Embedded wallet keys that should be filtered out from any external-wallet
|
|
4
|
+
* catalogue. These wallets are not products the user "connects" to from the
|
|
5
|
+
* wallet selection list — they are embedded sign-in methods that live behind
|
|
6
|
+
* different SDK entry points.
|
|
7
|
+
* @not-instrumented
|
|
8
|
+
*/
|
|
9
|
+
export declare const EMBEDDED_WALLET_KEYS: string[];
|
|
10
|
+
export type ShouldFilterWalletParams = {
|
|
11
|
+
/** The wallet schema to check. */
|
|
12
|
+
wallet: WalletSchema;
|
|
13
|
+
/** The wallet key identifier. */
|
|
14
|
+
walletKey: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Generic "is this wallet eligible for an external-wallet catalogue" check.
|
|
18
|
+
* Filters out:
|
|
19
|
+
*
|
|
20
|
+
* 1. Embedded sign-in methods (see {@link EMBEDDED_WALLET_KEYS}).
|
|
21
|
+
* 2. Wallets that only ship a browser-extension injection (`injectedConfig`)
|
|
22
|
+
* with no mobile or desktop links — these have no surface a customer
|
|
23
|
+
* catalogue UI can drive to.
|
|
24
|
+
*
|
|
25
|
+
* Channel-specific eligibility (WalletConnect support, in-app browser URL,
|
|
26
|
+
* installation links, …) is the caller's responsibility — wrap this helper
|
|
27
|
+
* with an additional check, e.g.
|
|
28
|
+
* {@link shouldFilterWalletForWalletConnect}.
|
|
29
|
+
*
|
|
30
|
+
* @returns True if the wallet should be filtered out, false otherwise.
|
|
31
|
+
* @not-instrumented
|
|
32
|
+
*/
|
|
33
|
+
export declare const shouldFilterWallet: ({ wallet, walletKey, }: ShouldFilterWalletParams) => boolean;
|
|
34
|
+
//# sourceMappingURL=shouldFilterWallet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shouldFilterWallet.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,UAWhC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,kCAAkC;IAClC,MAAM,EAAE,YAAY,CAAC;IAErB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB,2BAG5B,wBAAwB,KAAG,OAuB7B,CAAC"}
|
package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
import type { ConnectionOptionForWalletOption } from '../groupOptionsByWalletOption/groupOptionsByWalletOption';
|
|
3
|
+
type BuildInAppBrowserOptionsParams = {
|
|
4
|
+
walletBook: WalletBookSchema;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Builds the `inAppBrowser` catalogue options from the wallet book. A wallet
|
|
8
|
+
* qualifies when it exposes a mobile in-app-browser URL — typically a
|
|
9
|
+
* `cb_url={{encodedDappURI}}`-style template the customer fills in with the
|
|
10
|
+
* current page URL before opening.
|
|
11
|
+
*
|
|
12
|
+
* Reuses the generic `shouldFilterWallet` rules — embedded sign-in methods
|
|
13
|
+
* and injected-only wallets are dropped — so the catalogue's notion of
|
|
14
|
+
* "external wallet" stays consistent across option types.
|
|
15
|
+
*
|
|
16
|
+
* @param params.walletBook - The fetched wallet book.
|
|
17
|
+
* @returns Tagged `inAppBrowser` options paired with their wallet option keys.
|
|
18
|
+
* @not-instrumented
|
|
19
|
+
*/
|
|
20
|
+
export declare const buildInAppBrowserOptions: ({ walletBook, }: BuildInAppBrowserOptionsParams) => ConnectionOptionForWalletOption[];
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=buildInAppBrowserOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildInAppBrowserOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAIhH,KAAK,8BAA8B,GAAG;IACpC,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,oBAElC,8BAA8B,KAAG,+BAA+B,EAyBlE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
type GetInAppBrowserUrlParams = {
|
|
3
|
+
wallet: WalletBookSchema['wallets'][string];
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Returns the wallet's in-app browser URL template, preferring the v2
|
|
7
|
+
* field. `inAppBrowser` is deprecated but some wallet book entries
|
|
8
|
+
* still carry only the v1 value, so it acts as a fallback. Trailing
|
|
9
|
+
* `?? undefined` collapses the schema's `string | null` typing down to
|
|
10
|
+
* the `string | undefined` return contract.
|
|
11
|
+
*
|
|
12
|
+
* @param params.wallet - The wallet book wallet entry.
|
|
13
|
+
* @returns The in-app browser URL, or `undefined` if neither field is set.
|
|
14
|
+
* @not-instrumented
|
|
15
|
+
*/
|
|
16
|
+
export declare const getInAppBrowserUrl: ({ wallet, }: GetInAppBrowserUrlParams) => string | undefined;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=getInAppBrowserUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInAppBrowserUrl.d.ts","sourceRoot":"","sources":["../../../../../src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAEzF,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,gBAE5B,wBAAwB,KAAG,MAAM,GAAG,SACoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WalletSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
import type { InstallationUrls } from '../walletOptionsCatalogue.types';
|
|
3
|
+
type BuildInstallationUrlsParams = {
|
|
4
|
+
wallet: WalletSchema;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Builds the install/download URL bag for a wallet book entry. Returns the
|
|
8
|
+
* concrete URLs assembled from each store's ID field — Play Store, App
|
|
9
|
+
* Store, Chrome Web Store, Firefox Add-ons, Edge Add-ons — plus the wallet's
|
|
10
|
+
* own `desktop.universal` / `desktop.native` URLs when set.
|
|
11
|
+
*
|
|
12
|
+
* Fields the wallet book does not carry are left undefined; callers should
|
|
13
|
+
* skip emitting an installation option for a wallet whose URL bag is empty.
|
|
14
|
+
*
|
|
15
|
+
* @param params.wallet - The wallet book entry.
|
|
16
|
+
* @returns The URL bag, omitting fields the wallet does not provide.
|
|
17
|
+
* @not-instrumented
|
|
18
|
+
*/
|
|
19
|
+
export declare const buildInstallationUrls: ({ wallet, }: BuildInstallationUrlsParams) => InstallationUrls;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=buildInstallationUrls.d.ts.map
|
package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildInstallationUrls.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAYxE,KAAK,2BAA2B,GAAG;IACjC,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,gBAE/B,2BAA2B,KAAG,gBAoBhC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
import type { InstallationUrls } from '../walletOptionsCatalogue.types';
|
|
3
|
+
type BuildInstallationUrlsByWalletOptionKeyParams = {
|
|
4
|
+
walletBook: WalletBookSchema;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Collects install / download URLs for every wallet book entry that has
|
|
8
|
+
* at least one installable surface, keyed by the wallet option key the
|
|
9
|
+
* wallet groups under. The catalogue assembly step merges this map into
|
|
10
|
+
* the per-key wallet option shell so `WalletOption.installationUrls` is
|
|
11
|
+
* populated alongside (or instead of) `connectionOptions`.
|
|
12
|
+
*
|
|
13
|
+
* First-seen URLs win when multiple wallet book entries resolve to the
|
|
14
|
+
* same wallet option key — wallet book authors put the most accurate
|
|
15
|
+
* install links on the canonical entry, so the first-seen one is the
|
|
16
|
+
* right pick.
|
|
17
|
+
*
|
|
18
|
+
* Reuses the generic `shouldFilterWallet` rules so embedded wallets do
|
|
19
|
+
* not appear here either — they're not user-installable products.
|
|
20
|
+
*
|
|
21
|
+
* @param params.walletBook - The fetched wallet book.
|
|
22
|
+
* @returns A map from wallet option key to its install URL bag.
|
|
23
|
+
* @not-instrumented
|
|
24
|
+
*/
|
|
25
|
+
export declare const buildInstallationUrlsByWalletOptionKey: ({ walletBook, }: BuildInstallationUrlsByWalletOptionKeyParams) => Map<string, InstallationUrls>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=buildInstallationUrlsByWalletOptionKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildInstallationUrlsByWalletOptionKey.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAItF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAcxE,KAAK,4CAA4C,GAAG;IAClD,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sCAAsC,oBAEhD,4CAA4C,KAAG,GAAG,CACnD,MAAM,EACN,gBAAgB,CA0BjB,CAAC"}
|
package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
import type { ConnectionOptionForWalletOption } from '../groupOptionsByWalletOption/groupOptionsByWalletOption';
|
|
3
|
+
type BuildWalletConnectOptionsParams = {
|
|
4
|
+
walletBook: WalletBookSchema;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Builds the `walletConnect` catalogue options from a fetched wallet book.
|
|
8
|
+
* Applies the WalletConnect-specific eligibility filter
|
|
9
|
+
* (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
|
|
10
|
+
* without `sign_v2` support are excluded — same surface as
|
|
11
|
+
* `getWalletConnectCatalog`.
|
|
12
|
+
*
|
|
13
|
+
* Each emitted option carries the wallet's mobile deeplinks. Customers
|
|
14
|
+
* combine these with their chain's `connectWithWalletConnect<Chain>` URI via
|
|
15
|
+
* `appendWalletConnectUriToDeepLink` to open the wallet's app.
|
|
16
|
+
*
|
|
17
|
+
* @param params.walletBook - The fetched wallet book.
|
|
18
|
+
* @returns Tagged `walletConnect` options paired with their wallet option keys.
|
|
19
|
+
* @not-instrumented
|
|
20
|
+
*/
|
|
21
|
+
export declare const buildWalletConnectOptions: ({ walletBook, }: BuildWalletConnectOptionsParams) => ConnectionOptionForWalletOption[];
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=buildWalletConnectOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildWalletConnectOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAgBhH,KAAK,+BAA+B,GAAG;IACrC,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,oBAEnC,+BAA+B,KAAG,+BAA+B,EAgCnE,CAAC"}
|