@@ -9,6 +9,10 @@ import { EXPORT_IN_C } from '../resources/transactionData/exportInC';
99import { EXPORT_IN_P } from '../resources/transactionData/exportInP' ;
1010import { IMPORT_IN_P } from '../resources/transactionData/importInP' ;
1111import { IMPORT_IN_C } from '../resources/transactionData/importInC' ;
12+ import {
13+ MULTISIG_DELEGATION_FULLY_SIGNED_TX_HEX ,
14+ MULTISIG_DELEGATION_PARAMS ,
15+ } from '../resources/transactionData/multisigDelegationTx' ;
1216import { HalfSignedAccountTransaction , TransactionType , MPCAlgorithm } from '@bitgo/sdk-core' ;
1317import { secp256k1 } from '@flarenetwork/flarejs' ;
1418import { FlrpContext } from '@bitgo/public-types' ;
@@ -958,6 +962,22 @@ describe('Flrp test cases', function () {
958962 const isVerified = await basecoin . verifyTransaction ( { txParams, txPrebuild } ) ;
959963 isVerified . should . equal ( true ) ;
960964 } ) ;
965+
966+ it ( 'should verify delegation transaction when txParams.type is the "stake" intent alias' , async ( ) => {
967+ const txPrebuild = { txHex : MULTISIG_DELEGATION_FULLY_SIGNED_TX_HEX , txInfo : { } } ;
968+ const txParams = {
969+ type : 'stake' , // intent-type alias used by wallet-platform; must normalise to AddPermissionlessDelegator
970+ stakingOptions : {
971+ nodeID : MULTISIG_DELEGATION_PARAMS . nodeID ,
972+ amount : MULTISIG_DELEGATION_PARAMS . stakeAmount ,
973+ durationSeconds : MULTISIG_DELEGATION_PARAMS . duration * 24 * 60 * 60 ,
974+ rewardAddress : MULTISIG_DELEGATION_PARAMS . rewardAddress ,
975+ } ,
976+ } ;
977+
978+ const isVerified = await basecoin . verifyTransaction ( { txParams, txPrebuild } ) ;
979+ isVerified . should . equal ( true ) ;
980+ } ) ;
961981 } ) ;
962982
963983 describe ( 'verifyTransaction with TSS wallet (Avalanche atomic)' , ( ) => {
0 commit comments