1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-06-16 21:18:45 +00:00

protob: reorder Ontology messages/fields

This commit is contained in:
Pavol Rusnak 2018-08-14 15:25:42 +02:00
parent 18739987ee
commit 390b0272e8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -8,15 +8,6 @@ option java_outer_classname = "TrezorMessageOntology";
* Ontology Transaction * Ontology Transaction
*/ */
message OntologyTransaction { message OntologyTransaction {
/**
* Attribute of Ontology transaction
*/
message OntologyTxAttribute {
optional uint32 usage = 1;
optional bytes data = 2;
}
optional uint32 version = 1; optional uint32 version = 1;
optional uint32 type = 2; optional uint32 type = 2;
optional uint32 nonce = 3; optional uint32 nonce = 3;
@ -24,6 +15,13 @@ message OntologyTransaction {
optional uint64 gas_limit = 5; optional uint64 gas_limit = 5;
optional string payer = 6; optional string payer = 6;
repeated OntologyTxAttribute tx_attributes = 7; repeated OntologyTxAttribute tx_attributes = 7;
/**
* Attribute of Ontology transaction
*/
message OntologyTxAttribute {
optional uint32 usage = 1;
optional bytes data = 2;
}
} }
/** /**
@ -62,7 +60,6 @@ message OntologyAddress {
optional string address = 1; // Ontology address optional string address = 1; // Ontology address
} }
/** /**
* Request: Ask device to sign Ontology transfer * Request: Ask device to sign Ontology transfer
* @start * @start
@ -72,11 +69,14 @@ message OntologyAddress {
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 OntologyTransaction transaction = 2; optional OntologyTransaction transaction = 2;
optional OntologyTransfer transfer = 3; optional OntologyTransfer transfer = 3;
/** /**
* Ontology Transfer * Ontology Transfer
*/ */
message OntologyTransfer { message OntologyTransfer {
optional OntologyAsset asset = 1;
optional uint64 amount = 2;
optional string from_address = 3;
optional string to_address = 4;
/** /**
* Ontology Asset * Ontology Asset
*/ */
@ -84,11 +84,6 @@ message OntologyAddress {
ONT = 1; ONT = 1;
ONG = 2; ONG = 2;
} }
optional OntologyAsset asset = 1;
optional uint64 amount = 2;
optional string from_address = 3;
optional string to_address = 4;
} }
} }
@ -110,7 +105,6 @@ message OntologySignedTransfer {
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 OntologyTransaction transaction = 2; optional OntologyTransaction transaction = 2;
optional OntologyWithdrawOng withdraw_ong = 3; optional OntologyWithdrawOng withdraw_ong = 3;
/** /**
* Ontology ONG Withdrawal * Ontology ONG Withdrawal
*/ */
@ -139,7 +133,6 @@ message OntologySignedWithdrawOng {
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 OntologyTransaction transaction = 2; optional OntologyTransaction transaction = 2;
optional OntologyOntIdRegister ont_id_register = 3; optional OntologyOntIdRegister ont_id_register = 3;
/** /**
* Ontology ONT ID registration * Ontology ONT ID registration
*/ */
@ -158,7 +151,6 @@ message OntologySignedOntIdRegister {
optional bytes payload = 2; optional bytes payload = 2;
} }
/** /**
* Request: Ask device to sign Ontology ONT ID attributes adding * Request: Ask device to sign Ontology ONT ID attributes adding
* @start * @start
@ -168,7 +160,13 @@ message OntologySignedOntIdRegister {
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 OntologyTransaction transaction = 2; optional OntologyTransaction transaction = 2;
optional OntologyOntIdAddAttributes ont_id_add_attributes = 3; 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 * Attribute of Ontology ONT ID
*/ */
@ -177,14 +175,6 @@ message OntologySignedOntIdRegister {
optional string type = 2; optional string type = 2;
optional string value = 3; optional string value = 3;
} }
/**
* Ontology ONT ID attributes adding
*/
message OntologyOntIdAddAttributes {
optional string ont_id = 1;
optional bytes public_key = 2;
repeated OntologyOntIdAttribute ont_id_attributes = 3;
} }
} }