Skip to content

@loktin/sdk / keeper / scanGoals

Function: scanGoals() ​

scanGoals(loktin, options): Promise<ScanResult>

Defined in: @loktin/sdk/dist/keeper/keeper.d.ts:68

Finds the goals a keeper serves (E1, W96). It pages the goal_created and goal_closed events of Target Savings across the RPC's retention window, following the cursor until it stops changing (most pages are empty), keeps created goals whose integrator matches and that have not closed, adds the open goals of the given owners, and reads the other goals' current data with getLedgerEntries, at most LEDGER_KEYS_PER_CALL per call (W113). Once the RPC's window is full, the scan starts START_MARGIN_LEDGERS after its oldest ledger (scanStart), and every RPC call is retried on network errors.

Parameters ​

loktin ​

Loktin

options ​

ScanOptions

Returns ​

Promise<ScanResult>

Built on Stellar