Repository navigation
Conversation
Contributor
Contributor
|
|
Keychains.list() gains an optional envelopeOnly flag forwarded as the `envelopeOnly=true` query param; the legacy updatePassword walk opts in and pipelines the next page's fetch while the current page re-encrypts (shaving ~2s/page of client crypto off the serial round-trip). Progress event ordering and per-record outcomes are unchanged; old servers ignoring the param keep today's behavior. Safe-mode rotation is untouched. Ticket: WCI-2309
vibhavgo
force-pushed
the
WCI-2309-sdk-slim-rotation-fetch
branch
from
November 18, 2026 10:49
f42c9be to
19d1f5a
Compare
vibhavgo
marked this pull request as ready for review
November 18, 2026 11:06
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
WCI-2309 (incident WCN-4788) — Optimize changePassword key fetching (client side)
Summary
Opts the legacy
keychains().updatePasswordrotation walk (login-password sync) into the server's newenvelopeOnly=trueslim key list (server PR: BitGo/bitgo-microservices#64575), and pipelines the walk: the next page's fetch starts as soon as the current page arrives, so page N+1's network round-trip overlaps page N's re-encryption (~2 s/page of client crypto hidden behind the fetch).Keychains.list()gains an optionalenvelopeOnly?: boolean, validated and forwarded the same way aslimit/prevId/safeId;false/undefinedproduce a query identical to today's.envelopeOnly: trueon every page and consumes the slim shape (id,pub,type,source, caller'sencryptedPrv,coinSpecific.ofc.features) — a superset of nothing it needs: tss/ofc multi-user keys are keyed byid, plain keys bypub, andupdateSingleKeychainPasswordtouches onlyencryptedPrv.envelopeOnlyis optional; old servers ignore the unknown query param and return full keychains, and the walk handles full responses unchanged (covered by test). Deploy the server PR first for the latency win; shipping the SDK alone is behavior-neutral.safeIdpresent) is untouched.Test plan
modules/sdk-core/test/unit/bitgo/keychain/keychains.ts: 32/32 passing — new coverage for param forwarding/rejection, slim-response rotation, prefetch-before-processing ordering, old-server full-response fallback, and identifier mapping (tss/ofc multi-user → id, plain → pub).modules/sdk-api/test/unit/bitgoApi.ts: 79 passing (changePassword suites stubupdatePasswordabove this layer; unchanged).npx tsc --buildclean for sdk-core and sdk-api; eslint clean on touched files.