mirror of
https://github.com/status-im/status-keycard-go.git
synced 2025-01-31 00:28:40 +00:00
add flow types
This commit is contained in:
parent
ca3fbcdfeb
commit
95647e9ee8
24
flow.go
24
flow.go
@ -217,12 +217,18 @@ func (f *KeycardFlow) connectedFlow() (FlowStatus, error) {
|
||||
return f.exportKeysFlow(kc, true)
|
||||
case Login:
|
||||
return f.exportKeysFlow(kc, false)
|
||||
case ExportPublic:
|
||||
return f.exportPublic(kc)
|
||||
case LoadAccount:
|
||||
return f.loadKeysFlow(kc)
|
||||
case Sign:
|
||||
return f.signFlow(kc)
|
||||
case ChangeCredentials:
|
||||
return f.changeCredentialsFlow(kc)
|
||||
case ChangePIN:
|
||||
return f.changePINFlow(kc)
|
||||
case ChangePUK:
|
||||
return f.changePUKFlow(kc)
|
||||
case ChangePairing:
|
||||
return f.changePairingFlow(kc)
|
||||
case UnpairThis:
|
||||
return f.unpairThisFlow(kc)
|
||||
case UnpairOthers:
|
||||
@ -307,6 +313,10 @@ func (f *KeycardFlow) exportKeysFlow(kc *keycardContext, recover bool) (FlowStat
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (f *KeycardFlow) exportPublic(kc *keycardContext) (FlowStatus, error) {
|
||||
return nil, errors.New("not implemented yet")
|
||||
}
|
||||
|
||||
func (f *KeycardFlow) loadKeysFlow(kc *keycardContext) (FlowStatus, error) {
|
||||
return nil, errors.New("not implemented yet")
|
||||
}
|
||||
@ -315,7 +325,15 @@ func (f *KeycardFlow) signFlow(kc *keycardContext) (FlowStatus, error) {
|
||||
return nil, errors.New("not implemented yet")
|
||||
}
|
||||
|
||||
func (f *KeycardFlow) changeCredentialsFlow(kc *keycardContext) (FlowStatus, error) {
|
||||
func (f *KeycardFlow) changePINFlow(kc *keycardContext) (FlowStatus, error) {
|
||||
return nil, errors.New("not implemented yet")
|
||||
}
|
||||
|
||||
func (f *KeycardFlow) changePUKFlow(kc *keycardContext) (FlowStatus, error) {
|
||||
return nil, errors.New("not implemented yet")
|
||||
}
|
||||
|
||||
func (f *KeycardFlow) changePairingFlow(kc *keycardContext) (FlowStatus, error) {
|
||||
return nil, errors.New("not implemented yet")
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,11 @@ const (
|
||||
RecoverAccount
|
||||
LoadAccount
|
||||
Login
|
||||
ExportPublic
|
||||
Sign
|
||||
ChangeCredentials
|
||||
ChangePIN
|
||||
ChangePUK
|
||||
ChangePairing
|
||||
UnpairThis
|
||||
UnpairOthers
|
||||
DeleteAccountAndUnpair
|
||||
@ -55,6 +58,8 @@ const (
|
||||
EnterNewPair = "keycard.action.enter-new-pairing"
|
||||
EnterNewPIN = "keycard.action.enter-new-pin"
|
||||
EnterNewPUK = "keycard.action.enter-new-puk"
|
||||
EnterTXHash = "keycard.action.enter-tx-hash"
|
||||
EnterPath = "keycard.action.enter-bip44-path"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -68,6 +73,8 @@ const (
|
||||
ErrorRequireInit = "require-init"
|
||||
ErrorPairing = "pairing"
|
||||
ErrorUnblocking = "unblocking"
|
||||
ErrorSigning = "signing"
|
||||
ErrorExporting = "exporting"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -92,6 +99,9 @@ const (
|
||||
WhisperKey = "whisper-key"
|
||||
EncKey = "encryption-key"
|
||||
Mnemonic = "mnemonic"
|
||||
TXHash = "tx-hash"
|
||||
BIP44Path = "bip44-path"
|
||||
TXSignature = "tx-signature"
|
||||
)
|
||||
|
||||
const (
|
||||
|
Loading…
x
Reference in New Issue
Block a user