mirror of
https://github.com/monero-project/monero.git
synced 2025-05-12 09:02:16 -04:00
device/trezor: trezor support added
This commit is contained in:
parent
963d247154
commit
29ffb6bba8
35 changed files with 4591 additions and 39 deletions
|
@ -47,6 +47,7 @@
|
|||
#include "crypto/crypto.h"
|
||||
#include "crypto/chacha.h"
|
||||
#include "ringct/rctTypes.h"
|
||||
#include "cryptonote_config.h"
|
||||
|
||||
|
||||
#ifndef USE_DEVICE_LEDGER
|
||||
|
@ -99,10 +100,17 @@ namespace hw {
|
|||
enum device_type
|
||||
{
|
||||
SOFTWARE = 0,
|
||||
LEDGER = 1
|
||||
LEDGER = 1,
|
||||
TREZOR = 2
|
||||
};
|
||||
|
||||
|
||||
enum device_protocol_t {
|
||||
PROTOCOL_DEFAULT,
|
||||
PROTOCOL_PROXY, // Originally defined by Ledger
|
||||
PROTOCOL_COLD, // Originally defined by Trezor
|
||||
};
|
||||
|
||||
/* ======================================================================= */
|
||||
/* SETUP/TEARDOWN */
|
||||
/* ======================================================================= */
|
||||
|
@ -120,6 +128,7 @@ namespace hw {
|
|||
|
||||
virtual device_type get_type() const = 0;
|
||||
|
||||
virtual device_protocol_t device_protocol() const { return PROTOCOL_DEFAULT; };
|
||||
|
||||
/* ======================================================================= */
|
||||
/* LOCKER */
|
||||
|
@ -204,6 +213,11 @@ namespace hw {
|
|||
|
||||
virtual bool close_tx(void) = 0;
|
||||
|
||||
virtual bool has_ki_cold_sync(void) const { return false; }
|
||||
virtual bool has_tx_cold_sign(void) const { return false; }
|
||||
|
||||
virtual void set_network_type(cryptonote::network_type network_type) { }
|
||||
|
||||
protected:
|
||||
device_mode mode;
|
||||
} ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue