import { Type } from "@chainsafe/ssz";
import { ResponseIncoming } from "@lodestar/reqresp";
import { WithBytes } from "@lodestar/types";
import { ResponseTypeGetter } from "../types.js";
/**
 * Sink for `<response_chunk>*`, from
 * ```bnf
 * response ::= <response_chunk>*
 * ```
 * Expects exactly one response
 */
export declare function collectExactOneTyped<T>(source: AsyncIterable<ResponseIncoming>, typeFn: ResponseTypeGetter<T>): Promise<T>;
/**
 * Sink for `<response_chunk>*`, from
 * ```bnf
 * response ::= <response_chunk>*
 * ```
 * Collects a bounded list of responses up to `maxResponses`
 */
export declare function collectMaxResponseTyped<T>(source: AsyncIterable<ResponseIncoming>, maxResponses: number, typeFn: ResponseTypeGetter<T>): Promise<T[]>;
/**
 * Sink for `<response_chunk>*`, from
 * ```bnf
 * response ::= <response_chunk>*
 * ```
 * Collects a bounded list of responses up to `maxResponses`
 */
export declare function collectMaxResponseTypedWithBytes<T>(source: AsyncIterable<ResponseIncoming>, maxResponses: number, typeFn: ResponseTypeGetter<T>): Promise<WithBytes<T>[]>;
/** Light wrapper on type to wrap deserialize errors */
export declare function sszDeserializeResponse<T>(type: Type<T>, bytes: Uint8Array): T;
//# sourceMappingURL=collect.d.ts.map