Sasha f199d92d60
feat: migrate to latest LightPush version (#2281)
* create retry manager

* update tests

* add retry manager tests, update peer manager

* fix start & merge with master

* return send to many logic

* add new error handling

* add sections to protocol errors

* fix check

* up test

* add waku.start in test

* fix check and test

* improve name
2025-02-25 22:40:03 +01:00

24 lines
515 B
TypeScript

import { IBaseProtocolCore } from "./protocols.js";
import type { ISender, ISendOptions } from "./sender.js";
export type LightPushProtocolOptions = ISendOptions & {
/**
* The interval in milliseconds to wait before retrying a failed push.
* @default 1000
*/
retryIntervalMs: number;
/**
* Number of peers to send message to.
*
* @default 1
*/
numPeersToUse?: number;
};
export type ILightPush = ISender & {
start: () => void;
stop: () => void;
protocol: IBaseProtocolCore;
};