refactor: update exports and add factory for S5Node

This commit is contained in:
Derrick Hammer 2023-08-31 03:49:01 -04:00
parent a189fab1be
commit a1549523fb
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
import { S5Node } from "#node.js";
import type { S5NodeConfig } from "#node.js";
export * from "./types.js";
export * from "./service/p2p.js";
export * from "./service/registry.js";
export type { S5NodeConfig };
export function createNode(config: S5NodeConfig) {
return new S5Node(config);
}

View File

@ -26,7 +26,7 @@ const DEFAULT_LOGGER = {
},
};
interface S5NodeConfig {
export interface S5NodeConfig {
p2p?: {
network: string;
peers?: {