@@ -18,7 +18,7 @@ import GenericApp, { ConstructorParams, LedgerError, Transport, processErrorResp
18
18
import { ResponsePayload } from '@zondax/ledger-js/dist/payload'
19
19
20
20
import { P2_VALUES } from './consts'
21
- import { deserializeDkgRound1 , deserializeDkgRound2 , deserializeReviewTx } from './deserialize'
21
+ import { deserializeDkgRound1 , deserializeDkgRound2 , deserializeGetIdentities , deserializeReviewTx } from './deserialize'
22
22
import { processGetIdentityResponse , processGetKeysResponse } from './helper'
23
23
import { serializeDkgGetCommitments , serializeDkgRound1 , serializeDkgRound2 , serializeDkgRound3Min , serializeDkgSign } from './serialize'
24
24
import {
@@ -31,6 +31,7 @@ import {
31
31
ResponseDkgRound1 ,
32
32
ResponseDkgRound2 ,
33
33
ResponseDkgSign ,
34
+ ResponseIdentities ,
34
35
ResponseIdentity ,
35
36
ResponseReviewTransaction ,
36
37
ResponseSign ,
@@ -59,7 +60,7 @@ export default class IronfishApp extends GenericApp {
59
60
DKG_GET_COMMITMENTS : 0x14 ,
60
61
DKG_SIGN : 0x15 ,
61
62
DKG_GET_KEYS : 0x16 ,
62
- DKG_GET_NONCES : 0x17 ,
63
+ DKG_IDENTITIES : 0x17 ,
63
64
DKG_GET_PUBLIC_PACKAGE : 0x18 ,
64
65
DKG_BACKUP_KEYS : 0x19 ,
65
66
DKG_RESTORE_KEYS : 0x1a ,
@@ -233,6 +234,19 @@ export default class IronfishApp extends GenericApp {
233
234
throw processErrorResponse ( e )
234
235
}
235
236
}
237
+
238
+ async dkgGetIdentities ( ) : Promise < ResponseIdentities > {
239
+ try {
240
+ let response = await this . transport . send ( this . CLA , this . INS . DKG_IDENTITIES , 0 , 0 , Buffer . alloc ( 0 ) , [ LedgerError . NoErrors ] )
241
+ let data = processResponse ( response )
242
+
243
+ let result = await this . getResult ( data )
244
+ return deserializeGetIdentities ( result )
245
+ } catch ( e ) {
246
+ throw processErrorResponse ( e )
247
+ }
248
+ }
249
+
236
250
async dkgRetrieveKeys ( keyType : IronfishKeys , showInDevice ?: boolean ) : Promise < KeyResponse > {
237
251
const p1 = showInDevice ? 1 : 0
238
252
const response = await this . transport . send ( this . CLA , this . INS . DKG_GET_KEYS , p1 , keyType , Buffer . alloc ( 0 ) , [ LedgerError . NoErrors ] )
0 commit comments