emerald-vault 0.32.0

Emerald Vault - Key Storage for Emerald Wallet
Documentation
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @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(box_pointers)]
#![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_imports)]
#![allow(unused_results)]
//! Generated file from `seed.proto`

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

#[derive(PartialEq,Clone,Default)]
pub struct Seed {
    // message fields
    pub file_type: super::common::FileType,
    pub id: ::std::vec::Vec<u8>,
    pub label: ::std::string::String,
    pub created_at: u64,
    // message oneof groups
    pub seed_source: ::std::option::Option<Seed_oneof_seed_source>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

#[derive(Clone,PartialEq,Debug)]
pub enum Seed_oneof_seed_source {
    bytes(super::crypto::Encrypted),
    ledger(LedgerSeed),
}

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

    // .emerald.vault.FileType file_type = 1;


    pub fn get_file_type(&self) -> super::common::FileType {
        self.file_type
    }
    pub fn clear_file_type(&mut self) {
        self.file_type = super::common::FileType::FILE_UNKNOWN;
    }

    // Param is passed by value, moved
    pub fn set_file_type(&mut self, v: super::common::FileType) {
        self.file_type = v;
    }

    // bytes id = 2;


    pub fn get_id(&self) -> &[u8] {
        &self.id
    }
    pub fn clear_id(&mut self) {
        self.id.clear();
    }

    // Param is passed by value, moved
    pub fn set_id(&mut self, v: ::std::vec::Vec<u8>) {
        self.id = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_id(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.id
    }

    // Take field
    pub fn take_id(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.id, ::std::vec::Vec::new())
    }

    // .emerald.vault.Encrypted bytes = 3;


    pub fn get_bytes(&self) -> &super::crypto::Encrypted {
        match self.seed_source {
            ::std::option::Option::Some(Seed_oneof_seed_source::bytes(ref v)) => v,
            _ => <super::crypto::Encrypted as ::protobuf::Message>::default_instance(),
        }
    }
    pub fn clear_bytes(&mut self) {
        self.seed_source = ::std::option::Option::None;
    }

