/** * Actions that carry rendition + info_hash context and therefore must be * filtered against the locally active swarm. Extracted from P2PManager so the * logic can be unit-tested without spinning up a WebSocket stub. */ export declare function trackerActionRequiresRendition(action: string | undefined): boolean; /** * Returns true when the tracker message's `protocol_version` matches the * locally configured one. Parity with Android `matchesCurrentProtocolVersion` * — messages WITHOUT a numeric `protocol_version` are rejected (a V2 tracker * always tags them, a V1 tracker's response is not meant to be consumed by * a V2 peer anyway). Filters on the narrow contract: only numeric, matching. */ export declare function messageMatchesProtocolVersion(data: { [key: string]: any; } | undefined, expectedVersion: number): boolean; /** * Returns true when the tracker message is addressed to the locally active * swarm. Byte-for-byte parity with Android `matchesCurrentSwarmContext`: * 1. If the action doesn't require rendition (e.g. runtime `config`), * it always passes. * 2. Otherwise, the message MUST carry a `rendition` field — missing * rendition is rejected as malformed. * 3. If the message's rendition disagrees with the locally active one, * reject as stale. * 4. For Join responses, no `info_hash` check (the local * `activeInfoHash` hasn't been locked in yet). * 5. For every other action, the message MUST carry `info_hash`; missing * or mismatched info_hash is rejected as stale. */ export declare function messageMatchesSwarm(data: { [key: string]: any; } | undefined, activeRendition: string | undefined, activeInfoHash: string | undefined): boolean;