Skip to content

Conversation

@at31416
Copy link
Contributor

@at31416 at31416 commented Oct 22, 2025

This pull request adds support for Vechain (VET) wallet recovery using MPCv2 TSS (Threshold Signature Scheme) in the BitGo SDK and test suite. The main changes include implementing the recovery flow in the VET coin class, updating transaction and builder logic to handle recovery transactions, introducing related constants and types, and adding comprehensive unit tests and mocks for the recovery process.

Vechain Recovery Feature Implementation:

  • Added a recover method to the Vet coin class to enable wallet recovery using MPCv2 TSS. This method derives the necessary keys, constructs and signs the recovery transaction, ensures sufficient VTHO for fees, and broadcasts the transaction.
  • Introduced helper methods in the Vet class for balance fetching, gas estimation, block reference retrieval, VTHO fee checks, and transaction construction to support the recovery flow.

Transaction and Builder Enhancements:

  • Extended the Transaction and TransactionBuilder classes to include an isRecovery flag, with logic to handle recovery-specific transaction building and ID assignment. [1] [2] [3] [4] [5] [6]

Types and Constants:

  • Added new types (RecoverOptions, RecoveryTransaction, UnsignedSweepRecoveryTransaction) and Vechain-specific constants (e.g., gas price, expiration, coefficient divisor) for use in the recovery process. [1] [2]

Testing and Mocking:

  • Implemented a new nockVetRecovery mock for Vechain node endpoints to simulate account, block, and transaction responses during recovery tests.
  • Added a comprehensive RecoverVet test suite to verify the MPCv2 TSS recovery flow for VET, ensuring that recovery transactions are constructed and broadcast as expected.

These changes collectively enable secure, tested, and automated recovery of Vechain wallets using modern MPCv2 TSS within the BitGo platform.

Ticket: COIN-6042

Copy link
Contributor

@MohammedRyaan786 MohammedRyaan786 left a comment

Choose a reason for hiding this comment

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

LGTM

@at31416 at31416 requested a review from a team as a code owner October 22, 2025 21:29
@at31416 at31416 force-pushed the vechain-wrw branch 2 times, most recently from aa39fa9 to d9b87db Compare October 23, 2025 05:00
@at31416 at31416 requested a review from a team as a code owner October 23, 2025 05:00
This adds logic for both non-bitgo recovery and unsigned sweep
Ticket: COIN-6042
@at31416 at31416 dismissed zahin-mohammad’s stale review October 23, 2025 09:51

addressed the requested changes.

@at31416 at31416 merged commit 3902e57 into master Oct 23, 2025
15 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.

5 participants