2022-08-28 06:33:49 +00:00
|
|
|
import SimpleRpcQuery from "./query/simple.js";
|
2022-12-04 07:42:04 +00:00
|
|
|
import WisdomRpcQuery from "./query/wisdom.js";
|
2022-12-04 10:39:59 +00:00
|
|
|
import { RpcQueryOptions } from "./types.js";
|
2022-08-28 06:33:49 +00:00
|
|
|
export default class RpcNetwork {
|
|
|
|
constructor(dht?: any);
|
|
|
|
private _dht;
|
|
|
|
get dht(): any;
|
|
|
|
private _majorityThreshold;
|
|
|
|
get majorityThreshold(): number;
|
|
|
|
set majorityThreshold(value: number);
|
|
|
|
private _queryTimeout;
|
|
|
|
get queryTimeout(): number;
|
|
|
|
set queryTimeout(value: number);
|
|
|
|
private _relayTimeout;
|
|
|
|
get relayTimeout(): number;
|
|
|
|
set relayTimeout(value: number);
|
|
|
|
private _relays;
|
|
|
|
get relays(): string[];
|
|
|
|
private _ready?;
|
|
|
|
get ready(): Promise<void>;
|
|
|
|
private _bypassCache;
|
|
|
|
get bypassCache(): boolean;
|
|
|
|
set bypassCache(value: boolean);
|
2022-09-22 13:36:04 +00:00
|
|
|
private _maxRelays;
|
|
|
|
get maxRelays(): number;
|
|
|
|
set maxRelays(value: number);
|
2022-08-28 06:33:49 +00:00
|
|
|
addRelay(pubkey: string): void;
|
|
|
|
removeRelay(pubkey: string): boolean;
|
|
|
|
clearRelays(): void;
|
|
|
|
wisdomQuery(
|
|
|
|
method: string,
|
|
|
|
module: string,
|
|
|
|
data?: object | any[],
|
|
|
|
bypassCache?: boolean,
|
2022-12-04 07:42:04 +00:00
|
|
|
options?: {}
|
2022-08-28 06:33:49 +00:00
|
|
|
): WisdomRpcQuery;
|
|
|
|
simpleQuery(
|
2022-12-04 07:42:04 +00:00
|
|
|
relay: string,
|
2022-08-28 06:33:49 +00:00
|
|
|
method: string,
|
|
|
|
module: string,
|
2022-12-04 10:39:59 +00:00
|
|
|
data?: object | any[],
|
|
|
|
bypassCache?: boolean,
|
|
|
|
options?: RpcQueryOptions
|
|
|
|
): SimpleRpcQuery;
|
|
|
|
clearCacheQuery(
|
|
|
|
relays: string[],
|
|
|
|
method: string,
|
|
|
|
module: string,
|
|
|
|
data?: object | any[],
|
|
|
|
options?: RpcQueryOptions
|
2022-08-28 06:33:49 +00:00
|
|
|
): SimpleRpcQuery;
|
|
|
|
}
|
|
|
|
//# sourceMappingURL=network.d.ts.map
|