2023-02-16 21:49:46 +01:00
|
|
|
import { RelayCreateOptions, WakuOptions } from "@waku/core";
|
2023-02-28 00:57:59 +01:00
|
|
|
import type { Decoder, Encoder } from "@waku/core/dist/lib/message/version_0";
|
2023-02-16 21:49:46 +01:00
|
|
|
import type { CreateOptions } from "@waku/create";
|
|
|
|
|
import type { Protocols, Waku } from "@waku/interfaces";
|
|
|
|
|
|
|
|
|
|
export type HookState = {
|
|
|
|
|
isLoading: boolean;
|
2023-02-28 00:57:59 +01:00
|
|
|
error: undefined | string;
|
2023-02-16 21:49:46 +01:00
|
|
|
};
|
|
|
|
|
|
2023-02-28 00:57:59 +01:00
|
|
|
export type CrateNodeResult<T extends Waku> = HookState & {
|
|
|
|
|
node: undefined | T;
|
2023-02-16 21:49:46 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type BootstrapNodeOptions<T = {}> = {
|
|
|
|
|
options?: T;
|
|
|
|
|
protocols?: Protocols[];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type LightNodeOptions = CreateOptions & WakuOptions;
|
|
|
|
|
export type RelayNodeOptions = CreateOptions &
|
|
|
|
|
WakuOptions &
|
|
|
|
|
Partial<RelayCreateOptions>;
|
2023-02-28 00:57:59 +01:00
|
|
|
|
|
|
|
|
export type ContentPair = {
|
|
|
|
|
encoder: Encoder;
|
|
|
|
|
decoder: Decoder;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type ReactChildrenProps = {
|
|
|
|
|
children?: React.ReactNode;
|
|
|
|
|
};
|