waku-react/src/types.ts

27 lines
563 B
TypeScript
Raw Normal View History

import type { Protocols, Waku } from "@waku/interfaces";
import type { waku } from "@waku/sdk";
export type { CreateWakuNodeOptions } from "@waku/sdk";
export type HookState = {
isLoading: boolean;
error: undefined | string;
};
export type CreateNodeResult<T extends Waku> = HookState & {
node: undefined | T;
};
export type BootstrapNodeOptions<T = {}> = {
options?: T;
protocols?: Protocols[];
};
export type ContentPair = {
encoder: waku.Encoder;
decoder: waku.Decoder;
};
export type ReactChildrenProps = {
children?: React.ReactNode;
};