UNPKG

@daimo/pay

Version:

Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.

14 lines (13 loc) 437 B
export type PollHandle = () => void; /** * Will poll the given function at the specified interval. Stops when the * returned handle is invoked. */ export declare function startPolling<T>({ key, intervalMs, pollFn, onResult, onError, log, }: { key: string; intervalMs: number; pollFn: () => Promise<T>; onResult: (value: T) => void; onError: (err: unknown) => void; log?: (msg: string) => void; }): PollHandle;