mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-05 13:01:12 +00:00
Merge branch 'master' into matejcik/coin-defs
This commit is contained in:
commit
1f6a15430c
@ -9,7 +9,7 @@
|
|||||||
"address_type": 76,
|
"address_type": 76,
|
||||||
"address_type_p2sh": 16,
|
"address_type_p2sh": 16,
|
||||||
"maxfee_kb": 100000,
|
"maxfee_kb": 100000,
|
||||||
"minfee_kb": 10000,
|
"minfee_kb": 1000,
|
||||||
"signed_message_header": "DarkCoin Signed Message:\n",
|
"signed_message_header": "DarkCoin Signed Message:\n",
|
||||||
"hash_genesis_block": "00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6",
|
"hash_genesis_block": "00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6",
|
||||||
"xprv_magic": 50221816,
|
"xprv_magic": 50221816,
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
"https://mona.chainsight.info",
|
"https://mona.chainsight.info",
|
||||||
"https://insight.electrum-mona.org"
|
"https://insight.electrum-mona.org"
|
||||||
],
|
],
|
||||||
"blockbook": [],
|
"blockbook": [
|
||||||
|
"https://blockbook.electrum-mona.org"
|
||||||
|
],
|
||||||
"cooldown": 100
|
"cooldown": 100
|
||||||
}
|
}
|
||||||
|
44
defs/coins/smartcash.json
Normal file
44
defs/coins/smartcash.json
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"coin_name": "SmartCash",
|
||||||
|
"coin_shortcut": "SMART",
|
||||||
|
"coin_label": "SmartCash",
|
||||||
|
"website": "https://smarcash.cc",
|
||||||
|
"github": "https://github.com/SmartCash/Core-Smart",
|
||||||
|
"maintainer": "Leandro Reinaux <leoreinaux@gmail.com>",
|
||||||
|
"curve_name": "secp256k1",
|
||||||
|
"address_type": 63,
|
||||||
|
"address_type_p2sh": 18,
|
||||||
|
"maxfee_kb": 1000000,
|
||||||
|
"minfee_kb": 0,
|
||||||
|
"signed_message_header": "SmartCash Signed Message:\n",
|
||||||
|
"hash_genesis_block": "000007acc6970b812948d14ea5a0a13db0fdd07d5047c7e69101fa8b361e05a4",
|
||||||
|
"xprv_magic": 76066276,
|
||||||
|
"xpub_magic": 76067358,
|
||||||
|
"xpub_magic_segwit_p2sh": null,
|
||||||
|
"xpub_magic_segwit_native": null,
|
||||||
|
"bech32_prefix": null,
|
||||||
|
"cashaddr_prefix": null,
|
||||||
|
"slip44": 224,
|
||||||
|
"segwit": false,
|
||||||
|
"decred": false,
|
||||||
|
"fork_id": null,
|
||||||
|
"force_bip143": false,
|
||||||
|
"bip115": false,
|
||||||
|
"version_group_id": null,
|
||||||
|
"default_fee_b": {
|
||||||
|
"Low": 1,
|
||||||
|
"Economy": 10,
|
||||||
|
"Normal": 100,
|
||||||
|
"High": 200
|
||||||
|
},
|
||||||
|
"dust_limit": 546,
|
||||||
|
"blocktime_seconds": 55,
|
||||||
|
"uri_prefix": "smart",
|
||||||
|
"min_address_length": 27,
|
||||||
|
"max_address_length": 34,
|
||||||
|
"bitcore": [
|
||||||
|
"https://insight.smartcash.cc"
|
||||||
|
],
|
||||||
|
"blockbook": [],
|
||||||
|
"cooldown": 100
|
||||||
|
}
|
BIN
defs/coins/smartcash.png
Normal file
BIN
defs/coins/smartcash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
42
defs/coins/smartcash_testnet.json
Normal file
42
defs/coins/smartcash_testnet.json
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"coin_name": "SmartCash Testnet",
|
||||||
|
"coin_shortcut": "tSMART",
|
||||||
|
"coin_label": "SmartCash Testnet",
|
||||||
|
"website": "https://smartcash.cc",
|
||||||
|
"github": "https://github.com/SmartCash/Core-Smart",
|
||||||
|
"maintainer": "Leandro Reinaux <leoreinaux@gmail.com>",
|
||||||
|
"curve_name": "secp256k1",
|
||||||
|
"address_type": 65,
|
||||||
|
"address_type_p2sh": 21,
|
||||||
|
"maxfee_kb": 1000000,
|
||||||
|
"minfee_kb": 0,
|
||||||
|
"signed_message_header": "SmartCash Signed Message:\n",
|
||||||
|
"hash_genesis_block": "0000027235b5679bcd28c90d03d4bf1a9ba4c07c4efcc1c87d6c68cce25e6e5d",
|
||||||
|
"xprv_magic": 70615956,
|
||||||
|
"xpub_magic": 70617039,
|
||||||
|
"xpub_magic_segwit_p2sh": null,
|
||||||
|
"xpub_magic_segwit_native": null,
|
||||||
|
"bech32_prefix": null,
|
||||||
|
"cashaddr_prefix": null,
|
||||||
|
"slip44": 224,
|
||||||
|
"segwit": false,
|
||||||
|
"decred": false,
|
||||||
|
"fork_id": null,
|
||||||
|
"force_bip143": false,
|
||||||
|
"bip115": false,
|
||||||
|
"version_group_id": null,
|
||||||
|
"default_fee_b": {
|
||||||
|
"Low": 1,
|
||||||
|
"Economy": 10,
|
||||||
|
"Normal": 100,
|
||||||
|
"High": 200
|
||||||
|
},
|
||||||
|
"dust_limit": 546,
|
||||||
|
"blocktime_seconds": 55,
|
||||||
|
"uri_prefix": "testsmart",
|
||||||
|
"min_address_length": 27,
|
||||||
|
"max_address_length": 35,
|
||||||
|
"bitcore": [],
|
||||||
|
"blockbook": [],
|
||||||
|
"cooldown": 100
|
||||||
|
}
|
BIN
defs/coins/smartcash_testnet.png
Normal file
BIN
defs/coins/smartcash_testnet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -142,5 +142,29 @@
|
|||||||
"name": "Akroma",
|
"name": "Akroma",
|
||||||
"rskip60": false,
|
"rskip60": false,
|
||||||
"url": "https://akroma.io"
|
"url": "https://akroma.io"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chain_id": 7762959,
|
||||||
|
"slip44": 184,
|
||||||
|
"shortcut": "MUSIC",
|
||||||
|
"name": "Musicoin",
|
||||||
|
"rskip60": false,
|
||||||
|
"url": "https://musicoin.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chain_id": 1313114,
|
||||||
|
"slip44": 1313114,
|
||||||
|
"shortcut": "ETHO",
|
||||||
|
"name": "Ether-1",
|
||||||
|
"rskip60": false,
|
||||||
|
"url": "https://ether1.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chain_id": 3125659152,
|
||||||
|
"slip44": 164,
|
||||||
|
"shortcut": "PIRL",
|
||||||
|
"name": "Pirl",
|
||||||
|
"rskip60": false,
|
||||||
|
"url": "https://pirl.io"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
1
protob/.gitignore
vendored
1
protob/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
*.pb
|
*.pb
|
||||||
|
combined.proto
|
||||||
graph.gv*
|
graph.gv*
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
check: messages.pb messages-bitcoin.pb messages-bootloader.pb messages-cardano.pb messages-common.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-lisk.pb messages-management.pb messages-monero.pb messages-nem.pb messages-ripple.pb messages-stellar.pb messages-tezos.pb
|
check: messages.pb messages-bitcoin.pb messages-bootloader.pb messages-cardano.pb messages-common.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-lisk.pb messages-management.pb messages-monero.pb messages-nem.pb messages-ripple.pb messages-stellar.pb messages-tezos.pb messages-ontology.pb
|
||||||
|
|
||||||
%.pb: %.proto
|
%.pb: %.proto
|
||||||
protoc -I/usr/include -I. $< -o $@
|
protoc -I/usr/include -I. $< -o $@
|
||||||
|
|
||||||
|
combine:
|
||||||
|
echo 'syntax = "proto2";' > combined.proto
|
||||||
|
echo 'import "google/protobuf/descriptor.proto";' >> combined.proto
|
||||||
|
grep -hv -e '^import ' -e '^syntax' -e '^package' -e 'option java_' messages*.proto | sed 's/hw\.trezor\.messages\.common\.//' >> combined.proto
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.pb
|
rm -f *.pb
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.bitcoin;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
@ -29,8 +30,8 @@ message MultisigRedeemScriptType {
|
|||||||
* Structure representing HDNode + Path
|
* Structure representing HDNode + Path
|
||||||
*/
|
*/
|
||||||
message HDNodePathType {
|
message HDNodePathType {
|
||||||
required HDNodeType node = 1; // BIP-32 node in deserialized form
|
required hw.trezor.messages.common.HDNodeType node = 1; // BIP-32 node in deserialized form
|
||||||
repeated uint32 address_n = 2; // BIP-32 path to derive the key from node
|
repeated uint32 address_n = 2; // BIP-32 path to derive the key from node
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +54,7 @@ message GetPublicKey {
|
|||||||
* @end
|
* @end
|
||||||
*/
|
*/
|
||||||
message PublicKey {
|
message PublicKey {
|
||||||
required HDNodeType node = 1; // BIP32 public node
|
required hw.trezor.messages.common.HDNodeType node = 1; // BIP32 public node
|
||||||
optional string xpub = 2; // serialized form of public node
|
optional string xpub = 2; // serialized form of public node
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.bootloader;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.cardano;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
@ -40,9 +41,9 @@ message CardanoGetPublicKey {
|
|||||||
* @end
|
* @end
|
||||||
*/
|
*/
|
||||||
message CardanoPublicKey {
|
message CardanoPublicKey {
|
||||||
optional string xpub = 1; // Xpub key
|
optional string xpub = 1; // Xpub key
|
||||||
optional HDNodeType node = 2; // BIP-32 public node
|
optional hw.trezor.messages.common.HDNodeType node = 2; // BIP-32 public node
|
||||||
optional string root_hd_passphrase = 3; // HD passphrase for root in hex format
|
optional string root_hd_passphrase = 3; // HD passphrase for root in hex format
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.common;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Success of the previous request
|
* Response: Success of the previous request
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.crypto;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.debug;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
@ -30,17 +31,17 @@ message DebugLinkGetState {
|
|||||||
* @end
|
* @end
|
||||||
*/
|
*/
|
||||||
message DebugLinkState {
|
message DebugLinkState {
|
||||||
optional bytes layout = 1; // raw buffer of display
|
optional bytes layout = 1; // raw buffer of display
|
||||||
optional string pin = 2; // current PIN, blank if PIN is not set/enabled
|
optional string pin = 2; // current PIN, blank if PIN is not set/enabled
|
||||||
optional string matrix = 3; // current PIN matrix
|
optional string matrix = 3; // current PIN matrix
|
||||||
optional string mnemonic = 4; // current BIP-39 mnemonic
|
optional string mnemonic = 4; // current BIP-39 mnemonic
|
||||||
optional HDNodeType node = 5; // current BIP-32 node
|
optional hw.trezor.messages.common.HDNodeType node = 5; // current BIP-32 node
|
||||||
optional bool passphrase_protection = 6; // is node/mnemonic encrypted using passphrase?
|
optional bool passphrase_protection = 6; // is node/mnemonic encrypted using passphrase?
|
||||||
optional string reset_word = 7; // word on device display during ResetDevice workflow
|
optional string reset_word = 7; // word on device display during ResetDevice workflow
|
||||||
optional bytes reset_entropy = 8; // current entropy during ResetDevice workflow
|
optional bytes reset_entropy = 8; // current entropy during ResetDevice workflow
|
||||||
optional string recovery_fake_word = 9; // (fake) word on display during RecoveryDevice workflow
|
optional string recovery_fake_word = 9; // (fake) word on display during RecoveryDevice workflow
|
||||||
optional uint32 recovery_word_pos = 10; // index of mnemonic word the device is expecting during RecoveryDevice workflow
|
optional uint32 recovery_word_pos = 10; // index of mnemonic word the device is expecting during RecoveryDevice workflow
|
||||||
optional uint32 reset_word_pos = 11; // index of mnemonic word the device is expecting during ResetDevice workflow
|
optional uint32 reset_word_pos = 11; // index of mnemonic word the device is expecting during ResetDevice workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.ethereum;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.lisk;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.management;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
@ -162,14 +163,14 @@ message WipeDevice {
|
|||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
message LoadDevice {
|
message LoadDevice {
|
||||||
optional string mnemonic = 1; // seed encoded as BIP-39 mnemonic (12, 18 or 24 words)
|
optional string mnemonic = 1; // seed encoded as BIP-39 mnemonic (12, 18 or 24 words)
|
||||||
optional HDNodeType node = 2; // BIP-32 node
|
optional hw.trezor.messages.common.HDNodeType node = 2; // BIP-32 node
|
||||||
optional string pin = 3; // set PIN protection
|
optional string pin = 3; // set PIN protection
|
||||||
optional bool passphrase_protection = 4; // enable master node encryption using passphrase
|
optional bool passphrase_protection = 4; // enable master node encryption using passphrase
|
||||||
optional string language = 5 [default='english']; // device language
|
optional string language = 5 [default='english']; // device language
|
||||||
optional string label = 6; // device label
|
optional string label = 6; // device label
|
||||||
optional bool skip_checksum = 7; // do not test mnemonic for valid BIP-39 checksum
|
optional bool skip_checksum = 7; // do not test mnemonic for valid BIP-39 checksum
|
||||||
optional uint32 u2f_counter = 8; // U2F counter
|
optional uint32 u2f_counter = 8; // U2F counter
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,9 +1,57 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.monero;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
option java_outer_classname = "TrezorMessageMonero";
|
option java_outer_classname = "TrezorMessageMonero";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Structure representing Monero transaction source entry, UTXO
|
||||||
|
* @embed
|
||||||
|
*/
|
||||||
|
message MoneroTransactionSourceEntry {
|
||||||
|
repeated MoneroOutputEntry outputs = 1;
|
||||||
|
optional uint64 real_output = 2;
|
||||||
|
optional bytes real_out_tx_key = 3;
|
||||||
|
repeated bytes real_out_additional_tx_keys = 4;
|
||||||
|
optional uint64 real_output_in_tx_index = 5;
|
||||||
|
optional uint64 amount = 6;
|
||||||
|
optional bool rct = 7;
|
||||||
|
optional bytes mask = 8;
|
||||||
|
optional MoneroMultisigKLRki multisig_kLRki = 9;
|
||||||
|
message MoneroOutputEntry {
|
||||||
|
optional uint64 idx = 1;
|
||||||
|
optional MoneroRctKey key = 2;
|
||||||
|
message MoneroRctKey {
|
||||||
|
optional bytes dest = 1;
|
||||||
|
optional bytes mask = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
message MoneroMultisigKLRki {
|
||||||
|
optional bytes K = 1;
|
||||||
|
optional bytes L = 2;
|
||||||
|
optional bytes R = 3;
|
||||||
|
optional bytes ki = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Structure representing Monero transaction destination entry
|
||||||
|
* @embed
|
||||||
|
*/
|
||||||
|
message MoneroTransactionDestinationEntry {
|
||||||
|
optional uint64 amount = 1;
|
||||||
|
optional MoneroAccountPublicAddress addr = 2;
|
||||||
|
optional bool is_subaddress = 3;
|
||||||
|
/**
|
||||||
|
* Structure representing Monero public address
|
||||||
|
*/
|
||||||
|
message MoneroAccountPublicAddress {
|
||||||
|
optional bytes spend_public_key = 1;
|
||||||
|
optional bytes view_public_key = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for public address derived from seed and address_n
|
* Request: Ask device for public address derived from seed and address_n
|
||||||
* @start
|
* @start
|
||||||
@ -57,8 +105,8 @@ message MoneroTransactionInitRequest {
|
|||||||
optional uint32 network_type = 3; // Main-net / testnet / stagenet
|
optional uint32 network_type = 3; // Main-net / testnet / stagenet
|
||||||
optional MoneroTransactionData tsx_data = 4;
|
optional MoneroTransactionData tsx_data = 4;
|
||||||
/**
|
/**
|
||||||
* Structure representing Monero initial transaction information
|
* Structure representing Monero initial transaction information
|
||||||
*/
|
*/
|
||||||
message MoneroTransactionData {
|
message MoneroTransactionData {
|
||||||
optional uint32 version = 1;
|
optional uint32 version = 1;
|
||||||
optional bytes payment_id = 2;
|
optional bytes payment_id = 2;
|
||||||
@ -74,21 +122,6 @@ message MoneroTransactionInitRequest {
|
|||||||
optional bytes exp_tx_prefix_hash = 12;
|
optional bytes exp_tx_prefix_hash = 12;
|
||||||
repeated bytes use_tx_keys = 13;
|
repeated bytes use_tx_keys = 13;
|
||||||
optional bool is_bulletproof = 14;
|
optional bool is_bulletproof = 14;
|
||||||
/**
|
|
||||||
* Structure representing Monero transaction destination entry
|
|
||||||
*/
|
|
||||||
message MoneroTransactionDestinationEntry {
|
|
||||||
optional uint64 amount = 1;
|
|
||||||
optional MoneroAccountPublicAddress addr = 2;
|
|
||||||
optional bool is_subaddress = 3;
|
|
||||||
/**
|
|
||||||
* Structure representing Monero public address
|
|
||||||
*/
|
|
||||||
message MoneroAccountPublicAddress {
|
|
||||||
optional bytes spend_public_key = 1;
|
|
||||||
optional bytes view_public_key = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +144,7 @@ message MoneroTransactionInitAck {
|
|||||||
*/
|
*/
|
||||||
message MoneroTransactionSetInputRequest {
|
message MoneroTransactionSetInputRequest {
|
||||||
optional uint32 version = 1;
|
optional uint32 version = 1;
|
||||||
optional bytes src_entr = 2; // xmrtypes.TxSourceEntry
|
optional MoneroTransactionSourceEntry src_entr = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -147,7 +180,7 @@ message MoneroTransactionInputsPermutationAck {
|
|||||||
* @next MoneroTransactionInputViniAck
|
* @next MoneroTransactionInputViniAck
|
||||||
*/
|
*/
|
||||||
message MoneroTransactionInputViniRequest {
|
message MoneroTransactionInputViniRequest {
|
||||||
optional bytes src_entr = 1; // xmrtypes.TxSourceEntry
|
optional MoneroTransactionSourceEntry src_entr = 1;
|
||||||
optional bytes vini = 2; // xmrtypes.TxinToKey
|
optional bytes vini = 2; // xmrtypes.TxinToKey
|
||||||
optional bytes vini_hmac = 3;
|
optional bytes vini_hmac = 3;
|
||||||
optional bytes pseudo_out = 4;
|
optional bytes pseudo_out = 4;
|
||||||
@ -166,7 +199,7 @@ message MoneroTransactionInputViniAck {
|
|||||||
* @next MoneroTransactionSetOutputAck
|
* @next MoneroTransactionSetOutputAck
|
||||||
*/
|
*/
|
||||||
message MoneroTransactionSetOutputRequest {
|
message MoneroTransactionSetOutputRequest {
|
||||||
optional bytes dst_entr = 1; // xmrtypes.TxDestinationEntry
|
optional MoneroTransactionDestinationEntry dst_entr = 1;
|
||||||
optional bytes dst_entr_hmac = 2;
|
optional bytes dst_entr_hmac = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,8 +231,8 @@ message MoneroTransactionAllOutSetAck {
|
|||||||
optional bytes tx_prefix_hash = 2;
|
optional bytes tx_prefix_hash = 2;
|
||||||
optional MoneroRingCtSig rv = 3; // xmrtypes.RctSig
|
optional MoneroRingCtSig rv = 3; // xmrtypes.RctSig
|
||||||
/*
|
/*
|
||||||
* Structure represents initial fields of the Monero RCT signature
|
* Structure represents initial fields of the Monero RCT signature
|
||||||
*/
|
*/
|
||||||
message MoneroRingCtSig {
|
message MoneroRingCtSig {
|
||||||
optional uint64 txn_fee = 1;
|
optional uint64 txn_fee = 1;
|
||||||
optional bytes message = 2;
|
optional bytes message = 2;
|
||||||
@ -227,7 +260,7 @@ message MoneroTransactionMlsagDoneAck {
|
|||||||
* @next MoneroTransactionSignInputAck
|
* @next MoneroTransactionSignInputAck
|
||||||
*/
|
*/
|
||||||
message MoneroTransactionSignInputRequest {
|
message MoneroTransactionSignInputRequest {
|
||||||
optional bytes src_entr = 1; // xmrtypes.TxSourceEntry
|
optional MoneroTransactionSourceEntry src_entr = 1;
|
||||||
optional bytes vini = 2; // xmrtypes.TxinToKey
|
optional bytes vini = 2; // xmrtypes.TxinToKey
|
||||||
optional bytes vini_hmac = 3;
|
optional bytes vini_hmac = 3;
|
||||||
optional bytes pseudo_out = 4;
|
optional bytes pseudo_out = 4;
|
||||||
@ -299,8 +332,8 @@ message MoneroKeyImageExportInitRequest {
|
|||||||
optional uint32 network_type = 4; // Main-net / testnet / stagenet
|
optional uint32 network_type = 4; // Main-net / testnet / stagenet
|
||||||
repeated MoneroSubAddressIndicesList subs = 5;
|
repeated MoneroSubAddressIndicesList subs = 5;
|
||||||
/**
|
/**
|
||||||
* Structure representing Monero list of sub-addresses
|
* Structure representing Monero list of sub-addresses
|
||||||
*/
|
*/
|
||||||
message MoneroSubAddressIndicesList {
|
message MoneroSubAddressIndicesList {
|
||||||
optional uint32 account = 1;
|
optional uint32 account = 1;
|
||||||
repeated uint32 minor_indices = 2;
|
repeated uint32 minor_indices = 2;
|
||||||
@ -321,8 +354,8 @@ message MoneroKeyImageExportInitAck {
|
|||||||
message MoneroKeyImageSyncStepRequest {
|
message MoneroKeyImageSyncStepRequest {
|
||||||
repeated MoneroTransferDetails tdis = 1;
|
repeated MoneroTransferDetails tdis = 1;
|
||||||
/**
|
/**
|
||||||
* Structure representing Monero UTXO for key image sync
|
* Structure representing Monero UTXO for key image sync
|
||||||
*/
|
*/
|
||||||
message MoneroTransferDetails {
|
message MoneroTransferDetails {
|
||||||
optional bytes out_key = 1;
|
optional bytes out_key = 1;
|
||||||
optional bytes tx_pub_key = 2;
|
optional bytes tx_pub_key = 2;
|
||||||
@ -338,8 +371,8 @@ message MoneroKeyImageSyncStepRequest {
|
|||||||
message MoneroKeyImageSyncStepAck {
|
message MoneroKeyImageSyncStepAck {
|
||||||
repeated MoneroExportedKeyImage kis = 1;
|
repeated MoneroExportedKeyImage kis = 1;
|
||||||
/**
|
/**
|
||||||
* Structure representing Monero encrypted exported key image
|
* Structure representing Monero encrypted exported key image
|
||||||
*/
|
*/
|
||||||
message MoneroExportedKeyImage {
|
message MoneroExportedKeyImage {
|
||||||
optional bytes iv = 1;
|
optional bytes iv = 1;
|
||||||
optional bytes tag = 2;
|
optional bytes tag = 2;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.nem;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
189
protob/messages-ontology.proto
Normal file
189
protob/messages-ontology.proto
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
|
// Sugar for easier handling in Java
|
||||||
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
option java_outer_classname = "TrezorMessageOntology";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ontology Transaction
|
||||||
|
* @embed
|
||||||
|
*/
|
||||||
|
message OntologyTransaction {
|
||||||
|
optional uint32 version = 1;
|
||||||
|
optional uint32 type = 2;
|
||||||
|
optional uint32 nonce = 3;
|
||||||
|
optional uint64 gas_price = 4;
|
||||||
|
optional uint64 gas_limit = 5;
|
||||||
|
optional string payer = 6;
|
||||||
|
repeated OntologyTxAttribute tx_attributes = 7;
|
||||||
|
/**
|
||||||
|
* Attribute of Ontology transaction
|
||||||
|
*/
|
||||||
|
message OntologyTxAttribute {
|
||||||
|
optional uint32 usage = 1;
|
||||||
|
optional bytes data = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device for Ontology public key corresponding to address_n path
|
||||||
|
* @start
|
||||||
|
* @next OntologyPublicKey
|
||||||
|
*/
|
||||||
|
message OntologyGetPublicKey {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional bool show_display = 2; // Optionally show on display before sending the result
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Ontology public key derived from device private seed
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message OntologyPublicKey {
|
||||||
|
optional bytes public_key = 1; // Ontology public key
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device for Ontology address corresponding to address_n path
|
||||||
|
* @start
|
||||||
|
* @next OntologyAddress
|
||||||
|
*/
|
||||||
|
message OntologyGetAddress {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional bool show_display = 2; // Optionally show on display before sending the result
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Ontology address derived from device private seed
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message OntologyAddress {
|
||||||
|
optional string address = 1; // Ontology address
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device to sign Ontology transfer
|
||||||
|
* @start
|
||||||
|
* @next OntologySignedTransfer
|
||||||
|
*/
|
||||||
|
message OntologySignTransfer {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional OntologyTransaction transaction = 2;
|
||||||
|
optional OntologyTransfer transfer = 3;
|
||||||
|
/**
|
||||||
|
* Ontology Transfer
|
||||||
|
*/
|
||||||
|
message OntologyTransfer {
|
||||||
|
optional OntologyAsset asset = 1;
|
||||||
|
optional uint64 amount = 2;
|
||||||
|
optional string from_address = 3;
|
||||||
|
optional string to_address = 4;
|
||||||
|
/**
|
||||||
|
* Ontology Asset
|
||||||
|
*/
|
||||||
|
enum OntologyAsset {
|
||||||
|
ONT = 1;
|
||||||
|
ONG = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Ontology transfer signature
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message OntologySignedTransfer {
|
||||||
|
optional bytes signature = 1;
|
||||||
|
optional bytes payload = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device to sign Ontology ONG withdrawal
|
||||||
|
* @start
|
||||||
|
* @next OntologySignedWithdrawOng
|
||||||
|
*/
|
||||||
|
message OntologySignWithdrawOng {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional OntologyTransaction transaction = 2;
|
||||||
|
optional OntologyWithdrawOng withdraw_ong = 3;
|
||||||
|
/**
|
||||||
|
* Ontology ONG Withdrawal
|
||||||
|
*/
|
||||||
|
message OntologyWithdrawOng {
|
||||||
|
optional uint64 amount = 1;
|
||||||
|
optional string from_address = 2;
|
||||||
|
optional string to_address = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Ontology ONG withdrawal signature
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message OntologySignedWithdrawOng {
|
||||||
|
optional bytes signature = 1;
|
||||||
|
optional bytes payload = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device to sign Ontology ONT ID registration
|
||||||
|
* @start
|
||||||
|
* @next OntologySignedOntIdRegister
|
||||||
|
*/
|
||||||
|
message OntologySignOntIdRegister {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional OntologyTransaction transaction = 2;
|
||||||
|
optional OntologyOntIdRegister ont_id_register = 3;
|
||||||
|
/**
|
||||||
|
* Ontology ONT ID registration
|
||||||
|
*/
|
||||||
|
message OntologyOntIdRegister {
|
||||||
|
optional string ont_id = 1;
|
||||||
|
optional bytes public_key = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Ontology ONT ID registration signature
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message OntologySignedOntIdRegister {
|
||||||
|
optional bytes signature = 1;
|
||||||
|
optional bytes payload = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device to sign Ontology ONT ID attributes adding
|
||||||
|
* @start
|
||||||
|
* @next OntologySignedOntIdAddAttributes
|
||||||
|
*/
|
||||||
|
message OntologySignOntIdAddAttributes {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional OntologyTransaction transaction = 2;
|
||||||
|
optional OntologyOntIdAddAttributes ont_id_add_attributes = 3;
|
||||||
|
/**
|
||||||
|
* Ontology ONT ID attributes adding
|
||||||
|
*/
|
||||||
|
message OntologyOntIdAddAttributes {
|
||||||
|
optional string ont_id = 1;
|
||||||
|
optional bytes public_key = 2;
|
||||||
|
repeated OntologyOntIdAttribute ont_id_attributes = 3;
|
||||||
|
/**
|
||||||
|
* Attribute of Ontology ONT ID
|
||||||
|
*/
|
||||||
|
message OntologyOntIdAttribute {
|
||||||
|
optional string key = 1;
|
||||||
|
optional string type = 2;
|
||||||
|
optional string value = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Ontology ONT ID attributes adding signature
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message OntologySignedOntIdAddAttributes {
|
||||||
|
optional bytes signature = 1;
|
||||||
|
optional bytes payload = 2;
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.ripple;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.stellar;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,9 +1,19 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.tezos;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
option java_outer_classname = "TrezorMessageTezos";
|
option java_outer_classname = "TrezorMessageTezos";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tezos Curve Type
|
||||||
|
*/
|
||||||
|
enum TezosCurveType {
|
||||||
|
Ed25519 = 0;
|
||||||
|
Secp256k1 = 1;
|
||||||
|
P256 = 2;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for Tezos address corresponding to address_n path
|
* Request: Ask device for Tezos address corresponding to address_n path
|
||||||
* @start
|
* @start
|
||||||
@ -12,7 +22,8 @@ option java_outer_classname = "TrezorMessageTezos";
|
|||||||
*/
|
*/
|
||||||
message TezosGetAddress {
|
message TezosGetAddress {
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
optional bool show_display = 2; // optionally show on display before sending the result
|
optional TezosCurveType curve = 2 [default=Ed25519]; // Curve to use in trezor
|
||||||
|
optional bool show_display = 3; // optionally show on display before sending the result
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,7 +41,8 @@ message TezosAddress {
|
|||||||
*/
|
*/
|
||||||
message TezosGetPublicKey {
|
message TezosGetPublicKey {
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
optional bool show_display = 2; // Optionally show on display before sending the result
|
optional TezosCurveType curve = 2 [default=Ed25519]; // Curve to use in trezor
|
||||||
|
optional bool show_display = 3; // Optionally show on display before sending the result
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,7 +50,7 @@ message TezosGetPublicKey {
|
|||||||
* @end
|
* @end
|
||||||
*/
|
*/
|
||||||
message TezosPublicKey {
|
message TezosPublicKey {
|
||||||
optional bytes public_key = 1; // Tezos public key
|
optional string public_key = 1; // b58 encoded Tezos public key with prefix
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,68 +60,77 @@ message TezosPublicKey {
|
|||||||
*/
|
*/
|
||||||
message TezosSignTx {
|
message TezosSignTx {
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
optional TezosOperationCommon operation = 2; // Tezos operation structure
|
optional TezosCurveType curve = 2 [default=Ed25519]; // Curve to use in trezor
|
||||||
optional TezosTransactionType transaction = 3; // Tezos transaction part
|
optional bytes branch = 3; // b58 encoded branch with prefix
|
||||||
optional TezosOriginationType origination = 4; // Tezos origination part
|
|
||||||
optional TezosDelegationType delegation = 5; // Tezos delegation part
|
optional TezosRevealOp reveal = 4; // Tezos reveal operation (may be bundled with other op)
|
||||||
|
optional TezosTransactionOp transaction = 5; // Tezos transaction operation
|
||||||
|
optional TezosOriginationOp origination = 6; // Tezos origination operation
|
||||||
|
optional TezosDelegationOp delegation = 7; // Tezos delegation operation
|
||||||
/*
|
/*
|
||||||
* Tezos contract ID
|
* Tezos contract ID
|
||||||
*/
|
*/
|
||||||
message TezosContractID {
|
message TezosContractID {
|
||||||
optional TezosContractType tag = 1;
|
optional TezosContractType tag = 1;
|
||||||
optional bytes hash = 2; // Implicit = 21B, originated = 20B + 1B padding
|
optional bytes hash = 2; // Implicit = 21B, originated = 20B + 1B padding
|
||||||
/*
|
/*
|
||||||
* Type of Tezos Contract type
|
* Type of Tezos Contract type
|
||||||
*/
|
*/
|
||||||
enum TezosContractType {
|
enum TezosContractType {
|
||||||
Implicit = 0;
|
Implicit = 0;
|
||||||
Originated = 1;
|
Originated = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/**
|
||||||
* Structure representing the common part for Tezos operations
|
* Structure representing information for reveal
|
||||||
*/
|
*/
|
||||||
message TezosOperationCommon {
|
message TezosRevealOp {
|
||||||
optional bytes branch = 1;
|
optional TezosContractID source = 1;
|
||||||
optional TezosOperationType tag = 2;
|
optional uint64 fee = 2;
|
||||||
optional TezosContractID source = 3;
|
optional uint64 counter = 3;
|
||||||
optional uint64 fee = 4;
|
optional uint64 gas_limit = 4;
|
||||||
optional uint64 counter = 5;
|
optional uint64 storage_limit = 5;
|
||||||
optional uint64 gas_limit = 6;
|
optional bytes public_key = 6;
|
||||||
optional uint64 storage_limit = 7;
|
|
||||||
/*
|
|
||||||
* Type of Tezos operation
|
|
||||||
*/
|
|
||||||
enum TezosOperationType {
|
|
||||||
Transaction = 8;
|
|
||||||
Origination = 9;
|
|
||||||
Delegation = 10;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/*
|
/**
|
||||||
* Structure representing additional information for transaction
|
* Structure representing information for transaction
|
||||||
*/
|
*/
|
||||||
message TezosTransactionType {
|
message TezosTransactionOp {
|
||||||
optional uint64 amount = 1;
|
optional TezosContractID source = 1;
|
||||||
optional TezosContractID destination = 2;
|
optional uint64 fee = 2;
|
||||||
optional bytes parameters = 3;
|
optional uint64 counter = 3;
|
||||||
|
optional uint64 gas_limit = 4;
|
||||||
|
optional uint64 storage_limit = 5;
|
||||||
|
optional uint64 amount = 6;
|
||||||
|
optional TezosContractID destination = 7;
|
||||||
|
optional bytes parameters = 8;
|
||||||
}
|
}
|
||||||
/*
|
/**
|
||||||
* Structure representing additional information for origination
|
* Structure representing information for origination
|
||||||
*/
|
*/
|
||||||
message TezosOriginationType {
|
message TezosOriginationOp {
|
||||||
optional bytes manager_pubkey = 1;
|
optional TezosContractID source = 1;
|
||||||
optional uint64 balance = 2;
|
optional uint64 fee = 2;
|
||||||
optional bool spendable = 3;
|
optional uint64 counter = 3;
|
||||||
optional bool delegatable = 4;
|
optional uint64 gas_limit = 4;
|
||||||
optional bytes delegate = 5; // 1B tag + 20B public key hash
|
optional uint64 storage_limit = 5;
|
||||||
optional bytes script = 6;
|
optional bytes manager_pubkey = 6;
|
||||||
|
optional uint64 balance = 7;
|
||||||
|
optional bool spendable = 8;
|
||||||
|
optional bool delegatable = 9;
|
||||||
|
optional bytes delegate = 10;
|
||||||
|
optional bytes script = 11;
|
||||||
}
|
}
|
||||||
/*
|
/**
|
||||||
* Structure representing additional information for delegation
|
* Structure representing information for delegation
|
||||||
*/
|
*/
|
||||||
message TezosDelegationType {
|
message TezosDelegationOp {
|
||||||
optional bytes delegate = 1; // 1B tag + 20B public key hash
|
optional TezosContractID source = 1;
|
||||||
|
optional uint64 fee = 2;
|
||||||
|
optional uint64 counter = 3;
|
||||||
|
optional uint64 gas_limit = 4;
|
||||||
|
optional uint64 storage_limit = 5;
|
||||||
|
optional bytes delegate = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,7 +139,7 @@ message TezosSignTx {
|
|||||||
* @end
|
* @end
|
||||||
*/
|
*/
|
||||||
message TezosSignedTx {
|
message TezosSignedTx {
|
||||||
optional bytes signature = 1; // Tezos transaction signature
|
optional string signature = 1; // Tezos b58 encoded transaction signature with prefix
|
||||||
optional bytes sig_op_contents = 2; // Signed operation contents
|
optional bytes sig_op_contents = 2; // operation_bytes + signed operation_bytes
|
||||||
optional string operation_hash = 3; // b58 check encoded blake2b hashed operation contents
|
optional string operation_hash = 3; // b58 encoded hashed operation contents with prefix
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Messages for TREZOR communication
|
* Messages for TREZOR communication
|
||||||
@ -173,6 +174,20 @@ enum MessageType {
|
|||||||
MessageType_CardanoTxAck = 309 [(wire_in) = true];
|
MessageType_CardanoTxAck = 309 [(wire_in) = true];
|
||||||
MessageType_CardanoSignedTransaction = 310 [(wire_out) = true];
|
MessageType_CardanoSignedTransaction = 310 [(wire_out) = true];
|
||||||
|
|
||||||
|
// Ontology
|
||||||
|
MessageType_OntologyGetAddress = 350 [(wire_in) = true];
|
||||||
|
MessageType_OntologyAddress = 351 [(wire_out) = true];
|
||||||
|
MessageType_OntologyGetPublicKey = 352 [(wire_in) = true];
|
||||||
|
MessageType_OntologyPublicKey = 353 [(wire_out) = true];
|
||||||
|
MessageType_OntologySignTransfer = 354 [(wire_in) = true];
|
||||||
|
MessageType_OntologySignedTransfer = 355 [(wire_out) = true];
|
||||||
|
MessageType_OntologySignWithdrawOng = 356 [(wire_in) = true];
|
||||||
|
MessageType_OntologySignedWithdrawOng = 357 [(wire_out) = true];
|
||||||
|
MessageType_OntologySignOntIdRegister = 358 [(wire_in) = true];
|
||||||
|
MessageType_OntologySignedOntIdRegister = 359 [(wire_out) = true];
|
||||||
|
MessageType_OntologySignOntIdAddAttributes = 360 [(wire_in) = true];
|
||||||
|
MessageType_OntologySignedOntIdAddAttributes = 361 [(wire_out) = true];
|
||||||
|
|
||||||
// Ripple
|
// Ripple
|
||||||
MessageType_RippleGetAddress = 400 [(wire_in) = true];
|
MessageType_RippleGetAddress = 400 [(wire_in) = true];
|
||||||
MessageType_RippleAddress = 401 [(wire_out) = true];
|
MessageType_RippleAddress = 401 [(wire_out) = true];
|
||||||
|
@ -189,6 +189,8 @@ class Descriptor:
|
|||||||
if field.orig.type == field.orig.TYPE_MESSAGE
|
if field.orig.type == field.orig.TYPE_MESSAGE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if len(imports) > 0:
|
||||||
|
yield "" # make isort happy
|
||||||
for name in sorted(imports):
|
for name in sorted(imports):
|
||||||
yield self.create_message_import(name)
|
yield self.create_message_import(name)
|
||||||
|
|
||||||
@ -218,15 +220,16 @@ class Descriptor:
|
|||||||
|
|
||||||
fields = [self.parse_field(field) for field in message.field]
|
fields = [self.parse_field(field) for field in message.field]
|
||||||
|
|
||||||
|
yield from self.process_message_imports(fields)
|
||||||
|
|
||||||
if any(field.repeated for field in fields):
|
if any(field.repeated for field in fields):
|
||||||
|
yield ""
|
||||||
yield "if __debug__:"
|
yield "if __debug__:"
|
||||||
yield " try:"
|
yield " try:"
|
||||||
yield " from typing import List"
|
yield " from typing import List"
|
||||||
yield " except ImportError:"
|
yield " except ImportError:"
|
||||||
yield " List = None # type: ignore"
|
yield " List = None # type: ignore"
|
||||||
|
|
||||||
yield from self.process_message_imports(fields)
|
|
||||||
|
|
||||||
yield ""
|
yield ""
|
||||||
yield ""
|
yield ""
|
||||||
yield "class {}(p.MessageType):".format(message.name)
|
yield "class {}(p.MessageType):".format(message.name)
|
||||||
|
@ -35,6 +35,7 @@ class CoinDef(p.MessageType):
|
|||||||
30: ('maintainer', p.UnicodeType, 0),
|
30: ('maintainer', p.UnicodeType, 0),
|
||||||
31: ('blocktime_seconds', p.UVarintType, 0),
|
31: ('blocktime_seconds', p.UVarintType, 0),
|
||||||
32: ('bip115', p.BoolType, 0),
|
32: ('bip115', p.BoolType, 0),
|
||||||
|
33: ('cooldown', p.UVarintType, 0),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -73,7 +74,8 @@ class CoinDef(p.MessageType):
|
|||||||
blocktime_seconds: int = None,
|
blocktime_seconds: int = None,
|
||||||
default_fee_b: dict = None,
|
default_fee_b: dict = None,
|
||||||
bitcore: dict = None,
|
bitcore: dict = None,
|
||||||
blockbook: dict = None
|
blockbook: dict = None,
|
||||||
|
cooldown: int = None
|
||||||
):
|
):
|
||||||
self.coin_name = coin_name
|
self.coin_name = coin_name
|
||||||
self.coin_shortcut = coin_shortcut
|
self.coin_shortcut = coin_shortcut
|
||||||
@ -110,4 +112,5 @@ class CoinDef(p.MessageType):
|
|||||||
self.default_fee_b = default_fee_b
|
self.default_fee_b = default_fee_b
|
||||||
self.bitcore = bitcore
|
self.bitcore = bitcore
|
||||||
self.blockbook = blockbook
|
self.blockbook = blockbook
|
||||||
|
self.cooldown = cooldown
|
||||||
p.MessageType.__init__(self)
|
p.MessageType.__init__(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user