    pub fn has_bytes(&self) -> bool {
        match self.seed_source {
            ::std::option::Option::Some(Seed_oneof_seed_source::bytes(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_bytes(&mut self, v: super::crypto::Encrypted) {
        self.seed_source = ::std::option::Option::Some(Seed_oneof_seed_source::bytes(v))
    }

    // Mutable pointer to the field.
    pub fn mut_bytes(&mut self) -> &mut super::crypto::Encrypted {
        if let ::std::option::Option::Some(Seed_oneof_seed_source::bytes(_)) = self.seed_source {
        } else {
            self.seed_source = ::std::option::Option::Some(Seed_oneof_seed_source::bytes(super::crypto::Encrypted::new()));
        }
        match self.seed_source {
            ::std::option::Option::Some(Seed_oneof_seed_source::bytes(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_bytes(&mut self) -> super::crypto::Encrypted {
        if self.has_bytes() {
            match self.seed_source.take() {
                ::std::option::Option::Some(Seed_oneof_seed_source::bytes(v)) => v,
                _ => panic!(),
            }
        } else {
            super::crypto::Encrypted::new()
        }
    }

    // .emerald.vault.LedgerSeed ledger = 4;


    pub fn get_ledger(&self) -> &LedgerSeed {
        match self.seed_source {
            ::std::option::Option::Some(Seed_oneof_seed_source::ledger(ref v)) => v,
            _ => <LedgerSeed as ::protobuf::Message>::default_instance(),
        }
    }
    pub fn clear_ledger(&mut self) {
        self.seed_source = ::std::option::Option::None;
    }

    pub fn has_ledger(&self) -> bool {
        match self.seed_source {
            ::std::option::Option::Some(Seed_oneof_seed_source::ledger(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_ledger(&mut self, v: LedgerSeed) {
        self.seed_source = ::std::option::Option::Some(Seed_oneof_seed_source::ledger(v))
    }

    // Mutable pointer to the field.
    pub fn mut_ledger(&mut self) -> &mut LedgerSeed {
        if let ::std::option::Option::Some(Seed_oneof_seed_source::ledger(_)) = self.seed_source {
        } else {
            self.seed_source = ::std::option::Option::Some(Seed_oneof_seed_source::ledger(LedgerSeed::new()));
        }
        match self.seed_source {
            ::std::option::Option::Some(Seed_oneof_seed_source::ledger(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_ledger(&mut self) -> LedgerSeed {
        if self.has_ledger() {
            match self.seed_source.take() {
                ::std::option::Option::Some(Seed_oneof_seed_source::ledger(v)) => v,
                _ => panic!(),
            }
        } else {
            LedgerSeed::new()
        }
    }

    // string label = 5;


    pub fn get_label(&self) -> &str {
        &self.label
    }
    pub fn clear_label(&mut self) {
        self.label.clear();
    }

    // Param is passed by value, moved
    pub fn set_label(&mut self, v: ::std::string::String) {
        self.label = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_label(&mut self) -> &mut ::std::string::String {
        &mut self.label
    }

    // Take field
    pub fn take_label(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.label, ::std::string::String::new())
    }

    // uint64 created_at = 6;


    pub fn get_created_at(&self) -> u64 {
        self.created_at
    }
    pub fn clear_created_at(&mut self) {
        self.created_at = 0;
    }

    // Param is passed by value, moved
    pub fn set_created_at(&mut self, v: u64) {
        self.created_at = v;
    }
}

impl ::protobuf::Message for Seed {
    fn is_initialized(&self) -> bool {
        if let Some(Seed_oneof_seed_source::bytes(ref v)) = self.seed_source {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(Seed_oneof_seed_source::ledger(ref v)) = self.seed_source {
            if !v.is_initialized() {
                return false;
            }
        }
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.file_type, 1, &mut self.unknown_fields)?
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.id)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.seed_source = ::std::option::Option::Some(Seed_oneof_seed_source::bytes(is.read_message()?));
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.seed_source = ::std::option::Option::Some(Seed_oneof_seed_source::ledger(is.read_message()?));
                },
                5 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.label)?;
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.created_at = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.file_type != super::common::FileType::FILE_UNKNOWN {
            my_size += ::protobuf::rt::enum_size(1, self.file_type);
        }
        if !self.id.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.id);
        }
        if !self.label.is_empty() {
            my_size += ::protobuf::rt::string_size(5, &self.label);
        }
        if self.created_at != 0 {
            my_size += ::protobuf::rt::value_size(6, self.created_at, ::protobuf::wire_format::WireTypeVarint);
        }
        if let ::std::option::Option::Some(ref v) = self.seed_source {
            match v {
                &Seed_oneof_seed_source::bytes(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &Seed_oneof_seed_source::ledger(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
            };
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if self.file_type != super::common::FileType::FILE_UNKNOWN {
            os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.file_type))?;
        }
        if !self.id.is_empty() {
            os.write_bytes(2, &self.id)?;
        }
        if !self.label.is_empty() {
            os.write_string(5, &self.label)?;
        }
        if self.created_at != 0 {
            os.write_uint64(6, self.created_at)?;
        }
        if let ::std::option::Option::Some(ref v) = self.seed_source {
            match v {
                &Seed_oneof_seed_source::bytes(ref v) => {
                    os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &Seed_oneof_seed_source::ledger(ref v) => {
                    os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
            };
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Seed {
        Seed::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::common::FileType>>(
                "file_type",
                |m: &Seed| { &m.file_type },
                |m: &mut Seed| { &mut m.file_type },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                "id",
                |m: &Seed| { &m.id },
                |m: &mut Seed| { &mut m.id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::crypto::Encrypted>(
                "bytes",
                Seed::has_bytes,
                Seed::get_bytes,
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, LedgerSeed>(
                "ledger",
                Seed::has_ledger,
                Seed::get_ledger,
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "label",
                |m: &Seed| { &m.label },
                |m: &mut Seed| { &mut m.label },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "created_at",
                |m: &Seed| { &m.created_at },
                |m: &mut Seed| { &mut m.created_at },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<Seed>(
                "Seed",
                fields,
                file_descriptor_proto(),
            )
        })
    }

    fn default_instance() -> &'static Seed {
        static instance: ::protobuf::rt::LazyV2<Seed> = ::protobuf::rt::LazyV2::INIT;
        instance.get(Seed::new)
    }
}

impl ::protobuf::Clear for Seed {
    fn clear(&mut self) {
        self.file_type = super::common::FileType::FILE_UNKNOWN;
        self.id.clear();
        self.seed_source = ::std::option::Option::None;
        self.seed_source = ::std::option::Option::None;
        self.label.clear();
        self.created_at = 0;
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for Seed {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct LedgerSeed {
    // message fields
    pub fingerprints: ::protobuf::RepeatedField<HDPathFingerprint>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // repeated .emerald.vault.HDPathFingerprint fingerprints = 1;


    pub fn get_fingerprints(&self) -> &[HDPathFingerprint] {
        &self.fingerprints
    }
    pub fn clear_fingerprints(&mut self) {
        self.fingerprints.clear();
    }

    // Param is passed by value, moved
    pub fn set_fingerprints(&mut self, v: ::protobuf::RepeatedField<HDPathFingerprint>) {
        self.fingerprints = v;
    }

    // Mutable pointer to the field.
    pub fn mut_fingerprints(&mut self) -> &mut ::protobuf::RepeatedField<HDPathFingerprint> {
        &mut self.fingerprints
    }

    // Take field
    pub fn take_fingerprints(&mut self) -> ::protobuf::RepeatedField<HDPathFingerprint> {
        ::std::mem::replace(&mut self.fingerprints, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for LedgerSeed {
    fn is_initialized(&self) -> bool {
        for v in &self.fingerprints {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.fingerprints)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        for value in &self.fingerprints {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        for v in &self.fingerprints {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> LedgerSeed {
        LedgerSeed::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<HDPathFingerprint>>(
                "fingerprints",
                |m: &LedgerSeed| { &m.fingerprints },
                |m: &mut LedgerSeed| { &mut m.fingerprints },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<LedgerSeed>(
                "LedgerSeed",
                fields,
                file_descriptor_proto(),
            )
        })
    }

    fn default_instance() -> &'static LedgerSeed {
        static instance: ::protobuf::rt::LazyV2<LedgerSeed> = ::protobuf::rt::LazyV2::INIT;
        instance.get(LedgerSeed::new)
    }
}

impl ::protobuf::Clear for LedgerSeed {
    fn clear(&mut self) {
        self.fingerprints.clear();
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for LedgerSeed {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct HDPathFingerprint {
    // message fields
    pub path: ::protobuf::SingularPtrField<HDPath>,
    pub field_type: HDPathFingerprint_Type,
    pub fingerprint: ::std::vec::Vec<u8>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // .emerald.vault.HDPath path = 1;


    pub fn get_path(&self) -> &HDPath {
        self.path.as_ref().unwrap_or_else(|| <HDPath as ::protobuf::Message>::default_instance())
    }
    pub fn clear_path(&mut self) {
        self.path.clear();
    }

    pub fn has_path(&self) -> bool {
        self.path.is_some()
    }

    // Param is passed by value, moved
    pub fn set_path(&mut self, v: HDPath) {
        self.path = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_path(&mut self) -> &mut HDPath {
        if self.path.is_none() {
            self.path.set_default();
        }
        self.path.as_mut().unwrap()
    }

    // Take field
    pub fn take_path(&mut self) -> HDPath {
        self.path.take().unwrap_or_else(|| HDPath::new())
    }

    // .emerald.vault.HDPathFingerprint.Type type = 2;


    pub fn get_field_type(&self) -> HDPathFingerprint_Type {
        self.field_type
    }
    pub fn clear_field_type(&mut self) {
        self.field_type = HDPathFingerprint_Type::UNKNOWN;
    }

    // Param is passed by value, moved
    pub fn set_field_type(&mut self, v: HDPathFingerprint_Type) {
        self.field_type = v;
    }

    // bytes fingerprint = 3;


    pub fn get_fingerprint(&self) -> &[u8] {
        &self.fingerprint
    }
    pub fn clear_fingerprint(&mut self) {
        self.fingerprint.clear();
    }

    // Param is passed by value, moved
    pub fn set_fingerprint(&mut self, v: ::std::vec::Vec<u8>) {
        self.fingerprint = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_fingerprint(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.fingerprint
    }

    // Take field
    pub fn take_fingerprint(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.fingerprint, ::std::vec::Vec::new())
    }
}

impl ::protobuf::Message for HDPathFingerprint {
    fn is_initialized(&self) -> bool {
        for v in &self.path {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.path)?;
                },
                2 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 2, &mut self.unknown_fields)?
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.fingerprint)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(ref v) = self.path.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if self.field_type != HDPathFingerprint_Type::UNKNOWN {
            my_size += ::protobuf::rt::enum_size(2, self.field_type);
        }
        if !self.fingerprint.is_empty() {
            my_size += ::protobuf::rt::bytes_size(3, &self.fingerprint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(ref v) = self.path.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if self.field_type != HDPathFingerprint_Type::UNKNOWN {
            os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.field_type))?;
        }
        if !self.fingerprint.is_empty() {
            os.write_bytes(3, &self.fingerprint)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> HDPathFingerprint {
        HDPathFingerprint::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<HDPath>>(
                "path",
                |m: &HDPathFingerprint| { &m.path },
                |m: &mut HDPathFingerprint| { &mut m.path },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<HDPathFingerprint_Type>>(
                "type",
                |m: &HDPathFingerprint| { &m.field_type },
                |m: &mut HDPathFingerprint| { &mut m.field_type },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                "fingerprint",
                |m: &HDPathFingerprint| { &m.fingerprint },
                |m: &mut HDPathFingerprint| { &mut m.fingerprint },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<HDPathFingerprint>(
                "HDPathFingerprint",
                fields,
                file_descriptor_proto(),
            )
        })
    }

    fn default_instance() -> &'static HDPathFingerprint {
        static instance: ::protobuf::rt::LazyV2<HDPathFingerprint> = ::protobuf::rt::LazyV2::INIT;
        instance.get(HDPathFingerprint::new)
    }
}

impl ::protobuf::Clear for HDPathFingerprint {
    fn clear(&mut self) {
        self.path.clear();
        self.field_type = HDPathFingerprint_Type::UNKNOWN;
        self.fingerprint.clear();
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for HDPathFingerprint {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum HDPathFingerprint_Type {
    UNKNOWN = 0,
    ADDRESS_SHA256 = 1,
}

impl ::protobuf::ProtobufEnum for HDPathFingerprint_Type {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<HDPathFingerprint_Type> {
        match value {
            0 => ::std::option::Option::Some(HDPathFingerprint_Type::UNKNOWN),
            1 => ::std::option::Option::Some(HDPathFingerprint_Type::ADDRESS_SHA256),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [HDPathFingerprint_Type] = &[
            HDPathFingerprint_Type::UNKNOWN,
            HDPathFingerprint_Type::ADDRESS_SHA256,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<HDPathFingerprint_Type>("HDPathFingerprint.Type", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for HDPathFingerprint_Type {
}

impl ::std::default::Default for HDPathFingerprint_Type {
    fn default() -> Self {
        HDPathFingerprint_Type::UNKNOWN
    }
}

impl ::protobuf::reflect::ProtobufValue for HDPathFingerprint_Type {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct SeedHD {
    // message fields
    pub seed_id: ::std::vec::Vec<u8>,
    // message oneof groups
    pub path_type: ::std::option::Option<SeedHD_oneof_path_type>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

#[derive(Clone,PartialEq,Debug)]
pub enum SeedHD_oneof_path_type {
    path(HDPath),
    account(HDPath),
}

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

    // bytes seed_id = 1;


    pub fn get_seed_id(&self) -> &[u8] {
        &self.seed_id
    }
    pub fn clear_seed_id(&mut self) {
        self.seed_id.clear();
    }

    // Param is passed by value, moved
    pub fn set_seed_id(&mut self, v: ::std::vec::Vec<u8>) {
        self.seed_id = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_seed_id(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.seed_id
    }

    // Take field
    pub fn take_seed_id(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.seed_id, ::std::vec::Vec::new())
    }

    // .emerald.vault.HDPath path = 2;


    pub fn get_path(&self) -> &HDPath {
        match self.path_type {
            ::std::option::Option::Some(SeedHD_oneof_path_type::path(ref v)) => v,
            _ => <HDPath as ::protobuf::Message>::default_instance(),
        }
    }
    pub fn clear_path(&mut self) {
        self.path_type = ::std::option::Option::None;
    }

    pub fn has_path(&self) -> bool {
        match self.path_type {
            ::std::option::Option::Some(SeedHD_oneof_path_type::path(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_path(&mut self, v: HDPath) {
        self.path_type = ::std::option::Option::Some(SeedHD_oneof_path_type::path(v))
    }

    // Mutable pointer to the field.
    pub fn mut_path(&mut self) -> &mut HDPath {
        if let ::std::option::Option::Some(SeedHD_oneof_path_type::path(_)) = self.path_type {
        } else {
            self.path_type = ::std::option::Option::Some(SeedHD_oneof_path_type::path(HDPath::new()));
        }
        match self.path_type {
            ::std::option::Option::Some(SeedHD_oneof_path_type::path(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_path(&mut self) -> HDPath {
        if self.has_path() {
            match self.path_type.take() {
                ::std::option::Option::Some(SeedHD_oneof_path_type::path(v)) => v,
                _ => panic!(),
            }
        } else {
            HDPath::new()
        }
    }

    // .emerald.vault.HDPath account = 3;


    pub fn get_account(&self) -> &HDPath {
        match self.path_type {
            ::std::option::Option::Some(SeedHD_oneof_path_type::account(ref v)) => v,
            _ => <HDPath as ::protobuf::Message>::default_instance(),
        }
    }
    pub fn clear_account(&mut self) {
        self.path_type = ::std::option::Option::None;
    }

    pub fn has_account(&self) -> bool {
        match self.path_type {
            ::std::option::Option::Some(SeedHD_oneof_path_type::account(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_account(&mut self, v: HDPath) {
        self.path_type = ::std::option::Option::Some(SeedHD_oneof_path_type::account(v))
    }

    // Mutable pointer to the field.
    pub fn mut_account(&mut self) -> &mut HDPath {
        if let ::std::option::Option::Some(SeedHD_oneof_path_type::account(_)) = self.path_type {
        } else {
            self.path_type = ::std::option::Option::Some(SeedHD_oneof_path_type::account(HDPath::new()));
        }
        match self.path_type {
            ::std::option::Option::Some(SeedHD_oneof_path_type::account(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_account(&mut self) -> HDPath {
        if self.has_account() {
            match self.path_type.take() {
                ::std::option::Option::Some(SeedHD_oneof_path_type::account(v)) => v,
                _ => panic!(),
            }
        } else {
            HDPath::new()
        }
    }
}

impl ::protobuf::Message for SeedHD {
    fn is_initialized(&self) -> bool {
        if let Some(SeedHD_oneof_path_type::path(ref v)) = self.path_type {
            if !v.is_initialized() {
                return false;
            }
        }
        if let Some(SeedHD_oneof_path_type::account(ref v)) = self.path_type {
            if !v.is_initialized() {
                return false;
            }
        }
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.seed_id)?;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.path_type = ::std::option::Option::Some(SeedHD_oneof_path_type::path(is.read_message()?));
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self.path_type = ::std::option::Option::Some(SeedHD_oneof_path_type::account(is.read_message()?));
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.seed_id.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.seed_id);
        }
        if let ::std::option::Option::Some(ref v) = self.path_type {
            match v {
                &SeedHD_oneof_path_type::path(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
                &SeedHD_oneof_path_type::account(ref v) => {
                    let len = v.compute_size();
                    my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
                },
            };
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if !self.seed_id.is_empty() {
            os.write_bytes(1, &self.seed_id)?;
        }
        if let ::std::option::Option::Some(ref v) = self.path_type {
            match v {
                &SeedHD_oneof_path_type::path(ref v) => {
                    os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
                &SeedHD_oneof_path_type::account(ref v) => {
                    os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
                    os.write_raw_varint32(v.get_cached_size())?;
                    v.write_to_with_cached_sizes(os)?;
                },
            };
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> SeedHD {
        SeedHD::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                "seed_id",
                |m: &SeedHD| { &m.seed_id },
                |m: &mut SeedHD| { &mut m.seed_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, HDPath>(
                "path",
                SeedHD::has_path,
                SeedHD::get_path,
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, HDPath>(
                "account",
                SeedHD::has_account,
                SeedHD::get_account,
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<SeedHD>(
                "SeedHD",
                fields,
                file_descriptor_proto(),
            )
        })
    }

    fn default_instance() -> &'static SeedHD {
        static instance: ::protobuf::rt::LazyV2<SeedHD> = ::protobuf::rt::LazyV2::INIT;
        instance.get(SeedHD::new)
    }
}

impl ::protobuf::Clear for SeedHD {
    fn clear(&mut self) {
        self.seed_id.clear();
        self.path_type = ::std::option::Option::None;
        self.path_type = ::std::option::Option::None;
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for SeedHD {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct HDPath {
    // message fields
    pub purpose: u32,
    pub coin: u32,
    pub account: u32,
    pub change: u32,
    pub index: u32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // uint32 purpose = 1;


    pub fn get_purpose(&self) -> u32 {
        self.purpose
    }
    pub fn clear_purpose(&mut self) {
        self.purpose = 0;
    }

    // Param is passed by value, moved
    pub fn set_purpose(&mut self, v: u32) {
        self.purpose = v;
    }

    // uint32 coin = 2;


    pub fn get_coin(&self) -> u32 {
        self.coin
    }
    pub fn clear_coin(&mut self) {
        self.coin = 0;
    }

    // Param is passed by value, moved
    pub fn set_coin(&mut self, v: u32) {
        self.coin = v;
    }

    // uint32 account = 3;


    pub fn get_account(&self) -> u32 {
        self.account
    }
    pub fn clear_account(&mut self) {
        self.account = 0;
    }

    // Param is passed by value, moved
    pub fn set_account(&mut self, v: u32) {
        self.account = v;
    }

    // uint32 change = 4;


    pub fn get_change(&self) -> u32 {
        self.change
    }
    pub fn clear_change(&mut self) {
        self.change = 0;
    }

    // Param is passed by value, moved
    pub fn set_change(&mut self, v: u32) {
        self.change = v;
    }

    // uint32 index = 5;


    pub fn get_index(&self) -> u32 {
        self.index
    }
    pub fn clear_index(&mut self) {
        self.index = 0;
    }

    // Param is passed by value, moved
    pub fn set_index(&mut self, v: u32) {
        self.index = v;
    }
}

impl ::protobuf::Message for HDPath {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.purpose = tmp;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.coin = tmp;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.account = tmp;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.change = tmp;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.index = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.purpose != 0 {
            my_size += ::protobuf::rt::value_size(1, self.purpose, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.coin != 0 {
            my_size += ::protobuf::rt::value_size(2, self.coin, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.account != 0 {
            my_size += ::protobuf::rt::value_size(3, self.account, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.change != 0 {
            my_size += ::protobuf::rt::value_size(4, self.change, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.index != 0 {
            my_size += ::protobuf::rt::value_size(5, self.index, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if self.purpose != 0 {
            os.write_uint32(1, self.purpose)?;
        }
        if self.coin != 0 {
            os.write_uint32(2, self.coin)?;
        }
        if self.account != 0 {
            os.write_uint32(3, self.account)?;
        }
        if self.change != 0 {
            os.write_uint32(4, self.change)?;
        }
        if self.index != 0 {
            os.write_uint32(5, self.index)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> HDPath {
        HDPath::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "purpose",
                |m: &HDPath| { &m.purpose },
                |m: &mut HDPath| { &mut m.purpose },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "coin",
                |m: &HDPath| { &m.coin },
                |m: &mut HDPath| { &mut m.coin },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "account",
                |m: &HDPath| { &m.account },
                |m: &mut HDPath| { &mut m.account },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "change",
                |m: &HDPath| { &m.change },
                |m: &mut HDPath| { &mut m.change },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "index",
                |m: &HDPath| { &m.index },
                |m: &mut HDPath| { &mut m.index },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<HDPath>(
                "HDPath",
                fields,
                file_descriptor_proto(),
            )
        })
    }

    fn default_instance() -> &'static HDPath {
        static instance: ::protobuf::rt::LazyV2<HDPath> = ::protobuf::rt::LazyV2::INIT;
        instance.get(HDPath::new)
    }
}

impl ::protobuf::Clear for HDPath {
    fn clear(&mut self) {
        self.purpose = 0;
        self.coin = 0;
        self.account = 0;
        self.change = 0;
        self.index = 0;
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for HDPath {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\nseed.proto\x12\remerald.vault\x1a\x0ccrypto.proto\x1a\x0ccommon.prot\
    o\"\xf7\x01\n\x04Seed\x124\n\tfile_type\x18\x01\x20\x01(\x0e2\x17.emeral\
    d.vault.FileTypeR\x08fileType\x12\x0e\n\x02id\x18\x02\x20\x01(\x0cR\x02i\
    d\x120\n\x05bytes\x18\x03\x20\x01(\x0b2\x18.emerald.vault.EncryptedH\0R\
    \x05bytes\x123\n\x06ledger\x18\x04\x20\x01(\x0b2\x19.emerald.vault.Ledge\
    rSeedH\0R\x06ledger\x12\x14\n\x05label\x18\x05\x20\x01(\tR\x05label\x12\
    \x1d\n\ncreated_at\x18\x06\x20\x01(\x04R\tcreatedAtB\r\n\x0bseed_source\
    \"R\n\nLedgerSeed\x12D\n\x0cfingerprints\x18\x01\x20\x03(\x0b2\x20.emera\
    ld.vault.HDPathFingerprintR\x0cfingerprints\"\xc4\x01\n\x11HDPathFingerp\
    rint\x12)\n\x04path\x18\x01\x20\x01(\x0b2\x15.emerald.vault.HDPathR\x04p\
    ath\x129\n\x04type\x18\x02\x20\x01(\x0e2%.emerald.vault.HDPathFingerprin\
    t.TypeR\x04type\x12\x20\n\x0bfingerprint\x18\x03\x20\x01(\x0cR\x0bfinger\
    print\"'\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\0\x12\x12\n\x0eADDRESS_SHA25\
    6\x10\x01\"\x8e\x01\n\x06SeedHD\x12\x17\n\x07seed_id\x18\x01\x20\x01(\
    \x0cR\x06seedId\x12+\n\x04path\x18\x02\x20\x01(\x0b2\x15.emerald.vault.H\
    DPathH\0R\x04path\x121\n\x07account\x18\x03\x20\x01(\x0b2\x15.emerald.va\
    ult.HDPathH\0R\x07accountB\x0b\n\tpath_type\"~\n\x06HDPath\x12\x18\n\x07\
    purpose\x18\x01\x20\x01(\rR\x07purpose\x12\x12\n\x04coin\x18\x02\x20\x01\
    (\rR\x04coin\x12\x18\n\x07account\x18\x03\x20\x01(\rR\x07account\x12\x16\
    \n\x06change\x18\x04\x20\x01(\rR\x06change\x12\x14\n\x05index\x18\x05\
    \x20\x01(\rR\x05indexJ\xf9\x0b\n\x06\x12\x04\0\01\x01\n\x08\n\x01\x0c\
    \x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x01\0\x16\n\t\n\x02\x03\0\x12\
    \x03\x02\0\x16\n\t\n\x02\x03\x01\x12\x03\x03\0\x16\n\n\n\x02\x04\0\x12\
    \x04\x05\0\x10\x01\n\n\n\x03\x04\0\x01\x12\x03\x05\x08\x0c\n\x0b\n\x04\
    \x04\0\x02\0\x12\x03\x06\x04\x1b\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x06\
    \x04\x0c\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x06\r\x16\n\x0c\n\x05\x04\0\
    \x02\0\x03\x12\x03\x06\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x07\x04\
    \x11\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x07\x04\t\n\x0c\n\x05\x04\0\
    \x02\x01\x01\x12\x03\x07\n\x0c\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x07\
    \x0f\x10\n\x0c\n\x04\x04\0\x08\0\x12\x04\x08\x04\x0b\x05\n\x0c\n\x05\x04\
    \0\x08\0\x01\x12\x03\x08\n\x15\n\x0b\n\x04\x04\0\x02\x02\x12\x03\t\x08\
    \x1c\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03\t\x08\x11\n\x0c\n\x05\x04\0\
    \x02\x02\x01\x12\x03\t\x12\x17\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\t\
    \x1a\x1b\n\x0b\n\x04\x04\0\x02\x03\x12\x03\n\x08\x1e\n\x0c\n\x05\x04\0\
    \x02\x03\x06\x12\x03\n\x08\x12\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\n\
    \x13\x19\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\n\x1c\x1d\n-\n\x04\x04\0\
    \x02\x04\x12\x03\r\x04\x15\x1a\x20\x20User\x20assigned\x20label\x20(opti\
    onal)\n\n\x0c\n\x05\x04\0\x02\x04\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\0\
    \x02\x04\x01\x12\x03\r\x0b\x10\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\r\
    \x13\x14\nD\n\x04\x04\0\x02\x05\x12\x03\x0f\x04\x1a\x1a7\x20creation\x20\
    date\x20of\x20the\x20seed,\x20millis\x20since\x20epoch,\x20in\x20UTC\n\n\
    \x0c\n\x05\x04\0\x02\x05\x05\x12\x03\x0f\x04\n\n\x0c\n\x05\x04\0\x02\x05\
    \x01\x12\x03\x0f\x0b\x15\n\x0c\n\x05\x04\0\x02\x05\x03\x12\x03\x0f\x18\
    \x19\n\n\n\x02\x04\x01\x12\x04\x12\0\x14\x01\n\n\n\x03\x04\x01\x01\x12\
    \x03\x12\x08\x12\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x13\x040\n\x0c\n\x05\
    \x04\x01\x02\0\x04\x12\x03\x13\x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x06\x12\
    \x03\x13\r\x1e\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x13\x1f+\n\x0c\n\
    \x05\x04\x01\x02\0\x03\x12\x03\x13./\n\n\n\x02\x04\x02\x12\x04\x16\0\x1f\
    \x01\n\n\n\x03\x04\x02\x01\x12\x03\x16\x08\x19\n\x0b\n\x04\x04\x02\x02\0\
    \x12\x03\x17\x04\x14\n\x0c\n\x05\x04\x02\x02\0\x06\x12\x03\x17\x04\n\n\
    \x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x17\x0b\x0f\n\x0c\n\x05\x04\x02\x02\
    \0\x03\x12\x03\x17\x12\x13\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x18\x04\
    \x12\n\x0c\n\x05\x04\x02\x02\x01\x06\x12\x03\x18\x04\x08\n\x0c\n\x05\x04\
    \x02\x02\x01\x01\x12\x03\x18\t\r\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\
    \x18\x10\x11\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\x19\x04\x1a\n\x0c\n\x05\
    \x04\x02\x02\x02\x05\x12\x03\x19\x04\t\n\x0c\n\x05\x04\x02\x02\x02\x01\
    \x12\x03\x19\n\x15\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x19\x18\x19\n\
    \x0c\n\x04\x04\x02\x04\0\x12\x04\x1b\x04\x1e\x05\n\x0c\n\x05\x04\x02\x04\
    \0\x01\x12\x03\x1b\t\r\n\r\n\x06\x04\x02\x04\0\x02\0\x12\x03\x1c\x08\x14\
    \n\x0e\n\x07\x04\x02\x04\0\x02\0\x01\x12\x03\x1c\x08\x0f\n\x0e\n\x07\x04\
    \x02\x04\0\x02\0\x02\x12\x03\x1c\x12\x13\n\r\n\x06\x04\x02\x04\0\x02\x01\
    \x12\x03\x1d\x08\x1b\n\x0e\n\x07\x04\x02\x04\0\x02\x01\x01\x12\x03\x1d\
    \x08\x16\n\x0e\n\x07\x04\x02\x04\0\x02\x01\x02\x12\x03\x1d\x19\x1a\n\n\n\
    \x02\x04\x03\x12\x04!\0)\x01\n\n\n\x03\x04\x03\x01\x12\x03!\x08\x0e\n\
    \x0b\n\x04\x04\x03\x02\0\x12\x03\"\x04\x16\n\x0c\n\x05\x04\x03\x02\0\x05\
    \x12\x03\"\x04\t\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\"\n\x11\n\x0c\n\
    \x05\x04\x03\x02\0\x03\x12\x03\"\x14\x15\n\x0c\n\x04\x04\x03\x08\0\x12\
    \x04#\x04(\x05\n\x0c\n\x05\x04\x03\x08\0\x01\x12\x03#\n\x13\n9\n\x04\x04\
    \x03\x02\x01\x12\x03%\x08\x18\x1a,full\x20m/purpose'/coin'/account'/chan\
    ge/index\n\n\x0c\n\x05\x04\x03\x02\x01\x06\x12\x03%\x08\x0e\n\x0c\n\x05\
    \x04\x03\x02\x01\x01\x12\x03%\x0f\x13\n\x0c\n\x05\x04\x03\x02\x01\x03\
    \x12\x03%\x16\x17\n3\n\x04\x04\x03\x02\x02\x12\x03'\x08\x1b\x1a&short,\
    \x20only\x20m/purpose'/coin'/account'\n\n\x0c\n\x05\x04\x03\x02\x02\x06\
    \x12\x03'\x08\x0e\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03'\x0f\x16\n\x0c\
    \n\x05\x04\x03\x02\x02\x03\x12\x03'\x19\x1a\n\n\n\x02\x04\x04\x12\x04+\0\
    1\x01\n\n\n\x03\x04\x04\x01\x12\x03+\x08\x0e\n\x0b\n\x04\x04\x04\x02\0\
    \x12\x03,\x04\x17\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03,\x04\n\n\x0c\n\
    \x05\x04\x04\x02\0\x01\x12\x03,\x0b\x12\n\x0c\n\x05\x04\x04\x02\0\x03\
    \x12\x03,\x15\x16\n\x0b\n\x04\x04\x04\x02\x01\x12\x03-\x04\x14\n\x0c\n\
    \x05\x04\x04\x02\x01\x05\x12\x03-\x04\n\n\x0c\n\x05\x04\x04\x02\x01\x01\
    \x12\x03-\x0b\x0f\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03-\x12\x13\n\x0b\
    \n\x04\x04\x04\x02\x02\x12\x03.\x04\x17\n\x0c\n\x05\x04\x04\x02\x02\x05\
    \x12\x03.\x04\n\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03.\x0b\x12\n\x0c\n\
    \x05\x04\x04\x02\x02\x03\x12\x03.\x15\x16\n\x0b\n\x04\x04\x04\x02\x03\
    \x12\x03/\x04\x16\n\x0c\n\x05\x04\x04\x02\x03\x05\x12\x03/\x04\n\n\x0c\n\
    \x05\x04\x04\x02\x03\x01\x12\x03/\x0b\x11\n\x0c\n\x05\x04\x04\x02\x03\
    \x03\x12\x03/\x14\x15\n\x0b\n\x04\x04\x04\x02\x04\x12\x030\x04\x15\n\x0c\
    \n\x05\x04\x04\x02\x04\x05\x12\x030\x04\n\n\x0c\n\x05\x04\x04\x02\x04\
    \x01\x12\x030\x0b\x10\n\x0c\n\x05\x04\x04\x02\x04\x03\x12\x030\x13\x14b\
    \x06proto3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}