/** * Helia-based SDN node factory. * * Creates a Helia node that wraps libp2p with IPFS content-routing, giving * every SDN node full IPFS + p2p capabilities in both browser and Node.js. * * The internal libp2p instance uses the same transport/security/pubsub config * as SDNNode so both can interoperate on the same network. * * Usage: * * const { helia, libp2p } = await createHeliaSDNNode({ edgeRelays: [...] }); * * // IPFS content operations * const fs = unixfs(helia); * const cid = await fs.addBytes(myData); * * // p2p stream protocol * libp2p.handle('/my/protocol/1.0.0', handler); * * await helia.stop(); */ import { type Helia } from 'helia'; import { type Libp2p } from 'libp2p'; import type { SDNConfig } from './node'; export interface HeliaSDNNode { /** The Helia node (IPFS + libp2p). */ helia: Helia; /** The underlying libp2p instance (also accessible via helia.libp2p). */ libp2p: Libp2p; /** Stop both Helia and libp2p. */ stop(): Promise; } export declare function createHeliaFromLibp2p(libp2p: Libp2p): Promise; export declare function fetchCIDBytesFromHelia(helia: Helia, cid: string): Promise; /** * Create a Helia node configured for the Space Data Network. * * The libp2p config mirrors SDNNode.init() so both node types are * compatible peers on the same network. * * @param config SDNConfig — same options accepted by SDNNode.create() */ export declare function createHeliaSDNNode(config?: SDNConfig): Promise; //# sourceMappingURL=helia.d.ts.map