rpc-client/dist/network.d.ts

49 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-12-04 07:42:04 +00:00
import RPC from "@lumeweb/rpc";
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-08-28 06:33:49 +00:00
export default class RpcNetwork {
constructor(dht?: any);
2022-12-04 07:42:04 +00:00
private _activeRelay?;
get activeRelay(): RPC;
2022-08-28 06:33:49 +00:00
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 07:42:04 +00:00
data: object | any[] | undefined,
bypassCache: boolean | undefined,
options: {}
2022-08-28 06:33:49 +00:00
): SimpleRpcQuery;
}
//# sourceMappingURL=network.d.ts.map