diff --git a/common/protob/messages-mintlayer.proto b/common/protob/messages-mintlayer.proto index 143357e5c..cf9bc9e55 100644 --- a/common/protob/messages-mintlayer.proto +++ b/common/protob/messages-mintlayer.proto @@ -196,10 +196,12 @@ message MintlayerAccountCommandTxInput { optional MintlayerFreezeToken freeze_token = 8; // freeze supply optional MintlayerUnfreezeToken unfreeze_token = 9; // unfreeze supply optional MintlayerChangeTokenAuhtority change_token_authority = 10; // change token authority - optional MintlayerChangeTokenMetadataUri change_token_metadata_uri = 11; // change token metadata uri + optional MintlayerConcludeOrder conclude_order = 11; // conclude an order + optional MintlayerFillOrder fill_order = 12; // fill an order + optional MintlayerChangeTokenMetadataUri change_token_metadata_uri = 13; // change token metadata uri } -/** Data type for output value coins or token +/** Data type for account command * @embed */ message MintlayerMintTokens { @@ -207,21 +209,21 @@ message MintlayerMintTokens { required bytes amount = 2; // amoun of tokens to mint } -/** Data type for output value coins or token +/** Data type for account command * @embed */ message MintlayerUnmintTokens { required bytes token_id = 1; // token id } -/** Data type for output value coins or token +/** Data type for account command * @embed */ message MintlayerLockTokenSupply { required bytes token_id = 1; // token id } -/** Data type for output value coins or token +/** Data type for account command * @embed */ message MintlayerFreezeToken { @@ -229,14 +231,14 @@ message MintlayerFreezeToken { required bool is_token_unfreezabe = 2; // is unfreezeable after freezing it } -/** Data type for output value coins or token +/** Data type for account command * @embed */ message MintlayerUnfreezeToken { required bytes token_id = 1; // token id } -/** Data type for output value coins or token +/** Data type for account command * @embed */ message MintlayerChangeTokenAuhtority { @@ -244,7 +246,23 @@ message MintlayerChangeTokenAuhtority { required string destination = 2; // destination for the new authority } -/** Data type for output value coins or token +/** Data type for account command + * @embed + */ +message MintlayerConcludeOrder { + required bytes order_id = 1; // order id +} + +/** Data type for account command + * @embed + */ +message MintlayerFillOrder { + required bytes order_id = 1; // order id + required MintlayerOutputValue value = 2; // value + required string destination = 3; // the destination +} + +/** Data type for account command * @embed */ message MintlayerChangeTokenMetadataUri { @@ -267,6 +285,7 @@ message MintlayerTxOutput { optional MintlayerIssueNftTxOutput issue_nft = 9; // issue NFT output optional MintlayerDataDepositTxOutput data_deposit = 10; // data deposit output optional MintlayerHtlcTxOutput htlc = 11; // HTLC output + optional MintlayerAnyoneCanTakeTxOutput anyone_can_take = 12; // Anyone can take output } /** Data type for output value information for the token @@ -420,6 +439,15 @@ message MintlayerHtlcTxOutput { required string refund_key = 5; // the key for a refund after the time lock has expired } +/** Data type for transaction output to be signed. + * @embed + */ +message MintlayerAnyoneCanTakeTxOutput { + required string conclude_key = 1; // The key that can authorize conclusion of an order + required MintlayerOutputValue ask = 2; // ask value of the order + required MintlayerOutputValue give = 3; // give value of the order +} + /** Data type for metadata about previous transaction which contains the UTXO being spent. * @embed */ diff --git a/core/embed/extmod/modtrezormintlayer/modtrezormintlayer.c b/core/embed/extmod/modtrezormintlayer/modtrezormintlayer.c index 8128e353b..0c7c45e54 100644 --- a/core/embed/extmod/modtrezormintlayer/modtrezormintlayer.c +++ b/core/embed/extmod/modtrezormintlayer/modtrezormintlayer.c @@ -18,8 +18,6 @@ */ #include -#include -#include #include "common.h" @@ -38,9 +36,15 @@ STATIC const mp_rom_map_elem_t mod_trezormintlayer_globals_table[] = { {MP_ROM_QSTR(MP_QSTR_encode_account_spending_input), MP_ROM_PTR( &mod_trezormintlayer_utils_mintlayer_encode_account_spending_input_obj)}, - {MP_ROM_QSTR(MP_QSTR_encode_account_command_input), + {MP_ROM_QSTR(MP_QSTR_encode_token_account_command_input), MP_ROM_PTR( - &mod_trezormintlayer_utils_mintlayer_encode_account_command_input_obj)}, + &mod_trezormintlayer_utils_mintlayer_encode_token_account_command_input_obj)}, + {MP_ROM_QSTR(MP_QSTR_encode_conclude_order_account_command_input), + MP_ROM_PTR( + &mod_trezormintlayer_utils_mintlayer_encode_conclude_order_account_command_input_obj)}, + {MP_ROM_QSTR(MP_QSTR_encode_fill_order_account_command_input), + MP_ROM_PTR( + &mod_trezormintlayer_utils_mintlayer_encode_fill_order_account_command_input_obj)}, {MP_ROM_QSTR(MP_QSTR_encode_transfer_output), MP_ROM_PTR( &mod_trezormintlayer_utils_mintlayer_encode_transfer_output_obj)}, @@ -72,6 +76,9 @@ STATIC const mp_rom_map_elem_t mod_trezormintlayer_globals_table[] = { &mod_trezormintlayer_utils_mintlayer_encode_data_deposit_output_obj)}, {MP_ROM_QSTR(MP_QSTR_encode_htlc_output), MP_ROM_PTR(&mod_trezormintlayer_utils_mintlayer_encode_htlc_output_obj)}, + {MP_ROM_QSTR(MP_QSTR_encode_anyone_can_take_output), + MP_ROM_PTR( + &mod_trezormintlayer_utils_mintlayer_encode_anyone_can_take_output_obj)}, {MP_ROM_QSTR(MP_QSTR_encode_compact_length), MP_ROM_PTR(&mod_trezormintlayer_utils_mintlayer_encode_comact_length_obj)}, }; diff --git a/core/embed/extmod/modtrezormintlayer/modtrezormintlayer.h b/core/embed/extmod/modtrezormintlayer/modtrezormintlayer.h index fdd3b8b39..e339a0667 100644 --- a/core/embed/extmod/modtrezormintlayer/modtrezormintlayer.h +++ b/core/embed/extmod/modtrezormintlayer/modtrezormintlayer.h @@ -125,14 +125,14 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_3( mod_trezormintlayer_utils_mintlayer_encode_account_spending_input_obj, mod_trezormintlayer_utils_mintlayer_encode_account_spending_input); -/// def encode_account_command_input(nonce: int, command: int, token_id: bytes, -/// data: bytes) -> bytes: +/// def encode_token_account_command_input(nonce: int, command: int, token_id: +/// bytes, data: bytes) -> bytes: /// """ /// encodes an account command from the nonce, command, token id and /// additional command data /// """ STATIC mp_obj_t -mod_trezormintlayer_utils_mintlayer_encode_account_command_input( +mod_trezormintlayer_utils_mintlayer_encode_token_account_command_input( size_t n_args, const mp_obj_t *args) { uint64_t nonce = trezor_obj_get_uint64(args[0]); uint32_t command = trezor_obj_get_uint(args[1]); @@ -147,7 +147,7 @@ mod_trezormintlayer_utils_mintlayer_encode_account_command_input( mp_buffer_info_t data = {0}; mp_get_buffer_raise(args[3], &data, MP_BUFFER_READ); - ByteArray arr = mintlayer_encode_account_command_input( + ByteArray arr = mintlayer_encode_token_account_command_input( nonce, command, hash.buf, hash.len, data.buf, data.len); handle_err(&arr); @@ -162,8 +162,79 @@ mod_trezormintlayer_utils_mintlayer_encode_account_command_input( } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN( - mod_trezormintlayer_utils_mintlayer_encode_account_command_input_obj, 4, 4, - mod_trezormintlayer_utils_mintlayer_encode_account_command_input); + mod_trezormintlayer_utils_mintlayer_encode_token_account_command_input_obj, + 4, 4, + mod_trezormintlayer_utils_mintlayer_encode_token_account_command_input); + +/// def encode_conclude_order_account_command_input(nonce: int, order_id: bytes) +/// -> bytes: +/// """ +/// encodes an conclude order account command from the nonce and order id +/// """ +STATIC mp_obj_t +mod_trezormintlayer_utils_mintlayer_encode_conclude_order_account_command_input( + mp_obj_t nonce_obj, mp_obj_t order_id_obj) { + uint64_t nonce = trezor_obj_get_uint64(nonce_obj); + mp_buffer_info_t order_id = {0}; + mp_get_buffer_raise(order_id_obj, &order_id, MP_BUFFER_READ); + + ByteArray arr = mintlayer_encode_conclude_order_account_command_input( + nonce, order_id.buf, order_id.len); + handle_err(&arr); + + vstr_t pkh = {0}; + vstr_init_len(&pkh, arr.len_or_err.len); + int i = 0; + for (; i < arr.len_or_err.len; i++) { + ((uint8_t *)pkh.buf)[i] = (uint8_t)arr.data[i]; + } + + return mp_obj_new_str_from_vstr(&mp_type_bytes, &pkh); +} + +STATIC MP_DEFINE_CONST_FUN_OBJ_2( + mod_trezormintlayer_utils_mintlayer_encode_conclude_order_account_command_input_obj, + mod_trezormintlayer_utils_mintlayer_encode_conclude_order_account_command_input); + +/// def encode_fill_order_account_command_input(nonce: int, order_id: bytes, +/// amount: bytes, token_id: bytes, destination: bytes) +/// -> bytes: +/// """ +/// encodes an fill order account command from the nonce, order id, output +/// value and destination +/// """ +STATIC mp_obj_t +mod_trezormintlayer_utils_mintlayer_encode_fill_order_account_command_input( + size_t n_args, const mp_obj_t *args) { + uint64_t nonce = trezor_obj_get_uint64(args[0]); + mp_buffer_info_t order_id = {0}; + mp_get_buffer_raise(args[1], &order_id, MP_BUFFER_READ); + mp_buffer_info_t amount = {0}; + mp_get_buffer_raise(args[2], &amount, MP_BUFFER_READ); + mp_buffer_info_t token_id = {0}; + mp_get_buffer_raise(args[3], &token_id, MP_BUFFER_READ); + mp_buffer_info_t destination = {0}; + mp_get_buffer_raise(args[4], &destination, MP_BUFFER_READ); + + ByteArray arr = mintlayer_encode_fill_order_account_command_input( + nonce, order_id.buf, order_id.len, amount.buf, amount.len, token_id.buf, + token_id.len, destination.buf, destination.len); + handle_err(&arr); + + vstr_t pkh = {0}; + vstr_init_len(&pkh, arr.len_or_err.len); + int i = 0; + for (; i < arr.len_or_err.len; i++) { + ((uint8_t *)pkh.buf)[i] = (uint8_t)arr.data[i]; + } + + return mp_obj_new_str_from_vstr(&mp_type_bytes, &pkh); +} + +STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN( + mod_trezormintlayer_utils_mintlayer_encode_fill_order_account_command_input_obj, + 5, 5, + mod_trezormintlayer_utils_mintlayer_encode_fill_order_account_command_input); /// def encode_transfer_output(amount: bytes, token_id: bytes, address: bytes) /// -> bytes: @@ -557,6 +628,46 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN( mod_trezormintlayer_utils_mintlayer_encode_htlc_output_obj, 5, 5, mod_trezormintlayer_utils_mintlayer_encode_htlc_output); +/// def encode_anyone_can_take_output(destination: bytes, ask_amount: bytes, +/// ask_token_id: bytes, give_amount: bytes, give_token_id: bytes) -> bytes: +/// """ +/// encodes an anyone can take output with given the conclude key, give and +/// take amounts +/// """ +STATIC mp_obj_t +mod_trezormintlayer_utils_mintlayer_encode_anyone_can_take_output( + size_t n_args, const mp_obj_t *args) { + mp_buffer_info_t conclude_key = {0}; + mp_get_buffer_raise(args[0], &conclude_key, MP_BUFFER_READ); + mp_buffer_info_t ask_amount = {0}; + mp_get_buffer_raise(args[1], &ask_amount, MP_BUFFER_READ); + mp_buffer_info_t ask_token_id = {0}; + mp_get_buffer_raise(args[2], &ask_token_id, MP_BUFFER_READ); + mp_buffer_info_t give_amount = {0}; + mp_get_buffer_raise(args[3], &give_amount, MP_BUFFER_READ); + mp_buffer_info_t give_token_id = {0}; + mp_get_buffer_raise(args[4], &give_token_id, MP_BUFFER_READ); + + ByteArray arr = mintlayer_encode_anyone_can_take_output( + conclude_key.buf, conclude_key.len, ask_amount.buf, ask_amount.len, + ask_token_id.buf, ask_token_id.len, give_amount.buf, give_amount.len, + give_token_id.buf, give_token_id.len); + handle_err(&arr); + + vstr_t encoding = {0}; + vstr_init_len(&encoding, arr.len_or_err.len); + int i = 0; + for (; i < arr.len_or_err.len; i++) { + ((uint8_t *)encoding.buf)[i] = (uint8_t)arr.data[i]; + } + + return mp_obj_new_str_from_vstr(&mp_type_bytes, &encoding); +} + +STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN( + mod_trezormintlayer_utils_mintlayer_encode_anyone_can_take_output_obj, 5, 5, + mod_trezormintlayer_utils_mintlayer_encode_anyone_can_take_output); + /// def encode_compact_length(length: int) -> bytes: /// """ /// encodes a comapct length to bytes diff --git a/core/embed/rust/mintlayer.h b/core/embed/rust/mintlayer.h index 75130fc5e..04016a5d6 100644 --- a/core/embed/rust/mintlayer.h +++ b/core/embed/rust/mintlayer.h @@ -36,10 +36,21 @@ ByteArray mintlayer_encode_account_spending_input( uint32_t delegation_id_data_len, const unsigned char* amount_data, uint32_t amount_data_len); -ByteArray mintlayer_encode_account_command_input( +ByteArray mintlayer_encode_token_account_command_input( uint64_t nonce, uint32_t command, const unsigned char* token_id_data, uint32_t token_id_data_len, const unsigned char* data, uint32_t data_len); +ByteArray mintlayer_encode_conclude_order_account_command_input( + uint64_t nonce, const unsigned char* order_id_data, + uint32_t order_id_data_len); + +ByteArray mintlayer_encode_fill_order_account_command_input( + uint64_t nonce, const unsigned char* order_id_data, + uint32_t order_id_data_len, const unsigned char* coin_amount_data, + uint32_t coin_amount_data_len, const unsigned char* token_id_data, + uint32_t token_id_data_len, const unsigned char* destination_data, + uint32_t destination_data_len); + ByteArray mintlayer_encode_transfer_output( const unsigned char* coin_amount_data, uint32_t coin_amount_data_len, const unsigned char* token_id_data, uint32_t token_id_data_len, @@ -112,4 +123,12 @@ ByteArray mintlayer_encode_htlc_output( const unsigned char* spend_key_data, uint32_t spend_key_data_len, const unsigned char* secret_hash_data, uint32_t secret_hash_data_len); +ByteArray mintlayer_encode_anyone_can_take_output( + const unsigned char* conclude_key_data, uint32_t conclude_key_data_len, + const unsigned char* ask_coin_amount_data, + uint32_t ask_coin_amount_data_len, const unsigned char* ask_token_id_data, + uint32_t ask_token_id_data_len, const unsigned char* give_coin_amount_data, + uint32_t give_coin_amount_data_len, const unsigned char* give_token_id_data, + uint32_t give_token_id_data_len); + ByteArray mintlayer_encode_compact_length(uint32_t length); diff --git a/core/embed/rust/src/mintlayer/mod.rs b/core/embed/rust/src/mintlayer/mod.rs index e16d606e1..141e81e34 100644 --- a/core/embed/rust/src/mintlayer/mod.rs +++ b/core/embed/rust/src/mintlayer/mod.rs @@ -123,7 +123,7 @@ extern "C" fn mintlayer_encode_account_spending_input( } #[no_mangle] -extern "C" fn mintlayer_encode_account_command_input( +extern "C" fn mintlayer_encode_token_account_command_input( nonce: u64, command: u32, token_id_data: *const u8, @@ -164,7 +164,7 @@ extern "C" fn mintlayer_encode_account_command_input( }; AccountCommand::ChangeTokenAuthority(token_id, destination) } - 7 => AccountCommand::ChangeTokenMetadataUri(token_id, data.to_vec()), + 8 => AccountCommand::ChangeTokenMetadataUri(token_id, data.to_vec()), _ => return MintlayerErrorCode::InvalidAccountCommand.into(), }; @@ -185,7 +185,40 @@ extern "C" fn mintlayer_encode_account_command_input( } #[no_mangle] -extern "C" fn mintlayer_encode_transfer_output( +extern "C" fn mintlayer_encode_conclude_order_account_command_input( + nonce: u64, + order_id_data: *const u8, + order_id_data_len: u32, +) -> ByteArray { + let order_id = + unsafe { core::slice::from_raw_parts(order_id_data, order_id_data_len as usize) }; + let order_id = H256(match order_id.try_into() { + Ok(hash) => hash, + Err(_) => return MintlayerErrorCode::WrongHashSize.into(), + }); + let account_command = AccountCommand::ConcludeOrder(order_id); + + let tx_input = TxInput::AccountCommand(nonce, account_command); + let vec_data = tx_input.encode(); + // Extracting the raw pointer and length from the Vec + let ptr_data = vec_data.as_ptr(); + let len = vec_data.len() as cty::c_uint; + + // Prevent Rust from freeing the memory associated with vec_data + core::mem::forget(vec_data); + + // Construct and return the ByteArray struct + ByteArray { + data: ptr_data, + len_or_err: LenOrError { len }, + } +} + +#[no_mangle] +extern "C" fn mintlayer_encode_fill_order_account_command_input( + nonce: u64, + order_id_data: *const u8, + order_id_data_len: u32, amount_data: *const u8, amount_data_len: u32, token_id_data: *const u8, @@ -193,22 +226,89 @@ extern "C" fn mintlayer_encode_transfer_output( destination_data: *const u8, destination_data_len: u32, ) -> ByteArray { + let order_id = + unsafe { core::slice::from_raw_parts(order_id_data, order_id_data_len as usize) }; + let order_id = H256(match order_id.try_into() { + Ok(hash) => hash, + Err(_) => return MintlayerErrorCode::WrongHashSize.into(), + }); + let value = match parse_output_value( + amount_data, + amount_data_len, + token_id_data_len, + token_id_data, + ) { + Ok(value) => value, + Err(value) => return value, + }; + + let destination_bytes = + unsafe { core::slice::from_raw_parts(destination_data, destination_data_len as usize) }; + let destination = match Destination::decode_all(&mut destination_bytes.as_ref()) { + Ok(destination) => destination, + Err(_) => return MintlayerErrorCode::InvalidDestination.into(), + }; + let account_command = AccountCommand::FillOrder(order_id, value, destination); + + let tx_input = TxInput::AccountCommand(nonce, account_command); + let vec_data = tx_input.encode(); + // Extracting the raw pointer and length from the Vec + let ptr_data = vec_data.as_ptr(); + let len = vec_data.len() as cty::c_uint; + + // Prevent Rust from freeing the memory associated with vec_data + core::mem::forget(vec_data); + + // Construct and return the ByteArray struct + ByteArray { + data: ptr_data, + len_or_err: LenOrError { len }, + } +} + +fn parse_output_value( + amount_data: *const u8, + amount_data_len: u32, + token_id_data_len: u32, + token_id_data: *const u8, +) -> Result { let coin_amount = unsafe { core::slice::from_raw_parts(amount_data, amount_data_len as usize) }; let amount = match Amount::from_bytes_be(coin_amount.as_ref()) { Some(amount) => amount, - None => return MintlayerErrorCode::InvalidAmount.into(), + None => return Err(MintlayerErrorCode::InvalidAmount.into()), }; let value = if token_id_data_len == 32 { let token_id = unsafe { core::slice::from_raw_parts(token_id_data, token_id_data_len as usize) }; let token_id = H256(match token_id.try_into() { Ok(hash) => hash, - Err(_) => return MintlayerErrorCode::WrongHashSize.into(), + Err(_) => return Err(MintlayerErrorCode::WrongHashSize.into()), }); OutputValue::TokenV1(token_id, amount) } else { OutputValue::Coin(amount) }; + Ok(value) +} + +#[no_mangle] +extern "C" fn mintlayer_encode_transfer_output( + amount_data: *const u8, + amount_data_len: u32, + token_id_data: *const u8, + token_id_data_len: u32, + destination_data: *const u8, + destination_data_len: u32, +) -> ByteArray { + let value = match parse_output_value( + amount_data, + amount_data_len, + token_id_data_len, + token_id_data, + ) { + Ok(value) => value, + Err(value) => return value, + }; let destination_bytes = unsafe { core::slice::from_raw_parts(destination_data, destination_data_len as usize) }; @@ -217,12 +317,6 @@ extern "C" fn mintlayer_encode_transfer_output( Err(_) => return MintlayerErrorCode::InvalidDestination.into(), }; - // match &destination { - // Destination::AnyoneCanSpend => println!("anyone can spend dest"), - // Destination::PublicKey(_) => println!("pk dest"), - // Destination::PublicKeyHash(_) => println!("pkh dest"), - // }; - let txo = TxOutput::Transfer(value, destination); let vec_data = txo.encode(); @@ -251,22 +345,14 @@ extern "C" fn mintlayer_encode_lock_then_transfer_output( destination_data: *const u8, destination_data_len: u32, ) -> ByteArray { - let coin_amount = unsafe { core::slice::from_raw_parts(amount_data, amount_data_len as usize) }; - - let amount = match Amount::from_bytes_be(coin_amount.as_ref()) { - Some(amount) => amount, - None => return MintlayerErrorCode::InvalidAmount.into(), - }; - let value = if token_id_data_len == 32 { - let token_id = - unsafe { core::slice::from_raw_parts(token_id_data, token_id_data_len as usize) }; - let token_id = H256(match token_id.try_into() { - Ok(hash) => hash, - Err(_) => return MintlayerErrorCode::WrongHashSize.into(), - }); - OutputValue::TokenV1(token_id, amount) - } else { - OutputValue::Coin(amount) + let value = match parse_output_value( + amount_data, + amount_data_len, + token_id_data_len, + token_id_data, + ) { + Ok(value) => value, + Err(value) => return value, }; let destination_bytes = @@ -308,22 +394,14 @@ extern "C" fn mintlayer_encode_burn_output( token_id_data: *const u8, token_id_data_len: u32, ) -> ByteArray { - let coin_amount = unsafe { core::slice::from_raw_parts(amount_data, amount_data_len as usize) }; - - let amount = match Amount::from_bytes_be(coin_amount.as_ref()) { - Some(amount) => amount, - None => return MintlayerErrorCode::InvalidAmount.into(), - }; - let value = if token_id_data_len == 32 { - let token_id = - unsafe { core::slice::from_raw_parts(token_id_data, token_id_data_len as usize) }; - let token_id = H256(match token_id.try_into() { - Ok(hash) => hash, - Err(_) => return MintlayerErrorCode::WrongHashSize.into(), - }); - OutputValue::TokenV1(token_id, amount) - } else { - OutputValue::Coin(amount) + let value = match parse_output_value( + amount_data, + amount_data_len, + token_id_data_len, + token_id_data, + ) { + Ok(value) => value, + Err(value) => return value, }; let txo = TxOutput::Burn(value); @@ -775,22 +853,14 @@ extern "C" fn mintlayer_encode_htlc_output( secret_hash_data: *const u8, secret_hash_data_len: u32, ) -> ByteArray { - let coin_amount = unsafe { core::slice::from_raw_parts(amount_data, amount_data_len as usize) }; - - let amount = match Amount::from_bytes_be(coin_amount.as_ref()) { - Some(amount) => amount, - None => return MintlayerErrorCode::InvalidAmount.into(), - }; - let value = if token_id_data_len == 32 { - let token_id = - unsafe { core::slice::from_raw_parts(token_id_data, token_id_data_len as usize) }; - let token_id = H256(match token_id.try_into() { - Ok(hash) => hash, - Err(_) => return MintlayerErrorCode::WrongHashSize.into(), - }); - OutputValue::TokenV1(token_id, amount) - } else { - OutputValue::Coin(amount) + let value = match parse_output_value( + amount_data, + amount_data_len, + token_id_data_len, + token_id_data, + ) { + Ok(value) => value, + Err(value) => return value, }; let refund_destination_bytes = unsafe { @@ -851,6 +921,67 @@ extern "C" fn mintlayer_encode_htlc_output( } } +#[no_mangle] +extern "C" fn mintlayer_encode_anyone_can_take_output( + destination_data: *const u8, + destination_data_len: u32, + ask_amount_data: *const u8, + ask_amount_data_len: u32, + ask_token_id_data: *const u8, + ask_token_id_data_len: u32, + give_amount_data: *const u8, + give_amount_data_len: u32, + give_token_id_data: *const u8, + give_token_id_data_len: u32, +) -> ByteArray { + let ask_value = match parse_output_value( + ask_amount_data, + ask_amount_data_len, + ask_token_id_data_len, + ask_token_id_data, + ) { + Ok(value) => value, + Err(value) => return value, + }; + + let give_value = match parse_output_value( + give_amount_data, + give_amount_data_len, + give_token_id_data_len, + give_token_id_data, + ) { + Ok(value) => value, + Err(value) => return value, + }; + + let destination_bytes = + unsafe { core::slice::from_raw_parts(destination_data, destination_data_len as usize) }; + let destination = match Destination::decode_all(&mut destination_bytes.as_ref()) { + Ok(destination) => destination, + Err(_) => return MintlayerErrorCode::InvalidDestination.into(), + }; + + let txo = TxOutput::AnyoneCanTake(OrderData { + conclude_key: destination, + ask: ask_value, + give: give_value, + }); + + let vec_data = txo.encode(); + // Extracting the raw pointer and length from the Vec + let ptr_data = vec_data.as_ptr(); + let len = vec_data.len() as cty::c_uint; + + // Prevent Rust from freeing the memory associated with vec_data + core::mem::forget(vec_data); + + // Construct and return the ByteArray struct + ByteArray { + data: ptr_data, + len_or_err: LenOrError { len }, + } +} + #[derive(Encode, Debug, PartialEq, Eq)] struct CompactLength { #[codec(compact)] @@ -1212,6 +1343,18 @@ struct NftIssuanceV0 { pub media_hash: parity_scale_codec::alloc::vec::Vec, } +#[derive(Encode)] +pub struct OrderData { + /// The key that can authorize conclusion of an order + conclude_key: Destination, + /// `Ask` and `give` fields represent amounts of currencies + /// that an order maker wants to exchange. + /// E.g. Creator of an order asks for 5 coins and gives 10 tokens in + /// exchange. + ask: OutputValue, + give: OutputValue, +} + #[derive(Encode)] enum TxOutput { /// Transfer an output, giving the provided Destination the authority to @@ -1248,6 +1391,8 @@ enum TxOutput { DataDeposit(parity_scale_codec::alloc::vec::Vec), #[codec(index = 10)] Htlc(OutputValue, HashedTimelockContract), + #[codec(index = 11)] + AnyoneCanTake(OrderData), } #[derive(Encode)] diff --git a/core/mocks/generated/trezormintlayer.pyi b/core/mocks/generated/trezormintlayer.pyi index 0252498e4..b26d49337 100644 --- a/core/mocks/generated/trezormintlayer.pyi +++ b/core/mocks/generated/trezormintlayer.pyi @@ -17,14 +17,32 @@ bytes) -> bytes: # extmod/modtrezormintlayer/modtrezormintlayer.h -def encode_account_command_input(nonce: int, command: int, token_id: bytes, -data: bytes) -> bytes: +def encode_token_account_command_input(nonce: int, command: int, token_id: +bytes, data: bytes) -> bytes: """ encodes an account command from the nonce, command, token id and additional command data """ +# extmod/modtrezormintlayer/modtrezormintlayer.h +def encode_conclude_order_account_command_input(nonce: int, order_id: bytes) +-> bytes: + """ + encodes an conclude order account command from the nonce and order id + """ + + +# extmod/modtrezormintlayer/modtrezormintlayer.h +def encode_fill_order_account_command_input(nonce: int, order_id: bytes, +amount: bytes, token_id: bytes, destination: bytes) +-> bytes: + """ + encodes an fill order account command from the nonce, order id, output + value and destination + """ + + # extmod/modtrezormintlayer/modtrezormintlayer.h def encode_transfer_output(amount: bytes, token_id: bytes, address: bytes) -> bytes: @@ -119,6 +137,15 @@ bytes) -> bytes: """ +# extmod/modtrezormintlayer/modtrezormintlayer.h +def encode_anyone_can_take_output(destination: bytes, ask_amount: bytes, +ask_token_id: bytes, give_amount: bytes, give_token_id: bytes) -> bytes: + """ + encodes an anyone can take output with given the conclude key, give and + take amounts + """ + + # extmod/modtrezormintlayer/modtrezormintlayer.h def encode_compact_length(length: int) -> bytes: """ diff --git a/core/src/apps/mintlayer/sign_tx/signer.py b/core/src/apps/mintlayer/sign_tx/signer.py index a9d63d073..162848790 100644 --- a/core/src/apps/mintlayer/sign_tx/signer.py +++ b/core/src/apps/mintlayer/sign_tx/signer.py @@ -24,7 +24,11 @@ from typing import Dict, List, Tuple from trezor.crypto import bip32 - from trezor.messages import MintlayerOutputValue + from trezor.messages import ( + MintlayerAccountCommandTxInput, + MintlayerAnyoneCanTakeTxOutput, + MintlayerOutputValue, + ) from apps.common.keychain import Keychain @@ -251,19 +255,19 @@ async def step4_serialize_inputs(self) -> Tuple[List[bytes], List[bytes]]: for inp in self.tx_info.inputs: progress.advance() if inp.input.utxo and inp.utxo: - x = inp.input.utxo + u = inp.input.utxo encoded_inp = mintlayer_utils.encode_utxo_input( - x.prev_hash, x.prev_index, int(x.type) + u.prev_hash, u.prev_index, int(u.type) ) encoded_inputs.append(encoded_inp) - data = mintlayer_decode_address_to_bytes(x.address) + data = mintlayer_decode_address_to_bytes(u.address) encoded_inp_utxo = self.serialize_output(inp.utxo) encoded_input_utxos.append(b"\x01" + encoded_inp_utxo) elif inp.input.account: - x = inp.input.account + a = inp.input.account encoded_inp = mintlayer_utils.encode_account_spending_input( - x.nonce, x.delegation_id, x.value.amount + a.nonce, a.delegation_id, a.value.amount ) encoded_inputs.append(encoded_inp) encoded_input_utxos.append(b"\x00") @@ -299,10 +303,35 @@ async def step4_serialize_inputs(self) -> Tuple[List[bytes], List[bytes]]: command = 5 token_id = x.change_token_metadata_uri.token_id data = x.change_token_metadata_uri.metadata_uri + elif x.conclude_order: + ord = x.conclude_order + encoded_inp = ( + mintlayer_utils.encode_conclude_order_account_command_input( + x.nonce, ord.order_id + ) + ) + encoded_inputs.append(encoded_inp) + encoded_input_utxos.append(b"\x00") + continue + elif x.fill_order: + ord = x.fill_order + token_id = b"" if not ord.value.token else ord.value.token.token_id + encoded_inp = ( + mintlayer_utils.encode_fill_order_account_command_input( + x.nonce, + ord.order_id, + ord.value.amount, + token_id, + ord.destination, + ) + ) + encoded_inputs.append(encoded_inp) + encoded_input_utxos.append(b"\x00") + continue else: raise Exception("unknown account command") - encoded_inp = mintlayer_utils.encode_account_command_input( + encoded_inp = mintlayer_utils.encode_token_account_command_input( x.nonce, command, token_id, data ) encoded_inputs.append(encoded_inp) @@ -407,6 +436,13 @@ def serialize_output(self, out: MintlayerTxOutput) -> bytes: spend_key, x.secret_hash, ) + elif out.anyone_can_take: + x = out.anyone_can_take + ask_token_id = b"" if not x.ask.token else x.ask.token.token_id + give_token_id = b"" if not x.give.token else x.give.token.token_id + encoded_out = mintlayer_utils.encode_anyone_can_take_output( + x.conclude_key, x.ask.amount, ask_token_id, x.give.amount, give_token_id + ) else: raise Exception("unhandled tx output type") return encoded_out diff --git a/core/src/trezor/messages.py b/core/src/trezor/messages.py index 95c5545cf..b340b9f77 100644 --- a/core/src/trezor/messages.py +++ b/core/src/trezor/messages.py @@ -4207,6 +4207,8 @@ class MintlayerAccountCommandTxInput(protobuf.MessageType): freeze_token: "MintlayerFreezeToken | None" unfreeze_token: "MintlayerUnfreezeToken | None" change_token_authority: "MintlayerChangeTokenAuhtority | None" + conclude_order: "MintlayerConcludeOrder | None" + fill_order: "MintlayerFillOrder | None" change_token_metadata_uri: "MintlayerChangeTokenMetadataUri | None" def __init__( @@ -4222,6 +4224,8 @@ def __init__( freeze_token: "MintlayerFreezeToken | None" = None, unfreeze_token: "MintlayerUnfreezeToken | None" = None, change_token_authority: "MintlayerChangeTokenAuhtority | None" = None, + conclude_order: "MintlayerConcludeOrder | None" = None, + fill_order: "MintlayerFillOrder | None" = None, change_token_metadata_uri: "MintlayerChangeTokenMetadataUri | None" = None, ) -> None: pass @@ -4320,6 +4324,38 @@ def __init__( def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerChangeTokenAuhtority"]: return isinstance(msg, cls) + class MintlayerConcludeOrder(protobuf.MessageType): + order_id: "bytes" + + def __init__( + self, + *, + order_id: "bytes", + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerConcludeOrder"]: + return isinstance(msg, cls) + + class MintlayerFillOrder(protobuf.MessageType): + order_id: "bytes" + value: "MintlayerOutputValue" + destination: "str" + + def __init__( + self, + *, + order_id: "bytes", + value: "MintlayerOutputValue", + destination: "str", + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerFillOrder"]: + return isinstance(msg, cls) + class MintlayerChangeTokenMetadataUri(protobuf.MessageType): token_id: "bytes" metadata_uri: "bytes" @@ -4348,6 +4384,7 @@ class MintlayerTxOutput(protobuf.MessageType): issue_nft: "MintlayerIssueNftTxOutput | None" data_deposit: "MintlayerDataDepositTxOutput | None" htlc: "MintlayerHtlcTxOutput | None" + anyone_can_take: "MintlayerAnyoneCanTakeTxOutput | None" def __init__( self, @@ -4363,6 +4400,7 @@ def __init__( issue_nft: "MintlayerIssueNftTxOutput | None" = None, data_deposit: "MintlayerDataDepositTxOutput | None" = None, htlc: "MintlayerHtlcTxOutput | None" = None, + anyone_can_take: "MintlayerAnyoneCanTakeTxOutput | None" = None, ) -> None: pass @@ -4654,6 +4692,24 @@ def __init__( def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerHtlcTxOutput"]: return isinstance(msg, cls) + class MintlayerAnyoneCanTakeTxOutput(protobuf.MessageType): + conclude_key: "str" + ask: "MintlayerOutputValue" + give: "MintlayerOutputValue" + + def __init__( + self, + *, + conclude_key: "str", + ask: "MintlayerOutputValue", + give: "MintlayerOutputValue", + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerAnyoneCanTakeTxOutput"]: + return isinstance(msg, cls) + class MintlayerPrevTx(protobuf.MessageType): version: "int" inputs_count: "int" diff --git a/python/src/trezorlib/messages.py b/python/src/trezorlib/messages.py index 1fa8894db..565af1e64 100644 --- a/python/src/trezorlib/messages.py +++ b/python/src/trezorlib/messages.py @@ -5597,7 +5597,9 @@ class MintlayerAccountCommandTxInput(protobuf.MessageType): 8: protobuf.Field("freeze_token", "MintlayerFreezeToken", repeated=False, required=False, default=None), 9: protobuf.Field("unfreeze_token", "MintlayerUnfreezeToken", repeated=False, required=False, default=None), 10: protobuf.Field("change_token_authority", "MintlayerChangeTokenAuhtority", repeated=False, required=False, default=None), - 11: protobuf.Field("change_token_metadata_uri", "MintlayerChangeTokenMetadataUri", repeated=False, required=False, default=None), + 11: protobuf.Field("conclude_order", "MintlayerConcludeOrder", repeated=False, required=False, default=None), + 12: protobuf.Field("fill_order", "MintlayerFillOrder", repeated=False, required=False, default=None), + 13: protobuf.Field("change_token_metadata_uri", "MintlayerChangeTokenMetadataUri", repeated=False, required=False, default=None), } def __init__( @@ -5613,6 +5615,8 @@ def __init__( freeze_token: Optional["MintlayerFreezeToken"] = None, unfreeze_token: Optional["MintlayerUnfreezeToken"] = None, change_token_authority: Optional["MintlayerChangeTokenAuhtority"] = None, + conclude_order: Optional["MintlayerConcludeOrder"] = None, + fill_order: Optional["MintlayerFillOrder"] = None, change_token_metadata_uri: Optional["MintlayerChangeTokenMetadataUri"] = None, ) -> None: self.address_n: Sequence["MintlayerAddressPath"] = address_n if address_n is not None else [] @@ -5625,6 +5629,8 @@ def __init__( self.freeze_token = freeze_token self.unfreeze_token = unfreeze_token self.change_token_authority = change_token_authority + self.conclude_order = conclude_order + self.fill_order = fill_order self.change_token_metadata_uri = change_token_metadata_uri @@ -5721,6 +5727,40 @@ def __init__( self.destination = destination +class MintlayerConcludeOrder(protobuf.MessageType): + MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("order_id", "bytes", repeated=False, required=True), + } + + def __init__( + self, + *, + order_id: "bytes", + ) -> None: + self.order_id = order_id + + +class MintlayerFillOrder(protobuf.MessageType): + MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("order_id", "bytes", repeated=False, required=True), + 2: protobuf.Field("value", "MintlayerOutputValue", repeated=False, required=True), + 3: protobuf.Field("destination", "string", repeated=False, required=True), + } + + def __init__( + self, + *, + order_id: "bytes", + value: "MintlayerOutputValue", + destination: "str", + ) -> None: + self.order_id = order_id + self.value = value + self.destination = destination + + class MintlayerChangeTokenMetadataUri(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { @@ -5752,6 +5792,7 @@ class MintlayerTxOutput(protobuf.MessageType): 9: protobuf.Field("issue_nft", "MintlayerIssueNftTxOutput", repeated=False, required=False, default=None), 10: protobuf.Field("data_deposit", "MintlayerDataDepositTxOutput", repeated=False, required=False, default=None), 11: protobuf.Field("htlc", "MintlayerHtlcTxOutput", repeated=False, required=False, default=None), + 12: protobuf.Field("anyone_can_take", "MintlayerAnyoneCanTakeTxOutput", repeated=False, required=False, default=None), } def __init__( @@ -5768,6 +5809,7 @@ def __init__( issue_nft: Optional["MintlayerIssueNftTxOutput"] = None, data_deposit: Optional["MintlayerDataDepositTxOutput"] = None, htlc: Optional["MintlayerHtlcTxOutput"] = None, + anyone_can_take: Optional["MintlayerAnyoneCanTakeTxOutput"] = None, ) -> None: self.transfer = transfer self.lock_then_transfer = lock_then_transfer @@ -5780,6 +5822,7 @@ def __init__( self.issue_nft = issue_nft self.data_deposit = data_deposit self.htlc = htlc + self.anyone_can_take = anyone_can_take class MintlayerTokenOutputValue(protobuf.MessageType): @@ -6103,6 +6146,26 @@ def __init__( self.refund_key = refund_key +class MintlayerAnyoneCanTakeTxOutput(protobuf.MessageType): + MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("conclude_key", "string", repeated=False, required=True), + 2: protobuf.Field("ask", "MintlayerOutputValue", repeated=False, required=True), + 3: protobuf.Field("give", "MintlayerOutputValue", repeated=False, required=True), + } + + def __init__( + self, + *, + conclude_key: "str", + ask: "MintlayerOutputValue", + give: "MintlayerOutputValue", + ) -> None: + self.conclude_key = conclude_key + self.ask = ask + self.give = give + + class MintlayerPrevTx(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { diff --git a/rust/trezor-client/src/protos/generated/messages_mintlayer.rs b/rust/trezor-client/src/protos/generated/messages_mintlayer.rs index 60f7a501b..a380c625e 100644 --- a/rust/trezor-client/src/protos/generated/messages_mintlayer.rs +++ b/rust/trezor-client/src/protos/generated/messages_mintlayer.rs @@ -3275,6 +3275,10 @@ pub struct MintlayerAccountCommandTxInput { pub unfreeze_token: ::protobuf::MessageField, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountCommandTxInput.change_token_authority) pub change_token_authority: ::protobuf::MessageField, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountCommandTxInput.conclude_order) + pub conclude_order: ::protobuf::MessageField, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountCommandTxInput.fill_order) + pub fill_order: ::protobuf::MessageField, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountCommandTxInput.change_token_metadata_uri) pub change_token_metadata_uri: ::protobuf::MessageField, // special fields @@ -3368,7 +3372,7 @@ impl MintlayerAccountCommandTxInput { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(11); + let mut fields = ::std::vec::Vec::with_capacity(13); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "address_n", @@ -3420,6 +3424,16 @@ impl MintlayerAccountCommandTxInput { |m: &MintlayerAccountCommandTxInput| { &m.change_token_authority }, |m: &mut MintlayerAccountCommandTxInput| { &mut m.change_token_authority }, )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerConcludeOrder>( + "conclude_order", + |m: &MintlayerAccountCommandTxInput| { &m.conclude_order }, + |m: &mut MintlayerAccountCommandTxInput| { &mut m.conclude_order }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerFillOrder>( + "fill_order", + |m: &MintlayerAccountCommandTxInput| { &m.fill_order }, + |m: &mut MintlayerAccountCommandTxInput| { &mut m.fill_order }, + )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerChangeTokenMetadataUri>( "change_token_metadata_uri", |m: &MintlayerAccountCommandTxInput| { &m.change_token_metadata_uri }, @@ -3478,6 +3492,16 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { return false; } }; + for v in &self.conclude_order { + if !v.is_initialized() { + return false; + } + }; + for v in &self.fill_order { + if !v.is_initialized() { + return false; + } + }; for v in &self.change_token_metadata_uri { if !v.is_initialized() { return false; @@ -3520,6 +3544,12 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { ::protobuf::rt::read_singular_message_into_field(is, &mut self.change_token_authority)?; }, 90 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.conclude_order)?; + }, + 98 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.fill_order)?; + }, + 106 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.change_token_metadata_uri)?; }, tag => { @@ -3571,6 +3601,14 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } + if let Some(v) = self.conclude_order.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.fill_order.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } if let Some(v) = self.change_token_metadata_uri.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; @@ -3611,9 +3649,15 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { if let Some(v) = self.change_token_authority.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; } - if let Some(v) = self.change_token_metadata_uri.as_ref() { + if let Some(v) = self.conclude_order.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?; } + if let Some(v) = self.fill_order.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; + } + if let Some(v) = self.change_token_metadata_uri.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(13, v, os)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -3641,6 +3685,8 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { self.freeze_token.clear(); self.unfreeze_token.clear(); self.change_token_authority.clear(); + self.conclude_order.clear(); + self.fill_order.clear(); self.change_token_metadata_uri.clear(); self.special_fields.clear(); } @@ -3657,6 +3703,8 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { freeze_token: ::protobuf::MessageField::none(), unfreeze_token: ::protobuf::MessageField::none(), change_token_authority: ::protobuf::MessageField::none(), + conclude_order: ::protobuf::MessageField::none(), + fill_order: ::protobuf::MessageField::none(), change_token_metadata_uri: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; @@ -4801,6 +4849,412 @@ impl ::protobuf::reflect::ProtobufValue for MintlayerChangeTokenAuhtority { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } +// @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerConcludeOrder) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MintlayerConcludeOrder { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerConcludeOrder.order_id) + pub order_id: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerConcludeOrder.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a MintlayerConcludeOrder { + fn default() -> &'a MintlayerConcludeOrder { + ::default_instance() + } +} + +impl MintlayerConcludeOrder { + pub fn new() -> MintlayerConcludeOrder { + ::std::default::Default::default() + } + + // required bytes order_id = 1; + + pub fn order_id(&self) -> &[u8] { + match self.order_id.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_order_id(&mut self) { + self.order_id = ::std::option::Option::None; + } + + pub fn has_order_id(&self) -> bool { + self.order_id.is_some() + } + + // Param is passed by value, moved + pub fn set_order_id(&mut self, v: ::std::vec::Vec) { + self.order_id = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_order_id(&mut self) -> &mut ::std::vec::Vec { + if self.order_id.is_none() { + self.order_id = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.order_id.as_mut().unwrap() + } + + // Take field + pub fn take_order_id(&mut self) -> ::std::vec::Vec { + self.order_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "order_id", + |m: &MintlayerConcludeOrder| { &m.order_id }, + |m: &mut MintlayerConcludeOrder| { &mut m.order_id }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MintlayerConcludeOrder", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for MintlayerConcludeOrder { + const NAME: &'static str = "MintlayerConcludeOrder"; + + fn is_initialized(&self) -> bool { + if self.order_id.is_none() { + return false; + } + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.order_id = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.order_id.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.order_id.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> MintlayerConcludeOrder { + MintlayerConcludeOrder::new() + } + + fn clear(&mut self) { + self.order_id = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static MintlayerConcludeOrder { + static instance: MintlayerConcludeOrder = MintlayerConcludeOrder { + order_id: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for MintlayerConcludeOrder { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MintlayerConcludeOrder").unwrap()).clone() + } +} + +impl ::std::fmt::Display for MintlayerConcludeOrder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for MintlayerConcludeOrder { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerFillOrder) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MintlayerFillOrder { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerFillOrder.order_id) + pub order_id: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerFillOrder.value) + pub value: ::protobuf::MessageField, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerFillOrder.destination) + pub destination: ::std::option::Option<::std::string::String>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerFillOrder.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a MintlayerFillOrder { + fn default() -> &'a MintlayerFillOrder { + ::default_instance() + } +} + +impl MintlayerFillOrder { + pub fn new() -> MintlayerFillOrder { + ::std::default::Default::default() + } + + // required bytes order_id = 1; + + pub fn order_id(&self) -> &[u8] { + match self.order_id.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_order_id(&mut self) { + self.order_id = ::std::option::Option::None; + } + + pub fn has_order_id(&self) -> bool { + self.order_id.is_some() + } + + // Param is passed by value, moved + pub fn set_order_id(&mut self, v: ::std::vec::Vec) { + self.order_id = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_order_id(&mut self) -> &mut ::std::vec::Vec { + if self.order_id.is_none() { + self.order_id = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.order_id.as_mut().unwrap() + } + + // Take field + pub fn take_order_id(&mut self) -> ::std::vec::Vec { + self.order_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // required string destination = 3; + + pub fn destination(&self) -> &str { + match self.destination.as_ref() { + Some(v) => v, + None => "", + } + } + + pub fn clear_destination(&mut self) { + self.destination = ::std::option::Option::None; + } + + pub fn has_destination(&self) -> bool { + self.destination.is_some() + } + + // Param is passed by value, moved + pub fn set_destination(&mut self, v: ::std::string::String) { + self.destination = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_destination(&mut self) -> &mut ::std::string::String { + if self.destination.is_none() { + self.destination = ::std::option::Option::Some(::std::string::String::new()); + } + self.destination.as_mut().unwrap() + } + + // Take field + pub fn take_destination(&mut self) -> ::std::string::String { + self.destination.take().unwrap_or_else(|| ::std::string::String::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "order_id", + |m: &MintlayerFillOrder| { &m.order_id }, + |m: &mut MintlayerFillOrder| { &mut m.order_id }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerOutputValue>( + "value", + |m: &MintlayerFillOrder| { &m.value }, + |m: &mut MintlayerFillOrder| { &mut m.value }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "destination", + |m: &MintlayerFillOrder| { &m.destination }, + |m: &mut MintlayerFillOrder| { &mut m.destination }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MintlayerFillOrder", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for MintlayerFillOrder { + const NAME: &'static str = "MintlayerFillOrder"; + + fn is_initialized(&self) -> bool { + if self.order_id.is_none() { + return false; + } + if self.value.is_none() { + return false; + } + if self.destination.is_none() { + return false; + } + for v in &self.value { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.order_id = ::std::option::Option::Some(is.read_bytes()?); + }, + 18 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.value)?; + }, + 26 => { + self.destination = ::std::option::Option::Some(is.read_string()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.order_id.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(v) = self.value.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.destination.as_ref() { + my_size += ::protobuf::rt::string_size(3, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.order_id.as_ref() { + os.write_bytes(1, v)?; + } + if let Some(v) = self.value.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; + } + if let Some(v) = self.destination.as_ref() { + os.write_string(3, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> MintlayerFillOrder { + MintlayerFillOrder::new() + } + + fn clear(&mut self) { + self.order_id = ::std::option::Option::None; + self.value.clear(); + self.destination = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static MintlayerFillOrder { + static instance: MintlayerFillOrder = MintlayerFillOrder { + order_id: ::std::option::Option::None, + value: ::protobuf::MessageField::none(), + destination: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for MintlayerFillOrder { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MintlayerFillOrder").unwrap()).clone() + } +} + +impl ::std::fmt::Display for MintlayerFillOrder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for MintlayerFillOrder { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + // @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerChangeTokenMetadataUri) #[derive(PartialEq,Clone,Default,Debug)] pub struct MintlayerChangeTokenMetadataUri { @@ -5045,6 +5499,8 @@ pub struct MintlayerTxOutput { pub data_deposit: ::protobuf::MessageField, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxOutput.htlc) pub htlc: ::protobuf::MessageField, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxOutput.anyone_can_take) + pub anyone_can_take: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerTxOutput.special_fields) pub special_fields: ::protobuf::SpecialFields, @@ -5062,7 +5518,7 @@ impl MintlayerTxOutput { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(11); + let mut fields = ::std::vec::Vec::with_capacity(12); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerTransferTxOutput>( "transfer", @@ -5119,6 +5575,11 @@ impl MintlayerTxOutput { |m: &MintlayerTxOutput| { &m.htlc }, |m: &mut MintlayerTxOutput| { &mut m.htlc }, )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerAnyoneCanTakeTxOutput>( + "anyone_can_take", + |m: &MintlayerTxOutput| { &m.anyone_can_take }, + |m: &mut MintlayerTxOutput| { &mut m.anyone_can_take }, + )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "MintlayerTxOutput", fields, @@ -5186,6 +5647,11 @@ impl ::protobuf::Message for MintlayerTxOutput { return false; } }; + for v in &self.anyone_can_take { + if !v.is_initialized() { + return false; + } + }; true } @@ -5225,6 +5691,9 @@ impl ::protobuf::Message for MintlayerTxOutput { 90 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.htlc)?; }, + 98 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.anyone_can_take)?; + }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -5281,6 +5750,10 @@ impl ::protobuf::Message for MintlayerTxOutput { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } + if let Some(v) = self.anyone_can_take.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -5320,6 +5793,9 @@ impl ::protobuf::Message for MintlayerTxOutput { if let Some(v) = self.htlc.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?; } + if let Some(v) = self.anyone_can_take.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -5348,6 +5824,7 @@ impl ::protobuf::Message for MintlayerTxOutput { self.issue_nft.clear(); self.data_deposit.clear(); self.htlc.clear(); + self.anyone_can_take.clear(); self.special_fields.clear(); } @@ -5364,6 +5841,7 @@ impl ::protobuf::Message for MintlayerTxOutput { issue_nft: ::protobuf::MessageField::none(), data_deposit: ::protobuf::MessageField::none(), htlc: ::protobuf::MessageField::none(), + anyone_can_take: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -9488,6 +9966,221 @@ impl ::protobuf::reflect::ProtobufValue for MintlayerHtlcTxOutput { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } +// @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerAnyoneCanTakeTxOutput) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MintlayerAnyoneCanTakeTxOutput { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAnyoneCanTakeTxOutput.conclude_key) + pub conclude_key: ::std::option::Option<::std::string::String>, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAnyoneCanTakeTxOutput.ask) + pub ask: ::protobuf::MessageField, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAnyoneCanTakeTxOutput.give) + pub give: ::protobuf::MessageField, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerAnyoneCanTakeTxOutput.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a MintlayerAnyoneCanTakeTxOutput { + fn default() -> &'a MintlayerAnyoneCanTakeTxOutput { + ::default_instance() + } +} + +impl MintlayerAnyoneCanTakeTxOutput { + pub fn new() -> MintlayerAnyoneCanTakeTxOutput { + ::std::default::Default::default() + } + + // required string conclude_key = 1; + + pub fn conclude_key(&self) -> &str { + match self.conclude_key.as_ref() { + Some(v) => v, + None => "", + } + } + + pub fn clear_conclude_key(&mut self) { + self.conclude_key = ::std::option::Option::None; + } + + pub fn has_conclude_key(&self) -> bool { + self.conclude_key.is_some() + } + + // Param is passed by value, moved + pub fn set_conclude_key(&mut self, v: ::std::string::String) { + self.conclude_key = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_conclude_key(&mut self) -> &mut ::std::string::String { + if self.conclude_key.is_none() { + self.conclude_key = ::std::option::Option::Some(::std::string::String::new()); + } + self.conclude_key.as_mut().unwrap() + } + + // Take field + pub fn take_conclude_key(&mut self) -> ::std::string::String { + self.conclude_key.take().unwrap_or_else(|| ::std::string::String::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "conclude_key", + |m: &MintlayerAnyoneCanTakeTxOutput| { &m.conclude_key }, + |m: &mut MintlayerAnyoneCanTakeTxOutput| { &mut m.conclude_key }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerOutputValue>( + "ask", + |m: &MintlayerAnyoneCanTakeTxOutput| { &m.ask }, + |m: &mut MintlayerAnyoneCanTakeTxOutput| { &mut m.ask }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerOutputValue>( + "give", + |m: &MintlayerAnyoneCanTakeTxOutput| { &m.give }, + |m: &mut MintlayerAnyoneCanTakeTxOutput| { &mut m.give }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MintlayerAnyoneCanTakeTxOutput", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for MintlayerAnyoneCanTakeTxOutput { + const NAME: &'static str = "MintlayerAnyoneCanTakeTxOutput"; + + fn is_initialized(&self) -> bool { + if self.conclude_key.is_none() { + return false; + } + if self.ask.is_none() { + return false; + } + if self.give.is_none() { + return false; + } + for v in &self.ask { + if !v.is_initialized() { + return false; + } + }; + for v in &self.give { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.conclude_key = ::std::option::Option::Some(is.read_string()?); + }, + 18 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.ask)?; + }, + 26 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.give)?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.conclude_key.as_ref() { + my_size += ::protobuf::rt::string_size(1, &v); + } + if let Some(v) = self.ask.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.give.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.conclude_key.as_ref() { + os.write_string(1, v)?; + } + if let Some(v) = self.ask.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; + } + if let Some(v) = self.give.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> MintlayerAnyoneCanTakeTxOutput { + MintlayerAnyoneCanTakeTxOutput::new() + } + + fn clear(&mut self) { + self.conclude_key = ::std::option::Option::None; + self.ask.clear(); + self.give.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static MintlayerAnyoneCanTakeTxOutput { + static instance: MintlayerAnyoneCanTakeTxOutput = MintlayerAnyoneCanTakeTxOutput { + conclude_key: ::std::option::Option::None, + ask: ::protobuf::MessageField::none(), + give: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for MintlayerAnyoneCanTakeTxOutput { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MintlayerAnyoneCanTakeTxOutput").unwrap()).clone() + } +} + +impl ::std::fmt::Display for MintlayerAnyoneCanTakeTxOutput { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for MintlayerAnyoneCanTakeTxOutput { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + // @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerPrevTx) #[derive(PartialEq,Clone,Default,Debug)] pub struct MintlayerPrevTx { @@ -10757,7 +11450,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ e\x18\x03\x20\x01(\r:\n4294967295R\x08sequence\x12H\n\x05value\x18\x04\ \x20\x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValueR\x05va\ lue\x12\x14\n\x05nonce\x18\x05\x20\x02(\x04R\x05nonce\x12#\n\rdelegation\ - _id\x18\x06\x20\x02(\x0cR\x0cdelegationId\"\xe2\x06\n\x1eMintlayerAccoun\ + _id\x18\x06\x20\x02(\x0cR\x0cdelegationId\"\x90\x08\n\x1eMintlayerAccoun\ tCommandTxInput\x12O\n\taddress_n\x18\x01\x20\x03(\x0b22.hw.trezor.messa\ ges.mintlayer.MintlayerAddressPathR\x08addressN\x12\x18\n\x07address\x18\ \x02\x20\x02(\tR\x07address\x12&\n\x08sequence\x18\x03\x20\x01(\r:\n4294\ @@ -10771,11 +11464,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ Token\x12[\n\x0eunfreeze_token\x18\t\x20\x01(\x0b24.hw.trezor.messages.m\ intlayer.MintlayerUnfreezeTokenR\runfreezeToken\x12q\n\x16change_token_a\ uthority\x18\n\x20\x01(\x0b2;.hw.trezor.messages.mintlayer.MintlayerChan\ - geTokenAuhtorityR\x14changeTokenAuthority\x12x\n\x19change_token_metadat\ - a_uri\x18\x0b\x20\x01(\x0b2=.hw.trezor.messages.mintlayer.MintlayerChang\ - eTokenMetadataUriR\x16changeTokenMetadataUri\"H\n\x13MintlayerMintTokens\ - \x12\x19\n\x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\x12\x16\n\x06amo\ - unt\x18\x02\x20\x02(\x0cR\x06amount\"2\n\x15MintlayerUnmintTokens\x12\ + geTokenAuhtorityR\x14changeTokenAuthority\x12[\n\x0econclude_order\x18\ + \x0b\x20\x01(\x0b24.hw.trezor.messages.mintlayer.MintlayerConcludeOrderR\ + \rconcludeOrder\x12O\n\nfill_order\x18\x0c\x20\x01(\x0b20.hw.trezor.mess\ + ages.mintlayer.MintlayerFillOrderR\tfillOrder\x12x\n\x19change_token_met\ + adata_uri\x18\r\x20\x01(\x0b2=.hw.trezor.messages.mintlayer.MintlayerCha\ + ngeTokenMetadataUriR\x16changeTokenMetadataUri\"H\n\x13MintlayerMintToke\ + ns\x12\x19\n\x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\x12\x16\n\x06a\ + mount\x18\x02\x20\x02(\x0cR\x06amount\"2\n\x15MintlayerUnmintTokens\x12\ \x19\n\x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\"5\n\x18MintlayerLoc\ kTokenSupply\x12\x19\n\x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\"a\n\ \x14MintlayerFreezeToken\x12\x19\n\x08token_id\x18\x01\x20\x02(\x0cR\x07\ @@ -10783,105 +11479,115 @@ static file_descriptor_proto_data: &'static [u8] = b"\ freezabe\"3\n\x16MintlayerUnfreezeToken\x12\x19\n\x08token_id\x18\x01\ \x20\x02(\x0cR\x07tokenId\"\\\n\x1dMintlayerChangeTokenAuhtority\x12\x19\ \n\x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\x12\x20\n\x0bdestination\ - \x18\x02\x20\x02(\tR\x0bdestination\"_\n\x1fMintlayerChangeTokenMetadata\ - Uri\x12\x19\n\x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\x12!\n\x0cmet\ - adata_uri\x18\x02\x20\x02(\x0cR\x0bmetadataUri\"\xde\x08\n\x11MintlayerT\ - xOutput\x12S\n\x08transfer\x18\x01\x20\x01(\x0b27.hw.trezor.messages.min\ - tlayer.MintlayerTransferTxOutputR\x08transfer\x12m\n\x12lock_then_transf\ - er\x18\x02\x20\x01(\x0b2?.hw.trezor.messages.mintlayer.MintlayerLockThen\ - TransferTxOutputR\x10lockThenTransfer\x12G\n\x04burn\x18\x03\x20\x01(\ - \x0b23.hw.trezor.messages.mintlayer.MintlayerBurnTxOutputR\x04burn\x12j\ - \n\x11create_stake_pool\x18\x04\x20\x01(\x0b2>.hw.trezor.messages.mintla\ - yer.MintlayerCreateStakePoolTxOutputR\x0fcreateStakePool\x12}\n\x18produ\ - ce_block_from_stake\x18\x05\x20\x01(\x0b2D.hw.trezor.messages.mintlayer.\ - MintlayerProduceBlockFromStakeTxOutputR\x15produceBlockFromStake\x12s\n\ - \x14create_delegation_id\x18\x06\x20\x01(\x0b2A.hw.trezor.messages.mintl\ - ayer.MintlayerCreateDelegationIdTxOutputR\x12createDelegationId\x12i\n\ - \x10delegate_staking\x18\x07\x20\x01(\x0b2>.hw.trezor.messages.mintlayer\ - .MintlayerDelegateStakingTxOutputR\x0fdelegateStaking\x12s\n\x14issue_fu\ - ngible_token\x18\x08\x20\x01(\x0b2A.hw.trezor.messages.mintlayer.Mintlay\ - erIssueFungibleTokenTxOutputR\x12issueFungibleToken\x12T\n\tissue_nft\ - \x18\t\x20\x01(\x0b27.hw.trezor.messages.mintlayer.MintlayerIssueNftTxOu\ - tputR\x08issueNft\x12]\n\x0cdata_deposit\x18\n\x20\x01(\x0b2:.hw.trezor.\ - messages.mintlayer.MintlayerDataDepositTxOutputR\x0bdataDeposit\x12G\n\ - \x04htlc\x18\x0b\x20\x01(\x0b23.hw.trezor.messages.mintlayer.MintlayerHt\ - lcTxOutputR\x04htlc\"\x87\x01\n\x19MintlayerTokenOutputValue\x12\x19\n\ - \x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\x12!\n\x0ctoken_ticker\x18\ - \x02\x20\x02(\x0cR\x0btokenTicker\x12,\n\x12number_of_decimals\x18\x03\ - \x20\x02(\rR\x10numberOfDecimals\"}\n\x14MintlayerOutputValue\x12\x16\n\ - \x06amount\x18\x01\x20\x02(\x0cR\x06amount\x12M\n\x05token\x18\x02\x20\ - \x01(\x0b27.hw.trezor.messages.mintlayer.MintlayerTokenOutputValueR\x05t\ - oken\"\x7f\n\x19MintlayerTransferTxOutput\x12\x18\n\x07address\x18\x01\ - \x20\x02(\tR\x07address\x12H\n\x05value\x18\x02\x20\x02(\x0b22.hw.trezor\ - .messages.mintlayer.MintlayerOutputValueR\x05value\"\xa4\x01\n\x17Mintla\ - yerOutputTimeLock\x12!\n\x0cuntil_height\x18\x01\x20\x01(\x04R\x0buntilH\ - eight\x12\x1d\n\nuntil_time\x18\x02\x20\x01(\x04R\tuntilTime\x12&\n\x0ff\ - or_block_count\x18\x03\x20\x01(\x04R\rforBlockCount\x12\x1f\n\x0bfor_sec\ - onds\x18\x04\x20\x01(\x04R\nforSeconds\"\xd2\x01\n!MintlayerLockThenTran\ - sferTxOutput\x12\x18\n\x07address\x18\x01\x20\x01(\tR\x07address\x12H\n\ - \x05value\x18\x02\x20\x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerO\ - utputValueR\x05value\x12I\n\x04lock\x18\x03\x20\x02(\x0b25.hw.trezor.mes\ - sages.mintlayer.MintlayerOutputTimeLockR\x04lock\"a\n\x15MintlayerBurnTx\ - Output\x12H\n\x05value\x18\x01\x20\x02(\x0b22.hw.trezor.messages.mintlay\ - er.MintlayerOutputValueR\x05value\"\x9d\x02\n\x20MintlayerCreateStakePoo\ - lTxOutput\x12\x17\n\x07pool_id\x18\x01\x20\x02(\x0cR\x06poolId\x12\x16\n\ - \x06pledge\x18\x02\x20\x02(\x0cR\x06pledge\x12\x16\n\x06staker\x18\x03\ - \x20\x02(\tR\x06staker\x12$\n\x0evrf_public_key\x18\x04\x20\x02(\tR\x0cv\ - rfPublicKey\x12)\n\x10decommission_key\x18\x05\x20\x02(\tR\x0fdecommissi\ - onKey\x129\n\x19margin_ratio_per_thousand\x18\x06\x20\x02(\rR\x16marginR\ - atioPerThousand\x12$\n\x0ecost_per_block\x18\x07\x20\x02(\x0cR\x0ccostPe\ - rBlock\"c\n&MintlayerProduceBlockFromStakeTxOutput\x12\x20\n\x0bdestinat\ - ion\x18\x01\x20\x02(\tR\x0bdestination\x12\x17\n\x07pool_id\x18\x02\x20\ - \x02(\x0cR\x06poolId\"`\n#MintlayerCreateDelegationIdTxOutput\x12\x20\n\ - \x0bdestination\x18\x01\x20\x02(\tR\x0bdestination\x12\x17\n\x07pool_id\ - \x18\x02\x20\x02(\x0cR\x06poolId\"_\n\x20MintlayerDelegateStakingTxOutpu\ - t\x12\x16\n\x06amount\x18\x01\x20\x02(\x0cR\x06amount\x12#\n\rdelegation\ - _id\x18\x02\x20\x02(\x0cR\x0cdelegationId\"\x8f\x01\n\x19MintlayerTokenT\ - otalSupply\x12O\n\x04type\x18\x01\x20\x02(\x0e2;.hw.trezor.messages.mint\ - layer.MintlayerTokenTotalSupplyTypeR\x04type\x12!\n\x0cfixed_amount\x18\ - \x02\x20\x01(\x0cR\x0bfixedAmount\"\xb6\x02\n#MintlayerIssueFungibleToke\ - nTxOutput\x12!\n\x0ctoken_ticker\x18\x01\x20\x02(\x0cR\x0btokenTicker\ - \x12,\n\x12number_of_decimals\x18\x02\x20\x02(\rR\x10numberOfDecimals\ - \x12!\n\x0cmetadata_uri\x18\x03\x20\x02(\x0cR\x0bmetadataUri\x12Z\n\x0ct\ - otal_supply\x18\x04\x20\x02(\x0b27.hw.trezor.messages.mintlayer.Mintlaye\ - rTokenTotalSupplyR\x0btotalSupply\x12\x1c\n\tauthority\x18\x05\x20\x02(\ - \tR\tauthority\x12!\n\x0cis_freezable\x18\x06\x20\x02(\x08R\x0bisFreezab\ - le\"\xcf\x02\n\x19MintlayerIssueNftTxOutput\x12\x19\n\x08token_id\x18\ - \x01\x20\x02(\x0cR\x07tokenId\x12\x20\n\x0bdestination\x18\x02\x20\x02(\ - \tR\x0bdestination\x12\x18\n\x07creator\x18\x03\x20\x01(\tR\x07creator\ - \x12\x12\n\x04name\x18\x04\x20\x02(\x0cR\x04name\x12\x20\n\x0bdescriptio\ - n\x18\x05\x20\x02(\x0cR\x0bdescription\x12\x16\n\x06ticker\x18\x06\x20\ - \x02(\x0cR\x06ticker\x12\x19\n\x08icon_uri\x18\x07\x20\x01(\x0cR\x07icon\ - Uri\x126\n\x17additional_metadata_uri\x18\x08\x20\x01(\x0cR\x15additiona\ - lMetadataUri\x12\x1b\n\tmedia_uri\x18\t\x20\x01(\x0cR\x08mediaUri\x12\ - \x1d\n\nmedia_hash\x18\n\x20\x02(\x0cR\tmediaHash\"2\n\x1cMintlayerDataD\ - epositTxOutput\x12\x12\n\x04data\x18\x01\x20\x02(\x0cR\x04data\"\x9e\x02\ - \n\x15MintlayerHtlcTxOutput\x12H\n\x05value\x18\x01\x20\x02(\x0b22.hw.tr\ - ezor.messages.mintlayer.MintlayerOutputValueR\x05value\x12\x1f\n\x0bsecr\ - et_hash\x18\x02\x20\x02(\x0cR\nsecretHash\x12\x1b\n\tspend_key\x18\x03\ - \x20\x02(\tR\x08spendKey\x12^\n\x0frefund_timelock\x18\x04\x20\x02(\x0b2\ - 5.hw.trezor.messages.mintlayer.MintlayerOutputTimeLockR\x0erefundTimeloc\ - k\x12\x1d\n\nrefund_key\x18\x05\x20\x02(\tR\trefundKey\"s\n\x0fMintlayer\ - PrevTx\x12\x18\n\x07version\x18\x01\x20\x02(\rR\x07version\x12!\n\x0cinp\ - uts_count\x18\x06\x20\x02(\rR\x0binputsCount\x12#\n\routputs_count\x18\ - \x07\x20\x02(\rR\x0coutputsCount\"b\n\x12MintlayerPrevInput\x12\x1b\n\tp\ - rev_hash\x18\x02\x20\x02(\x0cR\x08prevHash\x12\x1d\n\nprev_index\x18\x03\ - \x20\x02(\rR\tprevIndexJ\x04\x08\x01\x10\x02J\x04\x08\x04\x10\x05J\x04\ - \x08\x05\x10\x06\"g\n\x1bMintlayerPrevTransferOutput\x12H\n\x05value\x18\ - \x01\x20\x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValueR\ - \x05value\"\xdf\x01\n\x17MintlayerTxAckUtxoInput\x12`\n\x02tx\x18\x01\ - \x20\x02(\x0b2P.hw.trezor.messages.mintlayer.MintlayerTxAckUtxoInput.Min\ - tlayerTxAckInputWrapperR\x02tx\x1ab\n\x1aMintlayerTxAckInputWrapper\x12D\ - \n\x05input\x18\x02\x20\x02(\x0b2..hw.trezor.messages.mintlayer.Mintlaye\ - rTxInputR\x05input\"\xde\x01\n\x14MintlayerTxAckOutput\x12^\n\x02tx\x18\ - \x01\x20\x02(\x0b2N.hw.trezor.messages.mintlayer.MintlayerTxAckOutput.Mi\ - ntlayerTxAckOutputWrapperR\x02tx\x1af\n\x1bMintlayerTxAckOutputWrapper\ - \x12G\n\x06output\x18\x05\x20\x02(\x0b2/.hw.trezor.messages.mintlayer.Mi\ - ntlayerTxOutputR\x06output*/\n\x11MintlayerUtxoType\x12\x0f\n\x0bTRANSAC\ - TION\x10\0\x12\t\n\x05BLOCK\x10\x01*G\n\x1dMintlayerTokenTotalSupplyType\ - \x12\t\n\x05FIXED\x10\0\x12\x0c\n\x08LOCKABLE\x10\x01\x12\r\n\tUNLIMITED\ - \x10\x02B=\n#com.satoshilabs.trezor.lib.protobufB\x16TrezorMessageMintla\ - yer\ + \x18\x02\x20\x02(\tR\x0bdestination\"3\n\x16MintlayerConcludeOrder\x12\ + \x19\n\x08order_id\x18\x01\x20\x02(\x0cR\x07orderId\"\x9b\x01\n\x12Mintl\ + ayerFillOrder\x12\x19\n\x08order_id\x18\x01\x20\x02(\x0cR\x07orderId\x12\ + H\n\x05value\x18\x02\x20\x02(\x0b22.hw.trezor.messages.mintlayer.Mintlay\ + erOutputValueR\x05value\x12\x20\n\x0bdestination\x18\x03\x20\x02(\tR\x0b\ + destination\"_\n\x1fMintlayerChangeTokenMetadataUri\x12\x19\n\x08token_i\ + d\x18\x01\x20\x02(\x0cR\x07tokenId\x12!\n\x0cmetadata_uri\x18\x02\x20\ + \x02(\x0cR\x0bmetadataUri\"\xc4\t\n\x11MintlayerTxOutput\x12S\n\x08trans\ + fer\x18\x01\x20\x01(\x0b27.hw.trezor.messages.mintlayer.MintlayerTransfe\ + rTxOutputR\x08transfer\x12m\n\x12lock_then_transfer\x18\x02\x20\x01(\x0b\ + 2?.hw.trezor.messages.mintlayer.MintlayerLockThenTransferTxOutputR\x10lo\ + ckThenTransfer\x12G\n\x04burn\x18\x03\x20\x01(\x0b23.hw.trezor.messages.\ + mintlayer.MintlayerBurnTxOutputR\x04burn\x12j\n\x11create_stake_pool\x18\ + \x04\x20\x01(\x0b2>.hw.trezor.messages.mintlayer.MintlayerCreateStakePoo\ + lTxOutputR\x0fcreateStakePool\x12}\n\x18produce_block_from_stake\x18\x05\ + \x20\x01(\x0b2D.hw.trezor.messages.mintlayer.MintlayerProduceBlockFromSt\ + akeTxOutputR\x15produceBlockFromStake\x12s\n\x14create_delegation_id\x18\ + \x06\x20\x01(\x0b2A.hw.trezor.messages.mintlayer.MintlayerCreateDelegati\ + onIdTxOutputR\x12createDelegationId\x12i\n\x10delegate_staking\x18\x07\ + \x20\x01(\x0b2>.hw.trezor.messages.mintlayer.MintlayerDelegateStakingTxO\ + utputR\x0fdelegateStaking\x12s\n\x14issue_fungible_token\x18\x08\x20\x01\ + (\x0b2A.hw.trezor.messages.mintlayer.MintlayerIssueFungibleTokenTxOutput\ + R\x12issueFungibleToken\x12T\n\tissue_nft\x18\t\x20\x01(\x0b27.hw.trezor\ + .messages.mintlayer.MintlayerIssueNftTxOutputR\x08issueNft\x12]\n\x0cdat\ + a_deposit\x18\n\x20\x01(\x0b2:.hw.trezor.messages.mintlayer.MintlayerDat\ + aDepositTxOutputR\x0bdataDeposit\x12G\n\x04htlc\x18\x0b\x20\x01(\x0b23.h\ + w.trezor.messages.mintlayer.MintlayerHtlcTxOutputR\x04htlc\x12d\n\x0fany\ + one_can_take\x18\x0c\x20\x01(\x0b2<.hw.trezor.messages.mintlayer.Mintlay\ + erAnyoneCanTakeTxOutputR\ranyoneCanTake\"\x87\x01\n\x19MintlayerTokenOut\ + putValue\x12\x19\n\x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\x12!\n\ + \x0ctoken_ticker\x18\x02\x20\x02(\x0cR\x0btokenTicker\x12,\n\x12number_o\ + f_decimals\x18\x03\x20\x02(\rR\x10numberOfDecimals\"}\n\x14MintlayerOutp\ + utValue\x12\x16\n\x06amount\x18\x01\x20\x02(\x0cR\x06amount\x12M\n\x05to\ + ken\x18\x02\x20\x01(\x0b27.hw.trezor.messages.mintlayer.MintlayerTokenOu\ + tputValueR\x05token\"\x7f\n\x19MintlayerTransferTxOutput\x12\x18\n\x07ad\ + dress\x18\x01\x20\x02(\tR\x07address\x12H\n\x05value\x18\x02\x20\x02(\ + \x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValueR\x05value\"\xa4\ + \x01\n\x17MintlayerOutputTimeLock\x12!\n\x0cuntil_height\x18\x01\x20\x01\ + (\x04R\x0buntilHeight\x12\x1d\n\nuntil_time\x18\x02\x20\x01(\x04R\tuntil\ + Time\x12&\n\x0ffor_block_count\x18\x03\x20\x01(\x04R\rforBlockCount\x12\ + \x1f\n\x0bfor_seconds\x18\x04\x20\x01(\x04R\nforSeconds\"\xd2\x01\n!Mint\ + layerLockThenTransferTxOutput\x12\x18\n\x07address\x18\x01\x20\x01(\tR\ + \x07address\x12H\n\x05value\x18\x02\x20\x02(\x0b22.hw.trezor.messages.mi\ + ntlayer.MintlayerOutputValueR\x05value\x12I\n\x04lock\x18\x03\x20\x02(\ + \x0b25.hw.trezor.messages.mintlayer.MintlayerOutputTimeLockR\x04lock\"a\ + \n\x15MintlayerBurnTxOutput\x12H\n\x05value\x18\x01\x20\x02(\x0b22.hw.tr\ + ezor.messages.mintlayer.MintlayerOutputValueR\x05value\"\x9d\x02\n\x20Mi\ + ntlayerCreateStakePoolTxOutput\x12\x17\n\x07pool_id\x18\x01\x20\x02(\x0c\ + R\x06poolId\x12\x16\n\x06pledge\x18\x02\x20\x02(\x0cR\x06pledge\x12\x16\ + \n\x06staker\x18\x03\x20\x02(\tR\x06staker\x12$\n\x0evrf_public_key\x18\ + \x04\x20\x02(\tR\x0cvrfPublicKey\x12)\n\x10decommission_key\x18\x05\x20\ + \x02(\tR\x0fdecommissionKey\x129\n\x19margin_ratio_per_thousand\x18\x06\ + \x20\x02(\rR\x16marginRatioPerThousand\x12$\n\x0ecost_per_block\x18\x07\ + \x20\x02(\x0cR\x0ccostPerBlock\"c\n&MintlayerProduceBlockFromStakeTxOutp\ + ut\x12\x20\n\x0bdestination\x18\x01\x20\x02(\tR\x0bdestination\x12\x17\n\ + \x07pool_id\x18\x02\x20\x02(\x0cR\x06poolId\"`\n#MintlayerCreateDelegati\ + onIdTxOutput\x12\x20\n\x0bdestination\x18\x01\x20\x02(\tR\x0bdestination\ + \x12\x17\n\x07pool_id\x18\x02\x20\x02(\x0cR\x06poolId\"_\n\x20MintlayerD\ + elegateStakingTxOutput\x12\x16\n\x06amount\x18\x01\x20\x02(\x0cR\x06amou\ + nt\x12#\n\rdelegation_id\x18\x02\x20\x02(\x0cR\x0cdelegationId\"\x8f\x01\ + \n\x19MintlayerTokenTotalSupply\x12O\n\x04type\x18\x01\x20\x02(\x0e2;.hw\ + .trezor.messages.mintlayer.MintlayerTokenTotalSupplyTypeR\x04type\x12!\n\ + \x0cfixed_amount\x18\x02\x20\x01(\x0cR\x0bfixedAmount\"\xb6\x02\n#Mintla\ + yerIssueFungibleTokenTxOutput\x12!\n\x0ctoken_ticker\x18\x01\x20\x02(\ + \x0cR\x0btokenTicker\x12,\n\x12number_of_decimals\x18\x02\x20\x02(\rR\ + \x10numberOfDecimals\x12!\n\x0cmetadata_uri\x18\x03\x20\x02(\x0cR\x0bmet\ + adataUri\x12Z\n\x0ctotal_supply\x18\x04\x20\x02(\x0b27.hw.trezor.message\ + s.mintlayer.MintlayerTokenTotalSupplyR\x0btotalSupply\x12\x1c\n\tauthori\ + ty\x18\x05\x20\x02(\tR\tauthority\x12!\n\x0cis_freezable\x18\x06\x20\x02\ + (\x08R\x0bisFreezable\"\xcf\x02\n\x19MintlayerIssueNftTxOutput\x12\x19\n\ + \x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\x12\x20\n\x0bdestination\ + \x18\x02\x20\x02(\tR\x0bdestination\x12\x18\n\x07creator\x18\x03\x20\x01\ + (\tR\x07creator\x12\x12\n\x04name\x18\x04\x20\x02(\x0cR\x04name\x12\x20\ + \n\x0bdescription\x18\x05\x20\x02(\x0cR\x0bdescription\x12\x16\n\x06tick\ + er\x18\x06\x20\x02(\x0cR\x06ticker\x12\x19\n\x08icon_uri\x18\x07\x20\x01\ + (\x0cR\x07iconUri\x126\n\x17additional_metadata_uri\x18\x08\x20\x01(\x0c\ + R\x15additionalMetadataUri\x12\x1b\n\tmedia_uri\x18\t\x20\x01(\x0cR\x08m\ + ediaUri\x12\x1d\n\nmedia_hash\x18\n\x20\x02(\x0cR\tmediaHash\"2\n\x1cMin\ + tlayerDataDepositTxOutput\x12\x12\n\x04data\x18\x01\x20\x02(\x0cR\x04dat\ + a\"\x9e\x02\n\x15MintlayerHtlcTxOutput\x12H\n\x05value\x18\x01\x20\x02(\ + \x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValueR\x05value\x12\ + \x1f\n\x0bsecret_hash\x18\x02\x20\x02(\x0cR\nsecretHash\x12\x1b\n\tspend\ + _key\x18\x03\x20\x02(\tR\x08spendKey\x12^\n\x0frefund_timelock\x18\x04\ + \x20\x02(\x0b25.hw.trezor.messages.mintlayer.MintlayerOutputTimeLockR\ + \x0erefundTimelock\x12\x1d\n\nrefund_key\x18\x05\x20\x02(\tR\trefundKey\ + \"\xd1\x01\n\x1eMintlayerAnyoneCanTakeTxOutput\x12!\n\x0cconclude_key\ + \x18\x01\x20\x02(\tR\x0bconcludeKey\x12D\n\x03ask\x18\x02\x20\x02(\x0b22\ + .hw.trezor.messages.mintlayer.MintlayerOutputValueR\x03ask\x12F\n\x04giv\ + e\x18\x03\x20\x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerOutputVal\ + ueR\x04give\"s\n\x0fMintlayerPrevTx\x12\x18\n\x07version\x18\x01\x20\x02\ + (\rR\x07version\x12!\n\x0cinputs_count\x18\x06\x20\x02(\rR\x0binputsCoun\ + t\x12#\n\routputs_count\x18\x07\x20\x02(\rR\x0coutputsCount\"b\n\x12Mint\ + layerPrevInput\x12\x1b\n\tprev_hash\x18\x02\x20\x02(\x0cR\x08prevHash\ + \x12\x1d\n\nprev_index\x18\x03\x20\x02(\rR\tprevIndexJ\x04\x08\x01\x10\ + \x02J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06\"g\n\x1bMintlayerPrevTran\ + sferOutput\x12H\n\x05value\x18\x01\x20\x02(\x0b22.hw.trezor.messages.min\ + tlayer.MintlayerOutputValueR\x05value\"\xdf\x01\n\x17MintlayerTxAckUtxoI\ + nput\x12`\n\x02tx\x18\x01\x20\x02(\x0b2P.hw.trezor.messages.mintlayer.Mi\ + ntlayerTxAckUtxoInput.MintlayerTxAckInputWrapperR\x02tx\x1ab\n\x1aMintla\ + yerTxAckInputWrapper\x12D\n\x05input\x18\x02\x20\x02(\x0b2..hw.trezor.me\ + ssages.mintlayer.MintlayerTxInputR\x05input\"\xde\x01\n\x14MintlayerTxAc\ + kOutput\x12^\n\x02tx\x18\x01\x20\x02(\x0b2N.hw.trezor.messages.mintlayer\ + .MintlayerTxAckOutput.MintlayerTxAckOutputWrapperR\x02tx\x1af\n\x1bMintl\ + ayerTxAckOutputWrapper\x12G\n\x06output\x18\x05\x20\x02(\x0b2/.hw.trezor\ + .messages.mintlayer.MintlayerTxOutputR\x06output*/\n\x11MintlayerUtxoTyp\ + e\x12\x0f\n\x0bTRANSACTION\x10\0\x12\t\n\x05BLOCK\x10\x01*G\n\x1dMintlay\ + erTokenTotalSupplyType\x12\t\n\x05FIXED\x10\0\x12\x0c\n\x08LOCKABLE\x10\ + \x01\x12\r\n\tUNLIMITED\x10\x02B=\n#com.satoshilabs.trezor.lib.protobufB\ + \x16TrezorMessageMintlayer\ "; /// `FileDescriptorProto` object which was a source for this generated file @@ -10899,7 +11605,7 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(45); + let mut messages = ::std::vec::Vec::with_capacity(48); messages.push(MintlayerGetAddress::generated_message_descriptor_data()); messages.push(MintlayerAddress::generated_message_descriptor_data()); messages.push(MintlayerGetPublicKey::generated_message_descriptor_data()); @@ -10918,6 +11624,8 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { messages.push(MintlayerFreezeToken::generated_message_descriptor_data()); messages.push(MintlayerUnfreezeToken::generated_message_descriptor_data()); messages.push(MintlayerChangeTokenAuhtority::generated_message_descriptor_data()); + messages.push(MintlayerConcludeOrder::generated_message_descriptor_data()); + messages.push(MintlayerFillOrder::generated_message_descriptor_data()); messages.push(MintlayerChangeTokenMetadataUri::generated_message_descriptor_data()); messages.push(MintlayerTxOutput::generated_message_descriptor_data()); messages.push(MintlayerTokenOutputValue::generated_message_descriptor_data()); @@ -10935,6 +11643,7 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { messages.push(MintlayerIssueNftTxOutput::generated_message_descriptor_data()); messages.push(MintlayerDataDepositTxOutput::generated_message_descriptor_data()); messages.push(MintlayerHtlcTxOutput::generated_message_descriptor_data()); + messages.push(MintlayerAnyoneCanTakeTxOutput::generated_message_descriptor_data()); messages.push(MintlayerPrevTx::generated_message_descriptor_data()); messages.push(MintlayerPrevInput::generated_message_descriptor_data()); messages.push(MintlayerPrevTransferOutput::generated_message_descriptor_data());