Skip to main content

Function: getLatestLedger()

getLatestLedger(rpcUrl, fetchImpl?): Promise<number>
Defined in: packages/core/src/auth-entry-builder.ts:146 Fetch the current Soroban ledger sequence via JSON-RPC. The RPC response is zod-validated before use; transport and protocol errors are mapped onto BuckspayError codes (never thrown raw). fetchImpl is injectable for tests.

Parameters

rpcUrl

string

fetchImpl?

RpcFetch = fetch

Returns

Promise<number>