mirror of
https://github.com/status-im/status-keycard-go.git
synced 2025-01-31 08:37:16 +00:00
add generateMnemonic
This commit is contained in:
parent
feff5ec90b
commit
71ab4cb075
@ -249,6 +249,21 @@ func (kc *keycardContext) generateKey() ([]byte, error) {
|
||||
return keyUID, nil
|
||||
}
|
||||
|
||||
func (kc *keycardContext) generateMnemonic(checksumSize int) ([]int, error) {
|
||||
<-kc.connected
|
||||
if kc.runErr != nil {
|
||||
return nil, kc.runErr
|
||||
}
|
||||
|
||||
indexes, err := kc.cmdSet.GenerateMnemonic(checksumSize)
|
||||
if err != nil {
|
||||
l("generateMnemonic failed %+v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return indexes, nil
|
||||
}
|
||||
|
||||
func (kc *keycardContext) removeKey() error {
|
||||
<-kc.connected
|
||||
if kc.runErr != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user