import { Connection } from 'typeorm' ; import { RfqBlockedAddressUtils } from './rfq_blocked_address_utils' ; /**
 * Satisfies the Set<string> interface, but uses RfqBlockedAddressUtils under the hood.
 * Only implements the `has` method
 */ export class RfqDynamicBlacklist implements Set < string > { public size : number ; public [ Symbol . toStringTag ] : string ; private readonly _rfqBlockedAddressUtils : RfqBlockedAddressUtils ; constructor ( connection , initialBlockedSet , ttlMs ) { this . _rfqBlockedAddressUtils = new RfqBlockedAddressUtils ( connection , initialBlockedSet , ttlMs ) ; this . size = 0 ; } public has ( value ) { return this . _rfqBlockedAddressUtils . isBlocked ( value ) ; } public add ( value ) { this . _rfqBlockedAddressUtils . _blocked . add ( value ) ; return this ; } public clear ( ) { this . _rfqBlockedAddressUtils . _blocked . clear ( ) ; } public delete ( value ) { return this . _rfqBlockedAddressUtils . _blocked . delete ( value ) ; } public forEach ( callbackfn , thisArg ? ) { this . _rfqBlockedAddressUtils . _blocked . forEach ( callbackfn ) ; } public entries ( ) { return this . _rfqBlockedAddressUtils . _blocked . entries ( ) ; } public keys ( ) { return this . _rfqBlockedAddressUtils . _blocked . keys ( ) ; } public values ( ) { return this . _rfqBlockedAddressUtils . _blocked . values ( ) ; } public [ Symbol . iterator ] ( ) { return this . _rfqBlockedAddressUtils . _blocked . values ( ) ; } }