refactor: update exports and add factory for S5Node
This commit is contained in:
parent
a189fab1be
commit
a1549523fb
10
src/index.ts
10
src/index.ts
|
@ -1,3 +1,9 @@
|
||||||
|
import { S5Node } from "#node.js";
|
||||||
|
import type { S5NodeConfig } from "#node.js";
|
||||||
|
|
||||||
export * from "./types.js";
|
export * from "./types.js";
|
||||||
export * from "./service/p2p.js";
|
export type { S5NodeConfig };
|
||||||
export * from "./service/registry.js";
|
|
||||||
|
export function createNode(config: S5NodeConfig) {
|
||||||
|
return new S5Node(config);
|
||||||
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ const DEFAULT_LOGGER = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
interface S5NodeConfig {
|
export interface S5NodeConfig {
|
||||||
p2p?: {
|
p2p?: {
|
||||||
network: string;
|
network: string;
|
||||||
peers?: {
|
peers?: {
|
||||||
|
|
Loading…
Reference in New Issue