/** * @fileoverview In-memory ban list cache. * * Each node maintains a local cache of active bans, updated via gossip. * Enforcement points check isBanned() which is O(1) via a hex-keyed Map. * * @see Network Trust and Ban Mechanism spec, Requirements 4.3, 4.4, 5.6 */ import { HexString, PlatformID, TypedIdProviderWrapper } from '@digitaldefiance/ecies-lib'; import { IBanListCache } from '../interfaces/network/banListCache'; import { IBanRecord } from '../interfaces/network/banRecord'; /** * In-memory implementation of the ban list cache. * Uses a Map keyed by hex-encoded member IDs for O(1) lookups. * * @template TID - Platform ID type */ export declare class BanListCache implements IBanListCache { private readonly idProvider; private readonly bannedMembers; constructor(idProvider: TypedIdProviderWrapper); private toHex; isBanned(memberId: TID): boolean; addBan(record: IBanRecord): void; removeBan(memberId: TID): void; getAll(): IBanRecord[]; getBan(memberId: TID): IBanRecord | null; loadFrom(records: IBanRecord[]): void; get size(): number; /** * Verify a ban record's BrightTrust signatures. * * Checks that at least `record.requiredSignatures` of the attached * signatures are valid against the provided BrightTrust public keys. * Uses ECDSA signature verification (secp256k1). * * @param record - The ban record to verify * @param brightTrustPublicKeys - Map of hex member ID → public key bytes * @returns true if enough valid signatures are present */ verifySignatures(record: IBanRecord, brightTrustPublicKeys: Map): Promise; /** * Verify an ECDSA signature using the Web Crypto API (browser-compatible) * or Node.js crypto. This is a minimal implementation; production code * should delegate to the existing ECIESService or NodeAuthenticator. */ private verifyEcdsaSignature; } //# sourceMappingURL=banListCache.d.ts.map