Skip to content

feat(sdk-core): forward WalletConnect message origin - #10133

Merged
nvjsr merged 1 commit into
masterfrom
defi-1069-walletconnect-messages
Nov 11, 2026
Merged

nvjsr merged 1 commit into
masterfrom
defi-1069-walletconnect-messages

Conversation

@ralph-bitgo

@ralph-bitgo ralph-bitgo Bot commented Nov 5, 2026

Copy link
Copy Markdown

Description

Forward the optional isWalletConnectTx marker through message and typed-data signing intents, including both message request routes. It is metadata, not an authorization signal.

WalletConnect message requests need this marker so wallet-platform can classify their origin and display security-check details. Deployment also requires wallet-platform support and a newly published SDK consumed by the clients.

Issue Number

DEFI-1069

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • SDK core workspace build and focused baseTSSUtils unit tests: 37 passing.
  • SDK intent smoke: marked personal, Solana, and typed-data requests and an unmarked message.
  • Prettier check on changed TypeScript files.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My code compiles correctly for both Node and Browser environments (Node build verified)
  • I have commented my code, particularly in hard-to-understand areas
  • My commits follow Conventional Commits and I have properly described any BREAKING CHANGES
  • The ticket or github issue was included in the commit message as a reference
  • I have made corresponding changes to the documentation and on any new/updated functions and/or methods
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing focused unit tests pass locally with my changes

Ticket: DEFI-1069

@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

DEFI-1069

@github-actions

github-actions Bot commented Nov 5, 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

@nvjsr
nvjsr marked this pull request as ready for review November 5, 2026 10:24
@nvjsr
nvjsr requested review from a team as code owners November 5, 2026 10:24

@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.

@nvjsr nvjsr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed end to end.

  • Marker forwarding: all four message/typed-data intent builders (buildSignMessageRequest → /msgrequests, createTxRequestWithIntentForTypedDataSigning → /txrequests, the deprecated message-signing builder) forward isWalletConnectTx; conditional spread omits the key when unset, so the wire body stays absent-or-true — matches the WP codec contract (t.literal(true)).
  • Typing: isWalletConnectTx?: true (literal) on IntentOptionsForMessage / IntentOptionsForTypedData / both Populated intents / WalletSignMessageBase — prevents false at compile time, consistent with DEFI-1013's send marker.
  • Resume path: when signing resumes by txRequestId the marker is not re-sent and the existing request keeps its original classification — asserted by the resume tests.
  • No txChannel key is ever constructed client-side (hasOwnProperty assertions), and tests cover the full marker/absent × msgrequests/txrequests/typed-data matrix plus wallet-level teth/tsol flows.

Verified against the WP side (bitgo-microservices#64175): /msgrequests MessageIntent and the /txrequests CreateTransactionRequestIntentCodec both declare t.literal(true), so every shape this SDK emits is accepted server-side.

Ticket: DEFI-1069

nvjsr
nvjsr previously approved these changes Nov 5, 2026
pranishnepal
pranishnepal previously approved these changes Nov 5, 2026

@pranishnepal pranishnepal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

pritam-gembali
pritam-gembali previously approved these changes Nov 7, 2026
@nvjsr
nvjsr dismissed stale reviews from pritam-gembali, pranishnepal, and themself via ddee01e November 11, 2026 06:34
@nvjsr

nvjsr commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Conflict with master resolved (merge commit ddee01e — CHANGELOG: Unreleased block kept above the newly-released 40.5.1 section; all marker code intact, diff vs master purely additive). Push moved the head, so reviews went stale and HITL re-evaluates from zero: the merge commit is unsigned (GPG card unavailable), which requires 2 CODEOWNERS approvals on the new head. @pranishnepal @pritam-gembali — could you re-approve? Ticket: DEFI-1069

@nvjsr
nvjsr force-pushed the defi-1069-walletconnect-messages branch from ddee01e to 30761b2 Compare November 11, 2026 07:22
@nvjsr

nvjsr commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Master moved twice since your reviews (40.5.1 and 40.6.0 releases), so the PR needed a re-merge — head is now a78c526, conflict-free and all commits GPG-signed. HITL needs just 1 CODEOWNERS approval on the new head (signer excluded). @pranishnepal @pritam-gembali — one re-approval unblocks merge. Code changes vs the head you approved are unchanged; only the CHANGELOG note moved into the 40.6.0 Features section. Ticket: DEFI-1069

Allow WalletConnect message and typed-data signing requests to carry
isWalletConnectTx: true, forwarded on the signMessage (POST
/wallet/{id}/msgrequests) and signTypedData (POST /wallet/{id}/txrequests)
intent bodies so wallet-platform can classify the message txRequest's
txChannel (DEFI-1069). Literal-true typing on all four intent option and
populated-intent types; conditional spread omits the key when unset so the
wire body stays absent-or-true, matching the wallet-platform codec
(t.literal(true)). Resuming an existing request by txRequestId keeps its
original classification. Observability metadata only — never policy,
approvals, or signing.

Ticket: DEFI-1069
@nvjsr
nvjsr force-pushed the defi-1069-walletconnect-messages branch from a78c526 to 4ebad0e Compare November 11, 2026 07:53
@nvjsr
nvjsr merged commit e39b1b4 into master Nov 11, 2026
27 checks passed
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.

4 participants