Skip to content

fix(sdk-coin-flr): support FLR C->P atomic TSS signing#9085

Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
WAL-1586-fix-flr-atomic-tss-signing
Draft

fix(sdk-coin-flr): support FLR C->P atomic TSS signing#9085
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
WAL-1586-fix-flr-atomic-tss-signing

Conversation

@bitgo-ai-agent-dev

@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot commented Jun 23, 2026

Copy link
Copy Markdown

What

  • Add isSignablePreHashed to Flr (mirrors the existing Flrp implementation) so the MPCv2 signing flow uses the Avalanche atomic signableHex (already SHA-256(txBody)) directly instead of re-hashing it with keccak256.
  • Add 'import' and 'importtoc' intent types to NO_RECIPIENT_TX_TYPES in sdk-core so the pre-signing recipient guard does not reject Avalanche / Flare cross-chain atomic imports.
  • Unit tests covering both changes.

Why

FLR export from C-Chain to P-Chain (and the subsequent import on FLRP) fails for TSS wallets:

  • Failed to combine signature shares — without isSignablePreHashed, the FLR coin falls through to the default DKLS hash path. For the atomic export tx the user signs keccak256(signableHex) while BitGo signs signableHex (already SHA-256 of the tx body), so the two shares cover different digests and never combine.
  • Recipient details are required to verify this transaction before signing. Pass txParams with at least one recipient. — atomic imports legitimately carry no client-supplied recipients (the wallet imports its own UTXOs and the destination is the wallet itself), but the TSS pre-signing guard treated those intentType values as missing-recipient errors.

Reported by Wallets in WAL-1586 — request ID bg-uicb6477a974fb49a60869-0008.

Test plan

  • yarn unit-test in modules/sdk-coin-flr — passes (60 tests, includes new isSignablePreHashed assertions for atomic vs RLP).
  • yarn unit-test in modules/sdk-core — passes (427 tests, includes new exempt-type assertions for import / importtoc).
  • yarn unit-test in modules/sdk-coin-flrp — passes (no regressions).
  • yarn unit-test in modules/abstract-eth — passes (no regressions).
  • yarn lint in the modified modules — clean.
  • End-to-end FLR C->P export + FLRP P import on staging with a TSS wallet (please run before merge — sandbox cannot exercise the live signing ceremony).

Ticket: WAL-1586

FLR C-chain to P-chain export (and the matching P-chain import)
fails during the MPC signing ceremony because:

1. sdk-coin-flr does not declare isSignablePreHashed, so the MPCv2
   signing flow re-hashes the Avalanche atomic signableHex with
   keccak256. The signableHex is already SHA-256(txBody), so the
   user's signature share is computed over a different digest from
   BitGo's, surfacing as "Failed to combine signature shares" on
   the send-transaction endpoint.

2. The TSS recipient guard rejects intent types 'import' and
   'importtoc' (Avalanche / Flare cross-chain atomic imports), even
   though those intents legitimately have no client-supplied
   recipients — the wallet imports its own UTXOs and the
   destination is the wallet itself. That surfaces as "Recipient
   details are required to verify this transaction before signing".

Add isSignablePreHashed to Flr mirroring the Flrp implementation,
and add 'import' / 'importtoc' to NO_RECIPIENT_TX_TYPES so the
pre-signing verifier no longer blocks the flow.

Ticket: WAL-1586
Session-Id: ed1da302-5a6d-427c-9cc8-9226e355d0ed
Task-Id: d6c37b72-82ce-4927-b917-f88212aedf23
@linear-code

linear-code Bot commented Jun 23, 2026

Copy link
Copy Markdown

WAL-1586

@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot force-pushed the WAL-1586-fix-flr-atomic-tss-signing branch from baf81ec to 8d4044e Compare June 23, 2026 06:21
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