// This file is generated by rust-protobuf 3.7.2. Do not edit
// .proto file is parsed by protoc 3.19.6
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]

#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]

//! Generated file from `messages-bitcoin.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.MultisigRedeemScriptType)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct MultisigRedeemScriptType {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.pubkeys)
    pub pubkeys: ::std::vec::Vec<multisig_redeem_script_type::HDNodePathType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.signatures)
    pub signatures: ::std::vec::Vec<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.m)
    pub m: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.nodes)
    pub nodes: ::std::vec::Vec<super::messages_common::HDNodeType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.pubkeys_order)
    pub pubkeys_order: ::std::option::Option<::protobuf::EnumOrUnknown<MultisigPubkeysOrder>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a MultisigRedeemScriptType {
    fn default() -> &'a MultisigRedeemScriptType {
        <MultisigRedeemScriptType as ::protobuf::Message>::default_instance()
    }
}

impl MultisigRedeemScriptType {
    pub fn new() -> MultisigRedeemScriptType {
        ::std::default::Default::default()
    }

    // required uint32 m = 3;

    pub fn m(&self) -> u32 {
        self.m.unwrap_or(0)
    }

    pub fn clear_m(&mut self) {
        self.m = ::std::option::Option::None;
    }

    pub fn has_m(&self) -> bool {
        self.m.is_some()
    }

    // Param is passed by value, moved
    pub fn set_m(&mut self, v: u32) {
        self.m = ::std::option::Option::Some(v);
    }

    // optional .hw.trezor.messages.bitcoin.MultisigPubkeysOrder pubkeys_order = 6;

    pub fn pubkeys_order(&self) -> MultisigPubkeysOrder {
        match self.pubkeys_order {
            Some(e) => e.enum_value_or(MultisigPubkeysOrder::PRESERVED),
            None => MultisigPubkeysOrder::PRESERVED,
        }
    }

    pub fn clear_pubkeys_order(&mut self) {
        self.pubkeys_order = ::std::option::Option::None;
    }

    pub fn has_pubkeys_order(&self) -> bool {
        self.pubkeys_order.is_some()
    }

