# resolveAccountState

> **resolveAccountState**(`params`): [`OutputType`](/reference/filoz/synapse-core/pay/namespaces/resolveaccountstate/type-aliases/outputtype/)

Defined in: [packages/synapse-core/src/pay/resolve-account-state.ts:48](https://github.com/FilOzone/synapse-sdk/blob/814fc2e242f2b236f8d2ba4078ebd703cedb5cf2/packages/synapse-core/src/pay/resolve-account-state.ts#L48)

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 which
  `lockupCurrent + 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) at `currentEpoch`.
- `runwayInEpochs` — `fundedUntilEpoch - currentEpoch`, clamped to `0n`
  when insolvent and `maxUint256` when `lockupRate` is 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

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`AccountState`](/reference/filoz/synapse-core/pay/type-aliases/accountstate/) | Raw account fields + current epoch |

## Returns

[`OutputType`](/reference/filoz/synapse-core/pay/namespaces/resolveaccountstate/type-aliases/outputtype/)

The projected account state [resolveAccountState.OutputType](/reference/filoz/synapse-core/pay/namespaces/resolveaccountstate/type-aliases/outputtype/)