Remove nostr shim and retarget imports

This commit is contained in:
thePR0M3TH3AN committed 2026-01-06 15:32:21 -05:00
1 parent 5d22d78717
commit 3996986e63
36 files changed
+89 -206

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ When wiring moderation or playback toggles into view analytics, import helpers f
import { recordVideoView, subscribeVideoViewEvents } from "../nostrViewEventsFacade.js";
```
The facade wraps [`js/nostr/viewEventBindings.js`](../js/nostr/viewEventBindings.js) so feature flags, relay discovery, and COUNT/LIST fallbacks all run through the same guard clauses that enforce the NIP-71/NIP-78 schemas. `js/nostr.js` still exports shimmed versions for legacy bundles, but new code should migrate to the facades to keep the eventual removal painless. Modules that need to no-op when relays disable optional methods can rely on the binding’s "unavailable" errors to short-circuit cleanly.
The facade wraps [`js/nostr/viewEventBindings.js`](../js/nostr/viewEventBindings.js) so feature flags, relay discovery, and COUNT/LIST fallbacks all run through the same guard clauses that enforce the NIP-71/NIP-78 schemas. Modules that need to no-op when relays disable optional methods can rely on the binding’s "unavailable" errors to short-circuit cleanly.
### Hydration, COUNT, and UI sync
+2 -3
View File
@@ -110,9 +110,8 @@ through the dedicated facade when you need to run a NIP-07 handshake:
import { nostrClient, requestDefaultExtensionPermissions } from "./nostrClientFacade.js";
```
`js/nostr.js` remains as a compatibility shim while downstream packages migrate;
it forwards to the new facades but is slated for removal once legacy imports
are retired.【F:js/nostr/defaultClient.js†L1-L25】【F:js/nostr.js†L1-L92】
The compatibility shim has been removed; import from the facades above to avoid
broken references.【F:js/nostr/defaultClient.js†L1-L25】
For analytics, route through the
[NIP-71](https://github.com/nostr-protocol/nips/blob/master/71.md) helpers in