    // Param is passed by value, moved
    pub fn set_pubkeys_order(&mut self, v: MultisigPubkeysOrder) {
        self.pubkeys_order = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(6);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "pubkeys",
            |m: &MultisigRedeemScriptType| { &m.pubkeys },
            |m: &mut MultisigRedeemScriptType| { &mut m.pubkeys },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "signatures",
            |m: &MultisigRedeemScriptType| { &m.signatures },
            |m: &mut MultisigRedeemScriptType| { &mut m.signatures },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "m",
            |m: &MultisigRedeemScriptType| { &m.m },
            |m: &mut MultisigRedeemScriptType| { &mut m.m },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "nodes",
            |m: &MultisigRedeemScriptType| { &m.nodes },
            |m: &mut MultisigRedeemScriptType| { &mut m.nodes },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &MultisigRedeemScriptType| { &m.address_n },
            |m: &mut MultisigRedeemScriptType| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "pubkeys_order",
            |m: &MultisigRedeemScriptType| { &m.pubkeys_order },
            |m: &mut MultisigRedeemScriptType| { &mut m.pubkeys_order },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MultisigRedeemScriptType>(
            "MultisigRedeemScriptType",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for MultisigRedeemScriptType {
    const NAME: &'static str = "MultisigRedeemScriptType";

    fn is_initialized(&self) -> bool {
        if self.m.is_none() {
            return false;
        }
        for v in &self.pubkeys {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.nodes {
            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.pubkeys.push(is.read_message()?);
                },
                18 => {
                    self.signatures.push(is.read_bytes()?);
                },
                24 => {
                    self.m = ::std::option::Option::Some(is.read_uint32()?);
                },
                34 => {
                    self.nodes.push(is.read_message()?);
                },
                42 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                40 => {
                    self.address_n.push(is.read_uint32()?);
                },
                48 => {
                    self.pubkeys_order = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                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;
        for value in &self.pubkeys {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        for value in &self.signatures {
            my_size += ::protobuf::rt::bytes_size(2, &value);
        };
        if let Some(v) = self.m {
            my_size += ::protobuf::rt::uint32_size(3, v);
        }
        for value in &self.nodes {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(5, *value);
        };
        if let Some(v) = self.pubkeys_order {
            my_size += ::protobuf::rt::int32_size(6, v.value());
        }
        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<()> {
        for v in &self.pubkeys {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        };
        for v in &self.signatures {
            os.write_bytes(2, &v)?;
        };
        if let Some(v) = self.m {
            os.write_uint32(3, v)?;
        }
        for v in &self.nodes {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        };
        for v in &self.address_n {
            os.write_uint32(5, *v)?;
        };
        if let Some(v) = self.pubkeys_order {
            os.write_enum(6, ::protobuf::EnumOrUnknown::value(&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() -> MultisigRedeemScriptType {
        MultisigRedeemScriptType::new()
    }

    fn clear(&mut self) {
        self.pubkeys.clear();
        self.signatures.clear();
        self.m = ::std::option::Option::None;
        self.nodes.clear();
        self.address_n.clear();
        self.pubkeys_order = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static MultisigRedeemScriptType {
        static instance: MultisigRedeemScriptType = MultisigRedeemScriptType {
            pubkeys: ::std::vec::Vec::new(),
            signatures: ::std::vec::Vec::new(),
            m: ::std::option::Option::None,
            nodes: ::std::vec::Vec::new(),
            address_n: ::std::vec::Vec::new(),
            pubkeys_order: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for MultisigRedeemScriptType {
    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("MultisigRedeemScriptType").unwrap()).clone()
    }
}

impl ::std::fmt::Display for MultisigRedeemScriptType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for MultisigRedeemScriptType {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `MultisigRedeemScriptType`
pub mod multisig_redeem_script_type {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.HDNodePathType)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct HDNodePathType {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.HDNodePathType.node)
        pub node: ::protobuf::MessageField<super::super::messages_common::HDNodeType>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.HDNodePathType.address_n)
        pub address_n: ::std::vec::Vec<u32>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.MultisigRedeemScriptType.HDNodePathType.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a HDNodePathType {
        fn default() -> &'a HDNodePathType {
            <HDNodePathType as ::protobuf::Message>::default_instance()
        }
    }

    impl HDNodePathType {
        pub fn new() -> HDNodePathType {
            ::std::default::Default::default()
        }

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(2);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::super::messages_common::HDNodeType>(
                "node",
                |m: &HDNodePathType| { &m.node },
                |m: &mut HDNodePathType| { &mut m.node },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                "address_n",
                |m: &HDNodePathType| { &m.address_n },
                |m: &mut HDNodePathType| { &mut m.address_n },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<HDNodePathType>(
                "MultisigRedeemScriptType.HDNodePathType",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for HDNodePathType {
        const NAME: &'static str = "HDNodePathType";

        fn is_initialized(&self) -> bool {
            if self.node.is_none() {
                return false;
            }
            for v in &self.node {
                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 => {
                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.node)?;
                    },
                    18 => {
                        is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                    },
                    16 => {
                        self.address_n.push(is.read_uint32()?);
                    },
                    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.node.as_ref() {
                let len = v.compute_size();
                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            }
            for value in &self.address_n {
                my_size += ::protobuf::rt::uint32_size(2, *value);
            };
            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.node.as_ref() {
                ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
            }
            for v in &self.address_n {
                os.write_uint32(2, *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() -> HDNodePathType {
            HDNodePathType::new()
        }

        fn clear(&mut self) {
            self.node.clear();
            self.address_n.clear();
            self.special_fields.clear();
        }

        fn default_instance() -> &'static HDNodePathType {
            static instance: HDNodePathType = HDNodePathType {
                node: ::protobuf::MessageField::none(),
                address_n: ::std::vec::Vec::new(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for HDNodePathType {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("MultisigRedeemScriptType.HDNodePathType").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for HDNodePathType {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for HDNodePathType {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.GetPublicKey)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetPublicKey {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetPublicKey.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetPublicKey.ecdsa_curve_name)
    pub ecdsa_curve_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetPublicKey.show_display)
    pub show_display: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetPublicKey.coin_name)
    pub coin_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetPublicKey.script_type)
    pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetPublicKey.ignore_xpub_magic)
    pub ignore_xpub_magic: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.GetPublicKey.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a GetPublicKey {
    fn default() -> &'a GetPublicKey {
        <GetPublicKey as ::protobuf::Message>::default_instance()
    }
}

impl GetPublicKey {
    pub fn new() -> GetPublicKey {
        ::std::default::Default::default()
    }

    // optional string ecdsa_curve_name = 2;

    pub fn ecdsa_curve_name(&self) -> &str {
        match self.ecdsa_curve_name.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_ecdsa_curve_name(&mut self) {
        self.ecdsa_curve_name = ::std::option::Option::None;
    }

    pub fn has_ecdsa_curve_name(&self) -> bool {
        self.ecdsa_curve_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ecdsa_curve_name(&mut self, v: ::std::string::String) {
        self.ecdsa_curve_name = ::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_ecdsa_curve_name(&mut self) -> &mut ::std::string::String {
        if self.ecdsa_curve_name.is_none() {
            self.ecdsa_curve_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.ecdsa_curve_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_ecdsa_curve_name(&mut self) -> ::std::string::String {
        self.ecdsa_curve_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional bool show_display = 3;

    pub fn show_display(&self) -> bool {
        self.show_display.unwrap_or(false)
    }

    pub fn clear_show_display(&mut self) {
        self.show_display = ::std::option::Option::None;
    }

    pub fn has_show_display(&self) -> bool {
        self.show_display.is_some()
    }

    // Param is passed by value, moved
    pub fn set_show_display(&mut self, v: bool) {
        self.show_display = ::std::option::Option::Some(v);
    }

    // optional string coin_name = 4;

    pub fn coin_name(&self) -> &str {
        match self.coin_name.as_ref() {
            Some(v) => v,
            None => "Bitcoin",
        }
    }

    pub fn clear_coin_name(&mut self) {
        self.coin_name = ::std::option::Option::None;
    }

    pub fn has_coin_name(&self) -> bool {
        self.coin_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coin_name(&mut self, v: ::std::string::String) {
        self.coin_name = ::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_coin_name(&mut self) -> &mut ::std::string::String {
        if self.coin_name.is_none() {
            self.coin_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coin_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_coin_name(&mut self) -> ::std::string::String {
        self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional .hw.trezor.messages.bitcoin.InputScriptType script_type = 5;

    pub fn script_type(&self) -> InputScriptType {
        match self.script_type {
            Some(e) => e.enum_value_or(InputScriptType::SPENDADDRESS),
            None => InputScriptType::SPENDADDRESS,
        }
    }

    pub fn clear_script_type(&mut self) {
        self.script_type = ::std::option::Option::None;
    }

    pub fn has_script_type(&self) -> bool {
        self.script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_type(&mut self, v: InputScriptType) {
        self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // optional bool ignore_xpub_magic = 6;

    pub fn ignore_xpub_magic(&self) -> bool {
        self.ignore_xpub_magic.unwrap_or(false)
    }

    pub fn clear_ignore_xpub_magic(&mut self) {
        self.ignore_xpub_magic = ::std::option::Option::None;
    }

    pub fn has_ignore_xpub_magic(&self) -> bool {
        self.ignore_xpub_magic.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ignore_xpub_magic(&mut self, v: bool) {
        self.ignore_xpub_magic = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(6);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &GetPublicKey| { &m.address_n },
            |m: &mut GetPublicKey| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "ecdsa_curve_name",
            |m: &GetPublicKey| { &m.ecdsa_curve_name },
            |m: &mut GetPublicKey| { &mut m.ecdsa_curve_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "show_display",
            |m: &GetPublicKey| { &m.show_display },
            |m: &mut GetPublicKey| { &mut m.show_display },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coin_name",
            |m: &GetPublicKey| { &m.coin_name },
            |m: &mut GetPublicKey| { &mut m.coin_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_type",
            |m: &GetPublicKey| { &m.script_type },
            |m: &mut GetPublicKey| { &mut m.script_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "ignore_xpub_magic",
            |m: &GetPublicKey| { &m.ignore_xpub_magic },
            |m: &mut GetPublicKey| { &mut m.ignore_xpub_magic },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GetPublicKey>(
            "GetPublicKey",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for GetPublicKey {
    const NAME: &'static str = "GetPublicKey";

    fn is_initialized(&self) -> bool {
        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 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.ecdsa_curve_name = ::std::option::Option::Some(is.read_string()?);
                },
                24 => {
                    self.show_display = ::std::option::Option::Some(is.read_bool()?);
                },
                34 => {
                    self.coin_name = ::std::option::Option::Some(is.read_string()?);
                },
                40 => {
                    self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                48 => {
                    self.ignore_xpub_magic = ::std::option::Option::Some(is.read_bool()?);
                },
                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;
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(1, *value);
        };
        if let Some(v) = self.ecdsa_curve_name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.show_display {
            my_size += 1 + 1;
        }
        if let Some(v) = self.coin_name.as_ref() {
            my_size += ::protobuf::rt::string_size(4, &v);
        }
        if let Some(v) = self.script_type {
            my_size += ::protobuf::rt::int32_size(5, v.value());
        }
        if let Some(v) = self.ignore_xpub_magic {
            my_size += 1 + 1;
        }
        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<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.ecdsa_curve_name.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.show_display {
            os.write_bool(3, v)?;
        }
        if let Some(v) = self.coin_name.as_ref() {
            os.write_string(4, v)?;
        }
        if let Some(v) = self.script_type {
            os.write_enum(5, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.ignore_xpub_magic {
            os.write_bool(6, 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() -> GetPublicKey {
        GetPublicKey::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.ecdsa_curve_name = ::std::option::Option::None;
        self.show_display = ::std::option::Option::None;
        self.coin_name = ::std::option::Option::None;
        self.script_type = ::std::option::Option::None;
        self.ignore_xpub_magic = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static GetPublicKey {
        static instance: GetPublicKey = GetPublicKey {
            address_n: ::std::vec::Vec::new(),
            ecdsa_curve_name: ::std::option::Option::None,
            show_display: ::std::option::Option::None,
            coin_name: ::std::option::Option::None,
            script_type: ::std::option::Option::None,
            ignore_xpub_magic: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for GetPublicKey {
    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("GetPublicKey").unwrap()).clone()
    }
}

impl ::std::fmt::Display for GetPublicKey {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for GetPublicKey {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.PublicKey)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PublicKey {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PublicKey.node)
    pub node: ::protobuf::MessageField<super::messages_common::HDNodeType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PublicKey.xpub)
    pub xpub: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PublicKey.root_fingerprint)
    pub root_fingerprint: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PublicKey.descriptor)
    pub descriptor: ::std::option::Option<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.PublicKey.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a PublicKey {
    fn default() -> &'a PublicKey {
        <PublicKey as ::protobuf::Message>::default_instance()
    }
}

impl PublicKey {
    pub fn new() -> PublicKey {
        ::std::default::Default::default()
    }

    // required string xpub = 2;

    pub fn xpub(&self) -> &str {
        match self.xpub.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_xpub(&mut self) {
        self.xpub = ::std::option::Option::None;
    }

    pub fn has_xpub(&self) -> bool {
        self.xpub.is_some()
    }

    // Param is passed by value, moved
    pub fn set_xpub(&mut self, v: ::std::string::String) {
        self.xpub = ::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_xpub(&mut self) -> &mut ::std::string::String {
        if self.xpub.is_none() {
            self.xpub = ::std::option::Option::Some(::std::string::String::new());
        }
        self.xpub.as_mut().unwrap()
    }

    // Take field
    pub fn take_xpub(&mut self) -> ::std::string::String {
        self.xpub.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional uint32 root_fingerprint = 3;

    pub fn root_fingerprint(&self) -> u32 {
        self.root_fingerprint.unwrap_or(0)
    }

    pub fn clear_root_fingerprint(&mut self) {
        self.root_fingerprint = ::std::option::Option::None;
    }

    pub fn has_root_fingerprint(&self) -> bool {
        self.root_fingerprint.is_some()
    }

    // Param is passed by value, moved
    pub fn set_root_fingerprint(&mut self, v: u32) {
        self.root_fingerprint = ::std::option::Option::Some(v);
    }

    // optional string descriptor = 4;

    pub fn descriptor(&self) -> &str {
        match self.descriptor.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_descriptor(&mut self) {
        self.descriptor = ::std::option::Option::None;
    }

    pub fn has_descriptor(&self) -> bool {
        self.descriptor.is_some()
    }

    // Param is passed by value, moved
    pub fn set_descriptor(&mut self, v: ::std::string::String) {
        self.descriptor = ::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_descriptor(&mut self) -> &mut ::std::string::String {
        if self.descriptor.is_none() {
            self.descriptor = ::std::option::Option::Some(::std::string::String::new());
        }
        self.descriptor.as_mut().unwrap()
    }

    // Take field
    pub fn take_descriptor(&mut self) -> ::std::string::String {
        self.descriptor.take().unwrap_or_else(|| ::std::string::String::new())
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(4);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_common::HDNodeType>(
            "node",
            |m: &PublicKey| { &m.node },
            |m: &mut PublicKey| { &mut m.node },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "xpub",
            |m: &PublicKey| { &m.xpub },
            |m: &mut PublicKey| { &mut m.xpub },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "root_fingerprint",
            |m: &PublicKey| { &m.root_fingerprint },
            |m: &mut PublicKey| { &mut m.root_fingerprint },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "descriptor",
            |m: &PublicKey| { &m.descriptor },
            |m: &mut PublicKey| { &mut m.descriptor },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PublicKey>(
            "PublicKey",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for PublicKey {
    const NAME: &'static str = "PublicKey";

    fn is_initialized(&self) -> bool {
        if self.node.is_none() {
            return false;
        }
        if self.xpub.is_none() {
            return false;
        }
        for v in &self.node {
            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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.node)?;
                },
                18 => {
                    self.xpub = ::std::option::Option::Some(is.read_string()?);
                },
                24 => {
                    self.root_fingerprint = ::std::option::Option::Some(is.read_uint32()?);
                },
                34 => {
                    self.descriptor = ::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.node.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.xpub.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.root_fingerprint {
            my_size += ::protobuf::rt::uint32_size(3, v);
        }
        if let Some(v) = self.descriptor.as_ref() {
            my_size += ::protobuf::rt::string_size(4, &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.node.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        }
        if let Some(v) = self.xpub.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.root_fingerprint {
            os.write_uint32(3, v)?;
        }
        if let Some(v) = self.descriptor.as_ref() {
            os.write_string(4, 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() -> PublicKey {
        PublicKey::new()
    }

    fn clear(&mut self) {
        self.node.clear();
        self.xpub = ::std::option::Option::None;
        self.root_fingerprint = ::std::option::Option::None;
        self.descriptor = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static PublicKey {
        static instance: PublicKey = PublicKey {
            node: ::protobuf::MessageField::none(),
            xpub: ::std::option::Option::None,
            root_fingerprint: ::std::option::Option::None,
            descriptor: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for PublicKey {
    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("PublicKey").unwrap()).clone()
    }
}

impl ::std::fmt::Display for PublicKey {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for PublicKey {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.GetAddress)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetAddress {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetAddress.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetAddress.coin_name)
    pub coin_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetAddress.show_display)
    pub show_display: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetAddress.multisig)
    pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetAddress.script_type)
    pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetAddress.ignore_xpub_magic)
    pub ignore_xpub_magic: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetAddress.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.GetAddress.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a GetAddress {
    fn default() -> &'a GetAddress {
        <GetAddress as ::protobuf::Message>::default_instance()
    }
}

impl GetAddress {
    pub fn new() -> GetAddress {
        ::std::default::Default::default()
    }

    // optional string coin_name = 2;

    pub fn coin_name(&self) -> &str {
        match self.coin_name.as_ref() {
            Some(v) => v,
            None => "Bitcoin",
        }
    }

    pub fn clear_coin_name(&mut self) {
        self.coin_name = ::std::option::Option::None;
    }

    pub fn has_coin_name(&self) -> bool {
        self.coin_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coin_name(&mut self, v: ::std::string::String) {
        self.coin_name = ::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_coin_name(&mut self) -> &mut ::std::string::String {
        if self.coin_name.is_none() {
            self.coin_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coin_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_coin_name(&mut self) -> ::std::string::String {
        self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional bool show_display = 3;

    pub fn show_display(&self) -> bool {
        self.show_display.unwrap_or(false)
    }

    pub fn clear_show_display(&mut self) {
        self.show_display = ::std::option::Option::None;
    }

    pub fn has_show_display(&self) -> bool {
        self.show_display.is_some()
    }

    // Param is passed by value, moved
    pub fn set_show_display(&mut self, v: bool) {
        self.show_display = ::std::option::Option::Some(v);
    }

    // optional .hw.trezor.messages.bitcoin.InputScriptType script_type = 5;

    pub fn script_type(&self) -> InputScriptType {
        match self.script_type {
            Some(e) => e.enum_value_or(InputScriptType::SPENDADDRESS),
            None => InputScriptType::SPENDADDRESS,
        }
    }

    pub fn clear_script_type(&mut self) {
        self.script_type = ::std::option::Option::None;
    }

    pub fn has_script_type(&self) -> bool {
        self.script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_type(&mut self, v: InputScriptType) {
        self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // optional bool ignore_xpub_magic = 6;

    pub fn ignore_xpub_magic(&self) -> bool {
        self.ignore_xpub_magic.unwrap_or(false)
    }

    pub fn clear_ignore_xpub_magic(&mut self) {
        self.ignore_xpub_magic = ::std::option::Option::None;
    }

    pub fn has_ignore_xpub_magic(&self) -> bool {
        self.ignore_xpub_magic.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ignore_xpub_magic(&mut self, v: bool) {
        self.ignore_xpub_magic = ::std::option::Option::Some(v);
    }

    // optional bool chunkify = 7;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

    pub fn clear_chunkify(&mut self) {
        self.chunkify = ::std::option::Option::None;
    }

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

    // Param is passed by value, moved
    pub fn set_chunkify(&mut self, v: bool) {
        self.chunkify = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(7);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &GetAddress| { &m.address_n },
            |m: &mut GetAddress| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coin_name",
            |m: &GetAddress| { &m.coin_name },
            |m: &mut GetAddress| { &mut m.coin_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "show_display",
            |m: &GetAddress| { &m.show_display },
            |m: &mut GetAddress| { &mut m.show_display },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MultisigRedeemScriptType>(
            "multisig",
            |m: &GetAddress| { &m.multisig },
            |m: &mut GetAddress| { &mut m.multisig },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_type",
            |m: &GetAddress| { &m.script_type },
            |m: &mut GetAddress| { &mut m.script_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "ignore_xpub_magic",
            |m: &GetAddress| { &m.ignore_xpub_magic },
            |m: &mut GetAddress| { &mut m.ignore_xpub_magic },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &GetAddress| { &m.chunkify },
            |m: &mut GetAddress| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GetAddress>(
            "GetAddress",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for GetAddress {
    const NAME: &'static str = "GetAddress";

    fn is_initialized(&self) -> bool {
        for v in &self.multisig {
            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 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.coin_name = ::std::option::Option::Some(is.read_string()?);
                },
                24 => {
                    self.show_display = ::std::option::Option::Some(is.read_bool()?);
                },
                34 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.multisig)?;
                },
                40 => {
                    self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                48 => {
                    self.ignore_xpub_magic = ::std::option::Option::Some(is.read_bool()?);
                },
                56 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                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;
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(1, *value);
        };
        if let Some(v) = self.coin_name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.show_display {
            my_size += 1 + 1;
        }
        if let Some(v) = self.multisig.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.script_type {
            my_size += ::protobuf::rt::int32_size(5, v.value());
        }
        if let Some(v) = self.ignore_xpub_magic {
            my_size += 1 + 1;
        }
        if let Some(v) = self.chunkify {
            my_size += 1 + 1;
        }
        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<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.coin_name.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.show_display {
            os.write_bool(3, v)?;
        }
        if let Some(v) = self.multisig.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        }
        if let Some(v) = self.script_type {
            os.write_enum(5, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.ignore_xpub_magic {
            os.write_bool(6, v)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(7, 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() -> GetAddress {
        GetAddress::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.coin_name = ::std::option::Option::None;
        self.show_display = ::std::option::Option::None;
        self.multisig.clear();
        self.script_type = ::std::option::Option::None;
        self.ignore_xpub_magic = ::std::option::Option::None;
        self.chunkify = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static GetAddress {
        static instance: GetAddress = GetAddress {
            address_n: ::std::vec::Vec::new(),
            coin_name: ::std::option::Option::None,
            show_display: ::std::option::Option::None,
            multisig: ::protobuf::MessageField::none(),
            script_type: ::std::option::Option::None,
            ignore_xpub_magic: ::std::option::Option::None,
            chunkify: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for GetAddress {
    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("GetAddress").unwrap()).clone()
    }
}

impl ::std::fmt::Display for GetAddress {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for GetAddress {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.Address)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Address {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.Address.address)
    pub address: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.Address.mac)
    pub mac: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.Address.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Address {
    fn default() -> &'a Address {
        <Address as ::protobuf::Message>::default_instance()
    }
}

impl Address {
    pub fn new() -> Address {
        ::std::default::Default::default()
    }

    // required string address = 1;

    pub fn address(&self) -> &str {
        match self.address.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_address(&mut self) {
        self.address = ::std::option::Option::None;
    }

    pub fn has_address(&self) -> bool {
        self.address.is_some()
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::string::String) {
        self.address = ::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_address(&mut self) -> &mut ::std::string::String {
        if self.address.is_none() {
            self.address = ::std::option::Option::Some(::std::string::String::new());
        }
        self.address.as_mut().unwrap()
    }

    // Take field
    pub fn take_address(&mut self) -> ::std::string::String {
        self.address.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional bytes mac = 2;

    pub fn mac(&self) -> &[u8] {
        match self.mac.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_mac(&mut self) {
        self.mac = ::std::option::Option::None;
    }

    pub fn has_mac(&self) -> bool {
        self.mac.is_some()
    }

    // Param is passed by value, moved
    pub fn set_mac(&mut self, v: ::std::vec::Vec<u8>) {
        self.mac = ::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_mac(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.mac.is_none() {
            self.mac = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.mac.as_mut().unwrap()
    }

    // Take field
    pub fn take_mac(&mut self) -> ::std::vec::Vec<u8> {
        self.mac.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "address",
            |m: &Address| { &m.address },
            |m: &mut Address| { &mut m.address },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "mac",
            |m: &Address| { &m.mac },
            |m: &mut Address| { &mut m.mac },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Address>(
            "Address",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Address {
    const NAME: &'static str = "Address";

    fn is_initialized(&self) -> bool {
        if self.address.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.address = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    self.mac = ::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.address.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.mac.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &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.address.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.mac.as_ref() {
            os.write_bytes(2, 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() -> Address {
        Address::new()
    }

    fn clear(&mut self) {
        self.address = ::std::option::Option::None;
        self.mac = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Address {
        static instance: Address = Address {
            address: ::std::option::Option::None,
            mac: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Address {
    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("Address").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Address {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Address {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.GetOwnershipId)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetOwnershipId {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipId.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipId.coin_name)
    pub coin_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipId.multisig)
    pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipId.script_type)
    pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.GetOwnershipId.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a GetOwnershipId {
    fn default() -> &'a GetOwnershipId {
        <GetOwnershipId as ::protobuf::Message>::default_instance()
    }
}

impl GetOwnershipId {
    pub fn new() -> GetOwnershipId {
        ::std::default::Default::default()
    }

    // optional string coin_name = 2;

    pub fn coin_name(&self) -> &str {
        match self.coin_name.as_ref() {
            Some(v) => v,
            None => "Bitcoin",
        }
    }

    pub fn clear_coin_name(&mut self) {
        self.coin_name = ::std::option::Option::None;
    }

    pub fn has_coin_name(&self) -> bool {
        self.coin_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coin_name(&mut self, v: ::std::string::String) {
        self.coin_name = ::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_coin_name(&mut self) -> &mut ::std::string::String {
        if self.coin_name.is_none() {
            self.coin_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coin_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_coin_name(&mut self) -> ::std::string::String {
        self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional .hw.trezor.messages.bitcoin.InputScriptType script_type = 4;

    pub fn script_type(&self) -> InputScriptType {
        match self.script_type {
            Some(e) => e.enum_value_or(InputScriptType::SPENDADDRESS),
            None => InputScriptType::SPENDADDRESS,
        }
    }

    pub fn clear_script_type(&mut self) {
        self.script_type = ::std::option::Option::None;
    }

    pub fn has_script_type(&self) -> bool {
        self.script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_type(&mut self, v: InputScriptType) {
        self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(4);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &GetOwnershipId| { &m.address_n },
            |m: &mut GetOwnershipId| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coin_name",
            |m: &GetOwnershipId| { &m.coin_name },
            |m: &mut GetOwnershipId| { &mut m.coin_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MultisigRedeemScriptType>(
            "multisig",
            |m: &GetOwnershipId| { &m.multisig },
            |m: &mut GetOwnershipId| { &mut m.multisig },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_type",
            |m: &GetOwnershipId| { &m.script_type },
            |m: &mut GetOwnershipId| { &mut m.script_type },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GetOwnershipId>(
            "GetOwnershipId",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for GetOwnershipId {
    const NAME: &'static str = "GetOwnershipId";

    fn is_initialized(&self) -> bool {
        for v in &self.multisig {
            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 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.coin_name = ::std::option::Option::Some(is.read_string()?);
                },
                26 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.multisig)?;
                },
                32 => {
                    self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                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;
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(1, *value);
        };
        if let Some(v) = self.coin_name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.multisig.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.script_type {
            my_size += ::protobuf::rt::int32_size(4, v.value());
        }
        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<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.coin_name.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.multisig.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
        }
        if let Some(v) = self.script_type {
            os.write_enum(4, ::protobuf::EnumOrUnknown::value(&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() -> GetOwnershipId {
        GetOwnershipId::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.coin_name = ::std::option::Option::None;
        self.multisig.clear();
        self.script_type = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static GetOwnershipId {
        static instance: GetOwnershipId = GetOwnershipId {
            address_n: ::std::vec::Vec::new(),
            coin_name: ::std::option::Option::None,
            multisig: ::protobuf::MessageField::none(),
            script_type: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for GetOwnershipId {
    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("GetOwnershipId").unwrap()).clone()
    }
}

impl ::std::fmt::Display for GetOwnershipId {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for GetOwnershipId {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.OwnershipId)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct OwnershipId {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.OwnershipId.ownership_id)
    pub ownership_id: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.OwnershipId.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a OwnershipId {
    fn default() -> &'a OwnershipId {
        <OwnershipId as ::protobuf::Message>::default_instance()
    }
}

impl OwnershipId {
    pub fn new() -> OwnershipId {
        ::std::default::Default::default()
    }

    // required bytes ownership_id = 1;

    pub fn ownership_id(&self) -> &[u8] {
        match self.ownership_id.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_ownership_id(&mut self) {
        self.ownership_id = ::std::option::Option::None;
    }

    pub fn has_ownership_id(&self) -> bool {
        self.ownership_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ownership_id(&mut self, v: ::std::vec::Vec<u8>) {
        self.ownership_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_ownership_id(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.ownership_id.is_none() {
            self.ownership_id = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.ownership_id.as_mut().unwrap()
    }

    // Take field
    pub fn take_ownership_id(&mut self) -> ::std::vec::Vec<u8> {
        self.ownership_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::<_, _>(
            "ownership_id",
            |m: &OwnershipId| { &m.ownership_id },
            |m: &mut OwnershipId| { &mut m.ownership_id },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<OwnershipId>(
            "OwnershipId",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for OwnershipId {
    const NAME: &'static str = "OwnershipId";

    fn is_initialized(&self) -> bool {
        if self.ownership_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.ownership_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.ownership_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.ownership_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() -> OwnershipId {
        OwnershipId::new()
    }

    fn clear(&mut self) {
        self.ownership_id = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static OwnershipId {
        static instance: OwnershipId = OwnershipId {
            ownership_id: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for OwnershipId {
    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("OwnershipId").unwrap()).clone()
    }
}

impl ::std::fmt::Display for OwnershipId {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for OwnershipId {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.SignMessage)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct SignMessage {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignMessage.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignMessage.message)
    pub message: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignMessage.coin_name)
    pub coin_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignMessage.script_type)
    pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignMessage.no_script_type)
    pub no_script_type: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignMessage.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.SignMessage.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a SignMessage {
    fn default() -> &'a SignMessage {
        <SignMessage as ::protobuf::Message>::default_instance()
    }
}

impl SignMessage {
    pub fn new() -> SignMessage {
        ::std::default::Default::default()
    }

    // required bytes message = 2;

    pub fn message(&self) -> &[u8] {
        match self.message.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_message(&mut self) {
        self.message = ::std::option::Option::None;
    }

    pub fn has_message(&self) -> bool {
        self.message.is_some()
    }

    // Param is passed by value, moved
    pub fn set_message(&mut self, v: ::std::vec::Vec<u8>) {
        self.message = ::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_message(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.message.is_none() {
            self.message = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.message.as_mut().unwrap()
    }

    // Take field
    pub fn take_message(&mut self) -> ::std::vec::Vec<u8> {
        self.message.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional string coin_name = 3;

    pub fn coin_name(&self) -> &str {
        match self.coin_name.as_ref() {
            Some(v) => v,
            None => "Bitcoin",
        }
    }

    pub fn clear_coin_name(&mut self) {
        self.coin_name = ::std::option::Option::None;
    }

    pub fn has_coin_name(&self) -> bool {
        self.coin_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coin_name(&mut self, v: ::std::string::String) {
        self.coin_name = ::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_coin_name(&mut self) -> &mut ::std::string::String {
        if self.coin_name.is_none() {
            self.coin_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coin_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_coin_name(&mut self) -> ::std::string::String {
        self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional .hw.trezor.messages.bitcoin.InputScriptType script_type = 4;

    pub fn script_type(&self) -> InputScriptType {
        match self.script_type {
            Some(e) => e.enum_value_or(InputScriptType::SPENDADDRESS),
            None => InputScriptType::SPENDADDRESS,
        }
    }

    pub fn clear_script_type(&mut self) {
        self.script_type = ::std::option::Option::None;
    }

    pub fn has_script_type(&self) -> bool {
        self.script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_type(&mut self, v: InputScriptType) {
        self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // optional bool no_script_type = 5;

    pub fn no_script_type(&self) -> bool {
        self.no_script_type.unwrap_or(false)
    }

    pub fn clear_no_script_type(&mut self) {
        self.no_script_type = ::std::option::Option::None;
    }

    pub fn has_no_script_type(&self) -> bool {
        self.no_script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_no_script_type(&mut self, v: bool) {
        self.no_script_type = ::std::option::Option::Some(v);
    }

    // optional bool chunkify = 6;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

    pub fn clear_chunkify(&mut self) {
        self.chunkify = ::std::option::Option::None;
    }

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

    // Param is passed by value, moved
    pub fn set_chunkify(&mut self, v: bool) {
        self.chunkify = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(6);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &SignMessage| { &m.address_n },
            |m: &mut SignMessage| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "message",
            |m: &SignMessage| { &m.message },
            |m: &mut SignMessage| { &mut m.message },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coin_name",
            |m: &SignMessage| { &m.coin_name },
            |m: &mut SignMessage| { &mut m.coin_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_type",
            |m: &SignMessage| { &m.script_type },
            |m: &mut SignMessage| { &mut m.script_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "no_script_type",
            |m: &SignMessage| { &m.no_script_type },
            |m: &mut SignMessage| { &mut m.no_script_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &SignMessage| { &m.chunkify },
            |m: &mut SignMessage| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SignMessage>(
            "SignMessage",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for SignMessage {
    const NAME: &'static str = "SignMessage";

    fn is_initialized(&self) -> bool {
        if self.message.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 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.message = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    self.coin_name = ::std::option::Option::Some(is.read_string()?);
                },
                32 => {
                    self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                40 => {
                    self.no_script_type = ::std::option::Option::Some(is.read_bool()?);
                },
                48 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                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;
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(1, *value);
        };
        if let Some(v) = self.message.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.coin_name.as_ref() {
            my_size += ::protobuf::rt::string_size(3, &v);
        }
        if let Some(v) = self.script_type {
            my_size += ::protobuf::rt::int32_size(4, v.value());
        }
        if let Some(v) = self.no_script_type {
            my_size += 1 + 1;
        }
        if let Some(v) = self.chunkify {
            my_size += 1 + 1;
        }
        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<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.message.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.coin_name.as_ref() {
            os.write_string(3, v)?;
        }
        if let Some(v) = self.script_type {
            os.write_enum(4, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.no_script_type {
            os.write_bool(5, v)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(6, 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() -> SignMessage {
        SignMessage::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.message = ::std::option::Option::None;
        self.coin_name = ::std::option::Option::None;
        self.script_type = ::std::option::Option::None;
        self.no_script_type = ::std::option::Option::None;
        self.chunkify = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static SignMessage {
        static instance: SignMessage = SignMessage {
            address_n: ::std::vec::Vec::new(),
            message: ::std::option::Option::None,
            coin_name: ::std::option::Option::None,
            script_type: ::std::option::Option::None,
            no_script_type: ::std::option::Option::None,
            chunkify: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for SignMessage {
    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("SignMessage").unwrap()).clone()
    }
}

impl ::std::fmt::Display for SignMessage {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for SignMessage {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.MessageSignature)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct MessageSignature {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MessageSignature.address)
    pub address: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.MessageSignature.signature)
    pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.MessageSignature.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a MessageSignature {
    fn default() -> &'a MessageSignature {
        <MessageSignature as ::protobuf::Message>::default_instance()
    }
}

impl MessageSignature {
    pub fn new() -> MessageSignature {
        ::std::default::Default::default()
    }

    // required string address = 1;

    pub fn address(&self) -> &str {
        match self.address.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_address(&mut self) {
        self.address = ::std::option::Option::None;
    }

    pub fn has_address(&self) -> bool {
        self.address.is_some()
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::string::String) {
        self.address = ::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_address(&mut self) -> &mut ::std::string::String {
        if self.address.is_none() {
            self.address = ::std::option::Option::Some(::std::string::String::new());
        }
        self.address.as_mut().unwrap()
    }

    // Take field
    pub fn take_address(&mut self) -> ::std::string::String {
        self.address.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // required bytes signature = 2;

    pub fn signature(&self) -> &[u8] {
        match self.signature.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_signature(&mut self) {
        self.signature = ::std::option::Option::None;
    }

    pub fn has_signature(&self) -> bool {
        self.signature.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
        self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.signature.is_none() {
            self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.signature.as_mut().unwrap()
    }

    // Take field
    pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
        self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "address",
            |m: &MessageSignature| { &m.address },
            |m: &mut MessageSignature| { &mut m.address },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "signature",
            |m: &MessageSignature| { &m.signature },
            |m: &mut MessageSignature| { &mut m.signature },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MessageSignature>(
            "MessageSignature",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for MessageSignature {
    const NAME: &'static str = "MessageSignature";

    fn is_initialized(&self) -> bool {
        if self.address.is_none() {
            return false;
        }
        if self.signature.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.address = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    self.signature = ::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.address.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.signature.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &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.address.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.signature.as_ref() {
            os.write_bytes(2, 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() -> MessageSignature {
        MessageSignature::new()
    }

    fn clear(&mut self) {
        self.address = ::std::option::Option::None;
        self.signature = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static MessageSignature {
        static instance: MessageSignature = MessageSignature {
            address: ::std::option::Option::None,
            signature: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for MessageSignature {
    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("MessageSignature").unwrap()).clone()
    }
}

impl ::std::fmt::Display for MessageSignature {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for MessageSignature {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.VerifyMessage)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct VerifyMessage {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.VerifyMessage.address)
    pub address: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.VerifyMessage.signature)
    pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.VerifyMessage.message)
    pub message: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.VerifyMessage.coin_name)
    pub coin_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.VerifyMessage.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.VerifyMessage.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a VerifyMessage {
    fn default() -> &'a VerifyMessage {
        <VerifyMessage as ::protobuf::Message>::default_instance()
    }
}

impl VerifyMessage {
    pub fn new() -> VerifyMessage {
        ::std::default::Default::default()
    }

    // required string address = 1;

    pub fn address(&self) -> &str {
        match self.address.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_address(&mut self) {
        self.address = ::std::option::Option::None;
    }

    pub fn has_address(&self) -> bool {
        self.address.is_some()
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::string::String) {
        self.address = ::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_address(&mut self) -> &mut ::std::string::String {
        if self.address.is_none() {
            self.address = ::std::option::Option::Some(::std::string::String::new());
        }
        self.address.as_mut().unwrap()
    }

    // Take field
    pub fn take_address(&mut self) -> ::std::string::String {
        self.address.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // required bytes signature = 2;

    pub fn signature(&self) -> &[u8] {
        match self.signature.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_signature(&mut self) {
        self.signature = ::std::option::Option::None;
    }

    pub fn has_signature(&self) -> bool {
        self.signature.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
        self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.signature.is_none() {
            self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.signature.as_mut().unwrap()
    }

    // Take field
    pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
        self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // required bytes message = 3;

    pub fn message(&self) -> &[u8] {
        match self.message.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_message(&mut self) {
        self.message = ::std::option::Option::None;
    }

    pub fn has_message(&self) -> bool {
        self.message.is_some()
    }

    // Param is passed by value, moved
    pub fn set_message(&mut self, v: ::std::vec::Vec<u8>) {
        self.message = ::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_message(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.message.is_none() {
            self.message = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.message.as_mut().unwrap()
    }

    // Take field
    pub fn take_message(&mut self) -> ::std::vec::Vec<u8> {
        self.message.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional string coin_name = 4;

    pub fn coin_name(&self) -> &str {
        match self.coin_name.as_ref() {
            Some(v) => v,
            None => "Bitcoin",
        }
    }

    pub fn clear_coin_name(&mut self) {
        self.coin_name = ::std::option::Option::None;
    }

    pub fn has_coin_name(&self) -> bool {
        self.coin_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coin_name(&mut self, v: ::std::string::String) {
        self.coin_name = ::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_coin_name(&mut self) -> &mut ::std::string::String {
        if self.coin_name.is_none() {
            self.coin_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coin_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_coin_name(&mut self) -> ::std::string::String {
        self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional bool chunkify = 5;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

    pub fn clear_chunkify(&mut self) {
        self.chunkify = ::std::option::Option::None;
    }

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

    // Param is passed by value, moved
    pub fn set_chunkify(&mut self, v: bool) {
        self.chunkify = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(5);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "address",
            |m: &VerifyMessage| { &m.address },
            |m: &mut VerifyMessage| { &mut m.address },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "signature",
            |m: &VerifyMessage| { &m.signature },
            |m: &mut VerifyMessage| { &mut m.signature },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "message",
            |m: &VerifyMessage| { &m.message },
            |m: &mut VerifyMessage| { &mut m.message },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coin_name",
            |m: &VerifyMessage| { &m.coin_name },
            |m: &mut VerifyMessage| { &mut m.coin_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &VerifyMessage| { &m.chunkify },
            |m: &mut VerifyMessage| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<VerifyMessage>(
            "VerifyMessage",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for VerifyMessage {
    const NAME: &'static str = "VerifyMessage";

    fn is_initialized(&self) -> bool {
        if self.address.is_none() {
            return false;
        }
        if self.signature.is_none() {
            return false;
        }
        if self.message.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.address = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    self.signature = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    self.message = ::std::option::Option::Some(is.read_bytes()?);
                },
                34 => {
                    self.coin_name = ::std::option::Option::Some(is.read_string()?);
                },
                40 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                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.address.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.signature.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.message.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        if let Some(v) = self.coin_name.as_ref() {
            my_size += ::protobuf::rt::string_size(4, &v);
        }
        if let Some(v) = self.chunkify {
            my_size += 1 + 1;
        }
        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.address.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.signature.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.message.as_ref() {
            os.write_bytes(3, v)?;
        }
        if let Some(v) = self.coin_name.as_ref() {
            os.write_string(4, v)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(5, 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() -> VerifyMessage {
        VerifyMessage::new()
    }

    fn clear(&mut self) {
        self.address = ::std::option::Option::None;
        self.signature = ::std::option::Option::None;
        self.message = ::std::option::Option::None;
        self.coin_name = ::std::option::Option::None;
        self.chunkify = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static VerifyMessage {
        static instance: VerifyMessage = VerifyMessage {
            address: ::std::option::Option::None,
            signature: ::std::option::Option::None,
            message: ::std::option::Option::None,
            coin_name: ::std::option::Option::None,
            chunkify: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for VerifyMessage {
    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("VerifyMessage").unwrap()).clone()
    }
}

impl ::std::fmt::Display for VerifyMessage {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for VerifyMessage {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.SignTx)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct SignTx {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.outputs_count)
    pub outputs_count: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.inputs_count)
    pub inputs_count: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.coin_name)
    pub coin_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.version)
    pub version: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.lock_time)
    pub lock_time: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.expiry)
    pub expiry: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.overwintered)
    pub overwintered: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.version_group_id)
    pub version_group_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.timestamp)
    pub timestamp: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.branch_id)
    pub branch_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.amount_unit)
    pub amount_unit: ::std::option::Option<::protobuf::EnumOrUnknown<AmountUnit>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.decred_staking_ticket)
    pub decred_staking_ticket: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.serialize)
    pub serialize: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.coinjoin_request)
    pub coinjoin_request: ::protobuf::MessageField<sign_tx::CoinJoinRequest>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.SignTx.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a SignTx {
    fn default() -> &'a SignTx {
        <SignTx as ::protobuf::Message>::default_instance()
    }
}

impl SignTx {
    pub fn new() -> SignTx {
        ::std::default::Default::default()
    }

    // required uint32 outputs_count = 1;

    pub fn outputs_count(&self) -> u32 {
        self.outputs_count.unwrap_or(0)
    }

    pub fn clear_outputs_count(&mut self) {
        self.outputs_count = ::std::option::Option::None;
    }

    pub fn has_outputs_count(&self) -> bool {
        self.outputs_count.is_some()
    }

    // Param is passed by value, moved
    pub fn set_outputs_count(&mut self, v: u32) {
        self.outputs_count = ::std::option::Option::Some(v);
    }

    // required uint32 inputs_count = 2;

    pub fn inputs_count(&self) -> u32 {
        self.inputs_count.unwrap_or(0)
    }

    pub fn clear_inputs_count(&mut self) {
        self.inputs_count = ::std::option::Option::None;
    }

    pub fn has_inputs_count(&self) -> bool {
        self.inputs_count.is_some()
    }

    // Param is passed by value, moved
    pub fn set_inputs_count(&mut self, v: u32) {
        self.inputs_count = ::std::option::Option::Some(v);
    }

    // optional string coin_name = 3;

    pub fn coin_name(&self) -> &str {
        match self.coin_name.as_ref() {
            Some(v) => v,
            None => "Bitcoin",
        }
    }

    pub fn clear_coin_name(&mut self) {
        self.coin_name = ::std::option::Option::None;
    }

    pub fn has_coin_name(&self) -> bool {
        self.coin_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coin_name(&mut self, v: ::std::string::String) {
        self.coin_name = ::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_coin_name(&mut self) -> &mut ::std::string::String {
        if self.coin_name.is_none() {
            self.coin_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coin_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_coin_name(&mut self) -> ::std::string::String {
        self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional uint32 version = 4;

    pub fn version(&self) -> u32 {
        self.version.unwrap_or(1u32)
    }

    pub fn clear_version(&mut self) {
        self.version = ::std::option::Option::None;
    }

    pub fn has_version(&self) -> bool {
        self.version.is_some()
    }

    // Param is passed by value, moved
    pub fn set_version(&mut self, v: u32) {
        self.version = ::std::option::Option::Some(v);
    }

    // optional uint32 lock_time = 5;

    pub fn lock_time(&self) -> u32 {
        self.lock_time.unwrap_or(0u32)
    }

    pub fn clear_lock_time(&mut self) {
        self.lock_time = ::std::option::Option::None;
    }

    pub fn has_lock_time(&self) -> bool {
        self.lock_time.is_some()
    }

    // Param is passed by value, moved
    pub fn set_lock_time(&mut self, v: u32) {
        self.lock_time = ::std::option::Option::Some(v);
    }

    // optional uint32 expiry = 6;

    pub fn expiry(&self) -> u32 {
        self.expiry.unwrap_or(0)
    }

    pub fn clear_expiry(&mut self) {
        self.expiry = ::std::option::Option::None;
    }

    pub fn has_expiry(&self) -> bool {
        self.expiry.is_some()
    }

    // Param is passed by value, moved
    pub fn set_expiry(&mut self, v: u32) {
        self.expiry = ::std::option::Option::Some(v);
    }

    // optional bool overwintered = 7;

    pub fn overwintered(&self) -> bool {
        self.overwintered.unwrap_or(false)
    }

    pub fn clear_overwintered(&mut self) {
        self.overwintered = ::std::option::Option::None;
    }

    pub fn has_overwintered(&self) -> bool {
        self.overwintered.is_some()
    }

    // Param is passed by value, moved
    pub fn set_overwintered(&mut self, v: bool) {
        self.overwintered = ::std::option::Option::Some(v);
    }

    // optional uint32 version_group_id = 8;

    pub fn version_group_id(&self) -> u32 {
        self.version_group_id.unwrap_or(0)
    }

    pub fn clear_version_group_id(&mut self) {
        self.version_group_id = ::std::option::Option::None;
    }

    pub fn has_version_group_id(&self) -> bool {
        self.version_group_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_version_group_id(&mut self, v: u32) {
        self.version_group_id = ::std::option::Option::Some(v);
    }

    // optional uint32 timestamp = 9;

    pub fn timestamp(&self) -> u32 {
        self.timestamp.unwrap_or(0)
    }

    pub fn clear_timestamp(&mut self) {
        self.timestamp = ::std::option::Option::None;
    }

    pub fn has_timestamp(&self) -> bool {
        self.timestamp.is_some()
    }

    // Param is passed by value, moved
    pub fn set_timestamp(&mut self, v: u32) {
        self.timestamp = ::std::option::Option::Some(v);
    }

    // optional uint32 branch_id = 10;

    pub fn branch_id(&self) -> u32 {
        self.branch_id.unwrap_or(0)
    }

    pub fn clear_branch_id(&mut self) {
        self.branch_id = ::std::option::Option::None;
    }

    pub fn has_branch_id(&self) -> bool {
        self.branch_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_branch_id(&mut self, v: u32) {
        self.branch_id = ::std::option::Option::Some(v);
    }

    // optional .hw.trezor.messages.bitcoin.AmountUnit amount_unit = 11;

    pub fn amount_unit(&self) -> AmountUnit {
        match self.amount_unit {
            Some(e) => e.enum_value_or(AmountUnit::BITCOIN),
            None => AmountUnit::BITCOIN,
        }
    }

    pub fn clear_amount_unit(&mut self) {
        self.amount_unit = ::std::option::Option::None;
    }

    pub fn has_amount_unit(&self) -> bool {
        self.amount_unit.is_some()
    }

    // Param is passed by value, moved
    pub fn set_amount_unit(&mut self, v: AmountUnit) {
        self.amount_unit = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // optional bool decred_staking_ticket = 12;

    pub fn decred_staking_ticket(&self) -> bool {
        self.decred_staking_ticket.unwrap_or(false)
    }

    pub fn clear_decred_staking_ticket(&mut self) {
        self.decred_staking_ticket = ::std::option::Option::None;
    }

    pub fn has_decred_staking_ticket(&self) -> bool {
        self.decred_staking_ticket.is_some()
    }

    // Param is passed by value, moved
    pub fn set_decred_staking_ticket(&mut self, v: bool) {
        self.decred_staking_ticket = ::std::option::Option::Some(v);
    }

    // optional bool serialize = 13;

    pub fn serialize(&self) -> bool {
        self.serialize.unwrap_or(true)
    }

    pub fn clear_serialize(&mut self) {
        self.serialize = ::std::option::Option::None;
    }

    pub fn has_serialize(&self) -> bool {
        self.serialize.is_some()
    }

    // Param is passed by value, moved
    pub fn set_serialize(&mut self, v: bool) {
        self.serialize = ::std::option::Option::Some(v);
    }

    // optional bool chunkify = 15;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

    pub fn clear_chunkify(&mut self) {
        self.chunkify = ::std::option::Option::None;
    }

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

    // Param is passed by value, moved
    pub fn set_chunkify(&mut self, v: bool) {
        self.chunkify = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(15);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "outputs_count",
            |m: &SignTx| { &m.outputs_count },
            |m: &mut SignTx| { &mut m.outputs_count },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "inputs_count",
            |m: &SignTx| { &m.inputs_count },
            |m: &mut SignTx| { &mut m.inputs_count },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coin_name",
            |m: &SignTx| { &m.coin_name },
            |m: &mut SignTx| { &mut m.coin_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "version",
            |m: &SignTx| { &m.version },
            |m: &mut SignTx| { &mut m.version },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "lock_time",
            |m: &SignTx| { &m.lock_time },
            |m: &mut SignTx| { &mut m.lock_time },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "expiry",
            |m: &SignTx| { &m.expiry },
            |m: &mut SignTx| { &mut m.expiry },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "overwintered",
            |m: &SignTx| { &m.overwintered },
            |m: &mut SignTx| { &mut m.overwintered },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "version_group_id",
            |m: &SignTx| { &m.version_group_id },
            |m: &mut SignTx| { &mut m.version_group_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "timestamp",
            |m: &SignTx| { &m.timestamp },
            |m: &mut SignTx| { &mut m.timestamp },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "branch_id",
            |m: &SignTx| { &m.branch_id },
            |m: &mut SignTx| { &mut m.branch_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "amount_unit",
            |m: &SignTx| { &m.amount_unit },
            |m: &mut SignTx| { &mut m.amount_unit },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "decred_staking_ticket",
            |m: &SignTx| { &m.decred_staking_ticket },
            |m: &mut SignTx| { &mut m.decred_staking_ticket },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "serialize",
            |m: &SignTx| { &m.serialize },
            |m: &mut SignTx| { &mut m.serialize },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, sign_tx::CoinJoinRequest>(
            "coinjoin_request",
            |m: &SignTx| { &m.coinjoin_request },
            |m: &mut SignTx| { &mut m.coinjoin_request },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &SignTx| { &m.chunkify },
            |m: &mut SignTx| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SignTx>(
            "SignTx",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for SignTx {
    const NAME: &'static str = "SignTx";

    fn is_initialized(&self) -> bool {
        if self.outputs_count.is_none() {
            return false;
        }
        if self.inputs_count.is_none() {
            return false;
        }
        for v in &self.coinjoin_request {
            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 {
                8 => {
                    self.outputs_count = ::std::option::Option::Some(is.read_uint32()?);
                },
                16 => {
                    self.inputs_count = ::std::option::Option::Some(is.read_uint32()?);
                },
                26 => {
                    self.coin_name = ::std::option::Option::Some(is.read_string()?);
                },
                32 => {
                    self.version = ::std::option::Option::Some(is.read_uint32()?);
                },
                40 => {
                    self.lock_time = ::std::option::Option::Some(is.read_uint32()?);
                },
                48 => {
                    self.expiry = ::std::option::Option::Some(is.read_uint32()?);
                },
                56 => {
                    self.overwintered = ::std::option::Option::Some(is.read_bool()?);
                },
                64 => {
                    self.version_group_id = ::std::option::Option::Some(is.read_uint32()?);
                },
                72 => {
                    self.timestamp = ::std::option::Option::Some(is.read_uint32()?);
                },
                80 => {
                    self.branch_id = ::std::option::Option::Some(is.read_uint32()?);
                },
                88 => {
                    self.amount_unit = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                96 => {
                    self.decred_staking_ticket = ::std::option::Option::Some(is.read_bool()?);
                },
                104 => {
                    self.serialize = ::std::option::Option::Some(is.read_bool()?);
                },
                114 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.coinjoin_request)?;
                },
                120 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                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.outputs_count {
            my_size += ::protobuf::rt::uint32_size(1, v);
        }
        if let Some(v) = self.inputs_count {
            my_size += ::protobuf::rt::uint32_size(2, v);
        }
        if let Some(v) = self.coin_name.as_ref() {
            my_size += ::protobuf::rt::string_size(3, &v);
        }
        if let Some(v) = self.version {
            my_size += ::protobuf::rt::uint32_size(4, v);
        }
        if let Some(v) = self.lock_time {
            my_size += ::protobuf::rt::uint32_size(5, v);
        }
        if let Some(v) = self.expiry {
            my_size += ::protobuf::rt::uint32_size(6, v);
        }
        if let Some(v) = self.overwintered {
            my_size += 1 + 1;
        }
        if let Some(v) = self.version_group_id {
            my_size += ::protobuf::rt::uint32_size(8, v);
        }
        if let Some(v) = self.timestamp {
            my_size += ::protobuf::rt::uint32_size(9, v);
        }
        if let Some(v) = self.branch_id {
            my_size += ::protobuf::rt::uint32_size(10, v);
        }
        if let Some(v) = self.amount_unit {
            my_size += ::protobuf::rt::int32_size(11, v.value());
        }
        if let Some(v) = self.decred_staking_ticket {
            my_size += 1 + 1;
        }
        if let Some(v) = self.serialize {
            my_size += 1 + 1;
        }
        if let Some(v) = self.coinjoin_request.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.chunkify {
            my_size += 1 + 1;
        }
        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.outputs_count {
            os.write_uint32(1, v)?;
        }
        if let Some(v) = self.inputs_count {
            os.write_uint32(2, v)?;
        }
        if let Some(v) = self.coin_name.as_ref() {
            os.write_string(3, v)?;
        }
        if let Some(v) = self.version {
            os.write_uint32(4, v)?;
        }
        if let Some(v) = self.lock_time {
            os.write_uint32(5, v)?;
        }
        if let Some(v) = self.expiry {
            os.write_uint32(6, v)?;
        }
        if let Some(v) = self.overwintered {
            os.write_bool(7, v)?;
        }
        if let Some(v) = self.version_group_id {
            os.write_uint32(8, v)?;
        }
        if let Some(v) = self.timestamp {
            os.write_uint32(9, v)?;
        }
        if let Some(v) = self.branch_id {
            os.write_uint32(10, v)?;
        }
        if let Some(v) = self.amount_unit {
            os.write_enum(11, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.decred_staking_ticket {
            os.write_bool(12, v)?;
        }
        if let Some(v) = self.serialize {
            os.write_bool(13, v)?;
        }
        if let Some(v) = self.coinjoin_request.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(15, 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() -> SignTx {
        SignTx::new()
    }

    fn clear(&mut self) {
        self.outputs_count = ::std::option::Option::None;
        self.inputs_count = ::std::option::Option::None;
        self.coin_name = ::std::option::Option::None;
        self.version = ::std::option::Option::None;
        self.lock_time = ::std::option::Option::None;
        self.expiry = ::std::option::Option::None;
        self.overwintered = ::std::option::Option::None;
        self.version_group_id = ::std::option::Option::None;
        self.timestamp = ::std::option::Option::None;
        self.branch_id = ::std::option::Option::None;
        self.amount_unit = ::std::option::Option::None;
        self.decred_staking_ticket = ::std::option::Option::None;
        self.serialize = ::std::option::Option::None;
        self.coinjoin_request.clear();
        self.chunkify = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static SignTx {
        static instance: SignTx = SignTx {
            outputs_count: ::std::option::Option::None,
            inputs_count: ::std::option::Option::None,
            coin_name: ::std::option::Option::None,
            version: ::std::option::Option::None,
            lock_time: ::std::option::Option::None,
            expiry: ::std::option::Option::None,
            overwintered: ::std::option::Option::None,
            version_group_id: ::std::option::Option::None,
            timestamp: ::std::option::Option::None,
            branch_id: ::std::option::Option::None,
            amount_unit: ::std::option::Option::None,
            decred_staking_ticket: ::std::option::Option::None,
            serialize: ::std::option::Option::None,
            coinjoin_request: ::protobuf::MessageField::none(),
            chunkify: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for SignTx {
    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("SignTx").unwrap()).clone()
    }
}

impl ::std::fmt::Display for SignTx {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for SignTx {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `SignTx`
pub mod sign_tx {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.SignTx.CoinJoinRequest)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct CoinJoinRequest {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.CoinJoinRequest.fee_rate)
        pub fee_rate: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.CoinJoinRequest.no_fee_threshold)
        pub no_fee_threshold: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.CoinJoinRequest.min_registrable_amount)
        pub min_registrable_amount: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.CoinJoinRequest.mask_public_key)
        pub mask_public_key: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.SignTx.CoinJoinRequest.signature)
        pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.SignTx.CoinJoinRequest.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a CoinJoinRequest {
        fn default() -> &'a CoinJoinRequest {
            <CoinJoinRequest as ::protobuf::Message>::default_instance()
        }
    }

    impl CoinJoinRequest {
        pub fn new() -> CoinJoinRequest {
            ::std::default::Default::default()
        }

        // required uint32 fee_rate = 1;

        pub fn fee_rate(&self) -> u32 {
            self.fee_rate.unwrap_or(0)
        }

        pub fn clear_fee_rate(&mut self) {
            self.fee_rate = ::std::option::Option::None;
        }

        pub fn has_fee_rate(&self) -> bool {
            self.fee_rate.is_some()
        }

        // Param is passed by value, moved
        pub fn set_fee_rate(&mut self, v: u32) {
            self.fee_rate = ::std::option::Option::Some(v);
        }

        // required uint64 no_fee_threshold = 2;

        pub fn no_fee_threshold(&self) -> u64 {
            self.no_fee_threshold.unwrap_or(0)
        }

        pub fn clear_no_fee_threshold(&mut self) {
            self.no_fee_threshold = ::std::option::Option::None;
        }

        pub fn has_no_fee_threshold(&self) -> bool {
            self.no_fee_threshold.is_some()
        }

        // Param is passed by value, moved
        pub fn set_no_fee_threshold(&mut self, v: u64) {
            self.no_fee_threshold = ::std::option::Option::Some(v);
        }

        // required uint64 min_registrable_amount = 3;

        pub fn min_registrable_amount(&self) -> u64 {
            self.min_registrable_amount.unwrap_or(0)
        }

        pub fn clear_min_registrable_amount(&mut self) {
            self.min_registrable_amount = ::std::option::Option::None;
        }

        pub fn has_min_registrable_amount(&self) -> bool {
            self.min_registrable_amount.is_some()
        }

        // Param is passed by value, moved
        pub fn set_min_registrable_amount(&mut self, v: u64) {
            self.min_registrable_amount = ::std::option::Option::Some(v);
        }

        // optional bytes mask_public_key = 4;

        pub fn mask_public_key(&self) -> &[u8] {
            match self.mask_public_key.as_ref() {
                Some(v) => v,
                None => &[],
            }
        }

        pub fn clear_mask_public_key(&mut self) {
            self.mask_public_key = ::std::option::Option::None;
        }

        pub fn has_mask_public_key(&self) -> bool {
            self.mask_public_key.is_some()
        }

        // Param is passed by value, moved
        pub fn set_mask_public_key(&mut self, v: ::std::vec::Vec<u8>) {
            self.mask_public_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_mask_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
            if self.mask_public_key.is_none() {
                self.mask_public_key = ::std::option::Option::Some(::std::vec::Vec::new());
            }
            self.mask_public_key.as_mut().unwrap()
        }

        // Take field
        pub fn take_mask_public_key(&mut self) -> ::std::vec::Vec<u8> {
            self.mask_public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
        }

        // optional bytes signature = 5;

        pub fn signature(&self) -> &[u8] {
            match self.signature.as_ref() {
                Some(v) => v,
                None => &[],
            }
        }

        pub fn clear_signature(&mut self) {
            self.signature = ::std::option::Option::None;
        }

        pub fn has_signature(&self) -> bool {
            self.signature.is_some()
        }

        // Param is passed by value, moved
        pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
            self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
            if self.signature.is_none() {
                self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
            }
            self.signature.as_mut().unwrap()
        }

        // Take field
        pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
            self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
        }

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(5);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "fee_rate",
                |m: &CoinJoinRequest| { &m.fee_rate },
                |m: &mut CoinJoinRequest| { &mut m.fee_rate },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "no_fee_threshold",
                |m: &CoinJoinRequest| { &m.no_fee_threshold },
                |m: &mut CoinJoinRequest| { &mut m.no_fee_threshold },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "min_registrable_amount",
                |m: &CoinJoinRequest| { &m.min_registrable_amount },
                |m: &mut CoinJoinRequest| { &mut m.min_registrable_amount },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "mask_public_key",
                |m: &CoinJoinRequest| { &m.mask_public_key },
                |m: &mut CoinJoinRequest| { &mut m.mask_public_key },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "signature",
                |m: &CoinJoinRequest| { &m.signature },
                |m: &mut CoinJoinRequest| { &mut m.signature },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CoinJoinRequest>(
                "SignTx.CoinJoinRequest",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for CoinJoinRequest {
        const NAME: &'static str = "CoinJoinRequest";

        fn is_initialized(&self) -> bool {
            if self.fee_rate.is_none() {
                return false;
            }
            if self.no_fee_threshold.is_none() {
                return false;
            }
            if self.min_registrable_amount.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 {
                    8 => {
                        self.fee_rate = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    16 => {
                        self.no_fee_threshold = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    24 => {
                        self.min_registrable_amount = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    34 => {
                        self.mask_public_key = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    42 => {
                        self.signature = ::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.fee_rate {
                my_size += ::protobuf::rt::uint32_size(1, v);
            }
            if let Some(v) = self.no_fee_threshold {
                my_size += ::protobuf::rt::uint64_size(2, v);
            }
            if let Some(v) = self.min_registrable_amount {
                my_size += ::protobuf::rt::uint64_size(3, v);
            }
            if let Some(v) = self.mask_public_key.as_ref() {
                my_size += ::protobuf::rt::bytes_size(4, &v);
            }
            if let Some(v) = self.signature.as_ref() {
                my_size += ::protobuf::rt::bytes_size(5, &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.fee_rate {
                os.write_uint32(1, v)?;
            }
            if let Some(v) = self.no_fee_threshold {
                os.write_uint64(2, v)?;
            }
            if let Some(v) = self.min_registrable_amount {
                os.write_uint64(3, v)?;
            }
            if let Some(v) = self.mask_public_key.as_ref() {
                os.write_bytes(4, v)?;
            }
            if let Some(v) = self.signature.as_ref() {
                os.write_bytes(5, 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() -> CoinJoinRequest {
            CoinJoinRequest::new()
        }

        fn clear(&mut self) {
            self.fee_rate = ::std::option::Option::None;
            self.no_fee_threshold = ::std::option::Option::None;
            self.min_registrable_amount = ::std::option::Option::None;
            self.mask_public_key = ::std::option::Option::None;
            self.signature = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static CoinJoinRequest {
            static instance: CoinJoinRequest = CoinJoinRequest {
                fee_rate: ::std::option::Option::None,
                no_fee_threshold: ::std::option::Option::None,
                min_registrable_amount: ::std::option::Option::None,
                mask_public_key: ::std::option::Option::None,
                signature: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for CoinJoinRequest {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("SignTx.CoinJoinRequest").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for CoinJoinRequest {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for CoinJoinRequest {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxRequest {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.request_type)
    pub request_type: ::std::option::Option<::protobuf::EnumOrUnknown<tx_request::RequestType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.details)
    pub details: ::protobuf::MessageField<tx_request::TxRequestDetailsType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.serialized)
    pub serialized: ::protobuf::MessageField<tx_request::TxRequestSerializedType>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxRequest.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxRequest {
    fn default() -> &'a TxRequest {
        <TxRequest as ::protobuf::Message>::default_instance()
    }
}

impl TxRequest {
    pub fn new() -> TxRequest {
        ::std::default::Default::default()
    }

    // optional .hw.trezor.messages.bitcoin.TxRequest.RequestType request_type = 1;

    pub fn request_type(&self) -> tx_request::RequestType {
        match self.request_type {
            Some(e) => e.enum_value_or(tx_request::RequestType::TXINPUT),
            None => tx_request::RequestType::TXINPUT,
        }
    }

    pub fn clear_request_type(&mut self) {
        self.request_type = ::std::option::Option::None;
    }

    pub fn has_request_type(&self) -> bool {
        self.request_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_request_type(&mut self, v: tx_request::RequestType) {
        self.request_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    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::<_, _>(
            "request_type",
            |m: &TxRequest| { &m.request_type },
            |m: &mut TxRequest| { &mut m.request_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tx_request::TxRequestDetailsType>(
            "details",
            |m: &TxRequest| { &m.details },
            |m: &mut TxRequest| { &mut m.details },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tx_request::TxRequestSerializedType>(
            "serialized",
            |m: &TxRequest| { &m.serialized },
            |m: &mut TxRequest| { &mut m.serialized },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxRequest>(
            "TxRequest",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxRequest {
    const NAME: &'static str = "TxRequest";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                8 => {
                    self.request_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                18 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.details)?;
                },
                26 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.serialized)?;
                },
                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.request_type {
            my_size += ::protobuf::rt::int32_size(1, v.value());
        }
        if let Some(v) = self.details.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.serialized.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.request_type {
            os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.details.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
        }
        if let Some(v) = self.serialized.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() -> TxRequest {
        TxRequest::new()
    }

    fn clear(&mut self) {
        self.request_type = ::std::option::Option::None;
        self.details.clear();
        self.serialized.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxRequest {
        static instance: TxRequest = TxRequest {
            request_type: ::std::option::Option::None,
            details: ::protobuf::MessageField::none(),
            serialized: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxRequest {
    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("TxRequest").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxRequest {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxRequest {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `TxRequest`
pub mod tx_request {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxRequest.TxRequestDetailsType)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TxRequestDetailsType {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.TxRequestDetailsType.request_index)
        pub request_index: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.TxRequestDetailsType.tx_hash)
        pub tx_hash: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.TxRequestDetailsType.extra_data_len)
        pub extra_data_len: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.TxRequestDetailsType.extra_data_offset)
        pub extra_data_offset: ::std::option::Option<u32>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxRequest.TxRequestDetailsType.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a TxRequestDetailsType {
        fn default() -> &'a TxRequestDetailsType {
            <TxRequestDetailsType as ::protobuf::Message>::default_instance()
        }
    }

    impl TxRequestDetailsType {
        pub fn new() -> TxRequestDetailsType {
            ::std::default::Default::default()
        }

        // optional uint32 request_index = 1;

        pub fn request_index(&self) -> u32 {
            self.request_index.unwrap_or(0)
        }

        pub fn clear_request_index(&mut self) {
            self.request_index = ::std::option::Option::None;
        }

        pub fn has_request_index(&self) -> bool {
            self.request_index.is_some()
        }

        // Param is passed by value, moved
        pub fn set_request_index(&mut self, v: u32) {
            self.request_index = ::std::option::Option::Some(v);
        }

        // optional bytes tx_hash = 2;

        pub fn tx_hash(&self) -> &[u8] {
            match self.tx_hash.as_ref() {
                Some(v) => v,
                None => &[],
            }
        }

        pub fn clear_tx_hash(&mut self) {
            self.tx_hash = ::std::option::Option::None;
        }

        pub fn has_tx_hash(&self) -> bool {
            self.tx_hash.is_some()
        }

        // Param is passed by value, moved
        pub fn set_tx_hash(&mut self, v: ::std::vec::Vec<u8>) {
            self.tx_hash = ::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_tx_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
            if self.tx_hash.is_none() {
                self.tx_hash = ::std::option::Option::Some(::std::vec::Vec::new());
            }
            self.tx_hash.as_mut().unwrap()
        }

        // Take field
        pub fn take_tx_hash(&mut self) -> ::std::vec::Vec<u8> {
            self.tx_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
        }

        // optional uint32 extra_data_len = 3;

        pub fn extra_data_len(&self) -> u32 {
            self.extra_data_len.unwrap_or(0)
        }

        pub fn clear_extra_data_len(&mut self) {
            self.extra_data_len = ::std::option::Option::None;
        }

        pub fn has_extra_data_len(&self) -> bool {
            self.extra_data_len.is_some()
        }

        // Param is passed by value, moved
        pub fn set_extra_data_len(&mut self, v: u32) {
            self.extra_data_len = ::std::option::Option::Some(v);
        }

        // optional uint32 extra_data_offset = 4;

        pub fn extra_data_offset(&self) -> u32 {
            self.extra_data_offset.unwrap_or(0)
        }

        pub fn clear_extra_data_offset(&mut self) {
            self.extra_data_offset = ::std::option::Option::None;
        }

        pub fn has_extra_data_offset(&self) -> bool {
            self.extra_data_offset.is_some()
        }

        // Param is passed by value, moved
        pub fn set_extra_data_offset(&mut self, v: u32) {
            self.extra_data_offset = ::std::option::Option::Some(v);
        }

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(4);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "request_index",
                |m: &TxRequestDetailsType| { &m.request_index },
                |m: &mut TxRequestDetailsType| { &mut m.request_index },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "tx_hash",
                |m: &TxRequestDetailsType| { &m.tx_hash },
                |m: &mut TxRequestDetailsType| { &mut m.tx_hash },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "extra_data_len",
                |m: &TxRequestDetailsType| { &m.extra_data_len },
                |m: &mut TxRequestDetailsType| { &mut m.extra_data_len },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "extra_data_offset",
                |m: &TxRequestDetailsType| { &m.extra_data_offset },
                |m: &mut TxRequestDetailsType| { &mut m.extra_data_offset },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxRequestDetailsType>(
                "TxRequest.TxRequestDetailsType",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for TxRequestDetailsType {
        const NAME: &'static str = "TxRequestDetailsType";

        fn is_initialized(&self) -> bool {
            true
        }

        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
            while let Some(tag) = is.read_raw_tag_or_eof()? {
                match tag {
                    8 => {
                        self.request_index = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    18 => {
                        self.tx_hash = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    24 => {
                        self.extra_data_len = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    32 => {
                        self.extra_data_offset = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    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.request_index {
                my_size += ::protobuf::rt::uint32_size(1, v);
            }
            if let Some(v) = self.tx_hash.as_ref() {
                my_size += ::protobuf::rt::bytes_size(2, &v);
            }
            if let Some(v) = self.extra_data_len {
                my_size += ::protobuf::rt::uint32_size(3, v);
            }
            if let Some(v) = self.extra_data_offset {
                my_size += ::protobuf::rt::uint32_size(4, 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.request_index {
                os.write_uint32(1, v)?;
            }
            if let Some(v) = self.tx_hash.as_ref() {
                os.write_bytes(2, v)?;
            }
            if let Some(v) = self.extra_data_len {
                os.write_uint32(3, v)?;
            }
            if let Some(v) = self.extra_data_offset {
                os.write_uint32(4, 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() -> TxRequestDetailsType {
            TxRequestDetailsType::new()
        }

        fn clear(&mut self) {
            self.request_index = ::std::option::Option::None;
            self.tx_hash = ::std::option::Option::None;
            self.extra_data_len = ::std::option::Option::None;
            self.extra_data_offset = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TxRequestDetailsType {
            static instance: TxRequestDetailsType = TxRequestDetailsType {
                request_index: ::std::option::Option::None,
                tx_hash: ::std::option::Option::None,
                extra_data_len: ::std::option::Option::None,
                extra_data_offset: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for TxRequestDetailsType {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TxRequest.TxRequestDetailsType").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for TxRequestDetailsType {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for TxRequestDetailsType {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }

    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxRequest.TxRequestSerializedType)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TxRequestSerializedType {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.TxRequestSerializedType.signature_index)
        pub signature_index: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.TxRequestSerializedType.signature)
        pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxRequest.TxRequestSerializedType.serialized_tx)
        pub serialized_tx: ::std::option::Option<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxRequest.TxRequestSerializedType.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a TxRequestSerializedType {
        fn default() -> &'a TxRequestSerializedType {
            <TxRequestSerializedType as ::protobuf::Message>::default_instance()
        }
    }

    impl TxRequestSerializedType {
        pub fn new() -> TxRequestSerializedType {
            ::std::default::Default::default()
        }

        // optional uint32 signature_index = 1;

        pub fn signature_index(&self) -> u32 {
            self.signature_index.unwrap_or(0)
        }

        pub fn clear_signature_index(&mut self) {
            self.signature_index = ::std::option::Option::None;
        }

        pub fn has_signature_index(&self) -> bool {
            self.signature_index.is_some()
        }

        // Param is passed by value, moved
        pub fn set_signature_index(&mut self, v: u32) {
            self.signature_index = ::std::option::Option::Some(v);
        }

        // optional bytes signature = 2;

        pub fn signature(&self) -> &[u8] {
            match self.signature.as_ref() {
                Some(v) => v,
                None => &[],
            }
        }

        pub fn clear_signature(&mut self) {
            self.signature = ::std::option::Option::None;
        }

        pub fn has_signature(&self) -> bool {
            self.signature.is_some()
        }

        // Param is passed by value, moved
        pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
            self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
            if self.signature.is_none() {
                self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
            }
            self.signature.as_mut().unwrap()
        }

        // Take field
        pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
            self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
        }

        // optional bytes serialized_tx = 3;

        pub fn serialized_tx(&self) -> &[u8] {
            match self.serialized_tx.as_ref() {
                Some(v) => v,
                None => &[],
            }
        }

        pub fn clear_serialized_tx(&mut self) {
            self.serialized_tx = ::std::option::Option::None;
        }

        pub fn has_serialized_tx(&self) -> bool {
            self.serialized_tx.is_some()
        }

        // Param is passed by value, moved
        pub fn set_serialized_tx(&mut self, v: ::std::vec::Vec<u8>) {
            self.serialized_tx = ::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_serialized_tx(&mut self) -> &mut ::std::vec::Vec<u8> {
            if self.serialized_tx.is_none() {
                self.serialized_tx = ::std::option::Option::Some(::std::vec::Vec::new());
            }
            self.serialized_tx.as_mut().unwrap()
        }

        // Take field
        pub fn take_serialized_tx(&mut self) -> ::std::vec::Vec<u8> {
            self.serialized_tx.take().unwrap_or_else(|| ::std::vec::Vec::new())
        }

        pub(in super) 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::<_, _>(
                "signature_index",
                |m: &TxRequestSerializedType| { &m.signature_index },
                |m: &mut TxRequestSerializedType| { &mut m.signature_index },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "signature",
                |m: &TxRequestSerializedType| { &m.signature },
                |m: &mut TxRequestSerializedType| { &mut m.signature },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "serialized_tx",
                |m: &TxRequestSerializedType| { &m.serialized_tx },
                |m: &mut TxRequestSerializedType| { &mut m.serialized_tx },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxRequestSerializedType>(
                "TxRequest.TxRequestSerializedType",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for TxRequestSerializedType {
        const NAME: &'static str = "TxRequestSerializedType";

        fn is_initialized(&self) -> bool {
            true
        }

        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
            while let Some(tag) = is.read_raw_tag_or_eof()? {
                match tag {
                    8 => {
                        self.signature_index = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    18 => {
                        self.signature = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    26 => {
                        self.serialized_tx = ::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.signature_index {
                my_size += ::protobuf::rt::uint32_size(1, v);
            }
            if let Some(v) = self.signature.as_ref() {
                my_size += ::protobuf::rt::bytes_size(2, &v);
            }
            if let Some(v) = self.serialized_tx.as_ref() {
                my_size += ::protobuf::rt::bytes_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.signature_index {
                os.write_uint32(1, v)?;
            }
            if let Some(v) = self.signature.as_ref() {
                os.write_bytes(2, v)?;
            }
            if let Some(v) = self.serialized_tx.as_ref() {
                os.write_bytes(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() -> TxRequestSerializedType {
            TxRequestSerializedType::new()
        }

        fn clear(&mut self) {
            self.signature_index = ::std::option::Option::None;
            self.signature = ::std::option::Option::None;
            self.serialized_tx = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TxRequestSerializedType {
            static instance: TxRequestSerializedType = TxRequestSerializedType {
                signature_index: ::std::option::Option::None,
                signature: ::std::option::Option::None,
                serialized_tx: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for TxRequestSerializedType {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TxRequest.TxRequestSerializedType").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for TxRequestSerializedType {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for TxRequestSerializedType {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }

    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
    // @@protoc_insertion_point(enum:hw.trezor.messages.bitcoin.TxRequest.RequestType)
    pub enum RequestType {
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.TxRequest.RequestType.TXINPUT)
        TXINPUT = 0,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.TxRequest.RequestType.TXOUTPUT)
        TXOUTPUT = 1,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.TxRequest.RequestType.TXMETA)
        TXMETA = 2,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.TxRequest.RequestType.TXFINISHED)
        TXFINISHED = 3,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.TxRequest.RequestType.TXEXTRADATA)
        TXEXTRADATA = 4,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.TxRequest.RequestType.TXORIGINPUT)
        TXORIGINPUT = 5,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.TxRequest.RequestType.TXORIGOUTPUT)
        TXORIGOUTPUT = 6,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.TxRequest.RequestType.TXPAYMENTREQ)
        TXPAYMENTREQ = 7,
    }

    impl ::protobuf::Enum for RequestType {
        const NAME: &'static str = "RequestType";

        fn value(&self) -> i32 {
            *self as i32
        }

        fn from_i32(value: i32) -> ::std::option::Option<RequestType> {
            match value {
                0 => ::std::option::Option::Some(RequestType::TXINPUT),
                1 => ::std::option::Option::Some(RequestType::TXOUTPUT),
                2 => ::std::option::Option::Some(RequestType::TXMETA),
                3 => ::std::option::Option::Some(RequestType::TXFINISHED),
                4 => ::std::option::Option::Some(RequestType::TXEXTRADATA),
                5 => ::std::option::Option::Some(RequestType::TXORIGINPUT),
                6 => ::std::option::Option::Some(RequestType::TXORIGOUTPUT),
                7 => ::std::option::Option::Some(RequestType::TXPAYMENTREQ),
                _ => ::std::option::Option::None
            }
        }

        fn from_str(str: &str) -> ::std::option::Option<RequestType> {
            match str {
                "TXINPUT" => ::std::option::Option::Some(RequestType::TXINPUT),
                "TXOUTPUT" => ::std::option::Option::Some(RequestType::TXOUTPUT),
                "TXMETA" => ::std::option::Option::Some(RequestType::TXMETA),
                "TXFINISHED" => ::std::option::Option::Some(RequestType::TXFINISHED),
                "TXEXTRADATA" => ::std::option::Option::Some(RequestType::TXEXTRADATA),
                "TXORIGINPUT" => ::std::option::Option::Some(RequestType::TXORIGINPUT),
                "TXORIGOUTPUT" => ::std::option::Option::Some(RequestType::TXORIGOUTPUT),
                "TXPAYMENTREQ" => ::std::option::Option::Some(RequestType::TXPAYMENTREQ),
                _ => ::std::option::Option::None
            }
        }

        const VALUES: &'static [RequestType] = &[
            RequestType::TXINPUT,
            RequestType::TXOUTPUT,
            RequestType::TXMETA,
            RequestType::TXFINISHED,
            RequestType::TXEXTRADATA,
            RequestType::TXORIGINPUT,
            RequestType::TXORIGOUTPUT,
            RequestType::TXPAYMENTREQ,
        ];
    }

    impl ::protobuf::EnumFull for RequestType {
        fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("TxRequest.RequestType").unwrap()).clone()
        }

        fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
            let index = *self as usize;
            Self::enum_descriptor().value_by_index(index)
        }
    }

    impl ::std::default::Default for RequestType {
        fn default() -> Self {
            RequestType::TXINPUT
        }
    }

    impl RequestType {
        pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
            ::protobuf::reflect::GeneratedEnumDescriptorData::new::<RequestType>("TxRequest.RequestType")
        }
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAck)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAck {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.tx)
    pub tx: ::protobuf::MessageField<tx_ack::TransactionType>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAck.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxAck {
    fn default() -> &'a TxAck {
        <TxAck as ::protobuf::Message>::default_instance()
    }
}

impl TxAck {
    pub fn new() -> TxAck {
        ::std::default::Default::default()
    }

    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_message_field_accessor::<_, tx_ack::TransactionType>(
            "tx",
            |m: &TxAck| { &m.tx },
            |m: &mut TxAck| { &mut m.tx },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAck>(
            "TxAck",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxAck {
    const NAME: &'static str = "TxAck";

    fn is_initialized(&self) -> bool {
        for v in &self.tx {
            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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.tx)?;
                },
                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.tx.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.tx.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, 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() -> TxAck {
        TxAck::new()
    }

    fn clear(&mut self) {
        self.tx.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxAck {
        static instance: TxAck = TxAck {
            tx: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxAck {
    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("TxAck").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxAck {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxAck {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `TxAck`
pub mod tx_ack {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAck.TransactionType)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TransactionType {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.version)
        pub version: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.inputs)
        pub inputs: ::std::vec::Vec<transaction_type::TxInputType>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.bin_outputs)
        pub bin_outputs: ::std::vec::Vec<transaction_type::TxOutputBinType>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.lock_time)
        pub lock_time: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.outputs)
        pub outputs: ::std::vec::Vec<transaction_type::TxOutputType>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.inputs_cnt)
        pub inputs_cnt: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.outputs_cnt)
        pub outputs_cnt: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.extra_data)
        pub extra_data: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.extra_data_len)
        pub extra_data_len: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.expiry)
        pub expiry: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.overwintered)
        pub overwintered: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.version_group_id)
        pub version_group_id: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.timestamp)
        pub timestamp: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.branch_id)
        pub branch_id: ::std::option::Option<u32>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAck.TransactionType.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a TransactionType {
        fn default() -> &'a TransactionType {
            <TransactionType as ::protobuf::Message>::default_instance()
        }
    }

    impl TransactionType {
        pub fn new() -> TransactionType {
            ::std::default::Default::default()
        }

        // optional uint32 version = 1;

        pub fn version(&self) -> u32 {
            self.version.unwrap_or(0)
        }

        pub fn clear_version(&mut self) {
            self.version = ::std::option::Option::None;
        }

        pub fn has_version(&self) -> bool {
            self.version.is_some()
        }

        // Param is passed by value, moved
        pub fn set_version(&mut self, v: u32) {
            self.version = ::std::option::Option::Some(v);
        }

        // optional uint32 lock_time = 4;

        pub fn lock_time(&self) -> u32 {
            self.lock_time.unwrap_or(0)
        }

        pub fn clear_lock_time(&mut self) {
            self.lock_time = ::std::option::Option::None;
        }

        pub fn has_lock_time(&self) -> bool {
            self.lock_time.is_some()
        }

        // Param is passed by value, moved
        pub fn set_lock_time(&mut self, v: u32) {
            self.lock_time = ::std::option::Option::Some(v);
        }

        // optional uint32 inputs_cnt = 6;

        pub fn inputs_cnt(&self) -> u32 {
            self.inputs_cnt.unwrap_or(0)
        }

        pub fn clear_inputs_cnt(&mut self) {
            self.inputs_cnt = ::std::option::Option::None;
        }

        pub fn has_inputs_cnt(&self) -> bool {
            self.inputs_cnt.is_some()
        }

        // Param is passed by value, moved
        pub fn set_inputs_cnt(&mut self, v: u32) {
            self.inputs_cnt = ::std::option::Option::Some(v);
        }

        // optional uint32 outputs_cnt = 7;

        pub fn outputs_cnt(&self) -> u32 {
            self.outputs_cnt.unwrap_or(0)
        }

        pub fn clear_outputs_cnt(&mut self) {
            self.outputs_cnt = ::std::option::Option::None;
        }

        pub fn has_outputs_cnt(&self) -> bool {
            self.outputs_cnt.is_some()
        }

        // Param is passed by value, moved
        pub fn set_outputs_cnt(&mut self, v: u32) {
            self.outputs_cnt = ::std::option::Option::Some(v);
        }

        // optional bytes extra_data = 8;

        pub fn extra_data(&self) -> &[u8] {
            match self.extra_data.as_ref() {
                Some(v) => v,
                None => &[],
            }
        }

        pub fn clear_extra_data(&mut self) {
            self.extra_data = ::std::option::Option::None;
        }

        pub fn has_extra_data(&self) -> bool {
            self.extra_data.is_some()
        }

        // Param is passed by value, moved
        pub fn set_extra_data(&mut self, v: ::std::vec::Vec<u8>) {
            self.extra_data = ::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_extra_data(&mut self) -> &mut ::std::vec::Vec<u8> {
            if self.extra_data.is_none() {
                self.extra_data = ::std::option::Option::Some(::std::vec::Vec::new());
            }
            self.extra_data.as_mut().unwrap()
        }

        // Take field
        pub fn take_extra_data(&mut self) -> ::std::vec::Vec<u8> {
            self.extra_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
        }

        // optional uint32 extra_data_len = 9;

        pub fn extra_data_len(&self) -> u32 {
            self.extra_data_len.unwrap_or(0)
        }

        pub fn clear_extra_data_len(&mut self) {
            self.extra_data_len = ::std::option::Option::None;
        }

        pub fn has_extra_data_len(&self) -> bool {
            self.extra_data_len.is_some()
        }

        // Param is passed by value, moved
        pub fn set_extra_data_len(&mut self, v: u32) {
            self.extra_data_len = ::std::option::Option::Some(v);
        }

        // optional uint32 expiry = 10;

        pub fn expiry(&self) -> u32 {
            self.expiry.unwrap_or(0)
        }

        pub fn clear_expiry(&mut self) {
            self.expiry = ::std::option::Option::None;
        }

        pub fn has_expiry(&self) -> bool {
            self.expiry.is_some()
        }

        // Param is passed by value, moved
        pub fn set_expiry(&mut self, v: u32) {
            self.expiry = ::std::option::Option::Some(v);
        }

        // optional bool overwintered = 11;

        pub fn overwintered(&self) -> bool {
            self.overwintered.unwrap_or(false)
        }

        pub fn clear_overwintered(&mut self) {
            self.overwintered = ::std::option::Option::None;
        }

        pub fn has_overwintered(&self) -> bool {
            self.overwintered.is_some()
        }

        // Param is passed by value, moved
        pub fn set_overwintered(&mut self, v: bool) {
            self.overwintered = ::std::option::Option::Some(v);
        }

        // optional uint32 version_group_id = 12;

        pub fn version_group_id(&self) -> u32 {
            self.version_group_id.unwrap_or(0)
        }

        pub fn clear_version_group_id(&mut self) {
            self.version_group_id = ::std::option::Option::None;
        }

        pub fn has_version_group_id(&self) -> bool {
            self.version_group_id.is_some()
        }

        // Param is passed by value, moved
        pub fn set_version_group_id(&mut self, v: u32) {
            self.version_group_id = ::std::option::Option::Some(v);
        }

        // optional uint32 timestamp = 13;

        pub fn timestamp(&self) -> u32 {
            self.timestamp.unwrap_or(0)
        }

        pub fn clear_timestamp(&mut self) {
            self.timestamp = ::std::option::Option::None;
        }

        pub fn has_timestamp(&self) -> bool {
            self.timestamp.is_some()
        }

        // Param is passed by value, moved
        pub fn set_timestamp(&mut self, v: u32) {
            self.timestamp = ::std::option::Option::Some(v);
        }

        // optional uint32 branch_id = 14;

        pub fn branch_id(&self) -> u32 {
            self.branch_id.unwrap_or(0)
        }

        pub fn clear_branch_id(&mut self) {
            self.branch_id = ::std::option::Option::None;
        }

        pub fn has_branch_id(&self) -> bool {
            self.branch_id.is_some()
        }

        // Param is passed by value, moved
        pub fn set_branch_id(&mut self, v: u32) {
            self.branch_id = ::std::option::Option::Some(v);
        }

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(14);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "version",
                |m: &TransactionType| { &m.version },
                |m: &mut TransactionType| { &mut m.version },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                "inputs",
                |m: &TransactionType| { &m.inputs },
                |m: &mut TransactionType| { &mut m.inputs },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                "bin_outputs",
                |m: &TransactionType| { &m.bin_outputs },
                |m: &mut TransactionType| { &mut m.bin_outputs },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "lock_time",
                |m: &TransactionType| { &m.lock_time },
                |m: &mut TransactionType| { &mut m.lock_time },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                "outputs",
                |m: &TransactionType| { &m.outputs },
                |m: &mut TransactionType| { &mut m.outputs },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "inputs_cnt",
                |m: &TransactionType| { &m.inputs_cnt },
                |m: &mut TransactionType| { &mut m.inputs_cnt },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "outputs_cnt",
                |m: &TransactionType| { &m.outputs_cnt },
                |m: &mut TransactionType| { &mut m.outputs_cnt },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "extra_data",
                |m: &TransactionType| { &m.extra_data },
                |m: &mut TransactionType| { &mut m.extra_data },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "extra_data_len",
                |m: &TransactionType| { &m.extra_data_len },
                |m: &mut TransactionType| { &mut m.extra_data_len },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "expiry",
                |m: &TransactionType| { &m.expiry },
                |m: &mut TransactionType| { &mut m.expiry },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "overwintered",
                |m: &TransactionType| { &m.overwintered },
                |m: &mut TransactionType| { &mut m.overwintered },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "version_group_id",
                |m: &TransactionType| { &m.version_group_id },
                |m: &mut TransactionType| { &mut m.version_group_id },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "timestamp",
                |m: &TransactionType| { &m.timestamp },
                |m: &mut TransactionType| { &mut m.timestamp },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "branch_id",
                |m: &TransactionType| { &m.branch_id },
                |m: &mut TransactionType| { &mut m.branch_id },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TransactionType>(
                "TxAck.TransactionType",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for TransactionType {
        const NAME: &'static str = "TransactionType";

        fn is_initialized(&self) -> bool {
            for v in &self.inputs {
                if !v.is_initialized() {
                    return false;
                }
            };
            for v in &self.bin_outputs {
                if !v.is_initialized() {
                    return false;
                }
            };
            for v in &self.outputs {
                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 {
                    8 => {
                        self.version = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    18 => {
                        self.inputs.push(is.read_message()?);
                    },
                    26 => {
                        self.bin_outputs.push(is.read_message()?);
                    },
                    32 => {
                        self.lock_time = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    42 => {
                        self.outputs.push(is.read_message()?);
                    },
                    48 => {
                        self.inputs_cnt = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    56 => {
                        self.outputs_cnt = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    66 => {
                        self.extra_data = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    72 => {
                        self.extra_data_len = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    80 => {
                        self.expiry = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    88 => {
                        self.overwintered = ::std::option::Option::Some(is.read_bool()?);
                    },
                    96 => {
                        self.version_group_id = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    104 => {
                        self.timestamp = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    112 => {
                        self.branch_id = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    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.version {
                my_size += ::protobuf::rt::uint32_size(1, v);
            }
            for value in &self.inputs {
                let len = value.compute_size();
                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            };
            for value in &self.bin_outputs {
                let len = value.compute_size();
                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            };
            if let Some(v) = self.lock_time {
                my_size += ::protobuf::rt::uint32_size(4, v);
            }
            for value in &self.outputs {
                let len = value.compute_size();
                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            };
            if let Some(v) = self.inputs_cnt {
                my_size += ::protobuf::rt::uint32_size(6, v);
            }
            if let Some(v) = self.outputs_cnt {
                my_size += ::protobuf::rt::uint32_size(7, v);
            }
            if let Some(v) = self.extra_data.as_ref() {
                my_size += ::protobuf::rt::bytes_size(8, &v);
            }
            if let Some(v) = self.extra_data_len {
                my_size += ::protobuf::rt::uint32_size(9, v);
            }
            if let Some(v) = self.expiry {
                my_size += ::protobuf::rt::uint32_size(10, v);
            }
            if let Some(v) = self.overwintered {
                my_size += 1 + 1;
            }
            if let Some(v) = self.version_group_id {
                my_size += ::protobuf::rt::uint32_size(12, v);
            }
            if let Some(v) = self.timestamp {
                my_size += ::protobuf::rt::uint32_size(13, v);
            }
            if let Some(v) = self.branch_id {
                my_size += ::protobuf::rt::uint32_size(14, 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.version {
                os.write_uint32(1, v)?;
            }
            for v in &self.inputs {
                ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
            };
            for v in &self.bin_outputs {
                ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
            };
            if let Some(v) = self.lock_time {
                os.write_uint32(4, v)?;
            }
            for v in &self.outputs {
                ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
            };
            if let Some(v) = self.inputs_cnt {
                os.write_uint32(6, v)?;
            }
            if let Some(v) = self.outputs_cnt {
                os.write_uint32(7, v)?;
            }
            if let Some(v) = self.extra_data.as_ref() {
                os.write_bytes(8, v)?;
            }
            if let Some(v) = self.extra_data_len {
                os.write_uint32(9, v)?;
            }
            if let Some(v) = self.expiry {
                os.write_uint32(10, v)?;
            }
            if let Some(v) = self.overwintered {
                os.write_bool(11, v)?;
            }
            if let Some(v) = self.version_group_id {
                os.write_uint32(12, v)?;
            }
            if let Some(v) = self.timestamp {
                os.write_uint32(13, v)?;
            }
            if let Some(v) = self.branch_id {
                os.write_uint32(14, 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() -> TransactionType {
            TransactionType::new()
        }

        fn clear(&mut self) {
            self.version = ::std::option::Option::None;
            self.inputs.clear();
            self.bin_outputs.clear();
            self.lock_time = ::std::option::Option::None;
            self.outputs.clear();
            self.inputs_cnt = ::std::option::Option::None;
            self.outputs_cnt = ::std::option::Option::None;
            self.extra_data = ::std::option::Option::None;
            self.extra_data_len = ::std::option::Option::None;
            self.expiry = ::std::option::Option::None;
            self.overwintered = ::std::option::Option::None;
            self.version_group_id = ::std::option::Option::None;
            self.timestamp = ::std::option::Option::None;
            self.branch_id = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TransactionType {
            static instance: TransactionType = TransactionType {
                version: ::std::option::Option::None,
                inputs: ::std::vec::Vec::new(),
                bin_outputs: ::std::vec::Vec::new(),
                lock_time: ::std::option::Option::None,
                outputs: ::std::vec::Vec::new(),
                inputs_cnt: ::std::option::Option::None,
                outputs_cnt: ::std::option::Option::None,
                extra_data: ::std::option::Option::None,
                extra_data_len: ::std::option::Option::None,
                expiry: ::std::option::Option::None,
                overwintered: ::std::option::Option::None,
                version_group_id: ::std::option::Option::None,
                timestamp: ::std::option::Option::None,
                branch_id: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for TransactionType {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TxAck.TransactionType").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for TransactionType {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for TransactionType {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }

    /// Nested message and enums of message `TransactionType`
    pub mod transaction_type {
        // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType)
        #[derive(PartialEq,Clone,Default,Debug)]
        pub struct TxInputType {
            // message fields
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.address_n)
            pub address_n: ::std::vec::Vec<u32>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.prev_hash)
            pub prev_hash: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.prev_index)
            pub prev_index: ::std::option::Option<u32>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.script_sig)
            pub script_sig: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.sequence)
            pub sequence: ::std::option::Option<u32>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.script_type)
            pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<super::super::InputScriptType>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.multisig)
            pub multisig: ::protobuf::MessageField<super::super::MultisigRedeemScriptType>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.amount)
            pub amount: ::std::option::Option<u64>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.decred_tree)
            pub decred_tree: ::std::option::Option<u32>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.witness)
            pub witness: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.ownership_proof)
            pub ownership_proof: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.commitment_data)
            pub commitment_data: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.orig_hash)
            pub orig_hash: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.orig_index)
            pub orig_index: ::std::option::Option<u32>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.decred_staking_spend)
            pub decred_staking_spend: ::std::option::Option<::protobuf::EnumOrUnknown<super::super::DecredStakingSpendType>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.script_pubkey)
            pub script_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.coinjoin_flags)
            pub coinjoin_flags: ::std::option::Option<u32>,
            // special fields
            // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType.special_fields)
            pub special_fields: ::protobuf::SpecialFields,
        }

        impl<'a> ::std::default::Default for &'a TxInputType {
            fn default() -> &'a TxInputType {
                <TxInputType as ::protobuf::Message>::default_instance()
            }
        }

        impl TxInputType {
            pub fn new() -> TxInputType {
                ::std::default::Default::default()
            }

            // required bytes prev_hash = 2;

            pub fn prev_hash(&self) -> &[u8] {
                match self.prev_hash.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_prev_hash(&mut self) {
                self.prev_hash = ::std::option::Option::None;
            }

            pub fn has_prev_hash(&self) -> bool {
                self.prev_hash.is_some()
            }

            // Param is passed by value, moved
            pub fn set_prev_hash(&mut self, v: ::std::vec::Vec<u8>) {
                self.prev_hash = ::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_prev_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.prev_hash.is_none() {
                    self.prev_hash = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.prev_hash.as_mut().unwrap()
            }

            // Take field
            pub fn take_prev_hash(&mut self) -> ::std::vec::Vec<u8> {
                self.prev_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // required uint32 prev_index = 3;

            pub fn prev_index(&self) -> u32 {
                self.prev_index.unwrap_or(0)
            }

            pub fn clear_prev_index(&mut self) {
                self.prev_index = ::std::option::Option::None;
            }

            pub fn has_prev_index(&self) -> bool {
                self.prev_index.is_some()
            }

            // Param is passed by value, moved
            pub fn set_prev_index(&mut self, v: u32) {
                self.prev_index = ::std::option::Option::Some(v);
            }

            // optional bytes script_sig = 4;

            pub fn script_sig(&self) -> &[u8] {
                match self.script_sig.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_script_sig(&mut self) {
                self.script_sig = ::std::option::Option::None;
            }

            pub fn has_script_sig(&self) -> bool {
                self.script_sig.is_some()
            }

            // Param is passed by value, moved
            pub fn set_script_sig(&mut self, v: ::std::vec::Vec<u8>) {
                self.script_sig = ::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_script_sig(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.script_sig.is_none() {
                    self.script_sig = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.script_sig.as_mut().unwrap()
            }

            // Take field
            pub fn take_script_sig(&mut self) -> ::std::vec::Vec<u8> {
                self.script_sig.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional uint32 sequence = 5;

            pub fn sequence(&self) -> u32 {
                self.sequence.unwrap_or(4294967295u32)
            }

            pub fn clear_sequence(&mut self) {
                self.sequence = ::std::option::Option::None;
            }

            pub fn has_sequence(&self) -> bool {
                self.sequence.is_some()
            }

            // Param is passed by value, moved
            pub fn set_sequence(&mut self, v: u32) {
                self.sequence = ::std::option::Option::Some(v);
            }

            // optional .hw.trezor.messages.bitcoin.InputScriptType script_type = 6;

            pub fn script_type(&self) -> super::super::InputScriptType {
                match self.script_type {
                    Some(e) => e.enum_value_or(super::super::InputScriptType::SPENDADDRESS),
                    None => super::super::InputScriptType::SPENDADDRESS,
                }
            }

            pub fn clear_script_type(&mut self) {
                self.script_type = ::std::option::Option::None;
            }

            pub fn has_script_type(&self) -> bool {
                self.script_type.is_some()
            }

            // Param is passed by value, moved
            pub fn set_script_type(&mut self, v: super::super::InputScriptType) {
                self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
            }

            // optional uint64 amount = 8;

            pub fn amount(&self) -> u64 {
                self.amount.unwrap_or(0)
            }

            pub fn clear_amount(&mut self) {
                self.amount = ::std::option::Option::None;
            }

            pub fn has_amount(&self) -> bool {
                self.amount.is_some()
            }

            // Param is passed by value, moved
            pub fn set_amount(&mut self, v: u64) {
                self.amount = ::std::option::Option::Some(v);
            }

            // optional uint32 decred_tree = 9;

            pub fn decred_tree(&self) -> u32 {
                self.decred_tree.unwrap_or(0)
            }

            pub fn clear_decred_tree(&mut self) {
                self.decred_tree = ::std::option::Option::None;
            }

            pub fn has_decred_tree(&self) -> bool {
                self.decred_tree.is_some()
            }

            // Param is passed by value, moved
            pub fn set_decred_tree(&mut self, v: u32) {
                self.decred_tree = ::std::option::Option::Some(v);
            }

            // optional bytes witness = 13;

            pub fn witness(&self) -> &[u8] {
                match self.witness.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_witness(&mut self) {
                self.witness = ::std::option::Option::None;
            }

            pub fn has_witness(&self) -> bool {
                self.witness.is_some()
            }

            // Param is passed by value, moved
            pub fn set_witness(&mut self, v: ::std::vec::Vec<u8>) {
                self.witness = ::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_witness(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.witness.is_none() {
                    self.witness = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.witness.as_mut().unwrap()
            }

            // Take field
            pub fn take_witness(&mut self) -> ::std::vec::Vec<u8> {
                self.witness.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional bytes ownership_proof = 14;

            pub fn ownership_proof(&self) -> &[u8] {
                match self.ownership_proof.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_ownership_proof(&mut self) {
                self.ownership_proof = ::std::option::Option::None;
            }

            pub fn has_ownership_proof(&self) -> bool {
                self.ownership_proof.is_some()
            }

            // Param is passed by value, moved
            pub fn set_ownership_proof(&mut self, v: ::std::vec::Vec<u8>) {
                self.ownership_proof = ::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_ownership_proof(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.ownership_proof.is_none() {
                    self.ownership_proof = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.ownership_proof.as_mut().unwrap()
            }

            // Take field
            pub fn take_ownership_proof(&mut self) -> ::std::vec::Vec<u8> {
                self.ownership_proof.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional bytes commitment_data = 15;

            pub fn commitment_data(&self) -> &[u8] {
                match self.commitment_data.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_commitment_data(&mut self) {
                self.commitment_data = ::std::option::Option::None;
            }

            pub fn has_commitment_data(&self) -> bool {
                self.commitment_data.is_some()
            }

            // Param is passed by value, moved
            pub fn set_commitment_data(&mut self, v: ::std::vec::Vec<u8>) {
                self.commitment_data = ::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_commitment_data(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.commitment_data.is_none() {
                    self.commitment_data = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.commitment_data.as_mut().unwrap()
            }

            // Take field
            pub fn take_commitment_data(&mut self) -> ::std::vec::Vec<u8> {
                self.commitment_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional bytes orig_hash = 16;

            pub fn orig_hash(&self) -> &[u8] {
                match self.orig_hash.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_orig_hash(&mut self) {
                self.orig_hash = ::std::option::Option::None;
            }

            pub fn has_orig_hash(&self) -> bool {
                self.orig_hash.is_some()
            }

            // Param is passed by value, moved
            pub fn set_orig_hash(&mut self, v: ::std::vec::Vec<u8>) {
                self.orig_hash = ::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_orig_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.orig_hash.is_none() {
                    self.orig_hash = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.orig_hash.as_mut().unwrap()
            }

            // Take field
            pub fn take_orig_hash(&mut self) -> ::std::vec::Vec<u8> {
                self.orig_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional uint32 orig_index = 17;

            pub fn orig_index(&self) -> u32 {
                self.orig_index.unwrap_or(0)
            }

            pub fn clear_orig_index(&mut self) {
                self.orig_index = ::std::option::Option::None;
            }

            pub fn has_orig_index(&self) -> bool {
                self.orig_index.is_some()
            }

            // Param is passed by value, moved
            pub fn set_orig_index(&mut self, v: u32) {
                self.orig_index = ::std::option::Option::Some(v);
            }

            // optional .hw.trezor.messages.bitcoin.DecredStakingSpendType decred_staking_spend = 18;

            pub fn decred_staking_spend(&self) -> super::super::DecredStakingSpendType {
                match self.decred_staking_spend {
                    Some(e) => e.enum_value_or(super::super::DecredStakingSpendType::SSGen),
                    None => super::super::DecredStakingSpendType::SSGen,
                }
            }

            pub fn clear_decred_staking_spend(&mut self) {
                self.decred_staking_spend = ::std::option::Option::None;
            }

            pub fn has_decred_staking_spend(&self) -> bool {
                self.decred_staking_spend.is_some()
            }

            // Param is passed by value, moved
            pub fn set_decred_staking_spend(&mut self, v: super::super::DecredStakingSpendType) {
                self.decred_staking_spend = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
            }

            // optional bytes script_pubkey = 19;

            pub fn script_pubkey(&self) -> &[u8] {
                match self.script_pubkey.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_script_pubkey(&mut self) {
                self.script_pubkey = ::std::option::Option::None;
            }

            pub fn has_script_pubkey(&self) -> bool {
                self.script_pubkey.is_some()
            }

            // Param is passed by value, moved
            pub fn set_script_pubkey(&mut self, v: ::std::vec::Vec<u8>) {
                self.script_pubkey = ::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_script_pubkey(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.script_pubkey.is_none() {
                    self.script_pubkey = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.script_pubkey.as_mut().unwrap()
            }

            // Take field
            pub fn take_script_pubkey(&mut self) -> ::std::vec::Vec<u8> {
                self.script_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional uint32 coinjoin_flags = 20;

            pub fn coinjoin_flags(&self) -> u32 {
                self.coinjoin_flags.unwrap_or(0u32)
            }

            pub fn clear_coinjoin_flags(&mut self) {
                self.coinjoin_flags = ::std::option::Option::None;
            }

            pub fn has_coinjoin_flags(&self) -> bool {
                self.coinjoin_flags.is_some()
            }

            // Param is passed by value, moved
            pub fn set_coinjoin_flags(&mut self, v: u32) {
                self.coinjoin_flags = ::std::option::Option::Some(v);
            }

            pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
                let mut fields = ::std::vec::Vec::with_capacity(17);
                let mut oneofs = ::std::vec::Vec::with_capacity(0);
                fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                    "address_n",
                    |m: &TxInputType| { &m.address_n },
                    |m: &mut TxInputType| { &mut m.address_n },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "prev_hash",
                    |m: &TxInputType| { &m.prev_hash },
                    |m: &mut TxInputType| { &mut m.prev_hash },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "prev_index",
                    |m: &TxInputType| { &m.prev_index },
                    |m: &mut TxInputType| { &mut m.prev_index },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "script_sig",
                    |m: &TxInputType| { &m.script_sig },
                    |m: &mut TxInputType| { &mut m.script_sig },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "sequence",
                    |m: &TxInputType| { &m.sequence },
                    |m: &mut TxInputType| { &mut m.sequence },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "script_type",
                    |m: &TxInputType| { &m.script_type },
                    |m: &mut TxInputType| { &mut m.script_type },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::super::MultisigRedeemScriptType>(
                    "multisig",
                    |m: &TxInputType| { &m.multisig },
                    |m: &mut TxInputType| { &mut m.multisig },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "amount",
                    |m: &TxInputType| { &m.amount },
                    |m: &mut TxInputType| { &mut m.amount },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "decred_tree",
                    |m: &TxInputType| { &m.decred_tree },
                    |m: &mut TxInputType| { &mut m.decred_tree },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "witness",
                    |m: &TxInputType| { &m.witness },
                    |m: &mut TxInputType| { &mut m.witness },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "ownership_proof",
                    |m: &TxInputType| { &m.ownership_proof },
                    |m: &mut TxInputType| { &mut m.ownership_proof },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "commitment_data",
                    |m: &TxInputType| { &m.commitment_data },
                    |m: &mut TxInputType| { &mut m.commitment_data },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "orig_hash",
                    |m: &TxInputType| { &m.orig_hash },
                    |m: &mut TxInputType| { &mut m.orig_hash },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "orig_index",
                    |m: &TxInputType| { &m.orig_index },
                    |m: &mut TxInputType| { &mut m.orig_index },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "decred_staking_spend",
                    |m: &TxInputType| { &m.decred_staking_spend },
                    |m: &mut TxInputType| { &mut m.decred_staking_spend },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "script_pubkey",
                    |m: &TxInputType| { &m.script_pubkey },
                    |m: &mut TxInputType| { &mut m.script_pubkey },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "coinjoin_flags",
                    |m: &TxInputType| { &m.coinjoin_flags },
                    |m: &mut TxInputType| { &mut m.coinjoin_flags },
                ));
                ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxInputType>(
                    "TxAck.TransactionType.TxInputType",
                    fields,
                    oneofs,
                )
            }
        }

        impl ::protobuf::Message for TxInputType {
            const NAME: &'static str = "TxInputType";

            fn is_initialized(&self) -> bool {
                if self.prev_hash.is_none() {
                    return false;
                }
                if self.prev_index.is_none() {
                    return false;
                }
                for v in &self.multisig {
                    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 => {
                            is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                        },
                        8 => {
                            self.address_n.push(is.read_uint32()?);
                        },
                        18 => {
                            self.prev_hash = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        24 => {
                            self.prev_index = ::std::option::Option::Some(is.read_uint32()?);
                        },
                        34 => {
                            self.script_sig = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        40 => {
                            self.sequence = ::std::option::Option::Some(is.read_uint32()?);
                        },
                        48 => {
                            self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                        },
                        58 => {
                            ::protobuf::rt::read_singular_message_into_field(is, &mut self.multisig)?;
                        },
                        64 => {
                            self.amount = ::std::option::Option::Some(is.read_uint64()?);
                        },
                        72 => {
                            self.decred_tree = ::std::option::Option::Some(is.read_uint32()?);
                        },
                        106 => {
                            self.witness = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        114 => {
                            self.ownership_proof = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        122 => {
                            self.commitment_data = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        130 => {
                            self.orig_hash = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        136 => {
                            self.orig_index = ::std::option::Option::Some(is.read_uint32()?);
                        },
                        144 => {
                            self.decred_staking_spend = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                        },
                        154 => {
                            self.script_pubkey = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        160 => {
                            self.coinjoin_flags = ::std::option::Option::Some(is.read_uint32()?);
                        },
                        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;
                for value in &self.address_n {
                    my_size += ::protobuf::rt::uint32_size(1, *value);
                };
                if let Some(v) = self.prev_hash.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(2, &v);
                }
                if let Some(v) = self.prev_index {
                    my_size += ::protobuf::rt::uint32_size(3, v);
                }
                if let Some(v) = self.script_sig.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(4, &v);
                }
                if let Some(v) = self.sequence {
                    my_size += ::protobuf::rt::uint32_size(5, v);
                }
                if let Some(v) = self.script_type {
                    my_size += ::protobuf::rt::int32_size(6, v.value());
                }
                if let Some(v) = self.multisig.as_ref() {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
                }
                if let Some(v) = self.amount {
                    my_size += ::protobuf::rt::uint64_size(8, v);
                }
                if let Some(v) = self.decred_tree {
                    my_size += ::protobuf::rt::uint32_size(9, v);
                }
                if let Some(v) = self.witness.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(13, &v);
                }
                if let Some(v) = self.ownership_proof.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(14, &v);
                }
                if let Some(v) = self.commitment_data.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(15, &v);
                }
                if let Some(v) = self.orig_hash.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(16, &v);
                }
                if let Some(v) = self.orig_index {
                    my_size += ::protobuf::rt::uint32_size(17, v);
                }
                if let Some(v) = self.decred_staking_spend {
                    my_size += ::protobuf::rt::int32_size(18, v.value());
                }
                if let Some(v) = self.script_pubkey.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(19, &v);
                }
                if let Some(v) = self.coinjoin_flags {
                    my_size += ::protobuf::rt::uint32_size(20, 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<()> {
                for v in &self.address_n {
                    os.write_uint32(1, *v)?;
                };
                if let Some(v) = self.prev_hash.as_ref() {
                    os.write_bytes(2, v)?;
                }
                if let Some(v) = self.prev_index {
                    os.write_uint32(3, v)?;
                }
                if let Some(v) = self.script_sig.as_ref() {
                    os.write_bytes(4, v)?;
                }
                if let Some(v) = self.sequence {
                    os.write_uint32(5, v)?;
                }
                if let Some(v) = self.script_type {
                    os.write_enum(6, ::protobuf::EnumOrUnknown::value(&v))?;
                }
                if let Some(v) = self.multisig.as_ref() {
                    ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
                }
                if let Some(v) = self.amount {
                    os.write_uint64(8, v)?;
                }
                if let Some(v) = self.decred_tree {
                    os.write_uint32(9, v)?;
                }
                if let Some(v) = self.witness.as_ref() {
                    os.write_bytes(13, v)?;
                }
                if let Some(v) = self.ownership_proof.as_ref() {
                    os.write_bytes(14, v)?;
                }
                if let Some(v) = self.commitment_data.as_ref() {
                    os.write_bytes(15, v)?;
                }
                if let Some(v) = self.orig_hash.as_ref() {
                    os.write_bytes(16, v)?;
                }
                if let Some(v) = self.orig_index {
                    os.write_uint32(17, v)?;
                }
                if let Some(v) = self.decred_staking_spend {
                    os.write_enum(18, ::protobuf::EnumOrUnknown::value(&v))?;
                }
                if let Some(v) = self.script_pubkey.as_ref() {
                    os.write_bytes(19, v)?;
                }
                if let Some(v) = self.coinjoin_flags {
                    os.write_uint32(20, 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() -> TxInputType {
                TxInputType::new()
            }

            fn clear(&mut self) {
                self.address_n.clear();
                self.prev_hash = ::std::option::Option::None;
                self.prev_index = ::std::option::Option::None;
                self.script_sig = ::std::option::Option::None;
                self.sequence = ::std::option::Option::None;
                self.script_type = ::std::option::Option::None;
                self.multisig.clear();
                self.amount = ::std::option::Option::None;
                self.decred_tree = ::std::option::Option::None;
                self.witness = ::std::option::Option::None;
                self.ownership_proof = ::std::option::Option::None;
                self.commitment_data = ::std::option::Option::None;
                self.orig_hash = ::std::option::Option::None;
                self.orig_index = ::std::option::Option::None;
                self.decred_staking_spend = ::std::option::Option::None;
                self.script_pubkey = ::std::option::Option::None;
                self.coinjoin_flags = ::std::option::Option::None;
                self.special_fields.clear();
            }

            fn default_instance() -> &'static TxInputType {
                static instance: TxInputType = TxInputType {
                    address_n: ::std::vec::Vec::new(),
                    prev_hash: ::std::option::Option::None,
                    prev_index: ::std::option::Option::None,
                    script_sig: ::std::option::Option::None,
                    sequence: ::std::option::Option::None,
                    script_type: ::std::option::Option::None,
                    multisig: ::protobuf::MessageField::none(),
                    amount: ::std::option::Option::None,
                    decred_tree: ::std::option::Option::None,
                    witness: ::std::option::Option::None,
                    ownership_proof: ::std::option::Option::None,
                    commitment_data: ::std::option::Option::None,
                    orig_hash: ::std::option::Option::None,
                    orig_index: ::std::option::Option::None,
                    decred_staking_spend: ::std::option::Option::None,
                    script_pubkey: ::std::option::Option::None,
                    coinjoin_flags: ::std::option::Option::None,
                    special_fields: ::protobuf::SpecialFields::new(),
                };
                &instance
            }
        }

        impl ::protobuf::MessageFull for TxInputType {
            fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
                static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
                descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("TxAck.TransactionType.TxInputType").unwrap()).clone()
            }
        }

        impl ::std::fmt::Display for TxInputType {
            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
                ::protobuf::text_format::fmt(self, f)
            }
        }

        impl ::protobuf::reflect::ProtobufValue for TxInputType {
            type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
        }

        // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputBinType)
        #[derive(PartialEq,Clone,Default,Debug)]
        pub struct TxOutputBinType {
            // message fields
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputBinType.amount)
            pub amount: ::std::option::Option<u64>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputBinType.script_pubkey)
            pub script_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputBinType.decred_script_version)
            pub decred_script_version: ::std::option::Option<u32>,
            // special fields
            // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputBinType.special_fields)
            pub special_fields: ::protobuf::SpecialFields,
        }

        impl<'a> ::std::default::Default for &'a TxOutputBinType {
            fn default() -> &'a TxOutputBinType {
                <TxOutputBinType as ::protobuf::Message>::default_instance()
            }
        }

        impl TxOutputBinType {
            pub fn new() -> TxOutputBinType {
                ::std::default::Default::default()
            }

            // required uint64 amount = 1;

            pub fn amount(&self) -> u64 {
                self.amount.unwrap_or(0)
            }

            pub fn clear_amount(&mut self) {
                self.amount = ::std::option::Option::None;
            }

            pub fn has_amount(&self) -> bool {
                self.amount.is_some()
            }

            // Param is passed by value, moved
            pub fn set_amount(&mut self, v: u64) {
                self.amount = ::std::option::Option::Some(v);
            }

            // required bytes script_pubkey = 2;

            pub fn script_pubkey(&self) -> &[u8] {
                match self.script_pubkey.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_script_pubkey(&mut self) {
                self.script_pubkey = ::std::option::Option::None;
            }

            pub fn has_script_pubkey(&self) -> bool {
                self.script_pubkey.is_some()
            }

            // Param is passed by value, moved
            pub fn set_script_pubkey(&mut self, v: ::std::vec::Vec<u8>) {
                self.script_pubkey = ::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_script_pubkey(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.script_pubkey.is_none() {
                    self.script_pubkey = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.script_pubkey.as_mut().unwrap()
            }

            // Take field
            pub fn take_script_pubkey(&mut self) -> ::std::vec::Vec<u8> {
                self.script_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional uint32 decred_script_version = 3;

            pub fn decred_script_version(&self) -> u32 {
                self.decred_script_version.unwrap_or(0)
            }

            pub fn clear_decred_script_version(&mut self) {
                self.decred_script_version = ::std::option::Option::None;
            }

            pub fn has_decred_script_version(&self) -> bool {
                self.decred_script_version.is_some()
            }

            // Param is passed by value, moved
            pub fn set_decred_script_version(&mut self, v: u32) {
                self.decred_script_version = ::std::option::Option::Some(v);
            }

            pub(in super::super) 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::<_, _>(
                    "amount",
                    |m: &TxOutputBinType| { &m.amount },
                    |m: &mut TxOutputBinType| { &mut m.amount },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "script_pubkey",
                    |m: &TxOutputBinType| { &m.script_pubkey },
                    |m: &mut TxOutputBinType| { &mut m.script_pubkey },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "decred_script_version",
                    |m: &TxOutputBinType| { &m.decred_script_version },
                    |m: &mut TxOutputBinType| { &mut m.decred_script_version },
                ));
                ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxOutputBinType>(
                    "TxAck.TransactionType.TxOutputBinType",
                    fields,
                    oneofs,
                )
            }
        }

        impl ::protobuf::Message for TxOutputBinType {
            const NAME: &'static str = "TxOutputBinType";

            fn is_initialized(&self) -> bool {
                if self.amount.is_none() {
                    return false;
                }
                if self.script_pubkey.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 {
                        8 => {
                            self.amount = ::std::option::Option::Some(is.read_uint64()?);
                        },
                        18 => {
                            self.script_pubkey = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        24 => {
                            self.decred_script_version = ::std::option::Option::Some(is.read_uint32()?);
                        },
                        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.amount {
                    my_size += ::protobuf::rt::uint64_size(1, v);
                }
                if let Some(v) = self.script_pubkey.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(2, &v);
                }
                if let Some(v) = self.decred_script_version {
                    my_size += ::protobuf::rt::uint32_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.amount {
                    os.write_uint64(1, v)?;
                }
                if let Some(v) = self.script_pubkey.as_ref() {
                    os.write_bytes(2, v)?;
                }
                if let Some(v) = self.decred_script_version {
                    os.write_uint32(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() -> TxOutputBinType {
                TxOutputBinType::new()
            }

            fn clear(&mut self) {
                self.amount = ::std::option::Option::None;
                self.script_pubkey = ::std::option::Option::None;
                self.decred_script_version = ::std::option::Option::None;
                self.special_fields.clear();
            }

            fn default_instance() -> &'static TxOutputBinType {
                static instance: TxOutputBinType = TxOutputBinType {
                    amount: ::std::option::Option::None,
                    script_pubkey: ::std::option::Option::None,
                    decred_script_version: ::std::option::Option::None,
                    special_fields: ::protobuf::SpecialFields::new(),
                };
                &instance
            }
        }

        impl ::protobuf::MessageFull for TxOutputBinType {
            fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
                static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
                descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("TxAck.TransactionType.TxOutputBinType").unwrap()).clone()
            }
        }

        impl ::std::fmt::Display for TxOutputBinType {
            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
                ::protobuf::text_format::fmt(self, f)
            }
        }

        impl ::protobuf::reflect::ProtobufValue for TxOutputBinType {
            type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
        }

        // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType)
        #[derive(PartialEq,Clone,Default,Debug)]
        pub struct TxOutputType {
            // message fields
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.address)
            pub address: ::std::option::Option<::std::string::String>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.address_n)
            pub address_n: ::std::vec::Vec<u32>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.amount)
            pub amount: ::std::option::Option<u64>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.script_type)
            pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<super::super::OutputScriptType>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.multisig)
            pub multisig: ::protobuf::MessageField<super::super::MultisigRedeemScriptType>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.op_return_data)
            pub op_return_data: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.orig_hash)
            pub orig_hash: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.orig_index)
            pub orig_index: ::std::option::Option<u32>,
            // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.payment_req_index)
            pub payment_req_index: ::std::option::Option<u32>,
            // special fields
            // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputType.special_fields)
            pub special_fields: ::protobuf::SpecialFields,
        }

        impl<'a> ::std::default::Default for &'a TxOutputType {
            fn default() -> &'a TxOutputType {
                <TxOutputType as ::protobuf::Message>::default_instance()
            }
        }

        impl TxOutputType {
            pub fn new() -> TxOutputType {
                ::std::default::Default::default()
            }

            // optional string address = 1;

            pub fn address(&self) -> &str {
                match self.address.as_ref() {
                    Some(v) => v,
                    None => "",
                }
            }

            pub fn clear_address(&mut self) {
                self.address = ::std::option::Option::None;
            }

            pub fn has_address(&self) -> bool {
                self.address.is_some()
            }

            // Param is passed by value, moved
            pub fn set_address(&mut self, v: ::std::string::String) {
                self.address = ::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_address(&mut self) -> &mut ::std::string::String {
                if self.address.is_none() {
                    self.address = ::std::option::Option::Some(::std::string::String::new());
                }
                self.address.as_mut().unwrap()
            }

            // Take field
            pub fn take_address(&mut self) -> ::std::string::String {
                self.address.take().unwrap_or_else(|| ::std::string::String::new())
            }

            // required uint64 amount = 3;

            pub fn amount(&self) -> u64 {
                self.amount.unwrap_or(0)
            }

            pub fn clear_amount(&mut self) {
                self.amount = ::std::option::Option::None;
            }

            pub fn has_amount(&self) -> bool {
                self.amount.is_some()
            }

            // Param is passed by value, moved
            pub fn set_amount(&mut self, v: u64) {
                self.amount = ::std::option::Option::Some(v);
            }

            // optional .hw.trezor.messages.bitcoin.OutputScriptType script_type = 4;

            pub fn script_type(&self) -> super::super::OutputScriptType {
                match self.script_type {
                    Some(e) => e.enum_value_or(super::super::OutputScriptType::PAYTOADDRESS),
                    None => super::super::OutputScriptType::PAYTOADDRESS,
                }
            }

            pub fn clear_script_type(&mut self) {
                self.script_type = ::std::option::Option::None;
            }

            pub fn has_script_type(&self) -> bool {
                self.script_type.is_some()
            }

            // Param is passed by value, moved
            pub fn set_script_type(&mut self, v: super::super::OutputScriptType) {
                self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
            }

            // optional bytes op_return_data = 6;

            pub fn op_return_data(&self) -> &[u8] {
                match self.op_return_data.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_op_return_data(&mut self) {
                self.op_return_data = ::std::option::Option::None;
            }

            pub fn has_op_return_data(&self) -> bool {
                self.op_return_data.is_some()
            }

            // Param is passed by value, moved
            pub fn set_op_return_data(&mut self, v: ::std::vec::Vec<u8>) {
                self.op_return_data = ::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_op_return_data(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.op_return_data.is_none() {
                    self.op_return_data = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.op_return_data.as_mut().unwrap()
            }

            // Take field
            pub fn take_op_return_data(&mut self) -> ::std::vec::Vec<u8> {
                self.op_return_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional bytes orig_hash = 10;

            pub fn orig_hash(&self) -> &[u8] {
                match self.orig_hash.as_ref() {
                    Some(v) => v,
                    None => &[],
                }
            }

            pub fn clear_orig_hash(&mut self) {
                self.orig_hash = ::std::option::Option::None;
            }

            pub fn has_orig_hash(&self) -> bool {
                self.orig_hash.is_some()
            }

            // Param is passed by value, moved
            pub fn set_orig_hash(&mut self, v: ::std::vec::Vec<u8>) {
                self.orig_hash = ::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_orig_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
                if self.orig_hash.is_none() {
                    self.orig_hash = ::std::option::Option::Some(::std::vec::Vec::new());
                }
                self.orig_hash.as_mut().unwrap()
            }

            // Take field
            pub fn take_orig_hash(&mut self) -> ::std::vec::Vec<u8> {
                self.orig_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
            }

            // optional uint32 orig_index = 11;

            pub fn orig_index(&self) -> u32 {
                self.orig_index.unwrap_or(0)
            }

            pub fn clear_orig_index(&mut self) {
                self.orig_index = ::std::option::Option::None;
            }

            pub fn has_orig_index(&self) -> bool {
                self.orig_index.is_some()
            }

            // Param is passed by value, moved
            pub fn set_orig_index(&mut self, v: u32) {
                self.orig_index = ::std::option::Option::Some(v);
            }

            // optional uint32 payment_req_index = 12;

            pub fn payment_req_index(&self) -> u32 {
                self.payment_req_index.unwrap_or(0)
            }

            pub fn clear_payment_req_index(&mut self) {
                self.payment_req_index = ::std::option::Option::None;
            }

            pub fn has_payment_req_index(&self) -> bool {
                self.payment_req_index.is_some()
            }

            // Param is passed by value, moved
            pub fn set_payment_req_index(&mut self, v: u32) {
                self.payment_req_index = ::std::option::Option::Some(v);
            }

            pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
                let mut fields = ::std::vec::Vec::with_capacity(9);
                let mut oneofs = ::std::vec::Vec::with_capacity(0);
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "address",
                    |m: &TxOutputType| { &m.address },
                    |m: &mut TxOutputType| { &mut m.address },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                    "address_n",
                    |m: &TxOutputType| { &m.address_n },
                    |m: &mut TxOutputType| { &mut m.address_n },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "amount",
                    |m: &TxOutputType| { &m.amount },
                    |m: &mut TxOutputType| { &mut m.amount },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "script_type",
                    |m: &TxOutputType| { &m.script_type },
                    |m: &mut TxOutputType| { &mut m.script_type },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::super::MultisigRedeemScriptType>(
                    "multisig",
                    |m: &TxOutputType| { &m.multisig },
                    |m: &mut TxOutputType| { &mut m.multisig },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "op_return_data",
                    |m: &TxOutputType| { &m.op_return_data },
                    |m: &mut TxOutputType| { &mut m.op_return_data },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "orig_hash",
                    |m: &TxOutputType| { &m.orig_hash },
                    |m: &mut TxOutputType| { &mut m.orig_hash },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "orig_index",
                    |m: &TxOutputType| { &m.orig_index },
                    |m: &mut TxOutputType| { &mut m.orig_index },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "payment_req_index",
                    |m: &TxOutputType| { &m.payment_req_index },
                    |m: &mut TxOutputType| { &mut m.payment_req_index },
                ));
                ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxOutputType>(
                    "TxAck.TransactionType.TxOutputType",
                    fields,
                    oneofs,
                )
            }
        }

        impl ::protobuf::Message for TxOutputType {
            const NAME: &'static str = "TxOutputType";

            fn is_initialized(&self) -> bool {
                if self.amount.is_none() {
                    return false;
                }
                for v in &self.multisig {
                    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.address = ::std::option::Option::Some(is.read_string()?);
                        },
                        18 => {
                            is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                        },
                        16 => {
                            self.address_n.push(is.read_uint32()?);
                        },
                        24 => {
                            self.amount = ::std::option::Option::Some(is.read_uint64()?);
                        },
                        32 => {
                            self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                        },
                        42 => {
                            ::protobuf::rt::read_singular_message_into_field(is, &mut self.multisig)?;
                        },
                        50 => {
                            self.op_return_data = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        82 => {
                            self.orig_hash = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        88 => {
                            self.orig_index = ::std::option::Option::Some(is.read_uint32()?);
                        },
                        96 => {
                            self.payment_req_index = ::std::option::Option::Some(is.read_uint32()?);
                        },
                        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.address.as_ref() {
                    my_size += ::protobuf::rt::string_size(1, &v);
                }
                for value in &self.address_n {
                    my_size += ::protobuf::rt::uint32_size(2, *value);
                };
                if let Some(v) = self.amount {
                    my_size += ::protobuf::rt::uint64_size(3, v);
                }
                if let Some(v) = self.script_type {
                    my_size += ::protobuf::rt::int32_size(4, v.value());
                }
                if let Some(v) = self.multisig.as_ref() {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
                }
                if let Some(v) = self.op_return_data.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(6, &v);
                }
                if let Some(v) = self.orig_hash.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(10, &v);
                }
                if let Some(v) = self.orig_index {
                    my_size += ::protobuf::rt::uint32_size(11, v);
                }
                if let Some(v) = self.payment_req_index {
                    my_size += ::protobuf::rt::uint32_size(12, 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.address.as_ref() {
                    os.write_string(1, v)?;
                }
                for v in &self.address_n {
                    os.write_uint32(2, *v)?;
                };
                if let Some(v) = self.amount {
                    os.write_uint64(3, v)?;
                }
                if let Some(v) = self.script_type {
                    os.write_enum(4, ::protobuf::EnumOrUnknown::value(&v))?;
                }
                if let Some(v) = self.multisig.as_ref() {
                    ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
                }
                if let Some(v) = self.op_return_data.as_ref() {
                    os.write_bytes(6, v)?;
                }
                if let Some(v) = self.orig_hash.as_ref() {
                    os.write_bytes(10, v)?;
                }
                if let Some(v) = self.orig_index {
                    os.write_uint32(11, v)?;
                }
                if let Some(v) = self.payment_req_index {
                    os.write_uint32(12, 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() -> TxOutputType {
                TxOutputType::new()
            }

            fn clear(&mut self) {
                self.address = ::std::option::Option::None;
                self.address_n.clear();
                self.amount = ::std::option::Option::None;
                self.script_type = ::std::option::Option::None;
                self.multisig.clear();
                self.op_return_data = ::std::option::Option::None;
                self.orig_hash = ::std::option::Option::None;
                self.orig_index = ::std::option::Option::None;
                self.payment_req_index = ::std::option::Option::None;
                self.special_fields.clear();
            }

            fn default_instance() -> &'static TxOutputType {
                static instance: TxOutputType = TxOutputType {
                    address: ::std::option::Option::None,
                    address_n: ::std::vec::Vec::new(),
                    amount: ::std::option::Option::None,
                    script_type: ::std::option::Option::None,
                    multisig: ::protobuf::MessageField::none(),
                    op_return_data: ::std::option::Option::None,
                    orig_hash: ::std::option::Option::None,
                    orig_index: ::std::option::Option::None,
                    payment_req_index: ::std::option::Option::None,
                    special_fields: ::protobuf::SpecialFields::new(),
                };
                &instance
            }
        }

        impl ::protobuf::MessageFull for TxOutputType {
            fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
                static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
                descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("TxAck.TransactionType.TxOutputType").unwrap()).clone()
            }
        }

        impl ::std::fmt::Display for TxOutputType {
            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
                ::protobuf::text_format::fmt(self, f)
            }
        }

        impl ::protobuf::reflect::ProtobufValue for TxOutputType {
            type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
        }
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxInput)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxInput {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.prev_hash)
    pub prev_hash: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.prev_index)
    pub prev_index: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.script_sig)
    pub script_sig: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.sequence)
    pub sequence: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.script_type)
    pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.multisig)
    pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.amount)
    pub amount: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.decred_tree)
    pub decred_tree: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.witness)
    pub witness: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.ownership_proof)
    pub ownership_proof: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.commitment_data)
    pub commitment_data: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.orig_hash)
    pub orig_hash: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.orig_index)
    pub orig_index: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.decred_staking_spend)
    pub decred_staking_spend: ::std::option::Option<::protobuf::EnumOrUnknown<DecredStakingSpendType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.script_pubkey)
    pub script_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxInput.coinjoin_flags)
    pub coinjoin_flags: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxInput.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxInput {
    fn default() -> &'a TxInput {
        <TxInput as ::protobuf::Message>::default_instance()
    }
}

impl TxInput {
    pub fn new() -> TxInput {
        ::std::default::Default::default()
    }

    // required bytes prev_hash = 2;

    pub fn prev_hash(&self) -> &[u8] {
        match self.prev_hash.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_prev_hash(&mut self) {
        self.prev_hash = ::std::option::Option::None;
    }

    pub fn has_prev_hash(&self) -> bool {
        self.prev_hash.is_some()
    }

    // Param is passed by value, moved
    pub fn set_prev_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.prev_hash = ::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_prev_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.prev_hash.is_none() {
            self.prev_hash = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.prev_hash.as_mut().unwrap()
    }

    // Take field
    pub fn take_prev_hash(&mut self) -> ::std::vec::Vec<u8> {
        self.prev_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // required uint32 prev_index = 3;

    pub fn prev_index(&self) -> u32 {
        self.prev_index.unwrap_or(0)
    }

    pub fn clear_prev_index(&mut self) {
        self.prev_index = ::std::option::Option::None;
    }

    pub fn has_prev_index(&self) -> bool {
        self.prev_index.is_some()
    }

    // Param is passed by value, moved
    pub fn set_prev_index(&mut self, v: u32) {
        self.prev_index = ::std::option::Option::Some(v);
    }

    // optional bytes script_sig = 4;

    pub fn script_sig(&self) -> &[u8] {
        match self.script_sig.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_script_sig(&mut self) {
        self.script_sig = ::std::option::Option::None;
    }

    pub fn has_script_sig(&self) -> bool {
        self.script_sig.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_sig(&mut self, v: ::std::vec::Vec<u8>) {
        self.script_sig = ::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_script_sig(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.script_sig.is_none() {
            self.script_sig = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.script_sig.as_mut().unwrap()
    }

    // Take field
    pub fn take_script_sig(&mut self) -> ::std::vec::Vec<u8> {
        self.script_sig.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional uint32 sequence = 5;

    pub fn sequence(&self) -> u32 {
        self.sequence.unwrap_or(4294967295u32)
    }

    pub fn clear_sequence(&mut self) {
        self.sequence = ::std::option::Option::None;
    }

    pub fn has_sequence(&self) -> bool {
        self.sequence.is_some()
    }

    // Param is passed by value, moved
    pub fn set_sequence(&mut self, v: u32) {
        self.sequence = ::std::option::Option::Some(v);
    }

    // optional .hw.trezor.messages.bitcoin.InputScriptType script_type = 6;

    pub fn script_type(&self) -> InputScriptType {
        match self.script_type {
            Some(e) => e.enum_value_or(InputScriptType::SPENDADDRESS),
            None => InputScriptType::SPENDADDRESS,
        }
    }

    pub fn clear_script_type(&mut self) {
        self.script_type = ::std::option::Option::None;
    }

    pub fn has_script_type(&self) -> bool {
        self.script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_type(&mut self, v: InputScriptType) {
        self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // required uint64 amount = 8;

    pub fn amount(&self) -> u64 {
        self.amount.unwrap_or(0)
    }

    pub fn clear_amount(&mut self) {
        self.amount = ::std::option::Option::None;
    }

    pub fn has_amount(&self) -> bool {
        self.amount.is_some()
    }

    // Param is passed by value, moved
    pub fn set_amount(&mut self, v: u64) {
        self.amount = ::std::option::Option::Some(v);
    }

    // optional uint32 decred_tree = 9;

    pub fn decred_tree(&self) -> u32 {
        self.decred_tree.unwrap_or(0)
    }

    pub fn clear_decred_tree(&mut self) {
        self.decred_tree = ::std::option::Option::None;
    }

    pub fn has_decred_tree(&self) -> bool {
        self.decred_tree.is_some()
    }

    // Param is passed by value, moved
    pub fn set_decred_tree(&mut self, v: u32) {
        self.decred_tree = ::std::option::Option::Some(v);
    }

    // optional bytes witness = 13;

    pub fn witness(&self) -> &[u8] {
        match self.witness.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_witness(&mut self) {
        self.witness = ::std::option::Option::None;
    }

    pub fn has_witness(&self) -> bool {
        self.witness.is_some()
    }

    // Param is passed by value, moved
    pub fn set_witness(&mut self, v: ::std::vec::Vec<u8>) {
        self.witness = ::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_witness(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.witness.is_none() {
            self.witness = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.witness.as_mut().unwrap()
    }

    // Take field
    pub fn take_witness(&mut self) -> ::std::vec::Vec<u8> {
        self.witness.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional bytes ownership_proof = 14;

    pub fn ownership_proof(&self) -> &[u8] {
        match self.ownership_proof.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_ownership_proof(&mut self) {
        self.ownership_proof = ::std::option::Option::None;
    }

    pub fn has_ownership_proof(&self) -> bool {
        self.ownership_proof.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ownership_proof(&mut self, v: ::std::vec::Vec<u8>) {
        self.ownership_proof = ::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_ownership_proof(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.ownership_proof.is_none() {
            self.ownership_proof = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.ownership_proof.as_mut().unwrap()
    }

    // Take field
    pub fn take_ownership_proof(&mut self) -> ::std::vec::Vec<u8> {
        self.ownership_proof.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional bytes commitment_data = 15;

    pub fn commitment_data(&self) -> &[u8] {
        match self.commitment_data.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_commitment_data(&mut self) {
        self.commitment_data = ::std::option::Option::None;
    }

    pub fn has_commitment_data(&self) -> bool {
        self.commitment_data.is_some()
    }

    // Param is passed by value, moved
    pub fn set_commitment_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.commitment_data = ::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_commitment_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.commitment_data.is_none() {
            self.commitment_data = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.commitment_data.as_mut().unwrap()
    }

    // Take field
    pub fn take_commitment_data(&mut self) -> ::std::vec::Vec<u8> {
        self.commitment_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional bytes orig_hash = 16;

    pub fn orig_hash(&self) -> &[u8] {
        match self.orig_hash.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_orig_hash(&mut self) {
        self.orig_hash = ::std::option::Option::None;
    }

    pub fn has_orig_hash(&self) -> bool {
        self.orig_hash.is_some()
    }

    // Param is passed by value, moved
    pub fn set_orig_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.orig_hash = ::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_orig_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.orig_hash.is_none() {
            self.orig_hash = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.orig_hash.as_mut().unwrap()
    }

    // Take field
    pub fn take_orig_hash(&mut self) -> ::std::vec::Vec<u8> {
        self.orig_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional uint32 orig_index = 17;

    pub fn orig_index(&self) -> u32 {
        self.orig_index.unwrap_or(0)
    }

    pub fn clear_orig_index(&mut self) {
        self.orig_index = ::std::option::Option::None;
    }

    pub fn has_orig_index(&self) -> bool {
        self.orig_index.is_some()
    }

    // Param is passed by value, moved
    pub fn set_orig_index(&mut self, v: u32) {
        self.orig_index = ::std::option::Option::Some(v);
    }

    // optional .hw.trezor.messages.bitcoin.DecredStakingSpendType decred_staking_spend = 18;

    pub fn decred_staking_spend(&self) -> DecredStakingSpendType {
        match self.decred_staking_spend {
            Some(e) => e.enum_value_or(DecredStakingSpendType::SSGen),
            None => DecredStakingSpendType::SSGen,
        }
    }

    pub fn clear_decred_staking_spend(&mut self) {
        self.decred_staking_spend = ::std::option::Option::None;
    }

    pub fn has_decred_staking_spend(&self) -> bool {
        self.decred_staking_spend.is_some()
    }

    // Param is passed by value, moved
    pub fn set_decred_staking_spend(&mut self, v: DecredStakingSpendType) {
        self.decred_staking_spend = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // optional bytes script_pubkey = 19;

    pub fn script_pubkey(&self) -> &[u8] {
        match self.script_pubkey.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_script_pubkey(&mut self) {
        self.script_pubkey = ::std::option::Option::None;
    }

    pub fn has_script_pubkey(&self) -> bool {
        self.script_pubkey.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_pubkey(&mut self, v: ::std::vec::Vec<u8>) {
        self.script_pubkey = ::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_script_pubkey(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.script_pubkey.is_none() {
            self.script_pubkey = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.script_pubkey.as_mut().unwrap()
    }

    // Take field
    pub fn take_script_pubkey(&mut self) -> ::std::vec::Vec<u8> {
        self.script_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional uint32 coinjoin_flags = 20;

    pub fn coinjoin_flags(&self) -> u32 {
        self.coinjoin_flags.unwrap_or(0u32)
    }

    pub fn clear_coinjoin_flags(&mut self) {
        self.coinjoin_flags = ::std::option::Option::None;
    }

    pub fn has_coinjoin_flags(&self) -> bool {
        self.coinjoin_flags.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coinjoin_flags(&mut self, v: u32) {
        self.coinjoin_flags = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(17);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &TxInput| { &m.address_n },
            |m: &mut TxInput| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "prev_hash",
            |m: &TxInput| { &m.prev_hash },
            |m: &mut TxInput| { &mut m.prev_hash },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "prev_index",
            |m: &TxInput| { &m.prev_index },
            |m: &mut TxInput| { &mut m.prev_index },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_sig",
            |m: &TxInput| { &m.script_sig },
            |m: &mut TxInput| { &mut m.script_sig },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "sequence",
            |m: &TxInput| { &m.sequence },
            |m: &mut TxInput| { &mut m.sequence },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_type",
            |m: &TxInput| { &m.script_type },
            |m: &mut TxInput| { &mut m.script_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MultisigRedeemScriptType>(
            "multisig",
            |m: &TxInput| { &m.multisig },
            |m: &mut TxInput| { &mut m.multisig },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "amount",
            |m: &TxInput| { &m.amount },
            |m: &mut TxInput| { &mut m.amount },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "decred_tree",
            |m: &TxInput| { &m.decred_tree },
            |m: &mut TxInput| { &mut m.decred_tree },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "witness",
            |m: &TxInput| { &m.witness },
            |m: &mut TxInput| { &mut m.witness },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "ownership_proof",
            |m: &TxInput| { &m.ownership_proof },
            |m: &mut TxInput| { &mut m.ownership_proof },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "commitment_data",
            |m: &TxInput| { &m.commitment_data },
            |m: &mut TxInput| { &mut m.commitment_data },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "orig_hash",
            |m: &TxInput| { &m.orig_hash },
            |m: &mut TxInput| { &mut m.orig_hash },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "orig_index",
            |m: &TxInput| { &m.orig_index },
            |m: &mut TxInput| { &mut m.orig_index },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "decred_staking_spend",
            |m: &TxInput| { &m.decred_staking_spend },
            |m: &mut TxInput| { &mut m.decred_staking_spend },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_pubkey",
            |m: &TxInput| { &m.script_pubkey },
            |m: &mut TxInput| { &mut m.script_pubkey },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coinjoin_flags",
            |m: &TxInput| { &m.coinjoin_flags },
            |m: &mut TxInput| { &mut m.coinjoin_flags },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxInput>(
            "TxInput",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxInput {
    const NAME: &'static str = "TxInput";

    fn is_initialized(&self) -> bool {
        if self.prev_hash.is_none() {
            return false;
        }
        if self.prev_index.is_none() {
            return false;
        }
        if self.amount.is_none() {
            return false;
        }
        for v in &self.multisig {
            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 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.prev_hash = ::std::option::Option::Some(is.read_bytes()?);
                },
                24 => {
                    self.prev_index = ::std::option::Option::Some(is.read_uint32()?);
                },
                34 => {
                    self.script_sig = ::std::option::Option::Some(is.read_bytes()?);
                },
                40 => {
                    self.sequence = ::std::option::Option::Some(is.read_uint32()?);
                },
                48 => {
                    self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                58 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.multisig)?;
                },
                64 => {
                    self.amount = ::std::option::Option::Some(is.read_uint64()?);
                },
                72 => {
                    self.decred_tree = ::std::option::Option::Some(is.read_uint32()?);
                },
                106 => {
                    self.witness = ::std::option::Option::Some(is.read_bytes()?);
                },
                114 => {
                    self.ownership_proof = ::std::option::Option::Some(is.read_bytes()?);
                },
                122 => {
                    self.commitment_data = ::std::option::Option::Some(is.read_bytes()?);
                },
                130 => {
                    self.orig_hash = ::std::option::Option::Some(is.read_bytes()?);
                },
                136 => {
                    self.orig_index = ::std::option::Option::Some(is.read_uint32()?);
                },
                144 => {
                    self.decred_staking_spend = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                154 => {
                    self.script_pubkey = ::std::option::Option::Some(is.read_bytes()?);
                },
                160 => {
                    self.coinjoin_flags = ::std::option::Option::Some(is.read_uint32()?);
                },
                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;
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(1, *value);
        };
        if let Some(v) = self.prev_hash.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.prev_index {
            my_size += ::protobuf::rt::uint32_size(3, v);
        }
        if let Some(v) = self.script_sig.as_ref() {
            my_size += ::protobuf::rt::bytes_size(4, &v);
        }
        if let Some(v) = self.sequence {
            my_size += ::protobuf::rt::uint32_size(5, v);
        }
        if let Some(v) = self.script_type {
            my_size += ::protobuf::rt::int32_size(6, v.value());
        }
        if let Some(v) = self.multisig.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.amount {
            my_size += ::protobuf::rt::uint64_size(8, v);
        }
        if let Some(v) = self.decred_tree {
            my_size += ::protobuf::rt::uint32_size(9, v);
        }
        if let Some(v) = self.witness.as_ref() {
            my_size += ::protobuf::rt::bytes_size(13, &v);
        }
        if let Some(v) = self.ownership_proof.as_ref() {
            my_size += ::protobuf::rt::bytes_size(14, &v);
        }
        if let Some(v) = self.commitment_data.as_ref() {
            my_size += ::protobuf::rt::bytes_size(15, &v);
        }
        if let Some(v) = self.orig_hash.as_ref() {
            my_size += ::protobuf::rt::bytes_size(16, &v);
        }
        if let Some(v) = self.orig_index {
            my_size += ::protobuf::rt::uint32_size(17, v);
        }
        if let Some(v) = self.decred_staking_spend {
            my_size += ::protobuf::rt::int32_size(18, v.value());
        }
        if let Some(v) = self.script_pubkey.as_ref() {
            my_size += ::protobuf::rt::bytes_size(19, &v);
        }
        if let Some(v) = self.coinjoin_flags {
            my_size += ::protobuf::rt::uint32_size(20, 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<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.prev_hash.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.prev_index {
            os.write_uint32(3, v)?;
        }
        if let Some(v) = self.script_sig.as_ref() {
            os.write_bytes(4, v)?;
        }
        if let Some(v) = self.sequence {
            os.write_uint32(5, v)?;
        }
        if let Some(v) = self.script_type {
            os.write_enum(6, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.multisig.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
        }
        if let Some(v) = self.amount {
            os.write_uint64(8, v)?;
        }
        if let Some(v) = self.decred_tree {
            os.write_uint32(9, v)?;
        }
        if let Some(v) = self.witness.as_ref() {
            os.write_bytes(13, v)?;
        }
        if let Some(v) = self.ownership_proof.as_ref() {
            os.write_bytes(14, v)?;
        }
        if let Some(v) = self.commitment_data.as_ref() {
            os.write_bytes(15, v)?;
        }
        if let Some(v) = self.orig_hash.as_ref() {
            os.write_bytes(16, v)?;
        }
        if let Some(v) = self.orig_index {
            os.write_uint32(17, v)?;
        }
        if let Some(v) = self.decred_staking_spend {
            os.write_enum(18, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.script_pubkey.as_ref() {
            os.write_bytes(19, v)?;
        }
        if let Some(v) = self.coinjoin_flags {
            os.write_uint32(20, 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() -> TxInput {
        TxInput::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.prev_hash = ::std::option::Option::None;
        self.prev_index = ::std::option::Option::None;
        self.script_sig = ::std::option::Option::None;
        self.sequence = ::std::option::Option::None;
        self.script_type = ::std::option::Option::None;
        self.multisig.clear();
        self.amount = ::std::option::Option::None;
        self.decred_tree = ::std::option::Option::None;
        self.witness = ::std::option::Option::None;
        self.ownership_proof = ::std::option::Option::None;
        self.commitment_data = ::std::option::Option::None;
        self.orig_hash = ::std::option::Option::None;
        self.orig_index = ::std::option::Option::None;
        self.decred_staking_spend = ::std::option::Option::None;
        self.script_pubkey = ::std::option::Option::None;
        self.coinjoin_flags = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxInput {
        static instance: TxInput = TxInput {
            address_n: ::std::vec::Vec::new(),
            prev_hash: ::std::option::Option::None,
            prev_index: ::std::option::Option::None,
            script_sig: ::std::option::Option::None,
            sequence: ::std::option::Option::None,
            script_type: ::std::option::Option::None,
            multisig: ::protobuf::MessageField::none(),
            amount: ::std::option::Option::None,
            decred_tree: ::std::option::Option::None,
            witness: ::std::option::Option::None,
            ownership_proof: ::std::option::Option::None,
            commitment_data: ::std::option::Option::None,
            orig_hash: ::std::option::Option::None,
            orig_index: ::std::option::Option::None,
            decred_staking_spend: ::std::option::Option::None,
            script_pubkey: ::std::option::Option::None,
            coinjoin_flags: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxInput {
    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("TxInput").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxInput {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxOutput)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxOutput {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.address)
    pub address: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.amount)
    pub amount: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.script_type)
    pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<OutputScriptType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.multisig)
    pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.op_return_data)
    pub op_return_data: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.orig_hash)
    pub orig_hash: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.orig_index)
    pub orig_index: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxOutput.payment_req_index)
    pub payment_req_index: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxOutput.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxOutput {
    fn default() -> &'a TxOutput {
        <TxOutput as ::protobuf::Message>::default_instance()
    }
}

impl TxOutput {
    pub fn new() -> TxOutput {
        ::std::default::Default::default()
    }

    // optional string address = 1;

    pub fn address(&self) -> &str {
        match self.address.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_address(&mut self) {
        self.address = ::std::option::Option::None;
    }

    pub fn has_address(&self) -> bool {
        self.address.is_some()
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::string::String) {
        self.address = ::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_address(&mut self) -> &mut ::std::string::String {
        if self.address.is_none() {
            self.address = ::std::option::Option::Some(::std::string::String::new());
        }
        self.address.as_mut().unwrap()
    }

    // Take field
    pub fn take_address(&mut self) -> ::std::string::String {
        self.address.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // required uint64 amount = 3;

    pub fn amount(&self) -> u64 {
        self.amount.unwrap_or(0)
    }

    pub fn clear_amount(&mut self) {
        self.amount = ::std::option::Option::None;
    }

    pub fn has_amount(&self) -> bool {
        self.amount.is_some()
    }

    // Param is passed by value, moved
    pub fn set_amount(&mut self, v: u64) {
        self.amount = ::std::option::Option::Some(v);
    }

    // optional .hw.trezor.messages.bitcoin.OutputScriptType script_type = 4;

    pub fn script_type(&self) -> OutputScriptType {
        match self.script_type {
            Some(e) => e.enum_value_or(OutputScriptType::PAYTOADDRESS),
            None => OutputScriptType::PAYTOADDRESS,
        }
    }

    pub fn clear_script_type(&mut self) {
        self.script_type = ::std::option::Option::None;
    }

    pub fn has_script_type(&self) -> bool {
        self.script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_type(&mut self, v: OutputScriptType) {
        self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // optional bytes op_return_data = 6;

    pub fn op_return_data(&self) -> &[u8] {
        match self.op_return_data.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_op_return_data(&mut self) {
        self.op_return_data = ::std::option::Option::None;
    }

    pub fn has_op_return_data(&self) -> bool {
        self.op_return_data.is_some()
    }

    // Param is passed by value, moved
    pub fn set_op_return_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.op_return_data = ::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_op_return_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.op_return_data.is_none() {
            self.op_return_data = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.op_return_data.as_mut().unwrap()
    }

    // Take field
    pub fn take_op_return_data(&mut self) -> ::std::vec::Vec<u8> {
        self.op_return_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional bytes orig_hash = 10;

    pub fn orig_hash(&self) -> &[u8] {
        match self.orig_hash.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_orig_hash(&mut self) {
        self.orig_hash = ::std::option::Option::None;
    }

    pub fn has_orig_hash(&self) -> bool {
        self.orig_hash.is_some()
    }

    // Param is passed by value, moved
    pub fn set_orig_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.orig_hash = ::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_orig_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.orig_hash.is_none() {
            self.orig_hash = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.orig_hash.as_mut().unwrap()
    }

    // Take field
    pub fn take_orig_hash(&mut self) -> ::std::vec::Vec<u8> {
        self.orig_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional uint32 orig_index = 11;

    pub fn orig_index(&self) -> u32 {
        self.orig_index.unwrap_or(0)
    }

    pub fn clear_orig_index(&mut self) {
        self.orig_index = ::std::option::Option::None;
    }

    pub fn has_orig_index(&self) -> bool {
        self.orig_index.is_some()
    }

    // Param is passed by value, moved
    pub fn set_orig_index(&mut self, v: u32) {
        self.orig_index = ::std::option::Option::Some(v);
    }

    // optional uint32 payment_req_index = 12;

    pub fn payment_req_index(&self) -> u32 {
        self.payment_req_index.unwrap_or(0)
    }

    pub fn clear_payment_req_index(&mut self) {
        self.payment_req_index = ::std::option::Option::None;
    }

    pub fn has_payment_req_index(&self) -> bool {
        self.payment_req_index.is_some()
    }

    // Param is passed by value, moved
    pub fn set_payment_req_index(&mut self, v: u32) {
        self.payment_req_index = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(9);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "address",
            |m: &TxOutput| { &m.address },
            |m: &mut TxOutput| { &mut m.address },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &TxOutput| { &m.address_n },
            |m: &mut TxOutput| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "amount",
            |m: &TxOutput| { &m.amount },
            |m: &mut TxOutput| { &mut m.amount },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_type",
            |m: &TxOutput| { &m.script_type },
            |m: &mut TxOutput| { &mut m.script_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MultisigRedeemScriptType>(
            "multisig",
            |m: &TxOutput| { &m.multisig },
            |m: &mut TxOutput| { &mut m.multisig },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "op_return_data",
            |m: &TxOutput| { &m.op_return_data },
            |m: &mut TxOutput| { &mut m.op_return_data },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "orig_hash",
            |m: &TxOutput| { &m.orig_hash },
            |m: &mut TxOutput| { &mut m.orig_hash },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "orig_index",
            |m: &TxOutput| { &m.orig_index },
            |m: &mut TxOutput| { &mut m.orig_index },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "payment_req_index",
            |m: &TxOutput| { &m.payment_req_index },
            |m: &mut TxOutput| { &mut m.payment_req_index },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxOutput>(
            "TxOutput",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxOutput {
    const NAME: &'static str = "TxOutput";

    fn is_initialized(&self) -> bool {
        if self.amount.is_none() {
            return false;
        }
        for v in &self.multisig {
            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.address = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                16 => {
                    self.address_n.push(is.read_uint32()?);
                },
                24 => {
                    self.amount = ::std::option::Option::Some(is.read_uint64()?);
                },
                32 => {
                    self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                42 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.multisig)?;
                },
                50 => {
                    self.op_return_data = ::std::option::Option::Some(is.read_bytes()?);
                },
                82 => {
                    self.orig_hash = ::std::option::Option::Some(is.read_bytes()?);
                },
                88 => {
                    self.orig_index = ::std::option::Option::Some(is.read_uint32()?);
                },
                96 => {
                    self.payment_req_index = ::std::option::Option::Some(is.read_uint32()?);
                },
                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.address.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(2, *value);
        };
        if let Some(v) = self.amount {
            my_size += ::protobuf::rt::uint64_size(3, v);
        }
        if let Some(v) = self.script_type {
            my_size += ::protobuf::rt::int32_size(4, v.value());
        }
        if let Some(v) = self.multisig.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.op_return_data.as_ref() {
            my_size += ::protobuf::rt::bytes_size(6, &v);
        }
        if let Some(v) = self.orig_hash.as_ref() {
            my_size += ::protobuf::rt::bytes_size(10, &v);
        }
        if let Some(v) = self.orig_index {
            my_size += ::protobuf::rt::uint32_size(11, v);
        }
        if let Some(v) = self.payment_req_index {
            my_size += ::protobuf::rt::uint32_size(12, 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.address.as_ref() {
            os.write_string(1, v)?;
        }
        for v in &self.address_n {
            os.write_uint32(2, *v)?;
        };
        if let Some(v) = self.amount {
            os.write_uint64(3, v)?;
        }
        if let Some(v) = self.script_type {
            os.write_enum(4, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.multisig.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
        }
        if let Some(v) = self.op_return_data.as_ref() {
            os.write_bytes(6, v)?;
        }
        if let Some(v) = self.orig_hash.as_ref() {
            os.write_bytes(10, v)?;
        }
        if let Some(v) = self.orig_index {
            os.write_uint32(11, v)?;
        }
        if let Some(v) = self.payment_req_index {
            os.write_uint32(12, 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() -> TxOutput {
        TxOutput::new()
    }

    fn clear(&mut self) {
        self.address = ::std::option::Option::None;
        self.address_n.clear();
        self.amount = ::std::option::Option::None;
        self.script_type = ::std::option::Option::None;
        self.multisig.clear();
        self.op_return_data = ::std::option::Option::None;
        self.orig_hash = ::std::option::Option::None;
        self.orig_index = ::std::option::Option::None;
        self.payment_req_index = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxOutput {
        static instance: TxOutput = TxOutput {
            address: ::std::option::Option::None,
            address_n: ::std::vec::Vec::new(),
            amount: ::std::option::Option::None,
            script_type: ::std::option::Option::None,
            multisig: ::protobuf::MessageField::none(),
            op_return_data: ::std::option::Option::None,
            orig_hash: ::std::option::Option::None,
            orig_index: ::std::option::Option::None,
            payment_req_index: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxOutput {
    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("TxOutput").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxOutput {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.PrevTx)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PrevTx {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.version)
    pub version: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.lock_time)
    pub lock_time: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.inputs_count)
    pub inputs_count: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.outputs_count)
    pub outputs_count: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.extra_data_len)
    pub extra_data_len: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.expiry)
    pub expiry: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.version_group_id)
    pub version_group_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.timestamp)
    pub timestamp: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevTx.branch_id)
    pub branch_id: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.PrevTx.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a PrevTx {
    fn default() -> &'a PrevTx {
        <PrevTx as ::protobuf::Message>::default_instance()
    }
}

impl PrevTx {
    pub fn new() -> PrevTx {
        ::std::default::Default::default()
    }

    // required uint32 version = 1;

    pub fn version(&self) -> u32 {
        self.version.unwrap_or(0)
    }

    pub fn clear_version(&mut self) {
        self.version = ::std::option::Option::None;
    }

    pub fn has_version(&self) -> bool {
        self.version.is_some()
    }

    // Param is passed by value, moved
    pub fn set_version(&mut self, v: u32) {
        self.version = ::std::option::Option::Some(v);
    }

    // required uint32 lock_time = 4;

    pub fn lock_time(&self) -> u32 {
        self.lock_time.unwrap_or(0)
    }

    pub fn clear_lock_time(&mut self) {
        self.lock_time = ::std::option::Option::None;
    }

    pub fn has_lock_time(&self) -> bool {
        self.lock_time.is_some()
    }

    // Param is passed by value, moved
    pub fn set_lock_time(&mut self, v: u32) {
        self.lock_time = ::std::option::Option::Some(v);
    }

    // required uint32 inputs_count = 6;

    pub fn inputs_count(&self) -> u32 {
        self.inputs_count.unwrap_or(0)
    }

    pub fn clear_inputs_count(&mut self) {
        self.inputs_count = ::std::option::Option::None;
    }

    pub fn has_inputs_count(&self) -> bool {
        self.inputs_count.is_some()
    }

    // Param is passed by value, moved
    pub fn set_inputs_count(&mut self, v: u32) {
        self.inputs_count = ::std::option::Option::Some(v);
    }

    // required uint32 outputs_count = 7;

    pub fn outputs_count(&self) -> u32 {
        self.outputs_count.unwrap_or(0)
    }

    pub fn clear_outputs_count(&mut self) {
        self.outputs_count = ::std::option::Option::None;
    }

    pub fn has_outputs_count(&self) -> bool {
        self.outputs_count.is_some()
    }

    // Param is passed by value, moved
    pub fn set_outputs_count(&mut self, v: u32) {
        self.outputs_count = ::std::option::Option::Some(v);
    }

    // optional uint32 extra_data_len = 9;

    pub fn extra_data_len(&self) -> u32 {
        self.extra_data_len.unwrap_or(0u32)
    }

    pub fn clear_extra_data_len(&mut self) {
        self.extra_data_len = ::std::option::Option::None;
    }

    pub fn has_extra_data_len(&self) -> bool {
        self.extra_data_len.is_some()
    }

    // Param is passed by value, moved
    pub fn set_extra_data_len(&mut self, v: u32) {
        self.extra_data_len = ::std::option::Option::Some(v);
    }

    // optional uint32 expiry = 10;

    pub fn expiry(&self) -> u32 {
        self.expiry.unwrap_or(0)
    }

    pub fn clear_expiry(&mut self) {
        self.expiry = ::std::option::Option::None;
    }

    pub fn has_expiry(&self) -> bool {
        self.expiry.is_some()
    }

    // Param is passed by value, moved
    pub fn set_expiry(&mut self, v: u32) {
        self.expiry = ::std::option::Option::Some(v);
    }

    // optional uint32 version_group_id = 12;

    pub fn version_group_id(&self) -> u32 {
        self.version_group_id.unwrap_or(0)
    }

    pub fn clear_version_group_id(&mut self) {
        self.version_group_id = ::std::option::Option::None;
    }

    pub fn has_version_group_id(&self) -> bool {
        self.version_group_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_version_group_id(&mut self, v: u32) {
        self.version_group_id = ::std::option::Option::Some(v);
    }

    // optional uint32 timestamp = 13;

    pub fn timestamp(&self) -> u32 {
        self.timestamp.unwrap_or(0)
    }

    pub fn clear_timestamp(&mut self) {
        self.timestamp = ::std::option::Option::None;
    }

    pub fn has_timestamp(&self) -> bool {
        self.timestamp.is_some()
    }

    // Param is passed by value, moved
    pub fn set_timestamp(&mut self, v: u32) {
        self.timestamp = ::std::option::Option::Some(v);
    }

    // optional uint32 branch_id = 14;

    pub fn branch_id(&self) -> u32 {
        self.branch_id.unwrap_or(0)
    }

    pub fn clear_branch_id(&mut self) {
        self.branch_id = ::std::option::Option::None;
    }

    pub fn has_branch_id(&self) -> bool {
        self.branch_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_branch_id(&mut self, v: u32) {
        self.branch_id = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(9);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "version",
            |m: &PrevTx| { &m.version },
            |m: &mut PrevTx| { &mut m.version },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "lock_time",
            |m: &PrevTx| { &m.lock_time },
            |m: &mut PrevTx| { &mut m.lock_time },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "inputs_count",
            |m: &PrevTx| { &m.inputs_count },
            |m: &mut PrevTx| { &mut m.inputs_count },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "outputs_count",
            |m: &PrevTx| { &m.outputs_count },
            |m: &mut PrevTx| { &mut m.outputs_count },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "extra_data_len",
            |m: &PrevTx| { &m.extra_data_len },
            |m: &mut PrevTx| { &mut m.extra_data_len },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "expiry",
            |m: &PrevTx| { &m.expiry },
            |m: &mut PrevTx| { &mut m.expiry },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "version_group_id",
            |m: &PrevTx| { &m.version_group_id },
            |m: &mut PrevTx| { &mut m.version_group_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "timestamp",
            |m: &PrevTx| { &m.timestamp },
            |m: &mut PrevTx| { &mut m.timestamp },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "branch_id",
            |m: &PrevTx| { &m.branch_id },
            |m: &mut PrevTx| { &mut m.branch_id },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PrevTx>(
            "PrevTx",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for PrevTx {
    const NAME: &'static str = "PrevTx";

    fn is_initialized(&self) -> bool {
        if self.version.is_none() {
            return false;
        }
        if self.lock_time.is_none() {
            return false;
        }
        if self.inputs_count.is_none() {
            return false;
        }
        if self.outputs_count.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 {
                8 => {
                    self.version = ::std::option::Option::Some(is.read_uint32()?);
                },
                32 => {
                    self.lock_time = ::std::option::Option::Some(is.read_uint32()?);
                },
                48 => {
                    self.inputs_count = ::std::option::Option::Some(is.read_uint32()?);
                },
                56 => {
                    self.outputs_count = ::std::option::Option::Some(is.read_uint32()?);
                },
                72 => {
                    self.extra_data_len = ::std::option::Option::Some(is.read_uint32()?);
                },
                80 => {
                    self.expiry = ::std::option::Option::Some(is.read_uint32()?);
                },
                96 => {
                    self.version_group_id = ::std::option::Option::Some(is.read_uint32()?);
                },
                104 => {
                    self.timestamp = ::std::option::Option::Some(is.read_uint32()?);
                },
                112 => {
                    self.branch_id = ::std::option::Option::Some(is.read_uint32()?);
                },
                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.version {
            my_size += ::protobuf::rt::uint32_size(1, v);
        }
        if let Some(v) = self.lock_time {
            my_size += ::protobuf::rt::uint32_size(4, v);
        }
        if let Some(v) = self.inputs_count {
            my_size += ::protobuf::rt::uint32_size(6, v);
        }
        if let Some(v) = self.outputs_count {
            my_size += ::protobuf::rt::uint32_size(7, v);
        }
        if let Some(v) = self.extra_data_len {
            my_size += ::protobuf::rt::uint32_size(9, v);
        }
        if let Some(v) = self.expiry {
            my_size += ::protobuf::rt::uint32_size(10, v);
        }
        if let Some(v) = self.version_group_id {
            my_size += ::protobuf::rt::uint32_size(12, v);
        }
        if let Some(v) = self.timestamp {
            my_size += ::protobuf::rt::uint32_size(13, v);
        }
        if let Some(v) = self.branch_id {
            my_size += ::protobuf::rt::uint32_size(14, 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.version {
            os.write_uint32(1, v)?;
        }
        if let Some(v) = self.lock_time {
            os.write_uint32(4, v)?;
        }
        if let Some(v) = self.inputs_count {
            os.write_uint32(6, v)?;
        }
        if let Some(v) = self.outputs_count {
            os.write_uint32(7, v)?;
        }
        if let Some(v) = self.extra_data_len {
            os.write_uint32(9, v)?;
        }
        if let Some(v) = self.expiry {
            os.write_uint32(10, v)?;
        }
        if let Some(v) = self.version_group_id {
            os.write_uint32(12, v)?;
        }
        if let Some(v) = self.timestamp {
            os.write_uint32(13, v)?;
        }
        if let Some(v) = self.branch_id {
            os.write_uint32(14, 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() -> PrevTx {
        PrevTx::new()
    }

    fn clear(&mut self) {
        self.version = ::std::option::Option::None;
        self.lock_time = ::std::option::Option::None;
        self.inputs_count = ::std::option::Option::None;
        self.outputs_count = ::std::option::Option::None;
        self.extra_data_len = ::std::option::Option::None;
        self.expiry = ::std::option::Option::None;
        self.version_group_id = ::std::option::Option::None;
        self.timestamp = ::std::option::Option::None;
        self.branch_id = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static PrevTx {
        static instance: PrevTx = PrevTx {
            version: ::std::option::Option::None,
            lock_time: ::std::option::Option::None,
            inputs_count: ::std::option::Option::None,
            outputs_count: ::std::option::Option::None,
            extra_data_len: ::std::option::Option::None,
            expiry: ::std::option::Option::None,
            version_group_id: ::std::option::Option::None,
            timestamp: ::std::option::Option::None,
            branch_id: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for PrevTx {
    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("PrevTx").unwrap()).clone()
    }
}

impl ::std::fmt::Display for PrevTx {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for PrevTx {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.PrevInput)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PrevInput {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevInput.prev_hash)
    pub prev_hash: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevInput.prev_index)
    pub prev_index: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevInput.script_sig)
    pub script_sig: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevInput.sequence)
    pub sequence: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevInput.decred_tree)
    pub decred_tree: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.PrevInput.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a PrevInput {
    fn default() -> &'a PrevInput {
        <PrevInput as ::protobuf::Message>::default_instance()
    }
}

impl PrevInput {
    pub fn new() -> PrevInput {
        ::std::default::Default::default()
    }

    // required bytes prev_hash = 2;

    pub fn prev_hash(&self) -> &[u8] {
        match self.prev_hash.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_prev_hash(&mut self) {
        self.prev_hash = ::std::option::Option::None;
    }

    pub fn has_prev_hash(&self) -> bool {
        self.prev_hash.is_some()
    }

    // Param is passed by value, moved
    pub fn set_prev_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.prev_hash = ::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_prev_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.prev_hash.is_none() {
            self.prev_hash = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.prev_hash.as_mut().unwrap()
    }

    // Take field
    pub fn take_prev_hash(&mut self) -> ::std::vec::Vec<u8> {
        self.prev_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // required uint32 prev_index = 3;

    pub fn prev_index(&self) -> u32 {
        self.prev_index.unwrap_or(0)
    }

    pub fn clear_prev_index(&mut self) {
        self.prev_index = ::std::option::Option::None;
    }

    pub fn has_prev_index(&self) -> bool {
        self.prev_index.is_some()
    }

    // Param is passed by value, moved
    pub fn set_prev_index(&mut self, v: u32) {
        self.prev_index = ::std::option::Option::Some(v);
    }

    // required bytes script_sig = 4;

    pub fn script_sig(&self) -> &[u8] {
        match self.script_sig.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_script_sig(&mut self) {
        self.script_sig = ::std::option::Option::None;
    }

    pub fn has_script_sig(&self) -> bool {
        self.script_sig.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_sig(&mut self, v: ::std::vec::Vec<u8>) {
        self.script_sig = ::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_script_sig(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.script_sig.is_none() {
            self.script_sig = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.script_sig.as_mut().unwrap()
    }

    // Take field
    pub fn take_script_sig(&mut self) -> ::std::vec::Vec<u8> {
        self.script_sig.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // required uint32 sequence = 5;

    pub fn sequence(&self) -> u32 {
        self.sequence.unwrap_or(0)
    }

    pub fn clear_sequence(&mut self) {
        self.sequence = ::std::option::Option::None;
    }

    pub fn has_sequence(&self) -> bool {
        self.sequence.is_some()
    }

    // Param is passed by value, moved
    pub fn set_sequence(&mut self, v: u32) {
        self.sequence = ::std::option::Option::Some(v);
    }

    // optional uint32 decred_tree = 9;

    pub fn decred_tree(&self) -> u32 {
        self.decred_tree.unwrap_or(0)
    }

    pub fn clear_decred_tree(&mut self) {
        self.decred_tree = ::std::option::Option::None;
    }

    pub fn has_decred_tree(&self) -> bool {
        self.decred_tree.is_some()
    }

    // Param is passed by value, moved
    pub fn set_decred_tree(&mut self, v: u32) {
        self.decred_tree = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(5);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "prev_hash",
            |m: &PrevInput| { &m.prev_hash },
            |m: &mut PrevInput| { &mut m.prev_hash },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "prev_index",
            |m: &PrevInput| { &m.prev_index },
            |m: &mut PrevInput| { &mut m.prev_index },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_sig",
            |m: &PrevInput| { &m.script_sig },
            |m: &mut PrevInput| { &mut m.script_sig },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "sequence",
            |m: &PrevInput| { &m.sequence },
            |m: &mut PrevInput| { &mut m.sequence },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "decred_tree",
            |m: &PrevInput| { &m.decred_tree },
            |m: &mut PrevInput| { &mut m.decred_tree },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PrevInput>(
            "PrevInput",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for PrevInput {
    const NAME: &'static str = "PrevInput";

    fn is_initialized(&self) -> bool {
        if self.prev_hash.is_none() {
            return false;
        }
        if self.prev_index.is_none() {
            return false;
        }
        if self.script_sig.is_none() {
            return false;
        }
        if self.sequence.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 {
                18 => {
                    self.prev_hash = ::std::option::Option::Some(is.read_bytes()?);
                },
                24 => {
                    self.prev_index = ::std::option::Option::Some(is.read_uint32()?);
                },
                34 => {
                    self.script_sig = ::std::option::Option::Some(is.read_bytes()?);
                },
                40 => {
                    self.sequence = ::std::option::Option::Some(is.read_uint32()?);
                },
                72 => {
                    self.decred_tree = ::std::option::Option::Some(is.read_uint32()?);
                },
                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.prev_hash.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.prev_index {
            my_size += ::protobuf::rt::uint32_size(3, v);
        }
        if let Some(v) = self.script_sig.as_ref() {
            my_size += ::protobuf::rt::bytes_size(4, &v);
        }
        if let Some(v) = self.sequence {
            my_size += ::protobuf::rt::uint32_size(5, v);
        }
        if let Some(v) = self.decred_tree {
            my_size += ::protobuf::rt::uint32_size(9, 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.prev_hash.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.prev_index {
            os.write_uint32(3, v)?;
        }
        if let Some(v) = self.script_sig.as_ref() {
            os.write_bytes(4, v)?;
        }
        if let Some(v) = self.sequence {
            os.write_uint32(5, v)?;
        }
        if let Some(v) = self.decred_tree {
            os.write_uint32(9, 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() -> PrevInput {
        PrevInput::new()
    }

    fn clear(&mut self) {
        self.prev_hash = ::std::option::Option::None;
        self.prev_index = ::std::option::Option::None;
        self.script_sig = ::std::option::Option::None;
        self.sequence = ::std::option::Option::None;
        self.decred_tree = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static PrevInput {
        static instance: PrevInput = PrevInput {
            prev_hash: ::std::option::Option::None,
            prev_index: ::std::option::Option::None,
            script_sig: ::std::option::Option::None,
            sequence: ::std::option::Option::None,
            decred_tree: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for PrevInput {
    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("PrevInput").unwrap()).clone()
    }
}

impl ::std::fmt::Display for PrevInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for PrevInput {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.PrevOutput)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PrevOutput {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevOutput.amount)
    pub amount: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevOutput.script_pubkey)
    pub script_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.PrevOutput.decred_script_version)
    pub decred_script_version: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.PrevOutput.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a PrevOutput {
    fn default() -> &'a PrevOutput {
        <PrevOutput as ::protobuf::Message>::default_instance()
    }
}

impl PrevOutput {
    pub fn new() -> PrevOutput {
        ::std::default::Default::default()
    }

    // required uint64 amount = 1;

    pub fn amount(&self) -> u64 {
        self.amount.unwrap_or(0)
    }

    pub fn clear_amount(&mut self) {
        self.amount = ::std::option::Option::None;
    }

    pub fn has_amount(&self) -> bool {
        self.amount.is_some()
    }

    // Param is passed by value, moved
    pub fn set_amount(&mut self, v: u64) {
        self.amount = ::std::option::Option::Some(v);
    }

    // required bytes script_pubkey = 2;

    pub fn script_pubkey(&self) -> &[u8] {
        match self.script_pubkey.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_script_pubkey(&mut self) {
        self.script_pubkey = ::std::option::Option::None;
    }

    pub fn has_script_pubkey(&self) -> bool {
        self.script_pubkey.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_pubkey(&mut self, v: ::std::vec::Vec<u8>) {
        self.script_pubkey = ::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_script_pubkey(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.script_pubkey.is_none() {
            self.script_pubkey = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.script_pubkey.as_mut().unwrap()
    }

    // Take field
    pub fn take_script_pubkey(&mut self) -> ::std::vec::Vec<u8> {
        self.script_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // optional uint32 decred_script_version = 3;

    pub fn decred_script_version(&self) -> u32 {
        self.decred_script_version.unwrap_or(0)
    }

    pub fn clear_decred_script_version(&mut self) {
        self.decred_script_version = ::std::option::Option::None;
    }

    pub fn has_decred_script_version(&self) -> bool {
        self.decred_script_version.is_some()
    }

    // Param is passed by value, moved
    pub fn set_decred_script_version(&mut self, v: u32) {
        self.decred_script_version = ::std::option::Option::Some(v);
    }

    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::<_, _>(
            "amount",
            |m: &PrevOutput| { &m.amount },
            |m: &mut PrevOutput| { &mut m.amount },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_pubkey",
            |m: &PrevOutput| { &m.script_pubkey },
            |m: &mut PrevOutput| { &mut m.script_pubkey },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "decred_script_version",
            |m: &PrevOutput| { &m.decred_script_version },
            |m: &mut PrevOutput| { &mut m.decred_script_version },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PrevOutput>(
            "PrevOutput",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for PrevOutput {
    const NAME: &'static str = "PrevOutput";

    fn is_initialized(&self) -> bool {
        if self.amount.is_none() {
            return false;
        }
        if self.script_pubkey.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 {
                8 => {
                    self.amount = ::std::option::Option::Some(is.read_uint64()?);
                },
                18 => {
                    self.script_pubkey = ::std::option::Option::Some(is.read_bytes()?);
                },
                24 => {
                    self.decred_script_version = ::std::option::Option::Some(is.read_uint32()?);
                },
                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.amount {
            my_size += ::protobuf::rt::uint64_size(1, v);
        }
        if let Some(v) = self.script_pubkey.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.decred_script_version {
            my_size += ::protobuf::rt::uint32_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.amount {
            os.write_uint64(1, v)?;
        }
        if let Some(v) = self.script_pubkey.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.decred_script_version {
            os.write_uint32(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() -> PrevOutput {
        PrevOutput::new()
    }

    fn clear(&mut self) {
        self.amount = ::std::option::Option::None;
        self.script_pubkey = ::std::option::Option::None;
        self.decred_script_version = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static PrevOutput {
        static instance: PrevOutput = PrevOutput {
            amount: ::std::option::Option::None,
            script_pubkey: ::std::option::Option::None,
            decred_script_version: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for PrevOutput {
    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("PrevOutput").unwrap()).clone()
    }
}

impl ::std::fmt::Display for PrevOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for PrevOutput {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckInput)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckInput {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckInput.tx)
    pub tx: ::protobuf::MessageField<tx_ack_input::TxAckInputWrapper>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckInput.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxAckInput {
    fn default() -> &'a TxAckInput {
        <TxAckInput as ::protobuf::Message>::default_instance()
    }
}

impl TxAckInput {
    pub fn new() -> TxAckInput {
        ::std::default::Default::default()
    }

    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_message_field_accessor::<_, tx_ack_input::TxAckInputWrapper>(
            "tx",
            |m: &TxAckInput| { &m.tx },
            |m: &mut TxAckInput| { &mut m.tx },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckInput>(
            "TxAckInput",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxAckInput {
    const NAME: &'static str = "TxAckInput";

    fn is_initialized(&self) -> bool {
        if self.tx.is_none() {
            return false;
        }
        for v in &self.tx {
            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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.tx)?;
                },
                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.tx.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.tx.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, 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() -> TxAckInput {
        TxAckInput::new()
    }

    fn clear(&mut self) {
        self.tx.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxAckInput {
        static instance: TxAckInput = TxAckInput {
            tx: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxAckInput {
    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("TxAckInput").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxAckInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxAckInput {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `TxAckInput`
pub mod tx_ack_input {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckInput.TxAckInputWrapper)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TxAckInputWrapper {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckInput.TxAckInputWrapper.input)
        pub input: ::protobuf::MessageField<super::TxInput>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckInput.TxAckInputWrapper.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a TxAckInputWrapper {
        fn default() -> &'a TxAckInputWrapper {
            <TxAckInputWrapper as ::protobuf::Message>::default_instance()
        }
    }

    impl TxAckInputWrapper {
        pub fn new() -> TxAckInputWrapper {
            ::std::default::Default::default()
        }

        pub(in super) 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_message_field_accessor::<_, super::TxInput>(
                "input",
                |m: &TxAckInputWrapper| { &m.input },
                |m: &mut TxAckInputWrapper| { &mut m.input },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckInputWrapper>(
                "TxAckInput.TxAckInputWrapper",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for TxAckInputWrapper {
        const NAME: &'static str = "TxAckInputWrapper";

        fn is_initialized(&self) -> bool {
            if self.input.is_none() {
                return false;
            }
            for v in &self.input {
                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 {
                    18 => {
                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.input)?;
                    },
                    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.input.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.input.as_ref() {
                ::protobuf::rt::write_message_field_with_cached_size(2, 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() -> TxAckInputWrapper {
            TxAckInputWrapper::new()
        }

        fn clear(&mut self) {
            self.input.clear();
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TxAckInputWrapper {
            static instance: TxAckInputWrapper = TxAckInputWrapper {
                input: ::protobuf::MessageField::none(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for TxAckInputWrapper {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TxAckInput.TxAckInputWrapper").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for TxAckInputWrapper {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for TxAckInputWrapper {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckOutput)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckOutput {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckOutput.tx)
    pub tx: ::protobuf::MessageField<tx_ack_output::TxAckOutputWrapper>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckOutput.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxAckOutput {
    fn default() -> &'a TxAckOutput {
        <TxAckOutput as ::protobuf::Message>::default_instance()
    }
}

impl TxAckOutput {
    pub fn new() -> TxAckOutput {
        ::std::default::Default::default()
    }

    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_message_field_accessor::<_, tx_ack_output::TxAckOutputWrapper>(
            "tx",
            |m: &TxAckOutput| { &m.tx },
            |m: &mut TxAckOutput| { &mut m.tx },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckOutput>(
            "TxAckOutput",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxAckOutput {
    const NAME: &'static str = "TxAckOutput";

    fn is_initialized(&self) -> bool {
        if self.tx.is_none() {
            return false;
        }
        for v in &self.tx {
            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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.tx)?;
                },
                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.tx.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.tx.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, 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() -> TxAckOutput {
        TxAckOutput::new()
    }

    fn clear(&mut self) {
        self.tx.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxAckOutput {
        static instance: TxAckOutput = TxAckOutput {
            tx: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxAckOutput {
    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("TxAckOutput").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxAckOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxAckOutput {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `TxAckOutput`
pub mod tx_ack_output {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckOutput.TxAckOutputWrapper)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TxAckOutputWrapper {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckOutput.TxAckOutputWrapper.output)
        pub output: ::protobuf::MessageField<super::TxOutput>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckOutput.TxAckOutputWrapper.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a TxAckOutputWrapper {
        fn default() -> &'a TxAckOutputWrapper {
            <TxAckOutputWrapper as ::protobuf::Message>::default_instance()
        }
    }

    impl TxAckOutputWrapper {
        pub fn new() -> TxAckOutputWrapper {
            ::std::default::Default::default()
        }

        pub(in super) 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_message_field_accessor::<_, super::TxOutput>(
                "output",
                |m: &TxAckOutputWrapper| { &m.output },
                |m: &mut TxAckOutputWrapper| { &mut m.output },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckOutputWrapper>(
                "TxAckOutput.TxAckOutputWrapper",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for TxAckOutputWrapper {
        const NAME: &'static str = "TxAckOutputWrapper";

        fn is_initialized(&self) -> bool {
            if self.output.is_none() {
                return false;
            }
            for v in &self.output {
                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 {
                    42 => {
                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.output)?;
                    },
                    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.output.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.output.as_ref() {
                ::protobuf::rt::write_message_field_with_cached_size(5, 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() -> TxAckOutputWrapper {
            TxAckOutputWrapper::new()
        }

        fn clear(&mut self) {
            self.output.clear();
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TxAckOutputWrapper {
            static instance: TxAckOutputWrapper = TxAckOutputWrapper {
                output: ::protobuf::MessageField::none(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for TxAckOutputWrapper {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TxAckOutput.TxAckOutputWrapper").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for TxAckOutputWrapper {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for TxAckOutputWrapper {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckPrevMeta)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevMeta {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckPrevMeta.tx)
    pub tx: ::protobuf::MessageField<PrevTx>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckPrevMeta.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxAckPrevMeta {
    fn default() -> &'a TxAckPrevMeta {
        <TxAckPrevMeta as ::protobuf::Message>::default_instance()
    }
}

impl TxAckPrevMeta {
    pub fn new() -> TxAckPrevMeta {
        ::std::default::Default::default()
    }

    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_message_field_accessor::<_, PrevTx>(
            "tx",
            |m: &TxAckPrevMeta| { &m.tx },
            |m: &mut TxAckPrevMeta| { &mut m.tx },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckPrevMeta>(
            "TxAckPrevMeta",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxAckPrevMeta {
    const NAME: &'static str = "TxAckPrevMeta";

    fn is_initialized(&self) -> bool {
        if self.tx.is_none() {
            return false;
        }
        for v in &self.tx {
            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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.tx)?;
                },
                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.tx.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.tx.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, 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() -> TxAckPrevMeta {
        TxAckPrevMeta::new()
    }

    fn clear(&mut self) {
        self.tx.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxAckPrevMeta {
        static instance: TxAckPrevMeta = TxAckPrevMeta {
            tx: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxAckPrevMeta {
    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("TxAckPrevMeta").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxAckPrevMeta {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxAckPrevMeta {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckPrevInput)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevInput {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckPrevInput.tx)
    pub tx: ::protobuf::MessageField<tx_ack_prev_input::TxAckPrevInputWrapper>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckPrevInput.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxAckPrevInput {
    fn default() -> &'a TxAckPrevInput {
        <TxAckPrevInput as ::protobuf::Message>::default_instance()
    }
}

impl TxAckPrevInput {
    pub fn new() -> TxAckPrevInput {
        ::std::default::Default::default()
    }

    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_message_field_accessor::<_, tx_ack_prev_input::TxAckPrevInputWrapper>(
            "tx",
            |m: &TxAckPrevInput| { &m.tx },
            |m: &mut TxAckPrevInput| { &mut m.tx },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckPrevInput>(
            "TxAckPrevInput",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxAckPrevInput {
    const NAME: &'static str = "TxAckPrevInput";

    fn is_initialized(&self) -> bool {
        if self.tx.is_none() {
            return false;
        }
        for v in &self.tx {
            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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.tx)?;
                },
                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.tx.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.tx.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, 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() -> TxAckPrevInput {
        TxAckPrevInput::new()
    }

    fn clear(&mut self) {
        self.tx.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxAckPrevInput {
        static instance: TxAckPrevInput = TxAckPrevInput {
            tx: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxAckPrevInput {
    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("TxAckPrevInput").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxAckPrevInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxAckPrevInput {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `TxAckPrevInput`
pub mod tx_ack_prev_input {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckPrevInput.TxAckPrevInputWrapper)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TxAckPrevInputWrapper {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckPrevInput.TxAckPrevInputWrapper.input)
        pub input: ::protobuf::MessageField<super::PrevInput>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckPrevInput.TxAckPrevInputWrapper.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a TxAckPrevInputWrapper {
        fn default() -> &'a TxAckPrevInputWrapper {
            <TxAckPrevInputWrapper as ::protobuf::Message>::default_instance()
        }
    }

    impl TxAckPrevInputWrapper {
        pub fn new() -> TxAckPrevInputWrapper {
            ::std::default::Default::default()
        }

        pub(in super) 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_message_field_accessor::<_, super::PrevInput>(
                "input",
                |m: &TxAckPrevInputWrapper| { &m.input },
                |m: &mut TxAckPrevInputWrapper| { &mut m.input },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckPrevInputWrapper>(
                "TxAckPrevInput.TxAckPrevInputWrapper",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for TxAckPrevInputWrapper {
        const NAME: &'static str = "TxAckPrevInputWrapper";

        fn is_initialized(&self) -> bool {
            if self.input.is_none() {
                return false;
            }
            for v in &self.input {
                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 {
                    18 => {
                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.input)?;
                    },
                    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.input.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.input.as_ref() {
                ::protobuf::rt::write_message_field_with_cached_size(2, 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() -> TxAckPrevInputWrapper {
            TxAckPrevInputWrapper::new()
        }

        fn clear(&mut self) {
            self.input.clear();
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TxAckPrevInputWrapper {
            static instance: TxAckPrevInputWrapper = TxAckPrevInputWrapper {
                input: ::protobuf::MessageField::none(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for TxAckPrevInputWrapper {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TxAckPrevInput.TxAckPrevInputWrapper").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for TxAckPrevInputWrapper {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for TxAckPrevInputWrapper {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckPrevOutput)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevOutput {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckPrevOutput.tx)
    pub tx: ::protobuf::MessageField<tx_ack_prev_output::TxAckPrevOutputWrapper>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckPrevOutput.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxAckPrevOutput {
    fn default() -> &'a TxAckPrevOutput {
        <TxAckPrevOutput as ::protobuf::Message>::default_instance()
    }
}

impl TxAckPrevOutput {
    pub fn new() -> TxAckPrevOutput {
        ::std::default::Default::default()
    }

    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_message_field_accessor::<_, tx_ack_prev_output::TxAckPrevOutputWrapper>(
            "tx",
            |m: &TxAckPrevOutput| { &m.tx },
            |m: &mut TxAckPrevOutput| { &mut m.tx },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckPrevOutput>(
            "TxAckPrevOutput",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxAckPrevOutput {
    const NAME: &'static str = "TxAckPrevOutput";

    fn is_initialized(&self) -> bool {
        if self.tx.is_none() {
            return false;
        }
        for v in &self.tx {
            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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.tx)?;
                },
                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.tx.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.tx.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, 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() -> TxAckPrevOutput {
        TxAckPrevOutput::new()
    }

    fn clear(&mut self) {
        self.tx.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxAckPrevOutput {
        static instance: TxAckPrevOutput = TxAckPrevOutput {
            tx: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxAckPrevOutput {
    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("TxAckPrevOutput").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxAckPrevOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxAckPrevOutput {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `TxAckPrevOutput`
pub mod tx_ack_prev_output {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckPrevOutput.TxAckPrevOutputWrapper)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TxAckPrevOutputWrapper {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckPrevOutput.TxAckPrevOutputWrapper.output)
        pub output: ::protobuf::MessageField<super::PrevOutput>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckPrevOutput.TxAckPrevOutputWrapper.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a TxAckPrevOutputWrapper {
        fn default() -> &'a TxAckPrevOutputWrapper {
            <TxAckPrevOutputWrapper as ::protobuf::Message>::default_instance()
        }
    }

    impl TxAckPrevOutputWrapper {
        pub fn new() -> TxAckPrevOutputWrapper {
            ::std::default::Default::default()
        }

        pub(in super) 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_message_field_accessor::<_, super::PrevOutput>(
                "output",
                |m: &TxAckPrevOutputWrapper| { &m.output },
                |m: &mut TxAckPrevOutputWrapper| { &mut m.output },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckPrevOutputWrapper>(
                "TxAckPrevOutput.TxAckPrevOutputWrapper",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for TxAckPrevOutputWrapper {
        const NAME: &'static str = "TxAckPrevOutputWrapper";

        fn is_initialized(&self) -> bool {
            if self.output.is_none() {
                return false;
            }
            for v in &self.output {
                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 {
                    26 => {
                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.output)?;
                    },
                    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.output.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.output.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() -> TxAckPrevOutputWrapper {
            TxAckPrevOutputWrapper::new()
        }

        fn clear(&mut self) {
            self.output.clear();
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TxAckPrevOutputWrapper {
            static instance: TxAckPrevOutputWrapper = TxAckPrevOutputWrapper {
                output: ::protobuf::MessageField::none(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for TxAckPrevOutputWrapper {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TxAckPrevOutput.TxAckPrevOutputWrapper").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for TxAckPrevOutputWrapper {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for TxAckPrevOutputWrapper {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckPrevExtraData)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevExtraData {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckPrevExtraData.tx)
    pub tx: ::protobuf::MessageField<tx_ack_prev_extra_data::TxAckPrevExtraDataWrapper>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckPrevExtraData.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a TxAckPrevExtraData {
    fn default() -> &'a TxAckPrevExtraData {
        <TxAckPrevExtraData as ::protobuf::Message>::default_instance()
    }
}

impl TxAckPrevExtraData {
    pub fn new() -> TxAckPrevExtraData {
        ::std::default::Default::default()
    }

    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_message_field_accessor::<_, tx_ack_prev_extra_data::TxAckPrevExtraDataWrapper>(
            "tx",
            |m: &TxAckPrevExtraData| { &m.tx },
            |m: &mut TxAckPrevExtraData| { &mut m.tx },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckPrevExtraData>(
            "TxAckPrevExtraData",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for TxAckPrevExtraData {
    const NAME: &'static str = "TxAckPrevExtraData";

    fn is_initialized(&self) -> bool {
        if self.tx.is_none() {
            return false;
        }
        for v in &self.tx {
            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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.tx)?;
                },
                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.tx.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.tx.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, 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() -> TxAckPrevExtraData {
        TxAckPrevExtraData::new()
    }

    fn clear(&mut self) {
        self.tx.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TxAckPrevExtraData {
        static instance: TxAckPrevExtraData = TxAckPrevExtraData {
            tx: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for TxAckPrevExtraData {
    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("TxAckPrevExtraData").unwrap()).clone()
    }
}

impl ::std::fmt::Display for TxAckPrevExtraData {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TxAckPrevExtraData {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `TxAckPrevExtraData`
pub mod tx_ack_prev_extra_data {
    // @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.TxAckPrevExtraData.TxAckPrevExtraDataWrapper)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TxAckPrevExtraDataWrapper {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.TxAckPrevExtraData.TxAckPrevExtraDataWrapper.extra_data_chunk)
        pub extra_data_chunk: ::std::option::Option<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.TxAckPrevExtraData.TxAckPrevExtraDataWrapper.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

    impl<'a> ::std::default::Default for &'a TxAckPrevExtraDataWrapper {
        fn default() -> &'a TxAckPrevExtraDataWrapper {
            <TxAckPrevExtraDataWrapper as ::protobuf::Message>::default_instance()
        }
    }

    impl TxAckPrevExtraDataWrapper {
        pub fn new() -> TxAckPrevExtraDataWrapper {
            ::std::default::Default::default()
        }

        // required bytes extra_data_chunk = 8;

        pub fn extra_data_chunk(&self) -> &[u8] {
            match self.extra_data_chunk.as_ref() {
                Some(v) => v,
                None => &[],
            }
        }

        pub fn clear_extra_data_chunk(&mut self) {
            self.extra_data_chunk = ::std::option::Option::None;
        }

        pub fn has_extra_data_chunk(&self) -> bool {
            self.extra_data_chunk.is_some()
        }

        // Param is passed by value, moved
        pub fn set_extra_data_chunk(&mut self, v: ::std::vec::Vec<u8>) {
            self.extra_data_chunk = ::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_extra_data_chunk(&mut self) -> &mut ::std::vec::Vec<u8> {
            if self.extra_data_chunk.is_none() {
                self.extra_data_chunk = ::std::option::Option::Some(::std::vec::Vec::new());
            }
            self.extra_data_chunk.as_mut().unwrap()
        }

        // Take field
        pub fn take_extra_data_chunk(&mut self) -> ::std::vec::Vec<u8> {
            self.extra_data_chunk.take().unwrap_or_else(|| ::std::vec::Vec::new())
        }

        pub(in super) 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::<_, _>(
                "extra_data_chunk",
                |m: &TxAckPrevExtraDataWrapper| { &m.extra_data_chunk },
                |m: &mut TxAckPrevExtraDataWrapper| { &mut m.extra_data_chunk },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckPrevExtraDataWrapper>(
                "TxAckPrevExtraData.TxAckPrevExtraDataWrapper",
                fields,
                oneofs,
            )
        }
    }

    impl ::protobuf::Message for TxAckPrevExtraDataWrapper {
        const NAME: &'static str = "TxAckPrevExtraDataWrapper";

        fn is_initialized(&self) -> bool {
            if self.extra_data_chunk.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 {
                    66 => {
                        self.extra_data_chunk = ::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.extra_data_chunk.as_ref() {
                my_size += ::protobuf::rt::bytes_size(8, &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.extra_data_chunk.as_ref() {
                os.write_bytes(8, 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() -> TxAckPrevExtraDataWrapper {
            TxAckPrevExtraDataWrapper::new()
        }

        fn clear(&mut self) {
            self.extra_data_chunk = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TxAckPrevExtraDataWrapper {
            static instance: TxAckPrevExtraDataWrapper = TxAckPrevExtraDataWrapper {
                extra_data_chunk: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for TxAckPrevExtraDataWrapper {
        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TxAckPrevExtraData.TxAckPrevExtraDataWrapper").unwrap()).clone()
        }
    }

    impl ::std::fmt::Display for TxAckPrevExtraDataWrapper {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
            ::protobuf::text_format::fmt(self, f)
        }
    }

    impl ::protobuf::reflect::ProtobufValue for TxAckPrevExtraDataWrapper {
        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.GetOwnershipProof)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetOwnershipProof {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipProof.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipProof.coin_name)
    pub coin_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipProof.script_type)
    pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipProof.multisig)
    pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipProof.user_confirmation)
    pub user_confirmation: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipProof.ownership_ids)
    pub ownership_ids: ::std::vec::Vec<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.GetOwnershipProof.commitment_data)
    pub commitment_data: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.GetOwnershipProof.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a GetOwnershipProof {
    fn default() -> &'a GetOwnershipProof {
        <GetOwnershipProof as ::protobuf::Message>::default_instance()
    }
}

impl GetOwnershipProof {
    pub fn new() -> GetOwnershipProof {
        ::std::default::Default::default()
    }

    // optional string coin_name = 2;

    pub fn coin_name(&self) -> &str {
        match self.coin_name.as_ref() {
            Some(v) => v,
            None => "Bitcoin",
        }
    }

    pub fn clear_coin_name(&mut self) {
        self.coin_name = ::std::option::Option::None;
    }

    pub fn has_coin_name(&self) -> bool {
        self.coin_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coin_name(&mut self, v: ::std::string::String) {
        self.coin_name = ::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_coin_name(&mut self) -> &mut ::std::string::String {
        if self.coin_name.is_none() {
            self.coin_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coin_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_coin_name(&mut self) -> ::std::string::String {
        self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional .hw.trezor.messages.bitcoin.InputScriptType script_type = 3;

    pub fn script_type(&self) -> InputScriptType {
        match self.script_type {
            Some(e) => e.enum_value_or(InputScriptType::SPENDWITNESS),
            None => InputScriptType::SPENDWITNESS,
        }
    }

    pub fn clear_script_type(&mut self) {
        self.script_type = ::std::option::Option::None;
    }

    pub fn has_script_type(&self) -> bool {
        self.script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_type(&mut self, v: InputScriptType) {
        self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // optional bool user_confirmation = 5;

    pub fn user_confirmation(&self) -> bool {
        self.user_confirmation.unwrap_or(false)
    }

    pub fn clear_user_confirmation(&mut self) {
        self.user_confirmation = ::std::option::Option::None;
    }

    pub fn has_user_confirmation(&self) -> bool {
        self.user_confirmation.is_some()
    }

    // Param is passed by value, moved
    pub fn set_user_confirmation(&mut self, v: bool) {
        self.user_confirmation = ::std::option::Option::Some(v);
    }

    // optional bytes commitment_data = 7;

    pub fn commitment_data(&self) -> &[u8] {
        match self.commitment_data.as_ref() {
            Some(v) => v,
            None => b"",
        }
    }

    pub fn clear_commitment_data(&mut self) {
        self.commitment_data = ::std::option::Option::None;
    }

    pub fn has_commitment_data(&self) -> bool {
        self.commitment_data.is_some()
    }

    // Param is passed by value, moved
    pub fn set_commitment_data(&mut self, v: ::std::vec::Vec<u8>) {
        self.commitment_data = ::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_commitment_data(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.commitment_data.is_none() {
            self.commitment_data = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.commitment_data.as_mut().unwrap()
    }

    // Take field
    pub fn take_commitment_data(&mut self) -> ::std::vec::Vec<u8> {
        self.commitment_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(7);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &GetOwnershipProof| { &m.address_n },
            |m: &mut GetOwnershipProof| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coin_name",
            |m: &GetOwnershipProof| { &m.coin_name },
            |m: &mut GetOwnershipProof| { &mut m.coin_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_type",
            |m: &GetOwnershipProof| { &m.script_type },
            |m: &mut GetOwnershipProof| { &mut m.script_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MultisigRedeemScriptType>(
            "multisig",
            |m: &GetOwnershipProof| { &m.multisig },
            |m: &mut GetOwnershipProof| { &mut m.multisig },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "user_confirmation",
            |m: &GetOwnershipProof| { &m.user_confirmation },
            |m: &mut GetOwnershipProof| { &mut m.user_confirmation },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "ownership_ids",
            |m: &GetOwnershipProof| { &m.ownership_ids },
            |m: &mut GetOwnershipProof| { &mut m.ownership_ids },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "commitment_data",
            |m: &GetOwnershipProof| { &m.commitment_data },
            |m: &mut GetOwnershipProof| { &mut m.commitment_data },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GetOwnershipProof>(
            "GetOwnershipProof",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for GetOwnershipProof {
    const NAME: &'static str = "GetOwnershipProof";

    fn is_initialized(&self) -> bool {
        for v in &self.multisig {
            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 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.coin_name = ::std::option::Option::Some(is.read_string()?);
                },
                24 => {
                    self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                34 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.multisig)?;
                },
                40 => {
                    self.user_confirmation = ::std::option::Option::Some(is.read_bool()?);
                },
                50 => {
                    self.ownership_ids.push(is.read_bytes()?);
                },
                58 => {
                    self.commitment_data = ::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;
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(1, *value);
        };
        if let Some(v) = self.coin_name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.script_type {
            my_size += ::protobuf::rt::int32_size(3, v.value());
        }
        if let Some(v) = self.multisig.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.user_confirmation {
            my_size += 1 + 1;
        }
        for value in &self.ownership_ids {
            my_size += ::protobuf::rt::bytes_size(6, &value);
        };
        if let Some(v) = self.commitment_data.as_ref() {
            my_size += ::protobuf::rt::bytes_size(7, &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<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.coin_name.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.script_type {
            os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.multisig.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        }
        if let Some(v) = self.user_confirmation {
            os.write_bool(5, v)?;
        }
        for v in &self.ownership_ids {
            os.write_bytes(6, &v)?;
        };
        if let Some(v) = self.commitment_data.as_ref() {
            os.write_bytes(7, 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() -> GetOwnershipProof {
        GetOwnershipProof::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.coin_name = ::std::option::Option::None;
        self.script_type = ::std::option::Option::None;
        self.multisig.clear();
        self.user_confirmation = ::std::option::Option::None;
        self.ownership_ids.clear();
        self.commitment_data = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static GetOwnershipProof {
        static instance: GetOwnershipProof = GetOwnershipProof {
            address_n: ::std::vec::Vec::new(),
            coin_name: ::std::option::Option::None,
            script_type: ::std::option::Option::None,
            multisig: ::protobuf::MessageField::none(),
            user_confirmation: ::std::option::Option::None,
            ownership_ids: ::std::vec::Vec::new(),
            commitment_data: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for GetOwnershipProof {
    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("GetOwnershipProof").unwrap()).clone()
    }
}

impl ::std::fmt::Display for GetOwnershipProof {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for GetOwnershipProof {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.OwnershipProof)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct OwnershipProof {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.OwnershipProof.ownership_proof)
    pub ownership_proof: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.OwnershipProof.signature)
    pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.OwnershipProof.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a OwnershipProof {
    fn default() -> &'a OwnershipProof {
        <OwnershipProof as ::protobuf::Message>::default_instance()
    }
}

impl OwnershipProof {
    pub fn new() -> OwnershipProof {
        ::std::default::Default::default()
    }

    // required bytes ownership_proof = 1;

    pub fn ownership_proof(&self) -> &[u8] {
        match self.ownership_proof.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_ownership_proof(&mut self) {
        self.ownership_proof = ::std::option::Option::None;
    }

    pub fn has_ownership_proof(&self) -> bool {
        self.ownership_proof.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ownership_proof(&mut self, v: ::std::vec::Vec<u8>) {
        self.ownership_proof = ::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_ownership_proof(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.ownership_proof.is_none() {
            self.ownership_proof = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.ownership_proof.as_mut().unwrap()
    }

    // Take field
    pub fn take_ownership_proof(&mut self) -> ::std::vec::Vec<u8> {
        self.ownership_proof.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    // required bytes signature = 2;

    pub fn signature(&self) -> &[u8] {
        match self.signature.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

    pub fn clear_signature(&mut self) {
        self.signature = ::std::option::Option::None;
    }

    pub fn has_signature(&self) -> bool {
        self.signature.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
        self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.signature.is_none() {
            self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.signature.as_mut().unwrap()
    }

    // Take field
    pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
        self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "ownership_proof",
            |m: &OwnershipProof| { &m.ownership_proof },
            |m: &mut OwnershipProof| { &mut m.ownership_proof },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "signature",
            |m: &OwnershipProof| { &m.signature },
            |m: &mut OwnershipProof| { &mut m.signature },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<OwnershipProof>(
            "OwnershipProof",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for OwnershipProof {
    const NAME: &'static str = "OwnershipProof";

    fn is_initialized(&self) -> bool {
        if self.ownership_proof.is_none() {
            return false;
        }
        if self.signature.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.ownership_proof = ::std::option::Option::Some(is.read_bytes()?);
                },
                18 => {
                    self.signature = ::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.ownership_proof.as_ref() {
            my_size += ::protobuf::rt::bytes_size(1, &v);
        }
        if let Some(v) = self.signature.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &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.ownership_proof.as_ref() {
            os.write_bytes(1, v)?;
        }
        if let Some(v) = self.signature.as_ref() {
            os.write_bytes(2, 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() -> OwnershipProof {
        OwnershipProof::new()
    }

    fn clear(&mut self) {
        self.ownership_proof = ::std::option::Option::None;
        self.signature = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static OwnershipProof {
        static instance: OwnershipProof = OwnershipProof {
            ownership_proof: ::std::option::Option::None,
            signature: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for OwnershipProof {
    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("OwnershipProof").unwrap()).clone()
    }
}

impl ::std::fmt::Display for OwnershipProof {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for OwnershipProof {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:hw.trezor.messages.bitcoin.AuthorizeCoinJoin)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct AuthorizeCoinJoin {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.coordinator)
    pub coordinator: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.max_rounds)
    pub max_rounds: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.max_coordinator_fee_rate)
    pub max_coordinator_fee_rate: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.max_fee_per_kvbyte)
    pub max_fee_per_kvbyte: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.coin_name)
    pub coin_name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.script_type)
    pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.amount_unit)
    pub amount_unit: ::std::option::Option<::protobuf::EnumOrUnknown<AmountUnit>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.bitcoin.AuthorizeCoinJoin.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a AuthorizeCoinJoin {
    fn default() -> &'a AuthorizeCoinJoin {
        <AuthorizeCoinJoin as ::protobuf::Message>::default_instance()
    }
}

impl AuthorizeCoinJoin {
    pub fn new() -> AuthorizeCoinJoin {
        ::std::default::Default::default()
    }

    // required string coordinator = 1;

    pub fn coordinator(&self) -> &str {
        match self.coordinator.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_coordinator(&mut self) {
        self.coordinator = ::std::option::Option::None;
    }

    pub fn has_coordinator(&self) -> bool {
        self.coordinator.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coordinator(&mut self, v: ::std::string::String) {
        self.coordinator = ::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_coordinator(&mut self) -> &mut ::std::string::String {
        if self.coordinator.is_none() {
            self.coordinator = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coordinator.as_mut().unwrap()
    }

    // Take field
    pub fn take_coordinator(&mut self) -> ::std::string::String {
        self.coordinator.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // required uint64 max_rounds = 2;

    pub fn max_rounds(&self) -> u64 {
        self.max_rounds.unwrap_or(0)
    }

    pub fn clear_max_rounds(&mut self) {
        self.max_rounds = ::std::option::Option::None;
    }

    pub fn has_max_rounds(&self) -> bool {
        self.max_rounds.is_some()
    }

    // Param is passed by value, moved
    pub fn set_max_rounds(&mut self, v: u64) {
        self.max_rounds = ::std::option::Option::Some(v);
    }

    // required uint32 max_coordinator_fee_rate = 3;

    pub fn max_coordinator_fee_rate(&self) -> u32 {
        self.max_coordinator_fee_rate.unwrap_or(0)
    }

    pub fn clear_max_coordinator_fee_rate(&mut self) {
        self.max_coordinator_fee_rate = ::std::option::Option::None;
    }

    pub fn has_max_coordinator_fee_rate(&self) -> bool {
        self.max_coordinator_fee_rate.is_some()
    }

    // Param is passed by value, moved
    pub fn set_max_coordinator_fee_rate(&mut self, v: u32) {
        self.max_coordinator_fee_rate = ::std::option::Option::Some(v);
    }

    // required uint32 max_fee_per_kvbyte = 4;

    pub fn max_fee_per_kvbyte(&self) -> u32 {
        self.max_fee_per_kvbyte.unwrap_or(0)
    }

    pub fn clear_max_fee_per_kvbyte(&mut self) {
        self.max_fee_per_kvbyte = ::std::option::Option::None;
    }

    pub fn has_max_fee_per_kvbyte(&self) -> bool {
        self.max_fee_per_kvbyte.is_some()
    }

    // Param is passed by value, moved
    pub fn set_max_fee_per_kvbyte(&mut self, v: u32) {
        self.max_fee_per_kvbyte = ::std::option::Option::Some(v);
    }

    // optional string coin_name = 6;

    pub fn coin_name(&self) -> &str {
        match self.coin_name.as_ref() {
            Some(v) => v,
            None => "Bitcoin",
        }
    }

    pub fn clear_coin_name(&mut self) {
        self.coin_name = ::std::option::Option::None;
    }

    pub fn has_coin_name(&self) -> bool {
        self.coin_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_coin_name(&mut self, v: ::std::string::String) {
        self.coin_name = ::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_coin_name(&mut self) -> &mut ::std::string::String {
        if self.coin_name.is_none() {
            self.coin_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.coin_name.as_mut().unwrap()
    }

    // Take field
    pub fn take_coin_name(&mut self) -> ::std::string::String {
        self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional .hw.trezor.messages.bitcoin.InputScriptType script_type = 7;

    pub fn script_type(&self) -> InputScriptType {
        match self.script_type {
            Some(e) => e.enum_value_or(InputScriptType::SPENDADDRESS),
            None => InputScriptType::SPENDADDRESS,
        }
    }

    pub fn clear_script_type(&mut self) {
        self.script_type = ::std::option::Option::None;
    }

    pub fn has_script_type(&self) -> bool {
        self.script_type.is_some()
    }

    // Param is passed by value, moved
    pub fn set_script_type(&mut self, v: InputScriptType) {
        self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    // optional .hw.trezor.messages.bitcoin.AmountUnit amount_unit = 8;

    pub fn amount_unit(&self) -> AmountUnit {
        match self.amount_unit {
            Some(e) => e.enum_value_or(AmountUnit::BITCOIN),
            None => AmountUnit::BITCOIN,
        }
    }

    pub fn clear_amount_unit(&mut self) {
        self.amount_unit = ::std::option::Option::None;
    }

    pub fn has_amount_unit(&self) -> bool {
        self.amount_unit.is_some()
    }

    // Param is passed by value, moved
    pub fn set_amount_unit(&mut self, v: AmountUnit) {
        self.amount_unit = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(8);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coordinator",
            |m: &AuthorizeCoinJoin| { &m.coordinator },
            |m: &mut AuthorizeCoinJoin| { &mut m.coordinator },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "max_rounds",
            |m: &AuthorizeCoinJoin| { &m.max_rounds },
            |m: &mut AuthorizeCoinJoin| { &mut m.max_rounds },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "max_coordinator_fee_rate",
            |m: &AuthorizeCoinJoin| { &m.max_coordinator_fee_rate },
            |m: &mut AuthorizeCoinJoin| { &mut m.max_coordinator_fee_rate },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "max_fee_per_kvbyte",
            |m: &AuthorizeCoinJoin| { &m.max_fee_per_kvbyte },
            |m: &mut AuthorizeCoinJoin| { &mut m.max_fee_per_kvbyte },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &AuthorizeCoinJoin| { &m.address_n },
            |m: &mut AuthorizeCoinJoin| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "coin_name",
            |m: &AuthorizeCoinJoin| { &m.coin_name },
            |m: &mut AuthorizeCoinJoin| { &mut m.coin_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "script_type",
            |m: &AuthorizeCoinJoin| { &m.script_type },
            |m: &mut AuthorizeCoinJoin| { &mut m.script_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "amount_unit",
            |m: &AuthorizeCoinJoin| { &m.amount_unit },
            |m: &mut AuthorizeCoinJoin| { &mut m.amount_unit },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<AuthorizeCoinJoin>(
            "AuthorizeCoinJoin",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for AuthorizeCoinJoin {
    const NAME: &'static str = "AuthorizeCoinJoin";

    fn is_initialized(&self) -> bool {
        if self.coordinator.is_none() {
            return false;
        }
        if self.max_rounds.is_none() {
            return false;
        }
        if self.max_coordinator_fee_rate.is_none() {
            return false;
        }
        if self.max_fee_per_kvbyte.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.coordinator = ::std::option::Option::Some(is.read_string()?);
                },
                16 => {
                    self.max_rounds = ::std::option::Option::Some(is.read_uint64()?);
                },
                24 => {
                    self.max_coordinator_fee_rate = ::std::option::Option::Some(is.read_uint32()?);
                },
                32 => {
                    self.max_fee_per_kvbyte = ::std::option::Option::Some(is.read_uint32()?);
                },
                42 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                40 => {
                    self.address_n.push(is.read_uint32()?);
                },
                50 => {
                    self.coin_name = ::std::option::Option::Some(is.read_string()?);
                },
                56 => {
                    self.script_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                64 => {
                    self.amount_unit = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                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.coordinator.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.max_rounds {
            my_size += ::protobuf::rt::uint64_size(2, v);
        }
        if let Some(v) = self.max_coordinator_fee_rate {
            my_size += ::protobuf::rt::uint32_size(3, v);
        }
        if let Some(v) = self.max_fee_per_kvbyte {
            my_size += ::protobuf::rt::uint32_size(4, v);
        }
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(5, *value);
        };
        if let Some(v) = self.coin_name.as_ref() {
            my_size += ::protobuf::rt::string_size(6, &v);
        }
        if let Some(v) = self.script_type {
            my_size += ::protobuf::rt::int32_size(7, v.value());
        }
        if let Some(v) = self.amount_unit {
            my_size += ::protobuf::rt::int32_size(8, v.value());
        }
        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.coordinator.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.max_rounds {
            os.write_uint64(2, v)?;
        }
        if let Some(v) = self.max_coordinator_fee_rate {
            os.write_uint32(3, v)?;
        }
        if let Some(v) = self.max_fee_per_kvbyte {
            os.write_uint32(4, v)?;
        }
        for v in &self.address_n {
            os.write_uint32(5, *v)?;
        };
        if let Some(v) = self.coin_name.as_ref() {
            os.write_string(6, v)?;
        }
        if let Some(v) = self.script_type {
            os.write_enum(7, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        if let Some(v) = self.amount_unit {
            os.write_enum(8, ::protobuf::EnumOrUnknown::value(&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() -> AuthorizeCoinJoin {
        AuthorizeCoinJoin::new()
    }

    fn clear(&mut self) {
        self.coordinator = ::std::option::Option::None;
        self.max_rounds = ::std::option::Option::None;
        self.max_coordinator_fee_rate = ::std::option::Option::None;
        self.max_fee_per_kvbyte = ::std::option::Option::None;
        self.address_n.clear();
        self.coin_name = ::std::option::Option::None;
        self.script_type = ::std::option::Option::None;
        self.amount_unit = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static AuthorizeCoinJoin {
        static instance: AuthorizeCoinJoin = AuthorizeCoinJoin {
            coordinator: ::std::option::Option::None,
            max_rounds: ::std::option::Option::None,
            max_coordinator_fee_rate: ::std::option::Option::None,
            max_fee_per_kvbyte: ::std::option::Option::None,
            address_n: ::std::vec::Vec::new(),
            coin_name: ::std::option::Option::None,
            script_type: ::std::option::Option::None,
            amount_unit: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for AuthorizeCoinJoin {
    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("AuthorizeCoinJoin").unwrap()).clone()
    }
}

impl ::std::fmt::Display for AuthorizeCoinJoin {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for AuthorizeCoinJoin {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.bitcoin.InputScriptType)
pub enum InputScriptType {
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.InputScriptType.SPENDADDRESS)
    SPENDADDRESS = 0,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.InputScriptType.SPENDMULTISIG)
    SPENDMULTISIG = 1,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.InputScriptType.EXTERNAL)
    EXTERNAL = 2,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.InputScriptType.SPENDWITNESS)
    SPENDWITNESS = 3,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.InputScriptType.SPENDP2SHWITNESS)
    SPENDP2SHWITNESS = 4,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.InputScriptType.SPENDTAPROOT)
    SPENDTAPROOT = 5,
}

impl ::protobuf::Enum for InputScriptType {
    const NAME: &'static str = "InputScriptType";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<InputScriptType> {
        match value {
            0 => ::std::option::Option::Some(InputScriptType::SPENDADDRESS),
            1 => ::std::option::Option::Some(InputScriptType::SPENDMULTISIG),
            2 => ::std::option::Option::Some(InputScriptType::EXTERNAL),
            3 => ::std::option::Option::Some(InputScriptType::SPENDWITNESS),
            4 => ::std::option::Option::Some(InputScriptType::SPENDP2SHWITNESS),
            5 => ::std::option::Option::Some(InputScriptType::SPENDTAPROOT),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<InputScriptType> {
        match str {
            "SPENDADDRESS" => ::std::option::Option::Some(InputScriptType::SPENDADDRESS),
            "SPENDMULTISIG" => ::std::option::Option::Some(InputScriptType::SPENDMULTISIG),
            "EXTERNAL" => ::std::option::Option::Some(InputScriptType::EXTERNAL),
            "SPENDWITNESS" => ::std::option::Option::Some(InputScriptType::SPENDWITNESS),
            "SPENDP2SHWITNESS" => ::std::option::Option::Some(InputScriptType::SPENDP2SHWITNESS),
            "SPENDTAPROOT" => ::std::option::Option::Some(InputScriptType::SPENDTAPROOT),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [InputScriptType] = &[
        InputScriptType::SPENDADDRESS,
        InputScriptType::SPENDMULTISIG,
        InputScriptType::EXTERNAL,
        InputScriptType::SPENDWITNESS,
        InputScriptType::SPENDP2SHWITNESS,
        InputScriptType::SPENDTAPROOT,
    ];
}

impl ::protobuf::EnumFull for InputScriptType {
    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().enum_by_package_relative_name("InputScriptType").unwrap()).clone()
    }

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = *self as usize;
        Self::enum_descriptor().value_by_index(index)
    }
}

impl ::std::default::Default for InputScriptType {
    fn default() -> Self {
        InputScriptType::SPENDADDRESS
    }
}

impl InputScriptType {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<InputScriptType>("InputScriptType")
    }
}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.bitcoin.OutputScriptType)
pub enum OutputScriptType {
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.OutputScriptType.PAYTOADDRESS)
    PAYTOADDRESS = 0,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.OutputScriptType.PAYTOSCRIPTHASH)
    PAYTOSCRIPTHASH = 1,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.OutputScriptType.PAYTOMULTISIG)
    PAYTOMULTISIG = 2,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.OutputScriptType.PAYTOOPRETURN)
    PAYTOOPRETURN = 3,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.OutputScriptType.PAYTOWITNESS)
    PAYTOWITNESS = 4,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.OutputScriptType.PAYTOP2SHWITNESS)
    PAYTOP2SHWITNESS = 5,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.OutputScriptType.PAYTOTAPROOT)
    PAYTOTAPROOT = 6,
}

impl ::protobuf::Enum for OutputScriptType {
    const NAME: &'static str = "OutputScriptType";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<OutputScriptType> {
        match value {
            0 => ::std::option::Option::Some(OutputScriptType::PAYTOADDRESS),
            1 => ::std::option::Option::Some(OutputScriptType::PAYTOSCRIPTHASH),
            2 => ::std::option::Option::Some(OutputScriptType::PAYTOMULTISIG),
            3 => ::std::option::Option::Some(OutputScriptType::PAYTOOPRETURN),
            4 => ::std::option::Option::Some(OutputScriptType::PAYTOWITNESS),
            5 => ::std::option::Option::Some(OutputScriptType::PAYTOP2SHWITNESS),
            6 => ::std::option::Option::Some(OutputScriptType::PAYTOTAPROOT),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<OutputScriptType> {
        match str {
            "PAYTOADDRESS" => ::std::option::Option::Some(OutputScriptType::PAYTOADDRESS),
            "PAYTOSCRIPTHASH" => ::std::option::Option::Some(OutputScriptType::PAYTOSCRIPTHASH),
            "PAYTOMULTISIG" => ::std::option::Option::Some(OutputScriptType::PAYTOMULTISIG),
            "PAYTOOPRETURN" => ::std::option::Option::Some(OutputScriptType::PAYTOOPRETURN),
            "PAYTOWITNESS" => ::std::option::Option::Some(OutputScriptType::PAYTOWITNESS),
            "PAYTOP2SHWITNESS" => ::std::option::Option::Some(OutputScriptType::PAYTOP2SHWITNESS),
            "PAYTOTAPROOT" => ::std::option::Option::Some(OutputScriptType::PAYTOTAPROOT),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [OutputScriptType] = &[
        OutputScriptType::PAYTOADDRESS,
        OutputScriptType::PAYTOSCRIPTHASH,
        OutputScriptType::PAYTOMULTISIG,
        OutputScriptType::PAYTOOPRETURN,
        OutputScriptType::PAYTOWITNESS,
        OutputScriptType::PAYTOP2SHWITNESS,
        OutputScriptType::PAYTOTAPROOT,
    ];
}

impl ::protobuf::EnumFull for OutputScriptType {
    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().enum_by_package_relative_name("OutputScriptType").unwrap()).clone()
    }

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = *self as usize;
        Self::enum_descriptor().value_by_index(index)
    }
}

impl ::std::default::Default for OutputScriptType {
    fn default() -> Self {
        OutputScriptType::PAYTOADDRESS
    }
}

impl OutputScriptType {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<OutputScriptType>("OutputScriptType")
    }
}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.bitcoin.DecredStakingSpendType)
pub enum DecredStakingSpendType {
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.DecredStakingSpendType.SSGen)
    SSGen = 0,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.DecredStakingSpendType.SSRTX)
    SSRTX = 1,
}

impl ::protobuf::Enum for DecredStakingSpendType {
    const NAME: &'static str = "DecredStakingSpendType";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<DecredStakingSpendType> {
        match value {
            0 => ::std::option::Option::Some(DecredStakingSpendType::SSGen),
            1 => ::std::option::Option::Some(DecredStakingSpendType::SSRTX),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<DecredStakingSpendType> {
        match str {
            "SSGen" => ::std::option::Option::Some(DecredStakingSpendType::SSGen),
            "SSRTX" => ::std::option::Option::Some(DecredStakingSpendType::SSRTX),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [DecredStakingSpendType] = &[
        DecredStakingSpendType::SSGen,
        DecredStakingSpendType::SSRTX,
    ];
}

impl ::protobuf::EnumFull for DecredStakingSpendType {
    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().enum_by_package_relative_name("DecredStakingSpendType").unwrap()).clone()
    }

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = *self as usize;
        Self::enum_descriptor().value_by_index(index)
    }
}

impl ::std::default::Default for DecredStakingSpendType {
    fn default() -> Self {
        DecredStakingSpendType::SSGen
    }
}

impl DecredStakingSpendType {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<DecredStakingSpendType>("DecredStakingSpendType")
    }
}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.bitcoin.AmountUnit)
pub enum AmountUnit {
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.AmountUnit.BITCOIN)
    BITCOIN = 0,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.AmountUnit.MILLIBITCOIN)
    MILLIBITCOIN = 1,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.AmountUnit.MICROBITCOIN)
    MICROBITCOIN = 2,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.AmountUnit.SATOSHI)
    SATOSHI = 3,
}

impl ::protobuf::Enum for AmountUnit {
    const NAME: &'static str = "AmountUnit";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<AmountUnit> {
        match value {
            0 => ::std::option::Option::Some(AmountUnit::BITCOIN),
            1 => ::std::option::Option::Some(AmountUnit::MILLIBITCOIN),
            2 => ::std::option::Option::Some(AmountUnit::MICROBITCOIN),
            3 => ::std::option::Option::Some(AmountUnit::SATOSHI),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<AmountUnit> {
        match str {
            "BITCOIN" => ::std::option::Option::Some(AmountUnit::BITCOIN),
            "MILLIBITCOIN" => ::std::option::Option::Some(AmountUnit::MILLIBITCOIN),
            "MICROBITCOIN" => ::std::option::Option::Some(AmountUnit::MICROBITCOIN),
            "SATOSHI" => ::std::option::Option::Some(AmountUnit::SATOSHI),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [AmountUnit] = &[
        AmountUnit::BITCOIN,
        AmountUnit::MILLIBITCOIN,
        AmountUnit::MICROBITCOIN,
        AmountUnit::SATOSHI,
    ];
}

impl ::protobuf::EnumFull for AmountUnit {
    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().enum_by_package_relative_name("AmountUnit").unwrap()).clone()
    }

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = *self as usize;
        Self::enum_descriptor().value_by_index(index)
    }
}

impl ::std::default::Default for AmountUnit {
    fn default() -> Self {
        AmountUnit::BITCOIN
    }
}

impl AmountUnit {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<AmountUnit>("AmountUnit")
    }
}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.bitcoin.MultisigPubkeysOrder)
pub enum MultisigPubkeysOrder {
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.MultisigPubkeysOrder.PRESERVED)
    PRESERVED = 0,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.MultisigPubkeysOrder.LEXICOGRAPHIC)
    LEXICOGRAPHIC = 1,
}

impl ::protobuf::Enum for MultisigPubkeysOrder {
    const NAME: &'static str = "MultisigPubkeysOrder";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<MultisigPubkeysOrder> {
        match value {
            0 => ::std::option::Option::Some(MultisigPubkeysOrder::PRESERVED),
            1 => ::std::option::Option::Some(MultisigPubkeysOrder::LEXICOGRAPHIC),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<MultisigPubkeysOrder> {
        match str {
            "PRESERVED" => ::std::option::Option::Some(MultisigPubkeysOrder::PRESERVED),
            "LEXICOGRAPHIC" => ::std::option::Option::Some(MultisigPubkeysOrder::LEXICOGRAPHIC),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [MultisigPubkeysOrder] = &[
        MultisigPubkeysOrder::PRESERVED,
        MultisigPubkeysOrder::LEXICOGRAPHIC,
    ];
}

impl ::protobuf::EnumFull for MultisigPubkeysOrder {
    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().enum_by_package_relative_name("MultisigPubkeysOrder").unwrap()).clone()
    }

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = *self as usize;
        Self::enum_descriptor().value_by_index(index)
    }
}

impl ::std::default::Default for MultisigPubkeysOrder {
    fn default() -> Self {
        MultisigPubkeysOrder::PRESERVED
    }
}

impl MultisigPubkeysOrder {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<MultisigPubkeysOrder>("MultisigPubkeysOrder")
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x16messages-bitcoin.proto\x12\x1ahw.trezor.messages.bitcoin\x1a\x15me\
    ssages-common.proto\x1a\roptions.proto\"\xcd\x03\n\x18MultisigRedeemScri\
    ptType\x12]\n\x07pubkeys\x18\x01\x20\x03(\x0b2C.hw.trezor.messages.bitco\
    in.MultisigRedeemScriptType.HDNodePathTypeR\x07pubkeys\x12\x1e\n\nsignat\
    ures\x18\x02\x20\x03(\x0cR\nsignatures\x12\x0c\n\x01m\x18\x03\x20\x02(\r\
    R\x01m\x12;\n\x05nodes\x18\x04\x20\x03(\x0b2%.hw.trezor.messages.common.\
    HDNodeTypeR\x05nodes\x12\x1b\n\taddress_n\x18\x05\x20\x03(\rR\x08address\
    N\x12`\n\rpubkeys_order\x18\x06\x20\x01(\x0e20.hw.trezor.messages.bitcoi\
    n.MultisigPubkeysOrder:\tPRESERVEDR\x0cpubkeysOrder\x1ah\n\x0eHDNodePath\
    Type\x129\n\x04node\x18\x01\x20\x02(\x0b2%.hw.trezor.messages.common.HDN\
    odeTypeR\x04node\x12\x1b\n\taddress_n\x18\x02\x20\x03(\rR\x08addressN\"\
    \xa6\x02\n\x0cGetPublicKey\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08a\
    ddressN\x12(\n\x10ecdsa_curve_name\x18\x02\x20\x01(\tR\x0eecdsaCurveName\
    \x12!\n\x0cshow_display\x18\x03\x20\x01(\x08R\x0bshowDisplay\x12$\n\tcoi\
    n_name\x18\x04\x20\x01(\t:\x07BitcoinR\x08coinName\x12Z\n\x0bscript_type\
    \x18\x05\x20\x01(\x0e2+.hw.trezor.messages.bitcoin.InputScriptType:\x0cS\
    PENDADDRESSR\nscriptType\x12*\n\x11ignore_xpub_magic\x18\x06\x20\x01(\
    \x08R\x0fignoreXpubMagic\"\xa5\x01\n\tPublicKey\x129\n\x04node\x18\x01\
    \x20\x02(\x0b2%.hw.trezor.messages.common.HDNodeTypeR\x04node\x12\x12\n\
    \x04xpub\x18\x02\x20\x02(\tR\x04xpub\x12)\n\x10root_fingerprint\x18\x03\
    \x20\x01(\rR\x0frootFingerprint\x12\x1e\n\ndescriptor\x18\x04\x20\x01(\t\
    R\ndescriptor\"\xe8\x02\n\nGetAddress\x12\x1b\n\taddress_n\x18\x01\x20\
    \x03(\rR\x08addressN\x12$\n\tcoin_name\x18\x02\x20\x01(\t:\x07BitcoinR\
    \x08coinName\x12!\n\x0cshow_display\x18\x03\x20\x01(\x08R\x0bshowDisplay\
    \x12P\n\x08multisig\x18\x04\x20\x01(\x0b24.hw.trezor.messages.bitcoin.Mu\
    ltisigRedeemScriptTypeR\x08multisig\x12Z\n\x0bscript_type\x18\x05\x20\
    \x01(\x0e2+.hw.trezor.messages.bitcoin.InputScriptType:\x0cSPENDADDRESSR\
    \nscriptType\x12*\n\x11ignore_xpub_magic\x18\x06\x20\x01(\x08R\x0fignore\
    XpubMagic\x12\x1a\n\x08chunkify\x18\x07\x20\x01(\x08R\x08chunkify\"5\n\
    \x07Address\x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\x12\x10\
    \n\x03mac\x18\x02\x20\x01(\x0cR\x03mac\"\x81\x02\n\x0eGetOwnershipId\x12\
    \x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12$\n\tcoin_name\x18\
    \x02\x20\x01(\t:\x07BitcoinR\x08coinName\x12P\n\x08multisig\x18\x03\x20\
    \x01(\x0b24.hw.trezor.messages.bitcoin.MultisigRedeemScriptTypeR\x08mult\
    isig\x12Z\n\x0bscript_type\x18\x04\x20\x01(\x0e2+.hw.trezor.messages.bit\
    coin.InputScriptType:\x0cSPENDADDRESSR\nscriptType\"0\n\x0bOwnershipId\
    \x12!\n\x0cownership_id\x18\x01\x20\x02(\x0cR\x0bownershipId\"\x88\x02\n\
    \x0bSignMessage\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\
    \x18\n\x07message\x18\x02\x20\x02(\x0cR\x07message\x12$\n\tcoin_name\x18\
    \x03\x20\x01(\t:\x07BitcoinR\x08coinName\x12Z\n\x0bscript_type\x18\x04\
    \x20\x01(\x0e2+.hw.trezor.messages.bitcoin.InputScriptType:\x0cSPENDADDR\
    ESSR\nscriptType\x12$\n\x0eno_script_type\x18\x05\x20\x01(\x08R\x0cnoScr\
    iptType\x12\x1a\n\x08chunkify\x18\x06\x20\x01(\x08R\x08chunkify\"J\n\x10\
    MessageSignature\x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\x12\
    \x1c\n\tsignature\x18\x02\x20\x02(\x0cR\tsignature\"\xa3\x01\n\rVerifyMe\
    ssage\x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\x12\x1c\n\tsig\
    nature\x18\x02\x20\x02(\x0cR\tsignature\x12\x18\n\x07message\x18\x03\x20\
    \x02(\x0cR\x07message\x12$\n\tcoin_name\x18\x04\x20\x01(\t:\x07BitcoinR\
    \x08coinName\x12\x1a\n\x08chunkify\x18\x05\x20\x01(\x08R\x08chunkify\"\
    \xd9\x06\n\x06SignTx\x12#\n\routputs_count\x18\x01\x20\x02(\rR\x0coutput\
    sCount\x12!\n\x0cinputs_count\x18\x02\x20\x02(\rR\x0binputsCount\x12$\n\
    \tcoin_name\x18\x03\x20\x01(\t:\x07BitcoinR\x08coinName\x12\x1b\n\x07ver\
    sion\x18\x04\x20\x01(\r:\x011R\x07version\x12\x1e\n\tlock_time\x18\x05\
    \x20\x01(\r:\x010R\x08lockTime\x12\x16\n\x06expiry\x18\x06\x20\x01(\rR\
    \x06expiry\x12&\n\x0coverwintered\x18\x07\x20\x01(\x08R\x0coverwinteredB\
    \x02\x18\x01\x12(\n\x10version_group_id\x18\x08\x20\x01(\rR\x0eversionGr\
    oupId\x12\x1c\n\ttimestamp\x18\t\x20\x01(\rR\ttimestamp\x12\x1b\n\tbranc\
    h_id\x18\n\x20\x01(\rR\x08branchId\x12P\n\x0bamount_unit\x18\x0b\x20\x01\
    (\x0e2&.hw.trezor.messages.bitcoin.AmountUnit:\x07BITCOINR\namountUnit\
    \x129\n\x15decred_staking_ticket\x18\x0c\x20\x01(\x08:\x05falseR\x13decr\
    edStakingTicket\x12\"\n\tserialize\x18\r\x20\x01(\x08:\x04trueR\tseriali\
    ze\x12]\n\x10coinjoin_request\x18\x0e\x20\x01(\x0b22.hw.trezor.messages.\
    bitcoin.SignTx.CoinJoinRequestR\x0fcoinjoinRequest\x12\x1a\n\x08chunkify\
    \x18\x0f\x20\x01(\x08R\x08chunkify\x1a\xd2\x01\n\x0fCoinJoinRequest\x12\
    \x19\n\x08fee_rate\x18\x01\x20\x02(\rR\x07feeRate\x12(\n\x10no_fee_thres\
    hold\x18\x02\x20\x02(\x04R\x0enoFeeThreshold\x124\n\x16min_registrable_a\
    mount\x18\x03\x20\x02(\x04R\x14minRegistrableAmount\x12&\n\x0fmask_publi\
    c_key\x18\x04\x20\x01(\x0cR\rmaskPublicKey\x12\x1c\n\tsignature\x18\x05\
    \x20\x01(\x0cR\tsignature\"\xd4\x05\n\tTxRequest\x12T\n\x0crequest_type\
    \x18\x01\x20\x01(\x0e21.hw.trezor.messages.bitcoin.TxRequest.RequestType\
    R\x0brequestType\x12T\n\x07details\x18\x02\x20\x01(\x0b2:.hw.trezor.mess\
    ages.bitcoin.TxRequest.TxRequestDetailsTypeR\x07details\x12]\n\nserializ\
    ed\x18\x03\x20\x01(\x0b2=.hw.trezor.messages.bitcoin.TxRequest.TxRequest\
    SerializedTypeR\nserialized\x1a\xa6\x01\n\x14TxRequestDetailsType\x12#\n\
    \rrequest_index\x18\x01\x20\x01(\rR\x0crequestIndex\x12\x17\n\x07tx_hash\
    \x18\x02\x20\x01(\x0cR\x06txHash\x12$\n\x0eextra_data_len\x18\x03\x20\
    \x01(\rR\x0cextraDataLen\x12*\n\x11extra_data_offset\x18\x04\x20\x01(\rR\
    \x0fextraDataOffset\x1a\x85\x01\n\x17TxRequestSerializedType\x12'\n\x0fs\
    ignature_index\x18\x01\x20\x01(\rR\x0esignatureIndex\x12\x1c\n\tsignatur\
    e\x18\x02\x20\x01(\x0cR\tsignature\x12#\n\rserialized_tx\x18\x03\x20\x01\
    (\x0cR\x0cserializedTx\"\x8a\x01\n\x0bRequestType\x12\x0b\n\x07TXINPUT\
    \x10\0\x12\x0c\n\x08TXOUTPUT\x10\x01\x12\n\n\x06TXMETA\x10\x02\x12\x0e\n\
    \nTXFINISHED\x10\x03\x12\x0f\n\x0bTXEXTRADATA\x10\x04\x12\x0f\n\x0bTXORI\
    GINPUT\x10\x05\x12\x10\n\x0cTXORIGOUTPUT\x10\x06\x12\x10\n\x0cTXPAYMENTR\
    EQ\x10\x07\"\xee\x0f\n\x05TxAck\x12A\n\x02tx\x18\x01\x20\x01(\x0b21.hw.t\
    rezor.messages.bitcoin.TxAck.TransactionTypeR\x02tx\x1a\x9d\x0f\n\x0fTra\
    nsactionType\x12\x18\n\x07version\x18\x01\x20\x01(\rR\x07version\x12U\n\
    \x06inputs\x18\x02\x20\x03(\x0b2=.hw.trezor.messages.bitcoin.TxAck.Trans\
    actionType.TxInputTypeR\x06inputs\x12b\n\x0bbin_outputs\x18\x03\x20\x03(\
    \x0b2A.hw.trezor.messages.bitcoin.TxAck.TransactionType.TxOutputBinTypeR\
    \nbinOutputs\x12\x1b\n\tlock_time\x18\x04\x20\x01(\rR\x08lockTime\x12X\n\
    \x07outputs\x18\x05\x20\x03(\x0b2>.hw.trezor.messages.bitcoin.TxAck.Tran\
    sactionType.TxOutputTypeR\x07outputs\x12\x1d\n\ninputs_cnt\x18\x06\x20\
    \x01(\rR\tinputsCnt\x12\x1f\n\x0boutputs_cnt\x18\x07\x20\x01(\rR\noutput\
    sCnt\x12\x1d\n\nextra_data\x18\x08\x20\x01(\x0cR\textraData\x12$\n\x0eex\
    tra_data_len\x18\t\x20\x01(\rR\x0cextraDataLen\x12\x16\n\x06expiry\x18\n\
    \x20\x01(\rR\x06expiry\x12&\n\x0coverwintered\x18\x0b\x20\x01(\x08R\x0co\
    verwinteredB\x02\x18\x01\x12(\n\x10version_group_id\x18\x0c\x20\x01(\rR\
    \x0eversionGroupId\x12\x1c\n\ttimestamp\x18\r\x20\x01(\rR\ttimestamp\x12\
    \x1b\n\tbranch_id\x18\x0e\x20\x01(\rR\x08branchId\x1a\xf1\x05\n\x0bTxInp\
    utType\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x1b\n\tp\
    rev_hash\x18\x02\x20\x02(\x0cR\x08prevHash\x12\x1d\n\nprev_index\x18\x03\
    \x20\x02(\rR\tprevIndex\x12\x1d\n\nscript_sig\x18\x04\x20\x01(\x0cR\tscr\
    iptSig\x12&\n\x08sequence\x18\x05\x20\x01(\r:\n4294967295R\x08sequence\
    \x12Z\n\x0bscript_type\x18\x06\x20\x01(\x0e2+.hw.trezor.messages.bitcoin\
    .InputScriptType:\x0cSPENDADDRESSR\nscriptType\x12P\n\x08multisig\x18\
    \x07\x20\x01(\x0b24.hw.trezor.messages.bitcoin.MultisigRedeemScriptTypeR\
    \x08multisig\x12\x16\n\x06amount\x18\x08\x20\x01(\x04R\x06amount\x12\x1f\
    \n\x0bdecred_tree\x18\t\x20\x01(\rR\ndecredTree\x12\x18\n\x07witness\x18\
    \r\x20\x01(\x0cR\x07witness\x12'\n\x0fownership_proof\x18\x0e\x20\x01(\
    \x0cR\x0eownershipProof\x12'\n\x0fcommitment_data\x18\x0f\x20\x01(\x0cR\
    \x0ecommitmentData\x12\x1b\n\torig_hash\x18\x10\x20\x01(\x0cR\x08origHas\
    h\x12\x1d\n\norig_index\x18\x11\x20\x01(\rR\torigIndex\x12d\n\x14decred_\
    staking_spend\x18\x12\x20\x01(\x0e22.hw.trezor.messages.bitcoin.DecredSt\
    akingSpendTypeR\x12decredStakingSpend\x12#\n\rscript_pubkey\x18\x13\x20\
    \x01(\x0cR\x0cscriptPubkey\x12(\n\x0ecoinjoin_flags\x18\x14\x20\x01(\r:\
    \x010R\rcoinjoinFlags\x1a\x82\x01\n\x0fTxOutputBinType\x12\x16\n\x06amou\
    nt\x18\x01\x20\x02(\x04R\x06amount\x12#\n\rscript_pubkey\x18\x02\x20\x02\
    (\x0cR\x0cscriptPubkey\x122\n\x15decred_script_version\x18\x03\x20\x01(\
    \rR\x13decredScriptVersion\x1a\x9a\x03\n\x0cTxOutputType\x12\x18\n\x07ad\
    dress\x18\x01\x20\x01(\tR\x07address\x12\x1b\n\taddress_n\x18\x02\x20\
    \x03(\rR\x08addressN\x12\x16\n\x06amount\x18\x03\x20\x02(\x04R\x06amount\
    \x12[\n\x0bscript_type\x18\x04\x20\x01(\x0e2,.hw.trezor.messages.bitcoin\
    .OutputScriptType:\x0cPAYTOADDRESSR\nscriptType\x12P\n\x08multisig\x18\
    \x05\x20\x01(\x0b24.hw.trezor.messages.bitcoin.MultisigRedeemScriptTypeR\
    \x08multisig\x12$\n\x0eop_return_data\x18\x06\x20\x01(\x0cR\x0copReturnD\
    ata\x12\x1b\n\torig_hash\x18\n\x20\x01(\x0cR\x08origHash\x12\x1d\n\norig\
    _index\x18\x0b\x20\x01(\rR\torigIndex\x12*\n\x11payment_req_index\x18\
    \x0c\x20\x01(\rR\x0fpaymentReqIndex:\x02\x18\x01\"\xff\x05\n\x07TxInput\
    \x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x1b\n\tprev_ha\
    sh\x18\x02\x20\x02(\x0cR\x08prevHash\x12\x1d\n\nprev_index\x18\x03\x20\
    \x02(\rR\tprevIndex\x12\x1d\n\nscript_sig\x18\x04\x20\x01(\x0cR\tscriptS\
    ig\x12&\n\x08sequence\x18\x05\x20\x01(\r:\n4294967295R\x08sequence\x12Z\
    \n\x0bscript_type\x18\x06\x20\x01(\x0e2+.hw.trezor.messages.bitcoin.Inpu\
    tScriptType:\x0cSPENDADDRESSR\nscriptType\x12P\n\x08multisig\x18\x07\x20\
    \x01(\x0b24.hw.trezor.messages.bitcoin.MultisigRedeemScriptTypeR\x08mult\
    isig\x12\x16\n\x06amount\x18\x08\x20\x02(\x04R\x06amount\x12\x1f\n\x0bde\
    cred_tree\x18\t\x20\x01(\rR\ndecredTree\x12\x18\n\x07witness\x18\r\x20\
    \x01(\x0cR\x07witness\x12'\n\x0fownership_proof\x18\x0e\x20\x01(\x0cR\
    \x0eownershipProof\x12'\n\x0fcommitment_data\x18\x0f\x20\x01(\x0cR\x0eco\
    mmitmentData\x12\x1b\n\torig_hash\x18\x10\x20\x01(\x0cR\x08origHash\x12\
    \x1d\n\norig_index\x18\x11\x20\x01(\rR\torigIndex\x12d\n\x14decred_staki\
    ng_spend\x18\x12\x20\x01(\x0e22.hw.trezor.messages.bitcoin.DecredStaking\
    SpendTypeR\x12decredStakingSpend\x12#\n\rscript_pubkey\x18\x13\x20\x01(\
    \x0cR\x0cscriptPubkey\x12(\n\x0ecoinjoin_flags\x18\x14\x20\x01(\r:\x010R\
    \rcoinjoinFlagsJ\x04\x08\n\x10\x0bJ\x04\x08\x0b\x10\x0cJ\x04\x08\x0c\x10\
    \r\"\xa8\x03\n\x08TxOutput\x12\x18\n\x07address\x18\x01\x20\x01(\tR\x07a\
    ddress\x12\x1b\n\taddress_n\x18\x02\x20\x03(\rR\x08addressN\x12\x16\n\
    \x06amount\x18\x03\x20\x02(\x04R\x06amount\x12[\n\x0bscript_type\x18\x04\
    \x20\x01(\x0e2,.hw.trezor.messages.bitcoin.OutputScriptType:\x0cPAYTOADD\
    RESSR\nscriptType\x12P\n\x08multisig\x18\x05\x20\x01(\x0b24.hw.trezor.me\
    ssages.bitcoin.MultisigRedeemScriptTypeR\x08multisig\x12$\n\x0eop_return\
    _data\x18\x06\x20\x01(\x0cR\x0copReturnData\x12\x1b\n\torig_hash\x18\n\
    \x20\x01(\x0cR\x08origHash\x12\x1d\n\norig_index\x18\x0b\x20\x01(\rR\tor\
    igIndex\x12*\n\x11payment_req_index\x18\x0c\x20\x01(\rR\x0fpaymentReqInd\
    exJ\x04\x08\x07\x10\x08J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"\xcb\x02\n\
    \x06PrevTx\x12\x18\n\x07version\x18\x01\x20\x02(\rR\x07version\x12\x1b\n\
    \tlock_time\x18\x04\x20\x02(\rR\x08lockTime\x12!\n\x0cinputs_count\x18\
    \x06\x20\x02(\rR\x0binputsCount\x12#\n\routputs_count\x18\x07\x20\x02(\r\
    R\x0coutputsCount\x12'\n\x0eextra_data_len\x18\t\x20\x01(\r:\x010R\x0cex\
    traDataLen\x12\x16\n\x06expiry\x18\n\x20\x01(\rR\x06expiry\x12(\n\x10ver\
    sion_group_id\x18\x0c\x20\x01(\rR\x0eversionGroupId\x12\x1c\n\ttimestamp\
    \x18\r\x20\x01(\rR\ttimestamp\x12\x1b\n\tbranch_id\x18\x0e\x20\x01(\rR\
    \x08branchIdJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x05\x10\
    \x06J\x04\x08\x08\x10\tJ\x04\x08\x0b\x10\x0c\"\xf7\x01\n\tPrevInput\x12\
    \x1b\n\tprev_hash\x18\x02\x20\x02(\x0cR\x08prevHash\x12\x1d\n\nprev_inde\
    x\x18\x03\x20\x02(\rR\tprevIndex\x12\x1d\n\nscript_sig\x18\x04\x20\x02(\
    \x0cR\tscriptSig\x12\x1a\n\x08sequence\x18\x05\x20\x02(\rR\x08sequence\
    \x12\x1f\n\x0bdecred_tree\x18\t\x20\x01(\rR\ndecredTreeJ\x04\x08\x01\x10\
    \x02J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\tJ\x04\
    \x08\n\x10\x0bJ\x04\x08\x0b\x10\x0cJ\x04\x08\x0c\x10\rJ\x04\x08\r\x10\
    \x0eJ\x04\x08\x0e\x10\x0fJ\x04\x08\x0f\x10\x10J\x04\x08\x10\x10\x11J\x04\
    \x08\x11\x10\x12J\x04\x08\x12\x10\x13J\x04\x08\x13\x10\x14\"}\n\nPrevOut\
    put\x12\x16\n\x06amount\x18\x01\x20\x02(\x04R\x06amount\x12#\n\rscript_p\
    ubkey\x18\x02\x20\x02(\x0cR\x0cscriptPubkey\x122\n\x15decred_script_vers\
    ion\x18\x03\x20\x01(\rR\x13decredScriptVersion\"\xac\x01\n\nTxAckInput\
    \x12H\n\x02tx\x18\x01\x20\x02(\x0b28.hw.trezor.messages.bitcoin.TxAckInp\
    ut.TxAckInputWrapperR\x02tx\x1aN\n\x11TxAckInputWrapper\x129\n\x05input\
    \x18\x02\x20\x02(\x0b2#.hw.trezor.messages.bitcoin.TxInputR\x05input:\
    \x04\x90\xb2\x19\x16\"\xb3\x01\n\x0bTxAckOutput\x12J\n\x02tx\x18\x01\x20\
    \x02(\x0b2:.hw.trezor.messages.bitcoin.TxAckOutput.TxAckOutputWrapperR\
    \x02tx\x1aR\n\x12TxAckOutputWrapper\x12<\n\x06output\x18\x05\x20\x02(\
    \x0b2$.hw.trezor.messages.bitcoin.TxOutputR\x06output:\x04\x90\xb2\x19\
    \x16\"I\n\rTxAckPrevMeta\x122\n\x02tx\x18\x01\x20\x02(\x0b2\".hw.trezor.\
    messages.bitcoin.PrevTxR\x02tx:\x04\x90\xb2\x19\x16\"\xbe\x01\n\x0eTxAck\
    PrevInput\x12P\n\x02tx\x18\x01\x20\x02(\x0b2@.hw.trezor.messages.bitcoin\
    .TxAckPrevInput.TxAckPrevInputWrapperR\x02tx\x1aT\n\x15TxAckPrevInputWra\
    pper\x12;\n\x05input\x18\x02\x20\x02(\x0b2%.hw.trezor.messages.bitcoin.P\
    revInputR\x05input:\x04\x90\xb2\x19\x16\"\xc5\x01\n\x0fTxAckPrevOutput\
    \x12R\n\x02tx\x18\x01\x20\x02(\x0b2B.hw.trezor.messages.bitcoin.TxAckPre\
    vOutput.TxAckPrevOutputWrapperR\x02tx\x1aX\n\x16TxAckPrevOutputWrapper\
    \x12>\n\x06output\x18\x03\x20\x02(\x0b2&.hw.trezor.messages.bitcoin.Prev\
    OutputR\x06output:\x04\x90\xb2\x19\x16\"\xbb\x01\n\x12TxAckPrevExtraData\
    \x12X\n\x02tx\x18\x01\x20\x02(\x0b2H.hw.trezor.messages.bitcoin.TxAckPre\
    vExtraData.TxAckPrevExtraDataWrapperR\x02tx\x1aE\n\x19TxAckPrevExtraData\
    Wrapper\x12(\n\x10extra_data_chunk\x18\x08\x20\x02(\x0cR\x0eextraDataChu\
    nk:\x04\x90\xb2\x19\x16\"\x88\x03\n\x11GetOwnershipProof\x12\x1b\n\taddr\
    ess_n\x18\x01\x20\x03(\rR\x08addressN\x12$\n\tcoin_name\x18\x02\x20\x01(\
    \t:\x07BitcoinR\x08coinName\x12Z\n\x0bscript_type\x18\x03\x20\x01(\x0e2+\
    .hw.trezor.messages.bitcoin.InputScriptType:\x0cSPENDWITNESSR\nscriptTyp\
    e\x12P\n\x08multisig\x18\x04\x20\x01(\x0b24.hw.trezor.messages.bitcoin.M\
    ultisigRedeemScriptTypeR\x08multisig\x122\n\x11user_confirmation\x18\x05\
    \x20\x01(\x08:\x05falseR\x10userConfirmation\x12#\n\rownership_ids\x18\
    \x06\x20\x03(\x0cR\x0cownershipIds\x12)\n\x0fcommitment_data\x18\x07\x20\
    \x01(\x0c:\0R\x0ecommitmentData\"W\n\x0eOwnershipProof\x12'\n\x0fownersh\
    ip_proof\x18\x01\x20\x02(\x0cR\x0eownershipProof\x12\x1c\n\tsignature\
    \x18\x02\x20\x02(\x0cR\tsignature\"\xab\x03\n\x11AuthorizeCoinJoin\x12\
    \x20\n\x0bcoordinator\x18\x01\x20\x02(\tR\x0bcoordinator\x12\x1d\n\nmax_\
    rounds\x18\x02\x20\x02(\x04R\tmaxRounds\x127\n\x18max_coordinator_fee_ra\
    te\x18\x03\x20\x02(\rR\x15maxCoordinatorFeeRate\x12+\n\x12max_fee_per_kv\
    byte\x18\x04\x20\x02(\rR\x0fmaxFeePerKvbyte\x12\x1b\n\taddress_n\x18\x05\
    \x20\x03(\rR\x08addressN\x12$\n\tcoin_name\x18\x06\x20\x01(\t:\x07Bitcoi\
    nR\x08coinName\x12Z\n\x0bscript_type\x18\x07\x20\x01(\x0e2+.hw.trezor.me\
    ssages.bitcoin.InputScriptType:\x0cSPENDADDRESSR\nscriptType\x12P\n\x0ba\
    mount_unit\x18\x08\x20\x01(\x0e2&.hw.trezor.messages.bitcoin.AmountUnit:\
    \x07BITCOINR\namountUnit*~\n\x0fInputScriptType\x12\x10\n\x0cSPENDADDRES\
    S\x10\0\x12\x11\n\rSPENDMULTISIG\x10\x01\x12\x0c\n\x08EXTERNAL\x10\x02\
    \x12\x10\n\x0cSPENDWITNESS\x10\x03\x12\x14\n\x10SPENDP2SHWITNESS\x10\x04\
    \x12\x10\n\x0cSPENDTAPROOT\x10\x05*\x99\x01\n\x10OutputScriptType\x12\
    \x10\n\x0cPAYTOADDRESS\x10\0\x12\x13\n\x0fPAYTOSCRIPTHASH\x10\x01\x12\
    \x11\n\rPAYTOMULTISIG\x10\x02\x12\x11\n\rPAYTOOPRETURN\x10\x03\x12\x10\n\
    \x0cPAYTOWITNESS\x10\x04\x12\x14\n\x10PAYTOP2SHWITNESS\x10\x05\x12\x10\n\
    \x0cPAYTOTAPROOT\x10\x06*.\n\x16DecredStakingSpendType\x12\t\n\x05SSGen\
    \x10\0\x12\t\n\x05SSRTX\x10\x01*J\n\nAmountUnit\x12\x0b\n\x07BITCOIN\x10\
    \0\x12\x10\n\x0cMILLIBITCOIN\x10\x01\x12\x10\n\x0cMICROBITCOIN\x10\x02\
    \x12\x0b\n\x07SATOSHI\x10\x03*8\n\x14MultisigPubkeysOrder\x12\r\n\tPRESE\
    RVED\x10\0\x12\x11\n\rLEXICOGRAPHIC\x10\x01B?\n#com.satoshilabs.trezor.l\
    ib.protobufB\x14TrezorMessageBitcoin\x80\xa6\x1d\x01\
";

/// `FileDescriptorProto` object which was a source for this generated file
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
    file_descriptor_proto_lazy.get(|| {
        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
    })
}

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(2);
            deps.push(super::messages_common::file_descriptor().clone());
            deps.push(super::options::file_descriptor().clone());
            let mut messages = ::std::vec::Vec::with_capacity(40);
            messages.push(MultisigRedeemScriptType::generated_message_descriptor_data());
            messages.push(GetPublicKey::generated_message_descriptor_data());
            messages.push(PublicKey::generated_message_descriptor_data());
            messages.push(GetAddress::generated_message_descriptor_data());
            messages.push(Address::generated_message_descriptor_data());
            messages.push(GetOwnershipId::generated_message_descriptor_data());
            messages.push(OwnershipId::generated_message_descriptor_data());
            messages.push(SignMessage::generated_message_descriptor_data());
            messages.push(MessageSignature::generated_message_descriptor_data());
            messages.push(VerifyMessage::generated_message_descriptor_data());
            messages.push(SignTx::generated_message_descriptor_data());
            messages.push(TxRequest::generated_message_descriptor_data());
            messages.push(TxAck::generated_message_descriptor_data());
            messages.push(TxInput::generated_message_descriptor_data());
            messages.push(TxOutput::generated_message_descriptor_data());
            messages.push(PrevTx::generated_message_descriptor_data());
            messages.push(PrevInput::generated_message_descriptor_data());
            messages.push(PrevOutput::generated_message_descriptor_data());
            messages.push(TxAckInput::generated_message_descriptor_data());
            messages.push(TxAckOutput::generated_message_descriptor_data());
            messages.push(TxAckPrevMeta::generated_message_descriptor_data());
            messages.push(TxAckPrevInput::generated_message_descriptor_data());
            messages.push(TxAckPrevOutput::generated_message_descriptor_data());
            messages.push(TxAckPrevExtraData::generated_message_descriptor_data());
            messages.push(GetOwnershipProof::generated_message_descriptor_data());
            messages.push(OwnershipProof::generated_message_descriptor_data());
            messages.push(AuthorizeCoinJoin::generated_message_descriptor_data());
            messages.push(multisig_redeem_script_type::HDNodePathType::generated_message_descriptor_data());
            messages.push(sign_tx::CoinJoinRequest::generated_message_descriptor_data());
            messages.push(tx_request::TxRequestDetailsType::generated_message_descriptor_data());
            messages.push(tx_request::TxRequestSerializedType::generated_message_descriptor_data());
            messages.push(tx_ack::TransactionType::generated_message_descriptor_data());
            messages.push(tx_ack::transaction_type::TxInputType::generated_message_descriptor_data());
            messages.push(tx_ack::transaction_type::TxOutputBinType::generated_message_descriptor_data());
            messages.push(tx_ack::transaction_type::TxOutputType::generated_message_descriptor_data());
            messages.push(tx_ack_input::TxAckInputWrapper::generated_message_descriptor_data());
            messages.push(tx_ack_output::TxAckOutputWrapper::generated_message_descriptor_data());
            messages.push(tx_ack_prev_input::TxAckPrevInputWrapper::generated_message_descriptor_data());
            messages.push(tx_ack_prev_output::TxAckPrevOutputWrapper::generated_message_descriptor_data());
            messages.push(tx_ack_prev_extra_data::TxAckPrevExtraDataWrapper::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(6);
            enums.push(InputScriptType::generated_enum_descriptor_data());
            enums.push(OutputScriptType::generated_enum_descriptor_data());
            enums.push(DecredStakingSpendType::generated_enum_descriptor_data());
            enums.push(AmountUnit::generated_enum_descriptor_data());
            enums.push(MultisigPubkeysOrder::generated_enum_descriptor_data());
            enums.push(tx_request::RequestType::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
