@orangecheck/sdk 1.13.0 → 1.14.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
@@ -218,7 +218,9 @@ var ATTESTATION_EVENT_KIND = 30078;
218
218
  var DEFAULT_RELAYS = [
219
219
  "wss://relay.damus.io",
220
220
  "wss://nos.lol",
221
- "wss://relay.snort.social",
221
+ // relay.snort.social sat here until 2026-10-21. It now runs in memory: it
222
+ // answered OK true to family events and served none of them back.
223
+ "wss://nostr.oxtr.dev",
222
224
  "wss://relay.ochk.io"
223
225
  ];
224
226
  var FANOUT_DEADLINE_MS = 4e3;
@@ -746,13 +748,16 @@ async function discoverAttestations(options) {
746
748
  throw new Error("Must provide attestationId, address, or identity");
747
749
  }
748
750
  const envelopes = [];
751
+ const kept = /* @__PURE__ */ new Set();
749
752
  for (const event of events) {
750
753
  const envelope = parseAttestationFromEvent(event);
754
+ if (envelope && kept.has(envelope.attestation_id)) continue;
751
755
  if (envelope && !eventIndexesEnvelope(event, envelope)) {
752
756
  log3.warn({ eventId: event.id }, "Skipping event whose index tags disagree with its envelope");
753
757
  } else if (envelope) {
754
758
  const isValid = await verifyAttestationEnvelope(envelope);
755
759
  if (isValid) {
760
+ kept.add(envelope.attestation_id);
756
761
  envelopes.push(envelope);
757
762
  } else {
758
763
  log3.warn(