UNPKG

libp2p

Version:

JavaScript implementation of libp2p, a modular peer to peer network stack

8 lines 367 B
import { InvalidParametersError } from '@libp2p/interface'; export async function validateConfig(opts) { if (opts.connectionProtector === null && globalThis.process?.env?.LIBP2P_FORCE_PNET != null) { throw new InvalidParametersError('Private network is enforced, but no protector was provided'); } return opts; } //# sourceMappingURL=config.js.map