@@ -27,7 +27,6 @@ import { setActiveUser } from "./active-user.js";
2727import type { CashuPayCb , LnPayCb , NDKPaymentConfirmation , NDKZapSplit } from "../zapper/index.js" ;
2828import type { NostrEvent } from "nostr-tools" ;
2929import type { NDKLnUrlData } from "../zapper/ln.js" ;
30- import { NDKEncryptionScheme } from "../types.js" ;
3130
3231export type NDKValidationRatioFn = (
3332 relay : NDKRelay ,
@@ -224,6 +223,7 @@ export class NDK extends EventEmitter<{
224223 ) => void ;
225224} > {
226225 private _explicitRelayUrls ?: WebSocket [ "url" ] [ ] ;
226+ public blacklistRelayUrls ?: WebSocket [ "url" ] [ ] ;
227227 public pool : NDKPool ;
228228 public outboxPool ?: NDKPool ;
229229 private _signer ?: NDKSigner ;
@@ -301,13 +301,14 @@ export class NDK extends EventEmitter<{
301301 this . debug = opts . debug || debug ( "ndk" ) ;
302302 this . netDebug = opts . netDebug ;
303303 this . _explicitRelayUrls = opts . explicitRelayUrls || [ ] ;
304+ this . blacklistRelayUrls = opts . blacklistRelayUrls || DEFAULT_BLACKLISTED_RELAYS ;
304305 this . subManager = new NDKSubscriptionManager ( this . debug ) ;
305306 this . pool = new NDKPool (
306307 opts . explicitRelayUrls || [ ] ,
307- opts . blacklistRelayUrls || DEFAULT_BLACKLISTED_RELAYS ,
308+ [ ] ,
308309 this
309310 ) ;
310- this . pool . name = "main " ;
311+ this . pool . name = "Main " ;
311312
312313 this . pool . on ( "relay:auth" , async ( relay : NDKRelay , challenge : string ) => {
313314 if ( this . relayAuthDefaultPolicy ) {
@@ -326,11 +327,11 @@ export class NDK extends EventEmitter<{
326327 if ( opts . enableOutboxModel ) {
327328 this . outboxPool = new NDKPool (
328329 opts . outboxRelayUrls || DEFAULT_OUTBOX_RELAYS ,
329- opts . blacklistRelayUrls || DEFAULT_BLACKLISTED_RELAYS ,
330+ [ ] ,
330331 this ,
331332 {
332333 debug : this . debug . extend ( "outbox-pool" ) ,
333- name : "outbox "
334+ name : "Outbox Pool "
334335 }
335336 ) ;
336337
0 commit comments