@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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
import type { WithWalletProviderDisplayOverride } from '../buildWithWalletProviderOptions/buildWithWalletProviderOptions';
|
|
3
|
+
import type { InstallationUrls, WalletConnectionOption, WalletOption } from '../walletOptionsCatalogue.types';
|
|
4
|
+
type BuildWalletOptionParams = {
|
|
5
|
+
connectionOptions: WalletConnectionOption[];
|
|
6
|
+
displayOverride?: WithWalletProviderDisplayOverride;
|
|
7
|
+
installationUrls?: InstallationUrls;
|
|
8
|
+
walletBook: WalletBookSchema;
|
|
9
|
+
walletOptionKey: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Assembles a `WalletOption` for a resolved wallet option key, populated
|
|
13
|
+
* with the connection options the transformers produced for it plus an
|
|
14
|
+
* optional install / download URL bag.
|
|
15
|
+
*
|
|
16
|
+
* Display merge rules (provider self-announced metadata wins where set):
|
|
17
|
+
*
|
|
18
|
+
* - `name`: `displayOverride.name` ?? wallet book group name ?? bare key.
|
|
19
|
+
* - `iconUrl`: `displayOverride.iconUrl` ?? wallet book group sprite URL ?? `''`.
|
|
20
|
+
* - `primaryColor`: wallet book group brand color only (providers do not
|
|
21
|
+
* ship a primary color in their announcement metadata).
|
|
22
|
+
* - `installationUrls`: copied through if present.
|
|
23
|
+
*
|
|
24
|
+
* Why provider precedence: a registered wallet provider knows its own
|
|
25
|
+
* brand best (EIP-6963 / Wallet Standard / vendor SDK announcement is the
|
|
26
|
+
* wallet authoring its own identity). The wallet book fills in fields the
|
|
27
|
+
* announcement does not carry — currently only `primaryColor`.
|
|
28
|
+
*
|
|
29
|
+
* @param params.connectionOptions - The connections to attach to this wallet option.
|
|
30
|
+
* @param [params.displayOverride] - Provider-announced display info that overrides the wallet book's name and iconUrl.
|
|
31
|
+
* @param [params.installationUrls] - Install/download URL bag for this wallet.
|
|
32
|
+
* @param params.walletBook - The fetched wallet book.
|
|
33
|
+
* @param params.walletOptionKey - The wallet option key.
|
|
34
|
+
* @returns The constructed wallet option.
|
|
35
|
+
* @not-instrumented
|
|
36
|
+
*/
|
|
37
|
+
export declare const buildWalletOption: ({ connectionOptions, displayOverride, installationUrls, walletBook, walletOptionKey, }: BuildWalletOptionParams) => WalletOption;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=buildWalletOption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildWalletOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kEAAkE,CAAC;AAC1H,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAEzC,KAAK,uBAAuB,GAAG;IAC7B,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iBAAiB,2FAM3B,uBAAuB,KAAG,YAe5B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../client/types/DynamicClient';
|
|
2
|
+
import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
3
|
+
import type { WalletProviderRegistryEntry } from '../../wallets/walletProviderRegistry';
|
|
4
|
+
import type { WithWalletProviderConnectionOption } from '../walletOptionsCatalogue.types';
|
|
5
|
+
/**
|
|
6
|
+
* Display override sourced from a registered wallet provider's announced
|
|
7
|
+
* metadata (EIP-6963 / Wallet Standard / vendor SDK). The outer
|
|
8
|
+
* transformer applies these on top of any wallet book group entry — the
|
|
9
|
+
* provider knows its own brand best, so `name` + `iconUrl` here win
|
|
10
|
+
* over the wallet book's values when both exist.
|
|
11
|
+
*/
|
|
12
|
+
export type WithWalletProviderDisplayOverride = {
|
|
13
|
+
iconUrl: string;
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* One `WithWalletProviderConnectionOption` paired with the wallet option
|
|
18
|
+
* key it should be bucketed under, plus the provider's self-announced
|
|
19
|
+
* display metadata. The outer transformer groups by `walletOptionKey` and
|
|
20
|
+
* uses `displayOverride` to build the wallet option shell, with provider
|
|
21
|
+
* precedence over the wallet book's display fields.
|
|
22
|
+
*/
|
|
23
|
+
export type WithWalletProviderOptionForWalletOption = {
|
|
24
|
+
displayOverride: WithWalletProviderDisplayOverride;
|
|
25
|
+
option: WithWalletProviderConnectionOption;
|
|
26
|
+
walletOptionKey: string;
|
|
27
|
+
};
|
|
28
|
+
type BuildWithWalletProviderOptionsParams = {
|
|
29
|
+
entries: WalletProviderRegistryEntry[];
|
|
30
|
+
walletBook: WalletBookSchema;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Converts each registered wallet provider entry into a
|
|
34
|
+
* `WithWalletProviderConnectionOption` paired with its target wallet
|
|
35
|
+
* option key and the provider's display override. Every classifiable
|
|
36
|
+
* entry surfaces in the catalogue; the outer transformer uses the
|
|
37
|
+
* carried `displayOverride` to override any wallet book branding for
|
|
38
|
+
* that key (provider self-announcement wins over book).
|
|
39
|
+
*
|
|
40
|
+
* Entries whose registration priority is not recognised by
|
|
41
|
+
* `classifyWithWalletProviderSource` are dropped from the catalogue and
|
|
42
|
+
* an error is logged so Datadog surfaces the unknown registration path —
|
|
43
|
+
* in production this should never happen, every chain extension is
|
|
44
|
+
* expected to register with one of the documented priorities.
|
|
45
|
+
*
|
|
46
|
+
* @param params.entries - Snapshot of the registry's entries.
|
|
47
|
+
* @param params.walletBook - The fetched wallet book.
|
|
48
|
+
* @param client - The Dynamic client (used for logging unclassifiable entries).
|
|
49
|
+
* @returns An array of tagged options, in input order.
|
|
50
|
+
* @not-instrumented
|
|
51
|
+
*/
|
|
52
|
+
export declare const buildWithWalletProviderOptions: ({ entries, walletBook }: BuildWithWalletProviderOptionsParams, client: DynamicClient) => WithWalletProviderOptionForWalletOption[];
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=buildWithWalletProviderOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildWithWalletProviderOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGxF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AAE1F;;;;;;GAMG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,uCAAuC,GAAG;IACpD,eAAe,EAAE,iCAAiC,CAAC;IACnD,MAAM,EAAE,kCAAkC,CAAC;IAC3C,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,oCAAoC,GAAG;IAC1C,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACvC,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,8BAA8B,4BAChB,oCAAoC,UACrD,aAAa,KACpB,uCAAuC,EA0CzC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WalletProviderRegistryEntry } from '../../wallets/walletProviderRegistry';
|
|
2
|
+
import type { WithWalletProviderSource } from '../walletOptionsCatalogue.types';
|
|
3
|
+
type ClassifyWithWalletProviderSourceParams = {
|
|
4
|
+
entry: WalletProviderRegistryEntry;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Maps a registered wallet provider's registration priority to the
|
|
8
|
+
* `WithWalletProviderSource` value that should appear on its catalogue option.
|
|
9
|
+
*
|
|
10
|
+
* Priority mapping (set by each chain extension when it calls
|
|
11
|
+
* `registry.register`):
|
|
12
|
+
*
|
|
13
|
+
* - `WALLET_SDK` → `'sdk'` — branded SDKs wrapped by chain extensions
|
|
14
|
+
* (Base Account via `@base-org/account`, MetaMask Connect, …).
|
|
15
|
+
* - `WALLET_SELF_ANNOUNCEMENT_STANDARD` → `'selfAnnounced'` — in-page
|
|
16
|
+
* self-announcement standards (EIP-6963 on EVM, Wallet Standard on
|
|
17
|
+
* Solana / Sui / …).
|
|
18
|
+
* - `WINDOW_INJECT` → `'windowInjected'` — legacy `window.*` injection.
|
|
19
|
+
*
|
|
20
|
+
* Returns `undefined` for providers whose registration priority does not
|
|
21
|
+
* correspond to a connectable external-wallet source — callers filter these
|
|
22
|
+
* out before emitting catalogue options.
|
|
23
|
+
*
|
|
24
|
+
* @param params.entry - The registry entry to classify.
|
|
25
|
+
* @returns The matching source, or `undefined` if this entry should not
|
|
26
|
+
* surface a `withWalletProvider` option.
|
|
27
|
+
* @not-instrumented
|
|
28
|
+
*/
|
|
29
|
+
export declare const classifyWithWalletProviderSource: ({ entry, }: ClassifyWithWalletProviderSourceParams) => WithWalletProviderSource | undefined;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=classifyWithWalletProviderSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classifyWithWalletProviderSource.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAEhF,KAAK,sCAAsC,GAAG;IAC5C,KAAK,EAAE,2BAA2B,CAAC;CACpC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,gCAAgC,eAE1C,sCAAsC,KACrC,wBAAwB,GACxB,SAgBH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WalletOption } from '../walletOptionsCatalogue.types';
|
|
2
|
+
type CompareByRelevanceParams = {
|
|
3
|
+
a: WalletOption;
|
|
4
|
+
b: WalletOption;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Compares two wallet options for relevance ordering: priority-list index
|
|
8
|
+
* first, then alphabetical-by-name as the tie-break. Suitable for passing
|
|
9
|
+
* straight to `Array.prototype.sort`.
|
|
10
|
+
*
|
|
11
|
+
* @param params.a - First wallet option.
|
|
12
|
+
* @param params.b - Second wallet option.
|
|
13
|
+
* @returns Negative when `a` ranks first, positive when `b` ranks first.
|
|
14
|
+
* @not-instrumented
|
|
15
|
+
*/
|
|
16
|
+
export declare const compareByRelevance: ({ a, b, }: CompareByRelevanceParams) => number;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=compareByRelevance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareByRelevance.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,KAAK,wBAAwB,GAAG;IAC9B,CAAC,EAAE,YAAY,CAAC;IAChB,CAAC,EAAE,YAAY,CAAC;CACjB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,cAG5B,wBAAwB,KAAG,MAS7B,CAAC"}
|
package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wallet option keys `getWalletOptionsCatalogue` drops before returning.
|
|
3
|
+
* Curated, product-level suppression.
|
|
4
|
+
*
|
|
5
|
+
* Example: Base Account SDK is the recommended entry point for
|
|
6
|
+
* Coinbase-managed users, so the legacy Coinbase Wallet entries are
|
|
7
|
+
* suppressed in favor of the SDK-backed `baseaccount` tile. Both the
|
|
8
|
+
* wallet book group key (`coinbase`) and the normalized display-name
|
|
9
|
+
* key (`coinbasewallet`) are listed so suppression holds regardless of
|
|
10
|
+
* how the resolver lands on a key.
|
|
11
|
+
*
|
|
12
|
+
* Used in: `getWalletOptionsCatalogue`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EXCLUDED_WALLET_OPTION_KEYS: ReadonlySet<string>;
|
|
15
|
+
//# sourceMappingURL=excludedWalletOptionKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excludedWalletOptionKeys.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAG1D,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
type FindByNameMatchParams = {
|
|
3
|
+
candidate: string;
|
|
4
|
+
walletBook: WalletBookSchema;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Looks for a wallet book entry whose `name` or `shortName` normalizes to
|
|
8
|
+
* the same string as `candidate`. Used as a fallback by
|
|
9
|
+
* `findWalletOptionKeyForProviderKey` for providers whose
|
|
10
|
+
* `walletProviderKey` strips down to a value that does not match any
|
|
11
|
+
* `walletBook.wallets` key directly (e.g. an extension whose display name
|
|
12
|
+
* happens to match the wallet's `shortName` instead of its book key).
|
|
13
|
+
*
|
|
14
|
+
* @param params.candidate - The lowercased, chain-suffix-stripped candidate.
|
|
15
|
+
* @param params.walletBook - The fetched wallet book.
|
|
16
|
+
* @returns The matching wallet book wallet key, or `undefined`.
|
|
17
|
+
* @not-instrumented
|
|
18
|
+
*/
|
|
19
|
+
export declare const findByNameMatch: ({ candidate, walletBook, }: FindByNameMatchParams) => string | undefined;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=findByNameMatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findByNameMatch.d.ts","sourceRoot":"","sources":["../../../../../src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAEzF,KAAK,qBAAqB,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAKF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,+BAGzB,qBAAqB,KAAG,MAAM,GAAG,SAWnC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Chain } from '../../chain';
|
|
2
|
+
import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
3
|
+
import type { WalletProvider } from '../../wallets/walletProvider/walletProvider.types';
|
|
4
|
+
type FindWalletOptionKeyForProviderKeyParams = {
|
|
5
|
+
chain: Chain;
|
|
6
|
+
walletBook: WalletBookSchema;
|
|
7
|
+
walletProvider: WalletProvider;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Resolves a registered wallet provider to the wallet option key it should
|
|
11
|
+
* be bucketed under. Always returns a key — providers with no wallet book
|
|
12
|
+
* match fall back to their self-announced `metadata.displayName`, so the
|
|
13
|
+
* catalogue surfaces them as self-described tiles instead of silently
|
|
14
|
+
* dropping them.
|
|
15
|
+
*
|
|
16
|
+
* Resolution order (each step short-circuits on first hit):
|
|
17
|
+
*
|
|
18
|
+
* 1. **Direct wallet book lookup with chain suffix** — try
|
|
19
|
+
* `walletBook.wallets[normalizedWalletNameWithChain]` as-is. Wallet
|
|
20
|
+
* book entries are inconsistent about whether they keep the chain
|
|
21
|
+
* suffix (e.g. `metamaskevm`) or strip it (e.g. `metamask`), so try
|
|
22
|
+
* the suffixed form first.
|
|
23
|
+
* 2. **Direct wallet book lookup without chain suffix** — strip the
|
|
24
|
+
* suffix and retry.
|
|
25
|
+
* 3. **Name match heuristic with chain suffix** — scan
|
|
26
|
+
* `walletBook.wallets` for an entry whose normalized `name` or
|
|
27
|
+
* `shortName` equals the suffixed candidate.
|
|
28
|
+
* 4. **Name match heuristic without chain suffix** — same scan on the
|
|
29
|
+
* stripped candidate.
|
|
30
|
+
* 5. **Display-name fallback** — derive a stable key from
|
|
31
|
+
* `walletProvider.metadata.displayName` via
|
|
32
|
+
* {@link normalizeWalletDisplayName}. Multi-chain registrations of the
|
|
33
|
+
* same self-described wallet (e.g. Phantom on EVM and Solana) collapse
|
|
34
|
+
* onto the same tile because each announces the same display name.
|
|
35
|
+
*
|
|
36
|
+
* @param params.chain - The provider's chain (used to strip the suffix).
|
|
37
|
+
* @param params.walletBook - The fetched wallet book.
|
|
38
|
+
* @param params.walletProvider - The registered wallet provider.
|
|
39
|
+
* @returns The wallet option key for this provider.
|
|
40
|
+
* @not-instrumented
|
|
41
|
+
*/
|
|
42
|
+
export declare const findWalletOptionKeyForProviderKey: ({ chain, walletBook, walletProvider, }: FindWalletOptionKeyForProviderKeyParams) => string;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=findWalletOptionKeyForProviderKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findWalletOptionKeyForProviderKey.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AAKxF,KAAK,uCAAuC,GAAG;IAC7C,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,gBAAgB,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,iCAAiC,2CAI3C,uCAAuC,KAAG,MAoC5C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
type ResolveWalletOptionKeyParams = {
|
|
3
|
+
fallback: string;
|
|
4
|
+
wallet: WalletBookSchema['wallets'][string];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Picks the wallet option (group) key for a wallet book wallet. The wallet
|
|
8
|
+
* book carries the group association under a few different field names
|
|
9
|
+
* (`group`, `chainGroup`, `walletGroup`) depending on the wallet's
|
|
10
|
+
* provenance — this helper centralises the lookup. When none of those
|
|
11
|
+
* fields are set, the wallet key itself acts as its own wallet option key.
|
|
12
|
+
*
|
|
13
|
+
* @param params.fallback - Wallet key to return if no group field is set.
|
|
14
|
+
* @param params.wallet - The wallet book wallet entry.
|
|
15
|
+
* @returns The resolved wallet option key.
|
|
16
|
+
* @not-instrumented
|
|
17
|
+
*/
|
|
18
|
+
export declare const resolveWalletOptionKey: ({ fallback, wallet, }: ResolveWalletOptionKeyParams) => string;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=resolveWalletOptionKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveWalletOptionKey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAEzF,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,0BAGhC,4BAA4B,KAAG,MACmC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WalletConnectionOption } from '../walletOptionsCatalogue.types';
|
|
2
|
+
type GetConnectionOptionPriorityParams = {
|
|
3
|
+
option: WalletConnectionOption;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Returns the numeric priority of a `WalletConnectionOption` for sorting.
|
|
7
|
+
* Lower numbers rank first.
|
|
8
|
+
*
|
|
9
|
+
* @param params.option - The connection option to inspect.
|
|
10
|
+
* @returns The numeric priority — lower is better.
|
|
11
|
+
* @not-instrumented
|
|
12
|
+
*/
|
|
13
|
+
export declare const getConnectionOptionPriority: ({ option, }: GetConnectionOptionPriorityParams) => number;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=getConnectionOptionPriority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConnectionOptionPriority.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAiB9E,KAAK,iCAAiC,GAAG;IACvC,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,gBAErC,iCAAiC,KAAG,MACE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WalletOption } from '../walletOptionsCatalogue.types';
|
|
2
|
+
type GetPriorityIndexParams = {
|
|
3
|
+
walletOption: WalletOption;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Returns the index of a wallet option in `PRIORITY_WALLET_KEYS`, or
|
|
7
|
+
* `Number.POSITIVE_INFINITY` when the wallet is not in the hand-curated
|
|
8
|
+
* priority list. Lower index = higher priority.
|
|
9
|
+
*
|
|
10
|
+
* @param params.walletOption - The wallet option to inspect.
|
|
11
|
+
* @returns Numeric priority index — lower is better.
|
|
12
|
+
* @not-instrumented
|
|
13
|
+
*/
|
|
14
|
+
export declare const getPriorityIndex: ({ walletOption, }: GetPriorityIndexParams) => number;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=getPriorityIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPriorityIndex.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,KAAK,sBAAsB,GAAG;IAC5B,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,sBAE1B,sBAAsB,KAAG,MAI3B,CAAC"}
|
package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { GetWalletOptionsCatalogueParams, WalletOptionsCatalogue } from '../walletOptionsCatalogue.types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a catalogue of the external wallet options a user can sign in
|
|
4
|
+
* with through this client. Each wallet option carries an ordered
|
|
5
|
+
* `connectionOptions` array — `withWalletProvider` (direct), `walletConnect`
|
|
6
|
+
* (deeplink/QR), or `inAppBrowser` (mobile webview). Wallet options without
|
|
7
|
+
* any matching connections are omitted.
|
|
8
|
+
*
|
|
9
|
+
* `includeWithWalletProvider` defaults to `true`; all other inclusion flags
|
|
10
|
+
* are opt-in. `walletOptionOrdering` defaults to `'relevance'` (Dynamic's
|
|
11
|
+
* recommended order); pass `'alphabetical'` to sort by wallet option name
|
|
12
|
+
* within each option-priority tier.
|
|
13
|
+
*
|
|
14
|
+
* The wallet book is fetched only when an enabled flag needs it
|
|
15
|
+
* (`includeWalletConnect`, `includeInAppBrowser`). Calls that only need
|
|
16
|
+
* `includeWithWalletProvider` skip the fetch entirely.
|
|
17
|
+
*
|
|
18
|
+
* @param [params] - Inclusion flags + ordering preference.
|
|
19
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
20
|
+
* @returns A promise that resolves to the wallet options catalogue.
|
|
21
|
+
* @not-instrumented
|
|
22
|
+
*/
|
|
23
|
+
export declare const getWalletOptionsCatalogue: (params?: GetWalletOptionsCatalogueParams, client?: import("../../../exports").DynamicClient) => Promise<WalletOptionsCatalogue>;
|
|
24
|
+
//# sourceMappingURL=getWalletOptionsCatalogue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWalletOptionsCatalogue.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,+BAA+B,EAG/B,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAIzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,yBAAyB,YAC5B,+BAA+B,wDAEtC,OAAO,CAAC,sBAAsB,CA8EhC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { WithWalletProviderDisplayOverride } from '../buildWithWalletProviderOptions/buildWithWalletProviderOptions';
|
|
2
|
+
import type { WalletConnectionOption } from '../walletOptionsCatalogue.types';
|
|
3
|
+
/**
|
|
4
|
+
* A `connectionOption` tagged with the wallet option key it belongs under.
|
|
5
|
+
* Transformer outputs produce these; the catalogue groups them by
|
|
6
|
+
* `walletOptionKey` before building wallet option shells.
|
|
7
|
+
*
|
|
8
|
+
* `displayOverride` is set only by the `withWalletProvider` transformer,
|
|
9
|
+
* carrying the provider's self-announced `name` + `iconUrl`. The shell
|
|
10
|
+
* builder applies it on top of any wallet book entry — provider
|
|
11
|
+
* metadata wins over book branding.
|
|
12
|
+
*/
|
|
13
|
+
export type ConnectionOptionForWalletOption = {
|
|
14
|
+
displayOverride?: WithWalletProviderDisplayOverride;
|
|
15
|
+
option: WalletConnectionOption;
|
|
16
|
+
walletOptionKey: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Bucket of grouped options for a single wallet option key, plus the
|
|
20
|
+
* first-seen display override (if any). Returned by
|
|
21
|
+
* `groupOptionsByWalletOption` for the catalogue to feed into the shell
|
|
22
|
+
* builder.
|
|
23
|
+
*/
|
|
24
|
+
export type GroupedWalletOption = {
|
|
25
|
+
connectionOptions: WalletConnectionOption[];
|
|
26
|
+
displayOverride?: WithWalletProviderDisplayOverride;
|
|
27
|
+
};
|
|
28
|
+
type GroupOptionsByWalletOptionParams = {
|
|
29
|
+
options: ConnectionOptionForWalletOption[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Buckets tagged connection options by their wallet option key. Preserves
|
|
33
|
+
* first-seen order so that the caller's choice of
|
|
34
|
+
* `walletOptionOrdering: 'relevance'` naturally inherits the upstream input
|
|
35
|
+
* order (wallet book order for walletConnect/inAppBrowser/installation,
|
|
36
|
+
* registry order for withWalletProvider).
|
|
37
|
+
*
|
|
38
|
+
* Carries through the first-seen `displayOverride` per wallet option
|
|
39
|
+
* key, so the shell builder can apply provider-announced metadata on
|
|
40
|
+
* top of any wallet book entry.
|
|
41
|
+
*
|
|
42
|
+
* @param params.options - The tagged options to group.
|
|
43
|
+
* @returns A map from wallet option key to its grouped option bucket,
|
|
44
|
+
* iterable in first-seen order.
|
|
45
|
+
* @not-instrumented
|
|
46
|
+
*/
|
|
47
|
+
export declare const groupOptionsByWalletOption: ({ options, }: GroupOptionsByWalletOptionParams) => Map<string, GroupedWalletOption>;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=groupOptionsByWalletOption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupOptionsByWalletOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kEAAkE,CAAC;AAC1H,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E;;;;;;;;;GASG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,MAAM,EAAE,sBAAsB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C,eAAe,CAAC,EAAE,iCAAiC,CAAC;CACrD,CAAC;AAEF,KAAK,gCAAgC,GAAG;IACtC,OAAO,EAAE,+BAA+B,EAAE,CAAC;CAC5C,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,0BAA0B,iBAEpC,gCAAgC,KAAG,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAoBpE,CAAC"}
|
package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WalletOption } from '../walletOptionsCatalogue.types';
|
|
2
|
+
type HasAnyConnectionOptionParams = {
|
|
3
|
+
walletOption: WalletOption;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* True when the wallet option has at least one connection — i.e. the user
|
|
7
|
+
* can sign in right now. Install-only wallet options surface in the
|
|
8
|
+
* catalogue too (they carry `installationUrls`) but have an empty
|
|
9
|
+
* `connectionOptions` array; this predicate distinguishes them from
|
|
10
|
+
* actually connectable wallets in the relevance sort.
|
|
11
|
+
*
|
|
12
|
+
* @param params.walletOption - The wallet option to inspect.
|
|
13
|
+
* @returns True when `connectionOptions` is non-empty.
|
|
14
|
+
* @not-instrumented
|
|
15
|
+
*/
|
|
16
|
+
export declare const hasAnyConnectionOption: ({ walletOption, }: HasAnyConnectionOptionParams) => boolean;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=hasAnyConnectionOption.d.ts.map
|
package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasAnyConnectionOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,KAAK,4BAA4B,GAAG;IAClC,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,sBAEhC,4BAA4B,KAAG,OACS,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WalletOption } from '../walletOptionsCatalogue.types';
|
|
2
|
+
type HasInstalledProviderParams = {
|
|
3
|
+
walletOption: WalletOption;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* True when the wallet option has a `withWalletProvider` connection — i.e.
|
|
7
|
+
* the user already has the wallet available in the page (browser extension,
|
|
8
|
+
* Wallet Standard announcement, window injection, or an SDK-backed provider
|
|
9
|
+
* one of our chain extensions registered). `connectionOptions` is
|
|
10
|
+
* pre-sorted, so a registered provider always sits at index 0 when present.
|
|
11
|
+
*
|
|
12
|
+
* @param params.walletOption - The wallet option to inspect.
|
|
13
|
+
* @returns True when an installed provider is available.
|
|
14
|
+
* @not-instrumented
|
|
15
|
+
*/
|
|
16
|
+
export declare const hasInstalledProvider: ({ walletOption, }: HasInstalledProviderParams) => boolean;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=hasInstalledProvider.d.ts.map
|
package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasInstalledProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,KAAK,0BAA0B,GAAG;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,sBAE9B,0BAA0B,KAAG,OACkC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes a wallet's self-announced `displayName` into a stable wallet
|
|
3
|
+
* option key. Used by `findWalletOptionKeyForProviderKey` as the off-book
|
|
4
|
+
* fallback — registered providers whose `walletProviderKey` does not
|
|
5
|
+
* resolve to any wallet book entry still surface in the catalogue under a
|
|
6
|
+
* key derived from the name they ship in their metadata.
|
|
7
|
+
*
|
|
8
|
+
* The normalization (lowercase + whitespace-strip) intentionally matches
|
|
9
|
+
* how the legacy wallet book composes its `wallets.<key>` keys, so a
|
|
10
|
+
* self-described provider's option will merge cleanly with its book entry
|
|
11
|
+
* if one ever lands later.
|
|
12
|
+
*
|
|
13
|
+
* Multi-chain registrations of the same wallet (e.g. Phantom announced via
|
|
14
|
+
* EIP-6963 on EVM and via Wallet Standard on Solana) collapse onto the
|
|
15
|
+
* same wallet option through this normalization, since each registration
|
|
16
|
+
* announces the same `displayName`.
|
|
17
|
+
*
|
|
18
|
+
* @param displayName - The provider's `metadata.displayName`.
|
|
19
|
+
* @returns The normalized wallet option key (lowercased, no whitespace).
|
|
20
|
+
* @not-instrumented
|
|
21
|
+
*/
|
|
22
|
+
export declare const normalizeWalletDisplayName: (displayName: string) => string;
|
|
23
|
+
//# sourceMappingURL=normalizeWalletDisplayName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeWalletDisplayName.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,0BAA0B,gBAAiB,MAAM,KAAG,MAClB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WalletSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
2
|
+
type ResolveWalletBookWalletOptionKeyParams = {
|
|
3
|
+
wallet: WalletSchema;
|
|
4
|
+
walletKey: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Resolves which wallet option (group) a wallet book entry belongs to. Used
|
|
8
|
+
* by the catalogue's wallet-book-driven transformers (`walletConnect`,
|
|
9
|
+
* `inAppBrowser`, `installation`) to bucket their emitted options.
|
|
10
|
+
*
|
|
11
|
+
* Wallet book entries inconsistently use `group` / `chainGroup` /
|
|
12
|
+
* `walletGroup` for the same idea. The wallet key itself acts as the wallet
|
|
13
|
+
* option key when no group field is set.
|
|
14
|
+
*
|
|
15
|
+
* @param params.wallet - The wallet entry.
|
|
16
|
+
* @param params.walletKey - The wallet's key in `walletBook.wallets`.
|
|
17
|
+
* @returns The wallet option key.
|
|
18
|
+
* @not-instrumented
|
|
19
|
+
*/
|
|
20
|
+
export declare const resolveWalletBookWalletOptionKey: ({ wallet, walletKey, }: ResolveWalletBookWalletOptionKeyParams) => string;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=resolveWalletBookWalletOptionKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveWalletBookWalletOptionKey.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAElF,KAAK,sCAAsC,GAAG;IAC5C,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gCAAgC,2BAG1C,sCAAsC,KAAG,MAC0B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WalletConnectionOption } from '../walletOptionsCatalogue.types';
|
|
2
|
+
type SortConnectionOptionsParams = {
|
|
3
|
+
options: WalletConnectionOption[];
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Sorts a wallet option's `connectionOptions` so the most preferred option lands at
|
|
7
|
+
* index 0. Primary sort is by option-type priority
|
|
8
|
+
* (`withWalletProvider` > `walletConnect` > `inAppBrowser`);
|
|
9
|
+
* within a type, ties break alphabetically by `chain` for deterministic
|
|
10
|
+
* output across calls.
|
|
11
|
+
*
|
|
12
|
+
* Returns a new array — the input is not mutated.
|
|
13
|
+
*
|
|
14
|
+
* @param params.options - The options to sort.
|
|
15
|
+
* @returns A new array in priority order.
|
|
16
|
+
* @not-instrumented
|
|
17
|
+
*/
|
|
18
|
+
export declare const sortConnectionOptions: ({ options, }: SortConnectionOptionsParams) => WalletConnectionOption[];
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=sortConnectionOptions.d.ts.map
|
package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortConnectionOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E,KAAK,2BAA2B,GAAG;IACjC,OAAO,EAAE,sBAAsB,EAAE,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,iBAE/B,2BAA2B,KAAG,sBAAsB,EAWnD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WalletOption, WalletOptionOrdering } from '../walletOptionsCatalogue.types';
|
|
2
|
+
type SortWalletOptionsParams = {
|
|
3
|
+
ordering: WalletOptionOrdering;
|
|
4
|
+
walletOptions: WalletOption[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Sorts the outer wallet-option list. This is the only ordering controlled
|
|
8
|
+
* by the customer; the inner `connectionOptions` array of each wallet
|
|
9
|
+
* option is ordered separately by `sortConnectionOptions` using a fixed
|
|
10
|
+
* option-type priority.
|
|
11
|
+
*
|
|
12
|
+
* - `'relevance'` (default): bucket wallet options into three tiers, in
|
|
13
|
+
* this order:
|
|
14
|
+
* 1. **Installed provider** — user already has the wallet available
|
|
15
|
+
* (`withWalletProvider` at index 0).
|
|
16
|
+
* 2. **Connectable** — has at least one connection (`walletConnect`
|
|
17
|
+
* or `inAppBrowser`) but no installed provider.
|
|
18
|
+
* 3. **Install-only** — no connection at all; only `installationUrls`.
|
|
19
|
+
* Within each tier, rank by the hand-curated {@link PRIORITY_WALLET_KEYS}
|
|
20
|
+
* list (MetaMask, Coinbase, Phantom, …); unknown wallets fall through to
|
|
21
|
+
* alphabetical-by-name order at the tail of their tier.
|
|
22
|
+
* - `'alphabetical'`: case-insensitive sort by wallet option `name`,
|
|
23
|
+
* without bucketing.
|
|
24
|
+
*
|
|
25
|
+
* Returns a new array — the input is not mutated.
|
|
26
|
+
*
|
|
27
|
+
* @param params.walletOptions - The wallet options to sort.
|
|
28
|
+
* @param params.ordering - The requested ordering.
|
|
29
|
+
* @returns A new array in the requested order.
|
|
30
|
+
* @not-instrumented
|
|
31
|
+
*/
|
|
32
|
+
export declare const sortWalletOptions: ({ walletOptions, ordering, }: SortWalletOptionsParams) => WalletOption[];
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=sortWalletOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortWalletOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AAEzC,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iBAAiB,iCAG3B,uBAAuB,KAAG,YAAY,EA0BxC,CAAC"}
|