feat(bitgo): add support for Export txn type in prebuildTransaction#8776
Merged
Conversation
bdesoky
approved these changes
May 14, 2026
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.
Summary
Export,Import, andImportToCcases to the TSSprebuildTransactionTxRequestsswitch for MPC cross-chain transfersexportcase to the EVMpopulateIntentswitch inmpcUtils.tsContext
MPC (TSS) wallets use
prebuildTransactionTxRequestswhich routes transaction types to the/txrequestsendpoint viaprebuildTxWithIntent. The existing multisig flow bypasses this switch entirely — it POSTsdirectly to
/tx/buildwhereparams.typeis forwarded as-is. That's why multisig cross-chain works but MPC wallets hit"transaction type not supported: Export".This PR adds the three Avalanche/Flare atomic transaction types to the TSS prebuild switch:
params.type(from caller)intentType(sent to WP)ExportexportImportimportImportToCimporttocThe
Exportcase passesrecipients,nonce,feeOptions, andfeeTokensince C-chain exports need gas pricing.ImportandImportToConly passrecipientssince P-chain fees are computed server-side.The
populateIntentEVM switch also needs theexportcase because FLR is EVM (baseCoin.isEVM() === true), so without it the intent would throw"Unsupported intent type export"at the EVM default case.ImportandImportToCdon't need EVM cases because they originate from FLRP which is non-EVM and uses the generic fallback path.Changes
modules/sdk-core/src/bitgo/wallet/wallet.tscase 'Export',case 'Import',case 'ImportToC'toprebuildTransactionTxRequestsswitchmodules/sdk-core/src/bitgo/utils/mpcUtils.tscase 'export'to EVMpopulateIntentswitchmodules/bitgo/test/v2/unit/wallet.tsTest plan
yarn unit-test --scope bitgo -- --grep "Export"— 3 prebuild tests passyarn unit-test --scope bitgo -- --grep "export intent"— populateIntent test passes