MasternodeKeysFragment - shows a list of all available key types (Owner, Voting, Operator, Platform) with total keys derived and number of keys used. The name of the fragment matches its title (Masternode Keys)
MasternodeKeyTypeAdapter - manages the view of each key type
MasternodeKeyTypeViewHolder - displays a single key type, total and used keys
MasternodeKeyChainFragment - shows a list of keys belonging to a single type, allows for deriving new keys. The name is taken from the DashJ KeyChain class.
MasternodeKeyChainAdapter - manages the view of each key for a single key type belonging to the same key chain.
MasternodeKeysViewModel - used by both fragments. Keeps a master copy of all data, handles adding keys and decrypting private keys. This has an activity scope so we don't have to decrypt private keys if the user is looking at the same screen multiple times while switching back and forth. The scope might be for the lifecycle of the app, which might not be desirable given that the private keys will be in memory longer than they need to be.
MasternodeKeyType - enum for the 4 key types (Owner, Voter, Operator, Platform)
MasternodeKeyTypeInfo - data class for a key type
MasternodeKeyInfo - data class for a key, which includes the raw Key Object from DashJ and decrypted private keys
MasternodeKeyChainInfo - data class for a single key chain (for a single key type) and its list of MasternodeKeyInfo
Issue being fixed or feature implemented
Add the Masternode Keys UI
MasternodeKeysFragment
- shows a list of all available key types (Owner, Voting, Operator, Platform) with total keys derived and number of keys used. The name of the fragment matches its title (Masternode Keys)MasternodeKeyTypeAdapter
- manages the view of each key typeMasternodeKeyTypeViewHolder
- displays a single key type, total and used keysMasternodeKeyChainFragment
- shows a list of keys belonging to a single type, allows for deriving new keys. The name is taken from the DashJ KeyChain class.MasternodeKeyChainAdapter
- manages the view of each key for a single key type belonging to the same key chain.MasternodeKeysViewModel
- used by both fragments. Keeps a master copy of all data, handles adding keys and decrypting private keys. This has an activity scope so we don't have to decrypt private keys if the user is looking at the same screen multiple times while switching back and forth. The scope might be for the lifecycle of the app, which might not be desirable given that the private keys will be in memory longer than they need to be.MasternodeKeyType
- enum for the 4 key types (Owner, Voter, Operator, Platform)MasternodeKeyTypeInfo
- data class for a key typeMasternodeKeyInfo
- data class for a key, which includes the raw Key Object from DashJ and decrypted private keysMasternodeKeyChainInfo
- data class for a single key chain (for a single key type) and its list ofMasternodeKeyInfo
Related PR's and Dependencies
https://github.com/dashpay/dashj/pull/201
Screenshots / Videos
How Has This Been Tested?
Checklist: