mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-16 04:33:12 +00:00
* feat: lighten retry logic for LightPush * update tests * remove base protocol sdk from light push, add unit tests for light push * remove replaced test * ensure numPeersToUse is respected * skip tests
24 lines
520 B
TypeScript
24 lines
520 B
TypeScript
import type { IEncoder, IMessage } from "./message.js";
|
|
import { SDKProtocolResult } from "./protocols.js";
|
|
|
|
export type ISenderOptions = {
|
|
/**
|
|
* Enables retry of a message that was failed to be sent.
|
|
* @default false
|
|
*/
|
|
autoRetry?: boolean;
|
|
/**
|
|
* Sets number of attempts if `autoRetry` is enabled.
|
|
* @default 3
|
|
*/
|
|
maxAttempts?: number;
|
|
};
|
|
|
|
export interface ISender {
|
|
send: (
|
|
encoder: IEncoder,
|
|
message: IMessage,
|
|
sendOptions?: ISenderOptions
|
|
) => Promise<SDKProtocolResult>;
|
|
}
|