@@ -1457,4 +1457,75 @@ describe('Recovery:', function () {
14571457 ( output . txRequests [ 0 ] . transactions [ 0 ] . unsignedTx . parsedTx as { outputs : any [ ] } ) . should . have . property ( 'outputs' ) ;
14581458 } ) ;
14591459 } ) ;
1460+
1461+ describe ( 'RecoverVet' , function ( ) {
1462+ beforeEach ( ( ) => {
1463+ nock . cleanAll ( ) ;
1464+ } ) ;
1465+ let recoveryParams ;
1466+
1467+ it ( 'should construct a recovery tx with MPCv2 TSS' , async function ( ) {
1468+ recoveryNocks . nockVetRecovery ( bitgo ) ;
1469+ const basecoin = bitgo . coin ( 'tvet' ) ;
1470+ const baseAddress = ethLikeDKLSKeycard . senderAddress ;
1471+ recoveryParams = {
1472+ userKey : ethLikeDKLSKeycard . userKey ,
1473+ backupKey : ethLikeDKLSKeycard . backupKey ,
1474+ walletContractAddress : baseAddress ,
1475+ recoveryDestination : ethLikeDKLSKeycard . destinationAddress ,
1476+ walletPassphrase : ethLikeDKLSKeycard . walletPassphrase ,
1477+ isTss : true ,
1478+ } ;
1479+
1480+ const recovery = await basecoin . recover ( recoveryParams ) ;
1481+
1482+ should . exist ( recovery ) ;
1483+ recovery . should . have . property ( 'id' ) ;
1484+ recovery . should . have . property ( 'tx' ) ;
1485+ } ) ;
1486+
1487+ // it('should construct an unsigned sweep tx with TSS', async function () {
1488+ // recoveryNocks.nockEthLikeRecovery(bitgo, nockUnsignedSweepTSSData);
1489+ //
1490+ // const basecoin = bitgo.coin('hteth');
1491+ //
1492+ // const userKey =
1493+ // '0234eb39b22fed523ece7c78da29ba1f1de5b64a6e48013e0914de793bc1df0570e779de04758732734d97e54b782c8b336283811af6a2c57bd81438798e1c2446';
1494+ // const backupKey =
1495+ // '0234eb39b22fed523ece7c78da29ba1f1de5b64a6e48013e0914de793bc1df0570e779de04758732734d97e54b782c8b336283811af6a2c57bd81438798e1c2446';
1496+ //
1497+ // recoveryParams = {
1498+ // userKey: userKey,
1499+ // backupKey: backupKey,
1500+ // walletContractAddress: '0xe7406dc43d13f698fb41a345c7783d39a4c2d191',
1501+ // recoveryDestination: '0xac05da78464520aa7c9d4c19bd7a440b111b3054',
1502+ // walletPassphrase: TestBitGo.V2.TEST_RECOVERY_PASSCODE,
1503+ // isTss: true,
1504+ // gasPrice: '20000000000',
1505+ // gasLimit: '500000',
1506+ // replayProtectionOptions: {
1507+ // chain: 42,
1508+ // hardfork: 'london',
1509+ // },
1510+ // };
1511+ //
1512+ // const transaction = await basecoin.recover(recoveryParams);
1513+ // should.exist(transaction);
1514+ // const output = transaction as unknown as UnsignedSweepTxMPCv2;
1515+ // output.should.have.property('txRequests');
1516+ // output.txRequests.should.have.length(1);
1517+ // output.txRequests[0].should.have.property('transactions');
1518+ // output.txRequests[0].transactions.should.have.length(1);
1519+ // output.txRequests[0].should.have.property('walletCoin');
1520+ // output.txRequests[0].transactions[0].should.have.property('unsignedTx');
1521+ // output.txRequests[0].transactions[0].unsignedTx.should.have.property('serializedTxHex');
1522+ // output.txRequests[0].transactions[0].unsignedTx.should.have.property('signableHex');
1523+ // output.txRequests[0].transactions[0].unsignedTx.should.have.property('derivationPath');
1524+ // output.txRequests[0].transactions[0].unsignedTx.should.have.property('feeInfo');
1525+ // output.txRequests[0].transactions[0].unsignedTx.should.have.property('parsedTx');
1526+ // const parsedTx = output.txRequests[0].transactions[0].unsignedTx.parsedTx as { spendAmount: string };
1527+ // parsedTx.should.have.property('spendAmount');
1528+ // (output.txRequests[0].transactions[0].unsignedTx.parsedTx as { outputs: any[] }).should.have.property('outputs');
1529+ // });
1530+ } ) ;
14601531} ) ;
0 commit comments