- 
                Notifications
    
You must be signed in to change notification settings  - Fork 300
 
feat: recover function for vet recovery #7299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
                
     Merged
            
            
          Conversation
  
    
      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
    
  
  
    
    
              
                    at31416
  
              
              commented
              
                  
                    Oct 22, 2025 
                  
              
              
            
            
              
                    MohammedRyaan786
  
              
              previously approved these changes
              
                  
                    Oct 22, 2025 
                  
              
              
            
            
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
              
                    ravibitgo
  
              
              reviewed
              
                  
                    Oct 22, 2025 
                  
              
              
            
            
              
                    zahin-mohammad
  
              
              previously requested changes
              
                  
                    Oct 22, 2025 
                  
              
              
            
            
aa39fa9    to
    d9b87db      
    Compare
  
    
              
                    ravibitgo
  
              
              reviewed
              
                  
                    Oct 23, 2025 
                  
              
              
            
            
              
                    ravibitgo
  
              
              reviewed
              
                  
                    Oct 23, 2025 
                  
              
              
            
            
This adds logic for both non-bitgo recovery and unsigned sweep Ticket: COIN-6042
              
                    ravibitgo
  
              
              approved these changes
              
                  
                    Oct 23, 2025 
                  
              
              
            
            
addressed the requested changes.
              
                    MohammedRyaan786
  
              
              approved these changes
              
                  
                    Oct 23, 2025 
                  
              
              
            
            
  
    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.
  
    
  
    
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:
recovermethod to theVetcoin 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.Vetclass for balance fetching, gas estimation, block reference retrieval, VTHO fee checks, and transaction construction to support the recovery flow.Transaction and Builder Enhancements:
TransactionandTransactionBuilderclasses to include anisRecoveryflag, with logic to handle recovery-specific transaction building and ID assignment. [1] [2] [3] [4] [5] [6]Types and Constants:
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:
nockVetRecoverymock for Vechain node endpoints to simulate account, block, and transaction responses during recovery tests.RecoverVettest 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