import type { TrustlessGatewayBlockBrokerInit, TrustlessGatewayBlockBrokerComponents, TrustlessGatewayGetBlockProgressEvents } from './index.ts'; import type { TransformRequestInit } from './trustless-gateway.ts'; import type { BlockRetrievalOptions, BlockBroker, CreateSessionOptions, SessionBlockBroker } from '@helia/interface'; import type { CID } from 'multiformats/cid'; export interface CreateTrustlessGatewaySessionOptions extends CreateSessionOptions { /** * By default we will only connect to peers with HTTPS addresses, pass true * to also connect to HTTP addresses. * * @default false */ allowInsecure?: boolean; /** * By default we will only connect to peers with public or DNS addresses, pass * true to also connect to private addresses. * * @default false */ allowLocal?: boolean; /** * Provide a function that will be called before querying trustless-gateways. * * This lets you modify the fetch options to pass custom headers or other * necessary things. */ transformRequestInit?: TransformRequestInit; } /** * A class that accepts a list of trustless gateways that are queried * for blocks. */ export declare class TrustlessGatewayBlockBroker implements BlockBroker { readonly name = "trustless-gateway"; private readonly allowInsecure; private readonly allowLocal; private readonly transformRequestInit?; private readonly routing; private readonly log; private readonly logger; constructor(components: TrustlessGatewayBlockBrokerComponents, init?: TrustlessGatewayBlockBrokerInit); retrieve(cid: CID, options?: BlockRetrievalOptions): Promise; createSession(options?: CreateTrustlessGatewaySessionOptions): SessionBlockBroker; } //# sourceMappingURL=broker.d.ts.map