Skip to content

CSHLD-906: Add bridgingParams support for BTC-to-sBTC bridging transactions#8850

Merged
veetragjain merged 1 commit into
masterfrom
CSHLD-906-add-btc-sbtc-bridging-params
May 29, 2026
Merged

CSHLD-906: Add bridgingParams support for BTC-to-sBTC bridging transactions#8850
veetragjain merged 1 commit into
masterfrom
CSHLD-906-add-btc-sbtc-bridging-params

Conversation

@abhi-bitgo
Copy link
Copy Markdown
Contributor

@abhi-bitgo abhi-bitgo commented May 26, 2026

Summary

Add bridgingParams to the BTC transaction build pipeline to support BTC-to-sBTC cross-chain bridging. The parameter flows through all wallet types (hot, cold, custodial, TSS).

Linear: CSHLD-906

Changes

  • Add shared SbtcBridgingParams and BridgingParams interfaces in iWallet.ts
  • Add bridgingParams to PrebuildTransactionOptions for SDK callers
  • Whitelist bridgingParams in BuildParams.ts for non-TSS /tx/build path`
  • Add BridgingParamsCodec io-ts codec in sendmany.ts, reused in prebuildAndSignTransaction.ts
  • Add unit tests for BuildParams whitelist and non-TSS /tx/build

Test Plan

  • Unit tests for BuildParams codec whitelist (bridgingParams passes, unknown fields stripped)
  • Unit test for non-TSS BTC wallet verifying bridgingParams reaches /tx/build endpoint

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 26, 2026

CSHLD-906

@abhi-bitgo abhi-bitgo marked this pull request as ready for review May 26, 2026 04:37
@abhi-bitgo abhi-bitgo requested review from a team as code owners May 26, 2026 04:37
@abhi-bitgo abhi-bitgo force-pushed the CSHLD-906-add-btc-sbtc-bridging-params branch 2 times, most recently from d75aa64 to 7cc82ac Compare May 28, 2026 03:29
mukeshsp
mukeshsp previously approved these changes May 28, 2026
@pritam-gembali pritam-gembali self-requested a review May 28, 2026 06:25
Copy link
Copy Markdown
Contributor

@pritam-gembali pritam-gembali left a comment

Choose a reason for hiding this comment

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

Nice, small, additive change. Posted inline comments on a couple of follow-ups worth addressing before merge — primarily an assert so a bridging request without bridgingParams fails loudly instead of silently no-op'ing, and a codec-level decode test for BridgingParamsCodec so the Express contract is enforced by tests, not just types.

The broader design (namespaced BridgingParams.sbtc) is good — leaves room for future bridge targets without breaking changes. Risk is low since no existing intent paths change behavior.

Comment thread modules/sdk-core/src/bitgo/wallet/wallet.ts Outdated
Comment thread modules/sdk-core/src/bitgo/utils/mpcUtils.ts Outdated
Comment thread modules/sdk-core/src/bitgo/utils/mpcUtils.ts Outdated
Comment thread modules/express/src/typedRoutes/api/v2/sendmany.ts
Add bridgingParams to the BTC transaction build pipeline for
cross-chain BTC-to-sBTC bridging. The parameter flows through all
wallet types: non-TSS (hot/cold via BuildParams whitelist),
TSS (via new 'bridging' case in prebuild switch), and custodial.

Shared types (SbtcBridgingParams, BridgingParams) defined once in
iWallet.ts and reused across sdk-core and express typed routes.
bridgingParams is conditionally included in populateIntent only
for intentType === 'bridging'.

Ticket: CSHLD-906
@veetragjain veetragjain force-pushed the CSHLD-906-add-btc-sbtc-bridging-params branch from 7cc82ac to 0f27d93 Compare May 28, 2026 14:37
@veetragjain veetragjain merged commit 16cf683 into master May 29, 2026
26 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