2023-05-19 01:28:49 +05:30
|
|
|
export interface Args {
|
|
|
|
|
staticnode?: string;
|
|
|
|
|
nat?: "none";
|
|
|
|
|
listenAddress?: string;
|
|
|
|
|
relay?: boolean;
|
|
|
|
|
rpc?: boolean;
|
|
|
|
|
rpcAdmin?: boolean;
|
|
|
|
|
nodekey?: string;
|
|
|
|
|
portsShift?: number;
|
|
|
|
|
logLevel?: LogLevel;
|
|
|
|
|
lightpush?: boolean;
|
|
|
|
|
filter?: boolean;
|
|
|
|
|
store?: boolean;
|
|
|
|
|
peerExchange?: boolean;
|
|
|
|
|
discv5Discovery?: boolean;
|
|
|
|
|
storeMessageDbUrl?: string;
|
2023-06-28 13:27:57 +10:00
|
|
|
topic?: string;
|
2023-05-19 01:28:49 +05:30
|
|
|
rpcPrivate?: boolean;
|
|
|
|
|
websocketSupport?: boolean;
|
|
|
|
|
tcpPort?: number;
|
|
|
|
|
rpcPort?: number;
|
|
|
|
|
websocketPort?: number;
|
|
|
|
|
discv5BootstrapNode?: string;
|
|
|
|
|
discv5UdpPort?: number;
|
2023-05-23 23:45:08 +05:30
|
|
|
// `legacyFilter` is required to enable filter v1 with go-waku
|
|
|
|
|
legacyFilter?: boolean;
|
2023-05-19 01:28:49 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export enum LogLevel {
|
|
|
|
|
Error = "ERROR",
|
|
|
|
|
Info = "INFO",
|
|
|
|
|
Warn = "WARN",
|
|
|
|
|
Debug = "DEBUG",
|
|
|
|
|
Trace = "TRACE",
|
|
|
|
|
Notice = "NOTICE",
|
2023-08-16 20:18:13 +05:30
|
|
|
Fatal = "FATAL"
|
2023-05-19 01:28:49 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface KeyPair {
|
|
|
|
|
privateKey: string;
|
|
|
|
|
publicKey: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface MessageRpcQuery {
|
|
|
|
|
payload: string; // Hex encoded data string without `0x` prefix.
|
|
|
|
|
contentTopic?: string;
|
|
|
|
|
timestamp?: bigint; // Unix epoch time in nanoseconds as a 64-bits integer value.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface MessageRpcResponse {
|
|
|
|
|
payload: string;
|
|
|
|
|
contentTopic?: string;
|
|
|
|
|
version?: number;
|
|
|
|
|
timestamp?: bigint; // Unix epoch time in nanoseconds as a 64-bits integer value.
|
|
|
|
|
}
|