Repository navigation
feat(sdk-core): forward attestation through signAndSendTxRequest - #10117
Open
gordonzhang1 wants to merge 1 commit into
Open
gordonzhang1 wants to merge 1 commit into
gordonzhang1 wants to merge 1 commit into
Conversation
signAndSendTxRequest is how clients sign an existing TSS txRequest that was created, approved, or abandoned earlier: the original initiator resuming, or another authorized wallet user signing. It had no way to carry the current signer's WebAuthn intent attestation, although signTransaction/signTxRequest already send one on the first signing round only. Add an optional attestation to SignAndSendTxRequestOptions and forward it via getUserKeyAndSignTssTransaction to signTransaction. Because signAndSendTxRequest clears signature shares first, every call is a first-round sign, so the proof is never replayed into a later round. It is not forwarded to the lite submitTransaction call: round one has already consumed its nonce. Omitting attestation leaves request bodies unchanged, so Wallet Platform can still fall back to a proof the signer stored at creation or approval. Ticket: WCN-3153 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Contributor
Contributor
|
|
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.
Description
Wallet.signAndSendTxRequestis how clients sign an existing TSS txRequest: the original initiator resuming later, a signer after approval, or another authorized wallet user. It couldn't carry the current signer's WebAuthn intent attestation, though the lower layers already support one (signTransaction→signTransactionTss→tssUtils.signTxRequestattaches it to round 1 only).This PR adds an optional
attestationtoSignAndSendTxRequestOptionsand passes it throughgetUserKeyAndSignTssTransactionintosignTransaction.signAndSendTxRequestdeletes signature shares before signing, which resets Wallet Platform's server-side first-round state (isFirstTransactionSigningRound). Every call therefore starts at round 1, and the existing TSS utils send the proof only on that round.submitTransaction. Round 1 has already used the nonce, so resending it would be a replay.verifyMpcSigningAttestationresolves stored proofs itself).The consumer is bitgo-retail's hot MPC "sign existing request" flow (WCN-3153). It needs this option to pass a fresh, intent-bound passkey proof from the signer.
Issue Number
WCN-3153
Type of change
How Has This Been Tested?
modules/bitgo/test/v2/unit/wallet.ts:signAndSendTxRequestforwardsattestationto first-round signing. It runs delete shares → sign → lite submit in that order and leavesattestationoff the submit call.signAndSendTxRequestsends noattestationkey when none is provided.getUserKeyAndSignTssTransactionforwardsattestationtosignTransaction, and the existing test asserts it's absent by default.mocha test/v2/unit/wallet.ts --grep "signAndSendTxRequest|getUserKeyAndSignTssTransaction"(12 passing), atsc --buildofsdk-core, andbitgowith all its dependencies, plus prettier and eslint on the changed files.🤖 Generated with Claude Code