UNPKG

@zkp2p/reclaim-witness-sdk

Version:

<div> <div> <img src="https://raw.githubusercontent.com/reclaimprotocol/.github/main/assets/banners/Attestor-Core.png" /> </div> </div>

13 lines (12 loc) 406 B
import { Logger } from '../types'; type RetryLoopOptions = { maxRetries?: number; logger: Logger; shouldRetry: (error: Error) => boolean; }; /** * Execute a function, and upon failure -- retry * based on specified options. */ export declare function executeWithRetries<T>(code: (attempt: number) => Promise<T>, { maxRetries, shouldRetry, logger, }: RetryLoopOptions): Promise<T>; export {};