Skip to Content
SdkReactInternalClassesWalletPoller

WalletPoller

Defined in: src/lib/db/queue/walletPoller.ts:11 

Constructors

Constructor

new WalletPoller(): WalletPoller

Returns

WalletPoller

Methods

startPolling()

startPolling(checkWallet: () => Promise<string | null>, onWalletReady: (address: string) => void, intervalMs: number, maxAttempts: number): () => void

Defined in: src/lib/db/queue/walletPoller.ts:24 

Start polling for wallet availability.

Parameters

ParameterTypeDefault valueDescription

checkWallet

() => Promise<string | null>

undefined

Returns wallet address when ready, null if not yet available

onWalletReady

(address: string) => void

undefined

Called with the wallet address when it becomes available

intervalMs

number

DEFAULT_INTERVAL_MS

Polling interval in milliseconds (default: 1000ms)

maxAttempts

number

DEFAULT_MAX_ATTEMPTS

Maximum polling attempts before giving up (default: 60)

Returns

Stop function to cancel polling

(): void

Returns

void


stop()

stop(): void

Defined in: src/lib/db/queue/walletPoller.ts:62 

Stop polling.

Returns

void

Last updated on