@@ -313,6 +313,49 @@ describe('LedgerKeyAgent', () => {
313
313
expect ( LedgerKeyAgent . getSigningMode ( tx ) ) . toEqual ( Ledger . TransactionSigningMode . PLUTUS_TRANSACTION ) ;
314
314
} ) ;
315
315
316
+ it ( 'can detect plutus transaction signing mode if there is a reference input' , async ( ) => {
317
+ const tx : Ledger . Transaction = {
318
+ fee : 10n ,
319
+ includeNetworkId : false ,
320
+ inputs : [
321
+ {
322
+ outputIndex : 0 ,
323
+ path : [ util . harden ( CardanoKeyConst . PURPOSE ) , util . harden ( CardanoKeyConst . COIN_TYPE ) , util . harden ( 0 ) , 1 , 0 ] ,
324
+ txHashHex : '0f3abbc8fc19c2e61bab6059bf8a466e6e754833a08a62a6c56fe0e78f19d9d5'
325
+ }
326
+ ] ,
327
+ network : {
328
+ networkId : Ledger . Networks . Testnet . networkId ,
329
+ protocolMagic : 999
330
+ } ,
331
+ outputs : [
332
+ {
333
+ amount : 10n ,
334
+ datumHashHex : '0f3abbc8fc19c2e61bab6059bf8a466e6e754833a08a62a6c56fe0e78f19d9d5' ,
335
+ destination : {
336
+ params : {
337
+ addressHex :
338
+ '009493315cd92eb5d8c4304e67b7e16ae36d61d34502694657811a2c8e32c728d3861e164cab28cb8f006448139c8f1740ffb8e7aa9e5232dc'
339
+ } ,
340
+ type : Ledger . TxOutputDestinationType . THIRD_PARTY
341
+ } ,
342
+ format : Ledger . TxOutputFormat . ARRAY_LEGACY
343
+ }
344
+ ] ,
345
+ referenceInputs : [
346
+ {
347
+ outputIndex : 0 ,
348
+ path : [ util . harden ( CardanoKeyConst . PURPOSE ) , util . harden ( CardanoKeyConst . COIN_TYPE ) , util . harden ( 0 ) , 1 , 0 ] ,
349
+ txHashHex : '0f3abbc8fc19c2e61bab6059bf8a466e6e754833a08a62a6c56fe0e78f19d9d5'
350
+ }
351
+ ] ,
352
+ ttl : 1000 ,
353
+ validityIntervalStart : 100
354
+ } ;
355
+
356
+ expect ( LedgerKeyAgent . getSigningMode ( tx ) ) . toEqual ( Ledger . TransactionSigningMode . PLUTUS_TRANSACTION ) ;
357
+ } ) ;
358
+
316
359
it ( 'can detect multisig transaction signing mode' , async ( ) => {
317
360
const tx : Ledger . Transaction = {
318
361
certificates : [
0 commit comments