resolveAccountState
resolveAccountState(
params):OutputType
Defined in: packages/synapse-core/src/pay/resolve-account-state.ts:48
Project account state forward to currentEpoch by simulating settlement locally.
Pure function — no RPC call. Takes raw account fields from accounts() +
currentEpoch and computes:
fundedUntilEpoch— the absolute epoch at whichlockupCurrent + lockupRate × elapsed === funds. Past this point, settlement stops advancing and the payer must deposit more funds (or have rails terminated) to keep services running.availableFunds— funds minus all lockup (fixed + rate) atcurrentEpoch.runwayInEpochs—fundedUntilEpoch - currentEpoch, clamped to0nwhen insolvent andmaxUint256whenlockupRateis 0n.
Note: funds already includes fixed lockup from rails (it’s reflected in
lockupCurrent), so runway accounts for both fixed lockup and rate-based
lockup automatically.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
params | AccountState | Raw account fields + current epoch |
Returns
Section titled “Returns”The projected account state resolveAccountState.OutputType