* Generate new address
receive "generate new address" command from USB
display "Generate address?" "OK/Cancel"
generate new
display "Show priv key?" "OK/Skip"
display "Priv key" "
display "Address" "" "Store/Cancel"
store
transmit to USB
* Sign transaction
receive "sign transaction" command and
display "Sign transaction?" "OK/Cancel"
parse
display "Send-to addr" "
display "Amount" "
display "Fee" "
sign
transmit
* List addresses
receive "list addresses" command from USB
display "List addresses?" "List/Cancel"
loop through []
transmit to USB
display "Address" "" "Next/Cancel"
end loop
* Delete address
receive "delete address" command and from USB
display "Delete address?" "OK/Cancel"
display "Address" "" "Delete/Cancel"
delete and its
Maybe there could be also a PIN security feature for the device. The PIN would be a hexadecimal number entered in a binary form.
Once the PIN is set, the device auto-locks when disconnected or after some period of inactivity, and then it needs to be unlocked next time.
* Set PIN
receive "set pin" command from USB
display "Set PIN?" "OK/Cancel"
display "1111 0111 10*_ ___" "F 7 8 _" "0/1" (enter 16 binary digits)
display "Setting PIN" "
store
* Unlock device
receive any command from USB when the device is locked
display "Unlock device?" "OK/Cancel"
display "1111 0111 10*_ ___" "F 7 8 _" "0/1" (enter 16 binary digits)
display "Unlocking device" "
verify
unlock device and continue