nostr-bray 3.5.1 → 3.5.2

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.
@@ -63,13 +63,11 @@ export async function handleMarketplaceDiscover(pool, npub, args) {
63
63
  if (args.authors?.length) {
64
64
  filter.authors = args.authors;
65
65
  }
66
- // Relay-side tag filters
66
+ // Relay-side tag filters. Relays index single-letter tags only and reject
67
+ // a #pmi filter ("unindexed tag filter"), so payment rails match below.
67
68
  if (args.topics?.length) {
68
69
  filter['#t'] = args.topics;
69
70
  }
70
- if (args.paymentMethod) {
71
- filter['#pmi'] = [args.paymentMethod];
72
- }
73
71
  let events;
74
72
  if (args.relays?.length) {
75
73
  events = await pool.queryDirect(args.relays, filter);
@@ -88,6 +86,10 @@ export async function handleMarketplaceDiscover(pool, npub, args) {
88
86
  }
89
87
  }
90
88
  let services = [...replaceableMap.values()].map(parseAnnounceEvent);
89
+ if (args.paymentMethod) {
90
+ const rail = args.paymentMethod.toLowerCase();
91
+ services = services.filter(svc => svc.paymentMethods.some(pm => pm[0]?.toLowerCase() === rail));
92
+ }
91
93
  // Client-side price filter (relays cannot filter by price range)
92
94
  if (args.maxPrice !== undefined && args.currency) {
93
95
  const currencyLower = args.currency.toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nostr-bray",
3
- "version": "3.5.1",
3
+ "version": "3.5.2",
4
4
  "mcpName": "dev.forgesworn/bray",
5
5
  "description": "Trust-aware Nostr for AI and humans. Three dimensions of trust -- verification, proximity, and access -- woven into every interaction.",
6
6
  "type": "module",