Add EIP 1024 APDUs
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#define INS_SET_EXTERNAL_PLUGIN 0x12
|
||||
#define INS_PROVIDE_NFT_INFORMATION 0x14
|
||||
#define INS_SET_PLUGIN 0x16
|
||||
#define INS_PERFORM_PRIVACY_OPERATION 0x18
|
||||
#define P1_CONFIRM 0x01
|
||||
#define P1_NON_CONFIRM 0x00
|
||||
#define P2_NO_CHAINCODE 0x00
|
||||
@@ -114,6 +115,13 @@ void handleSetPlugin(uint8_t p1,
|
||||
unsigned int *flags,
|
||||
unsigned int *tx);
|
||||
|
||||
void handlePerformPrivacyOperation(uint8_t p1,
|
||||
uint8_t p2,
|
||||
uint8_t *workBuffer,
|
||||
uint16_t dataLength,
|
||||
unsigned int *flags,
|
||||
unsigned int *tx);
|
||||
|
||||
#ifdef HAVE_ETH2
|
||||
|
||||
void handleGetEth2PublicKey(uint8_t p1,
|
||||
|
||||
@@ -540,6 +540,15 @@ void handleApdu(unsigned int *flags, unsigned int *tx) {
|
||||
tx);
|
||||
break;
|
||||
|
||||
case INS_PERFORM_PRIVACY_OPERATION:
|
||||
handlePerformPrivacyOperation(G_io_apdu_buffer[OFFSET_P1],
|
||||
G_io_apdu_buffer[OFFSET_P2],
|
||||
G_io_apdu_buffer + OFFSET_CDATA,
|
||||
G_io_apdu_buffer[OFFSET_LC],
|
||||
flags,
|
||||
tx);
|
||||
break;
|
||||
|
||||
case INS_SIGN:
|
||||
handleSign(G_io_apdu_buffer[OFFSET_P1],
|
||||
G_io_apdu_buffer[OFFSET_P2],
|
||||
|
||||
@@ -17,6 +17,8 @@ unsigned int io_seproxyhal_touch_data_cancel(const bagl_element_t *e);
|
||||
unsigned int io_seproxyhal_touch_signMessage712_v0_ok(const bagl_element_t *e);
|
||||
unsigned int io_seproxyhal_touch_signMessage712_v0_cancel(const bagl_element_t *e);
|
||||
unsigned int io_seproxyhal_touch_eth2_address_ok(const bagl_element_t *e);
|
||||
unsigned int io_seproxyhal_touch_privacy_ok(const bagl_element_t *e);
|
||||
unsigned int io_seproxyhal_touch_privacy_cancel(const bagl_element_t *e);
|
||||
|
||||
void ui_idle(void);
|
||||
void ui_warning_contract_data(void);
|
||||
|
||||
@@ -26,6 +26,10 @@ extern const ux_flow_step_t* const ux_sign_712_v0_flow[];
|
||||
|
||||
extern const ux_flow_step_t* const ux_display_public_eth2_flow[];
|
||||
|
||||
extern const ux_flow_step_t* const ux_display_privacy_public_key_flow[];
|
||||
|
||||
extern const ux_flow_step_t* const ux_display_privacy_shared_secret_flow[];
|
||||
|
||||
#ifdef HAVE_STARKWARE
|
||||
|
||||
extern const ux_flow_step_t* const ux_display_stark_public_flow[];
|
||||
|
||||
Reference in New Issue
Block a user