UNPKG

@helia/http

Version:

A lightweight implementation of IPFS over HTTP in JavaScript

13 lines 435 B
import { createLibp2p as create } from 'libp2p'; import { libp2pDefaults } from './libp2p-defaults.js'; export async function createLibp2p(options) { const defaults = libp2pDefaults(); options = options ?? {}; // @ts-expect-error derived ServiceMap is not compatible with ServiceFactoryMap return create({ ...defaults, ...options.libp2p, start: false }); } //# sourceMappingURL=libp2p.js.map