@partylayer/sdk 0.17.1 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1015,7 +1015,7 @@ var PartyLayerClient = class {
1015
1015
  channel: "stable"
1016
1016
  });
1017
1017
  }
1018
- registryWallets = await this.gateDiscoveryAdapterEntries(registryWallets);
1018
+ registryWallets = await this.gateUnconnectableEntries(registryWallets);
1019
1019
  registryWallets = await this.aggregateAnnouncedWallets(registryWallets);
1020
1020
  void this.warmDiscoveryPlans(registryWallets);
1021
1021
  if (filter?.requiredCapabilities) {
@@ -1031,19 +1031,31 @@ var PartyLayerClient = class {
1031
1031
  return registryWallets;
1032
1032
  }
1033
1033
  /**
1034
- * Hide `transport: 'discovery-adapter'` registry entries whose matching
1035
- * adapter is NOT registered. A discovery-adapter wallet's provider is supplied
1036
- * by the app (an official ProviderAdapter the SDK bridges under
1037
- * `toWalletId(providerId)`); without it, clicking the entry can only fail. So
1038
- * the entry surfaces only when its adapter is present. No-op when the registry
1039
- * is unavailable (list is already adapters-only) or has no such entries.
1034
+ * Hide registry entries whose wallet needs an app-registered adapter that is
1035
+ * NOT registered. This is the library default (RainbowKit-style): never show a
1036
+ * wallet the app cannot actually connect.
1037
+ *
1038
+ * A wallet is connectable with NO app adapter only when it is driven by the
1039
+ * generic announce path (`adapter.transport: 'announce'`, e.g. Console, Send):
1040
+ * there the SDK builds a generic announce adapter from the registry entry on
1041
+ * demand, so installing the extension is enough and the entry stays visible.
1042
+ * Every other transport can only connect through an adapter the app registered:
1043
+ * a `discovery-adapter` popup/remote wallet whose official ProviderAdapter
1044
+ * the app supplies (bridged under `toWalletId(providerId)`), or a wallet that
1045
+ * ships a PartyLayer adapter package (Loop, Cantor8, Nightly, Bron,
1046
+ * WalletConnect). Without that adapter, clicking the entry can only fail
1047
+ * (connect throws), so it surfaces only when the adapter is present.
1048
+ *
1049
+ * The decision reads each entry's DECLARED transport, never a hardcoded wallet
1050
+ * list. No-op when the registry is unavailable (the list is already
1051
+ * adapters-only) or every non-announce entry is registered.
1040
1052
  */
1041
- async gateDiscoveryAdapterEntries(wallets) {
1053
+ async gateUnconnectableEntries(wallets) {
1042
1054
  let hidden = null;
1043
1055
  try {
1044
1056
  const registry = await this.registryClient.getRegistry();
1045
1057
  for (const entry of registry.wallets) {
1046
- if (entry.adapter?.transport !== "discovery-adapter") continue;
1058
+ if (entry.adapter?.transport === "announce") continue;
1047
1059
  const walletId = toWalletId(entry.id);
1048
1060
  if (!this.adapters.has(walletId)) {
1049
1061
  (hidden ??= /* @__PURE__ */ new Set()).add(String(walletId));