import type { Libp2pDefaultsOptions } from './libp2p.js'; import type { AutoTLS } from '@ipshipyard/libp2p-auto-tls'; import type { CircuitRelayService } from '@libp2p/circuit-relay-v2'; import type { HTTP } from '@libp2p/http'; import type { Identify } from '@libp2p/identify'; import type { KadDHT } from '@libp2p/kad-dht'; import type { Keychain } from '@libp2p/keychain'; import type { Ping } from '@libp2p/ping'; import type { Libp2pOptions } from 'libp2p'; export interface DefaultLibp2pServices extends Record { autoNAT: unknown; autoTLS: AutoTLS; dcutr: unknown; delegatedRouting: unknown; dht: KadDHT; identify: Identify; keychain: Keychain; ping: Ping; relay: CircuitRelayService; upnp: unknown; http: HTTP; } /** * Returns the default libp2p config used by Helia which can then be modified or * extended to suit individual applications. * * @example Adding an additional libp2p service * * ```ts * import { myService } from '@example/my-service' * import { createHelia, libp2pDefaults } from 'helia' * * // get a copy of the default libp2p config * const libp2p = libp2pDefaults() * * // add the custom service to the service map * libp2p.services.myService = myService() * * // create a Helia node with the custom libp2p config * const helia = await createHelia({ * libp2p * }) * * //... use service * helia.libp2p.services.myService.serviceMethod() * ``` */ export declare function libp2pDefaults(options?: Libp2pDefaultsOptions): Libp2pOptions & Required, 'services'>>; //# sourceMappingURL=libp2p-defaults.d.ts.map