Summary
discoverAll pages through the registry at PAGE_LIMIT = 50 per call. It is covered only by a
live check against a registry holding a single entry, which returns on the first page and never
exercises the loop.
This is the same untested-loop shape as the readTtl chunking issue, and the two should be picked
up together — a fake server written for one is most of the fake server needed for the other.
The paging loop is worth pinning down because a bug in it is silent: a keeper that stops after the
first page maintains the first 50 contracts and never mentions the rest.
Acceptance Criteria
Tech Stack
TypeScript 5.7 on Node 22+ (CI runs 22 and 24), ESM with moduleResolution: "NodeNext" — relative
imports need the .js extension. @stellar/stellar-sdk is pinned to an exact version; verify RPC
API shape against the installed copy, not against documentation. Tests are Vitest under test/ and
run without a network. npm run format:check, npm run lint, npm run build and npm test must
all be clean.
Summary
discoverAllpages through the registry atPAGE_LIMIT = 50per call. It is covered only by alive check against a registry holding a single entry, which returns on the first page and never
exercises the loop.
This is the same untested-loop shape as the
readTtlchunking issue, and the two should be pickedup together — a fake server written for one is most of the fake server needed for the other.
The paging loop is worth pinning down because a bug in it is silent: a keeper that stops after the
first page maintains the first 50 contracts and never mentions the rest.
Acceptance Criteria
PAGE_LIMIT, the boundary where a naiveloop either stops early or makes one empty request too many.
count that disagrees with what
pagereturns.bigintbranch ofrequireNumberis covered, sincecountcan decode either way.Tech Stack
TypeScript 5.7 on Node 22+ (CI runs 22 and 24), ESM with
moduleResolution: "NodeNext"— relativeimports need the
.jsextension.@stellar/stellar-sdkis pinned to an exact version; verify RPCAPI shape against the installed copy, not against documentation. Tests are Vitest under
test/andrun without a network.
npm run format:check,npm run lint,npm run buildandnpm testmustall be clean.