mirror of https://github.com/status-im/js-waku.git
update: tsdoc (#1476)
This commit is contained in:
parent
5ad0210477
commit
7b6ead14ac
|
@ -4,6 +4,13 @@ import type { PeerIdStr, TopicStr } from "@chainsafe/libp2p-gossipsub/types";
|
|||
import { IReceiver } from "./receiver.js";
|
||||
import type { ISender } from "./sender.js";
|
||||
|
||||
/**
|
||||
* Interface representing the Relay API, providing control and information about the GossipSub protocol.
|
||||
*
|
||||
* @property gossipSub - The GossipSub instance used for managing pub/sub behavior.
|
||||
* @property start - Function to start the relay, returning a Promise that resolves when initialization is complete.
|
||||
* @property getMeshPeers - Function to retrieve the mesh peers for a given topic or all topics if none is specified. Returns an array of peer IDs as strings.
|
||||
*/
|
||||
interface IRelayAPI {
|
||||
readonly gossipSub: GossipSub;
|
||||
start: () => Promise<void>;
|
||||
|
|
|
@ -7,6 +7,12 @@ import type {
|
|||
Unsubscribe,
|
||||
} from "@waku/interfaces";
|
||||
|
||||
/**
|
||||
* Options for configuring the behavior of an iterator.
|
||||
*
|
||||
* @property timeoutMs - Optional timeout in milliseconds. If specified, the iterator will terminate after this time period.
|
||||
* @property iteratorDelay - Optional delay in milliseconds between each iteration. Can be used to control the rate of iteration.
|
||||
*/
|
||||
type IteratorOptions = {
|
||||
timeoutMs?: number;
|
||||
iteratorDelay?: number;
|
||||
|
|
Loading…
Reference in New Issue