-
-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add Zcash shielded payments
- Loading branch information
Showing
61 changed files
with
3,460 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,4 +152,3 @@ message BinanceSignedTx { | |
required bytes signature = 1; | ||
required bytes public_key = 2; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
syntax = "proto2"; | ||
package hw.trezor.messages.zcash; | ||
|
||
// Sugar for easier handling in Java | ||
option java_package = "com.satoshilabs.trezor.lib.protobuf"; | ||
option java_outer_classname = "TrezorMessageZcash"; | ||
|
||
|
||
enum ZcashSignatureType { | ||
reserved 1, 2, 4; | ||
TRANSPARENT = 0; | ||
// SAPLING_SPEND_AUTH = 1; | ||
// SAPLING_BINDING = 2; | ||
ORCHARD_SPEND_AUTH = 3; | ||
// ORCHARD_BINDING = 4; | ||
} | ||
|
||
/** | ||
* Request: Ask device for Orchard Full Viewing Key. | ||
* @start | ||
* @next Failure | ||
* @next ZcashFullViewingKey | ||
*/ | ||
message ZcashGetFullViewingKey { | ||
optional string coin_name = 2 [default = "Zcash"]; | ||
repeated uint32 z_address_n = 3; // z-address ZIP 32 path | ||
} | ||
|
||
/** | ||
* Response: Contains raw Orchard Full Viewing Key. | ||
* @end | ||
*/ | ||
message ZcashFullViewingKey { | ||
required bytes fvk = 1; | ||
} | ||
|
||
/** | ||
* Request: Ask device for Orchard Incoming Viewing Key. | ||
* @start | ||
* @next Failure | ||
* @next ZcashIncomingViewingKey | ||
*/ | ||
message ZcashGetIncomingViewingKey { | ||
optional string coin_name = 1 [default = "Zcash"]; | ||
repeated uint32 z_address_n = 2; // z-address ZIP 32 path | ||
} | ||
|
||
/** | ||
* Response: Contains raw Orchard Incoming Viewing Key. | ||
* @end | ||
*/ | ||
message ZcashIncomingViewingKey { | ||
required bytes ivk = 1; | ||
} | ||
|
||
/** | ||
* Request: Ask device for Unified Address. | ||
* @start | ||
* @next Failure | ||
* @next ZcashAddress | ||
*/ | ||
message ZcashGetAddress { | ||
optional string coin_name = 1 [default = "Zcash"]; | ||
repeated uint32 t_address_n = 2; // t-address BIP 32 path (P2PKH) | ||
repeated uint32 z_address_n = 3; // z-address ZIP 32 path (Orchard) | ||
optional uint64 diversifier_index = 4 [default = 0]; // z-address diversifier index | ||
optional bool show_display = 5 [default = false]; // Optionally show on display before sending the result | ||
} | ||
|
||
/** | ||
* Response: Contains Zcash diversified payment address derived from device private seed | ||
* @end | ||
*/ | ||
message ZcashAddress { | ||
optional string address = 1; | ||
} | ||
|
||
/** | ||
* Request: Specify transaction Orchard input. | ||
* @next TxRequest | ||
*/ | ||
message ZcashOrchardInput { | ||
required bytes recipient = 1; | ||
required uint64 value = 2; | ||
required bytes rho = 3; | ||
required bytes rseed = 4; | ||
} | ||
|
||
/** | ||
* Request: Specify transaction Orchard output. | ||
* Let the `address` and `memo` fields empty for change outputs. | ||
* @next TxRequest | ||
*/ | ||
message ZcashOrchardOutput { | ||
optional string address = 1; // for outgoing transfers | ||
required uint64 amount = 2; | ||
optional string memo = 3; // an optional message for a recepient | ||
} | ||
|
||
message ZcashAck {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.