Skip to content

feat(sdk-core): forward attestation through signAndSendTxRequest - #10117

Open
gordonzhang1 wants to merge 1 commit into
masterfrom
WCN-3153/sign-and-send-attestation
Open

gordonzhang1 wants to merge 1 commit into
masterfrom
WCN-3153/sign-and-send-attestation

Conversation

@gordonzhang1

Copy link
Copy Markdown

Description

Wallet.signAndSendTxRequest is 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.signTxRequest attaches it to round 1 only).

This PR adds an optional attestation to SignAndSendTxRequestOptions and passes it through getUserKeyAndSignTssTransaction into signTransaction.

  • First round only. signAndSendTxRequest deletes 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.
  • Not forwarded to the lite submitTransaction. Round 1 has already used the nonce, so resending it would be a replay.
  • No change when omitted. Request bodies stay the same, so Wallet Platform can still fall back to a proof the signer stored at creation or approval (verifyMpcSigningAttestation resolves 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

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • New unit tests in modules/bitgo/test/v2/unit/wallet.ts:
    • signAndSendTxRequest forwards attestation to first-round signing. It runs delete shares → sign → lite submit in that order and leaves attestation off the submit call.
    • signAndSendTxRequest sends no attestation key when none is provided.
    • getUserKeyAndSignTssTransaction forwards attestation to signTransaction, and the existing test asserts it's absent by default.
  • Ran locally: mocha test/v2/unit/wallet.ts --grep "signAndSendTxRequest|getUserKeyAndSignTssTransaction" (12 passing), a tsc --build of sdk-core, and bitgo with all its dependencies, plus prettier and eslint on the changed files.

🤖 Generated with Claude Code

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>
@gordonzhang1
gordonzhang1 requested review from a team as code owners November 2, 2026 16:42

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@linear-code

linear-code Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

WCN-3153

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ Compatibility checks are failing on Node.js 27-nightly (experimental, non-blocking). This does not block merge, but it signals an incompatibility to fix before this release becomes supported.

View run

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant