#![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_results)]
#![allow(unused_mut)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct MultisigRedeemScriptType {
pub pubkeys: ::std::vec::Vec<multisig_redeem_script_type::HDNodePathType>,
pub signatures: ::std::vec::Vec<::std::vec::Vec<u8>>,
pub m: ::std::option::Option<u32>,
pub nodes: ::std::vec::Vec<super::messages_common::HDNodeType>,
pub address_n: ::std::vec::Vec<u32>,
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()
}
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()
}
pub fn set_m(&mut self, v: u32) {
self.m = ::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_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 },
));
::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()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[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);
};
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)?;
};
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.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(),
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>;
}
pub mod multisig_redeem_script_type {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct HDNodePathType {
pub node: ::protobuf::MessageField<super::super::messages_common::HDNodeType>,
pub address_n: ::std::vec::Vec<u32>,
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(())
}
#[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>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetPublicKey {
pub address_n: ::std::vec::Vec<u32>,
pub ecdsa_curve_name: ::std::option::Option<::std::string::String>,
pub show_display: ::std::option::Option<bool>,
pub coin_name: ::std::option::Option<::std::string::String>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
pub ignore_xpub_magic: ::std::option::Option<bool>,
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()
}
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()
}
pub fn set_ecdsa_curve_name(&mut self, v: ::std::string::String) {
self.ecdsa_curve_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_ecdsa_curve_name(&mut self) -> ::std::string::String {
self.ecdsa_curve_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_show_display(&mut self, v: bool) {
self.show_display = ::std::option::Option::Some(v);
}
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()
}
pub fn set_coin_name(&mut self, v: ::std::string::String) {
self.coin_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coin_name(&mut self) -> ::std::string::String {
self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_script_type(&mut self, v: InputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PublicKey {
pub node: ::protobuf::MessageField<super::messages_common::HDNodeType>,
pub xpub: ::std::option::Option<::std::string::String>,
pub root_fingerprint: ::std::option::Option<u32>,
pub descriptor: ::std::option::Option<::std::string::String>,
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()
}
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()
}
pub fn set_xpub(&mut self, v: ::std::string::String) {
self.xpub = ::std::option::Option::Some(v);
}
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()
}
pub fn take_xpub(&mut self) -> ::std::string::String {
self.xpub.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_root_fingerprint(&mut self, v: u32) {
self.root_fingerprint = ::std::option::Option::Some(v);
}
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()
}
pub fn set_descriptor(&mut self, v: ::std::string::String) {
self.descriptor = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetAddress {
pub address_n: ::std::vec::Vec<u32>,
pub coin_name: ::std::option::Option<::std::string::String>,
pub show_display: ::std::option::Option<bool>,
pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
pub ignore_xpub_magic: ::std::option::Option<bool>,
pub chunkify: ::std::option::Option<bool>,
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()
}
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()
}
pub fn set_coin_name(&mut self, v: ::std::string::String) {
self.coin_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coin_name(&mut self) -> ::std::string::String {
self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_show_display(&mut self, v: bool) {
self.show_display = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_type(&mut self, v: InputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_ignore_xpub_magic(&mut self, v: bool) {
self.ignore_xpub_magic = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Address {
pub address: ::std::option::Option<::std::string::String>,
pub mac: ::std::option::Option<::std::vec::Vec<u8>>,
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()
}
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()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
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()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_mac(&mut self, v: ::std::vec::Vec<u8>) {
self.mac = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetOwnershipId {
pub address_n: ::std::vec::Vec<u32>,
pub coin_name: ::std::option::Option<::std::string::String>,
pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
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()
}
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()
}
pub fn set_coin_name(&mut self, v: ::std::string::String) {
self.coin_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coin_name(&mut self) -> ::std::string::String {
self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct OwnershipId {
pub ownership_id: ::std::option::Option<::std::vec::Vec<u8>>,
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()
}
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()
}
pub fn set_ownership_id(&mut self, v: ::std::vec::Vec<u8>) {
self.ownership_id = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct SignMessage {
pub address_n: ::std::vec::Vec<u32>,
pub message: ::std::option::Option<::std::vec::Vec<u8>>,
pub coin_name: ::std::option::Option<::std::string::String>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
pub no_script_type: ::std::option::Option<bool>,
pub chunkify: ::std::option::Option<bool>,
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()
}
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()
}
pub fn set_message(&mut self, v: ::std::vec::Vec<u8>) {
self.message = ::std::option::Option::Some(v);
}
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()
}
pub fn take_message(&mut self) -> ::std::vec::Vec<u8> {
self.message.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_coin_name(&mut self, v: ::std::string::String) {
self.coin_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coin_name(&mut self) -> ::std::string::String {
self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_script_type(&mut self, v: InputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_no_script_type(&mut self, v: bool) {
self.no_script_type = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct MessageSignature {
pub address: ::std::option::Option<::std::string::String>,
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
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()
}
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()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
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()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct VerifyMessage {
pub address: ::std::option::Option<::std::string::String>,
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
pub message: ::std::option::Option<::std::vec::Vec<u8>>,
pub coin_name: ::std::option::Option<::std::string::String>,
pub chunkify: ::std::option::Option<bool>,
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()
}
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()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
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()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::std::option::Option::Some(v);
}
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()
}
pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_message(&mut self, v: ::std::vec::Vec<u8>) {
self.message = ::std::option::Option::Some(v);
}
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()
}
pub fn take_message(&mut self) -> ::std::vec::Vec<u8> {
self.message.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_coin_name(&mut self, v: ::std::string::String) {
self.coin_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coin_name(&mut self) -> ::std::string::String {
self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct SignTx {
pub outputs_count: ::std::option::Option<u32>,
pub inputs_count: ::std::option::Option<u32>,
pub coin_name: ::std::option::Option<::std::string::String>,
pub version: ::std::option::Option<u32>,
pub lock_time: ::std::option::Option<u32>,
pub expiry: ::std::option::Option<u32>,
pub overwintered: ::std::option::Option<bool>,
pub version_group_id: ::std::option::Option<u32>,
pub timestamp: ::std::option::Option<u32>,
pub branch_id: ::std::option::Option<u32>,
pub amount_unit: ::std::option::Option<::protobuf::EnumOrUnknown<AmountUnit>>,
pub decred_staking_ticket: ::std::option::Option<bool>,
pub serialize: ::std::option::Option<bool>,
pub coinjoin_request: ::protobuf::MessageField<sign_tx::CoinJoinRequest>,
pub chunkify: ::std::option::Option<bool>,
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()
}
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()
}
pub fn set_outputs_count(&mut self, v: u32) {
self.outputs_count = ::std::option::Option::Some(v);
}
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()
}
pub fn set_inputs_count(&mut self, v: u32) {
self.inputs_count = ::std::option::Option::Some(v);
}
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()
}
pub fn set_coin_name(&mut self, v: ::std::string::String) {
self.coin_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coin_name(&mut self) -> ::std::string::String {
self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_version(&mut self, v: u32) {
self.version = ::std::option::Option::Some(v);
}
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()
}
pub fn set_lock_time(&mut self, v: u32) {
self.lock_time = ::std::option::Option::Some(v);
}
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()
}
pub fn set_expiry(&mut self, v: u32) {
self.expiry = ::std::option::Option::Some(v);
}
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()
}
pub fn set_overwintered(&mut self, v: bool) {
self.overwintered = ::std::option::Option::Some(v);
}
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()
}
pub fn set_version_group_id(&mut self, v: u32) {
self.version_group_id = ::std::option::Option::Some(v);
}
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()
}
pub fn set_timestamp(&mut self, v: u32) {
self.timestamp = ::std::option::Option::Some(v);
}
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()
}
pub fn set_branch_id(&mut self, v: u32) {
self.branch_id = ::std::option::Option::Some(v);
}
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()
}
pub fn set_amount_unit(&mut self, v: AmountUnit) {
self.amount_unit = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_decred_staking_ticket(&mut self, v: bool) {
self.decred_staking_ticket = ::std::option::Option::Some(v);
}
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()
}
pub fn set_serialize(&mut self, v: bool) {
self.serialize = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
pub mod sign_tx {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CoinJoinRequest {
pub fee_rate: ::std::option::Option<u32>,
pub no_fee_threshold: ::std::option::Option<u64>,
pub min_registrable_amount: ::std::option::Option<u64>,
pub mask_public_key: ::std::option::Option<::std::vec::Vec<u8>>,
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
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()
}
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()
}
pub fn set_fee_rate(&mut self, v: u32) {
self.fee_rate = ::std::option::Option::Some(v);
}
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()
}
pub fn set_no_fee_threshold(&mut self, v: u64) {
self.no_fee_threshold = ::std::option::Option::Some(v);
}
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()
}
pub fn set_min_registrable_amount(&mut self, v: u64) {
self.min_registrable_amount = ::std::option::Option::Some(v);
}
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()
}
pub fn set_mask_public_key(&mut self, v: ::std::vec::Vec<u8>) {
self.mask_public_key = ::std::option::Option::Some(v);
}
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()
}
pub fn take_mask_public_key(&mut self) -> ::std::vec::Vec<u8> {
self.mask_public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxRequest {
pub request_type: ::std::option::Option<::protobuf::EnumOrUnknown<tx_request::RequestType>>,
pub details: ::protobuf::MessageField<tx_request::TxRequestDetailsType>,
pub serialized: ::protobuf::MessageField<tx_request::TxRequestSerializedType>,
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()
}
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()
}
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(())
}
#[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>;
}
pub mod tx_request {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxRequestDetailsType {
pub request_index: ::std::option::Option<u32>,
pub tx_hash: ::std::option::Option<::std::vec::Vec<u8>>,
pub extra_data_len: ::std::option::Option<u32>,
pub extra_data_offset: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_request_index(&mut self, v: u32) {
self.request_index = ::std::option::Option::Some(v);
}
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()
}
pub fn set_tx_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.tx_hash = ::std::option::Option::Some(v);
}
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()
}
pub fn take_tx_hash(&mut self) -> ::std::vec::Vec<u8> {
self.tx_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_extra_data_len(&mut self, v: u32) {
self.extra_data_len = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxRequestSerializedType {
pub signature_index: ::std::option::Option<u32>,
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
pub serialized_tx: ::std::option::Option<::std::vec::Vec<u8>>,
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()
}
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()
}
pub fn set_signature_index(&mut self, v: u32) {
self.signature_index = ::std::option::Option::Some(v);
}
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()
}
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::std::option::Option::Some(v);
}
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()
}
pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_serialized_tx(&mut self, v: ::std::vec::Vec<u8>) {
self.serialized_tx = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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)]
pub enum RequestType {
TXINPUT = 0,
TXOUTPUT = 1,
TXMETA = 2,
TXFINISHED = 3,
TXEXTRADATA = 4,
TXORIGINPUT = 5,
TXORIGOUTPUT = 6,
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")
}
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAck {
pub tx: ::protobuf::MessageField<tx_ack::TransactionType>,
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(())
}
#[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>;
}
pub mod tx_ack {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TransactionType {
pub version: ::std::option::Option<u32>,
pub inputs: ::std::vec::Vec<transaction_type::TxInputType>,
pub bin_outputs: ::std::vec::Vec<transaction_type::TxOutputBinType>,
pub lock_time: ::std::option::Option<u32>,
pub outputs: ::std::vec::Vec<transaction_type::TxOutputType>,
pub inputs_cnt: ::std::option::Option<u32>,
pub outputs_cnt: ::std::option::Option<u32>,
pub extra_data: ::std::option::Option<::std::vec::Vec<u8>>,
pub extra_data_len: ::std::option::Option<u32>,
pub expiry: ::std::option::Option<u32>,
pub overwintered: ::std::option::Option<bool>,
pub version_group_id: ::std::option::Option<u32>,
pub timestamp: ::std::option::Option<u32>,
pub branch_id: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_version(&mut self, v: u32) {
self.version = ::std::option::Option::Some(v);
}
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()
}
pub fn set_lock_time(&mut self, v: u32) {
self.lock_time = ::std::option::Option::Some(v);
}
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()
}
pub fn set_inputs_cnt(&mut self, v: u32) {
self.inputs_cnt = ::std::option::Option::Some(v);
}
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()
}
pub fn set_outputs_cnt(&mut self, v: u32) {
self.outputs_cnt = ::std::option::Option::Some(v);
}
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()
}
pub fn set_extra_data(&mut self, v: ::std::vec::Vec<u8>) {
self.extra_data = ::std::option::Option::Some(v);
}
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()
}
pub fn take_extra_data(&mut self) -> ::std::vec::Vec<u8> {
self.extra_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_extra_data_len(&mut self, v: u32) {
self.extra_data_len = ::std::option::Option::Some(v);
}
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()
}
pub fn set_expiry(&mut self, v: u32) {
self.expiry = ::std::option::Option::Some(v);
}
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()
}
pub fn set_overwintered(&mut self, v: bool) {
self.overwintered = ::std::option::Option::Some(v);
}
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()
}
pub fn set_version_group_id(&mut self, v: u32) {
self.version_group_id = ::std::option::Option::Some(v);
}
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()
}
pub fn set_timestamp(&mut self, v: u32) {
self.timestamp = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
pub mod transaction_type {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxInputType {
pub address_n: ::std::vec::Vec<u32>,
pub prev_hash: ::std::option::Option<::std::vec::Vec<u8>>,
pub prev_index: ::std::option::Option<u32>,
pub script_sig: ::std::option::Option<::std::vec::Vec<u8>>,
pub sequence: ::std::option::Option<u32>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<super::super::InputScriptType>>,
pub multisig: ::protobuf::MessageField<super::super::MultisigRedeemScriptType>,
pub amount: ::std::option::Option<u64>,
pub decred_tree: ::std::option::Option<u32>,
pub witness: ::std::option::Option<::std::vec::Vec<u8>>,
pub ownership_proof: ::std::option::Option<::std::vec::Vec<u8>>,
pub commitment_data: ::std::option::Option<::std::vec::Vec<u8>>,
pub orig_hash: ::std::option::Option<::std::vec::Vec<u8>>,
pub orig_index: ::std::option::Option<u32>,
pub decred_staking_spend: ::std::option::Option<::protobuf::EnumOrUnknown<super::super::DecredStakingSpendType>>,
pub script_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
pub coinjoin_flags: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_prev_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.prev_hash = ::std::option::Option::Some(v);
}
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()
}
pub fn take_prev_hash(&mut self) -> ::std::vec::Vec<u8> {
self.prev_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_prev_index(&mut self, v: u32) {
self.prev_index = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_sig(&mut self, v: ::std::vec::Vec<u8>) {
self.script_sig = ::std::option::Option::Some(v);
}
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()
}
pub fn take_script_sig(&mut self) -> ::std::vec::Vec<u8> {
self.script_sig.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_sequence(&mut self, v: u32) {
self.sequence = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_type(&mut self, v: super::super::InputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_amount(&mut self, v: u64) {
self.amount = ::std::option::Option::Some(v);
}
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()
}
pub fn set_decred_tree(&mut self, v: u32) {
self.decred_tree = ::std::option::Option::Some(v);
}
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()
}
pub fn set_witness(&mut self, v: ::std::vec::Vec<u8>) {
self.witness = ::std::option::Option::Some(v);
}
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()
}
pub fn take_witness(&mut self) -> ::std::vec::Vec<u8> {
self.witness.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_ownership_proof(&mut self, v: ::std::vec::Vec<u8>) {
self.ownership_proof = ::std::option::Option::Some(v);
}
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()
}
pub fn take_ownership_proof(&mut self) -> ::std::vec::Vec<u8> {
self.ownership_proof.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_commitment_data(&mut self, v: ::std::vec::Vec<u8>) {
self.commitment_data = ::std::option::Option::Some(v);
}
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()
}
pub fn take_commitment_data(&mut self) -> ::std::vec::Vec<u8> {
self.commitment_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_orig_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.orig_hash = ::std::option::Option::Some(v);
}
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()
}
pub fn take_orig_hash(&mut self) -> ::std::vec::Vec<u8> {
self.orig_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_orig_index(&mut self, v: u32) {
self.orig_index = ::std::option::Option::Some(v);
}
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()
}
pub fn set_decred_staking_spend(&mut self, v: super::super::DecredStakingSpendType) {
self.decred_staking_spend = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_script_pubkey(&mut self, v: ::std::vec::Vec<u8>) {
self.script_pubkey = ::std::option::Option::Some(v);
}
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()
}
pub fn take_script_pubkey(&mut self) -> ::std::vec::Vec<u8> {
self.script_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxOutputBinType {
pub amount: ::std::option::Option<u64>,
pub script_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
pub decred_script_version: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_amount(&mut self, v: u64) {
self.amount = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_pubkey(&mut self, v: ::std::vec::Vec<u8>) {
self.script_pubkey = ::std::option::Option::Some(v);
}
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()
}
pub fn take_script_pubkey(&mut self) -> ::std::vec::Vec<u8> {
self.script_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxOutputType {
pub address: ::std::option::Option<::std::string::String>,
pub address_n: ::std::vec::Vec<u32>,
pub amount: ::std::option::Option<u64>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<super::super::OutputScriptType>>,
pub multisig: ::protobuf::MessageField<super::super::MultisigRedeemScriptType>,
pub op_return_data: ::std::option::Option<::std::vec::Vec<u8>>,
pub orig_hash: ::std::option::Option<::std::vec::Vec<u8>>,
pub orig_index: ::std::option::Option<u32>,
pub payment_req_index: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
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()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_amount(&mut self, v: u64) {
self.amount = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_type(&mut self, v: super::super::OutputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_op_return_data(&mut self, v: ::std::vec::Vec<u8>) {
self.op_return_data = ::std::option::Option::Some(v);
}
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()
}
pub fn take_op_return_data(&mut self) -> ::std::vec::Vec<u8> {
self.op_return_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_orig_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.orig_hash = ::std::option::Option::Some(v);
}
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()
}
pub fn take_orig_hash(&mut self) -> ::std::vec::Vec<u8> {
self.orig_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_orig_index(&mut self, v: u32) {
self.orig_index = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxInput {
pub address_n: ::std::vec::Vec<u32>,
pub prev_hash: ::std::option::Option<::std::vec::Vec<u8>>,
pub prev_index: ::std::option::Option<u32>,
pub script_sig: ::std::option::Option<::std::vec::Vec<u8>>,
pub sequence: ::std::option::Option<u32>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
pub amount: ::std::option::Option<u64>,
pub decred_tree: ::std::option::Option<u32>,
pub witness: ::std::option::Option<::std::vec::Vec<u8>>,
pub ownership_proof: ::std::option::Option<::std::vec::Vec<u8>>,
pub commitment_data: ::std::option::Option<::std::vec::Vec<u8>>,
pub orig_hash: ::std::option::Option<::std::vec::Vec<u8>>,
pub orig_index: ::std::option::Option<u32>,
pub decred_staking_spend: ::std::option::Option<::protobuf::EnumOrUnknown<DecredStakingSpendType>>,
pub script_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
pub coinjoin_flags: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_prev_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.prev_hash = ::std::option::Option::Some(v);
}
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()
}
pub fn take_prev_hash(&mut self) -> ::std::vec::Vec<u8> {
self.prev_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_prev_index(&mut self, v: u32) {
self.prev_index = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_sig(&mut self, v: ::std::vec::Vec<u8>) {
self.script_sig = ::std::option::Option::Some(v);
}
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()
}
pub fn take_script_sig(&mut self) -> ::std::vec::Vec<u8> {
self.script_sig.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_sequence(&mut self, v: u32) {
self.sequence = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_type(&mut self, v: InputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_amount(&mut self, v: u64) {
self.amount = ::std::option::Option::Some(v);
}
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()
}
pub fn set_decred_tree(&mut self, v: u32) {
self.decred_tree = ::std::option::Option::Some(v);
}
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()
}
pub fn set_witness(&mut self, v: ::std::vec::Vec<u8>) {
self.witness = ::std::option::Option::Some(v);
}
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()
}
pub fn take_witness(&mut self) -> ::std::vec::Vec<u8> {
self.witness.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_ownership_proof(&mut self, v: ::std::vec::Vec<u8>) {
self.ownership_proof = ::std::option::Option::Some(v);
}
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()
}
pub fn take_ownership_proof(&mut self) -> ::std::vec::Vec<u8> {
self.ownership_proof.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_commitment_data(&mut self, v: ::std::vec::Vec<u8>) {
self.commitment_data = ::std::option::Option::Some(v);
}
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()
}
pub fn take_commitment_data(&mut self) -> ::std::vec::Vec<u8> {
self.commitment_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_orig_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.orig_hash = ::std::option::Option::Some(v);
}
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()
}
pub fn take_orig_hash(&mut self) -> ::std::vec::Vec<u8> {
self.orig_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_orig_index(&mut self, v: u32) {
self.orig_index = ::std::option::Option::Some(v);
}
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()
}
pub fn set_decred_staking_spend(&mut self, v: DecredStakingSpendType) {
self.decred_staking_spend = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_script_pubkey(&mut self, v: ::std::vec::Vec<u8>) {
self.script_pubkey = ::std::option::Option::Some(v);
}
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()
}
pub fn take_script_pubkey(&mut self) -> ::std::vec::Vec<u8> {
self.script_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxOutput {
pub address: ::std::option::Option<::std::string::String>,
pub address_n: ::std::vec::Vec<u32>,
pub amount: ::std::option::Option<u64>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<OutputScriptType>>,
pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
pub op_return_data: ::std::option::Option<::std::vec::Vec<u8>>,
pub orig_hash: ::std::option::Option<::std::vec::Vec<u8>>,
pub orig_index: ::std::option::Option<u32>,
pub payment_req_index: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
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()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_amount(&mut self, v: u64) {
self.amount = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_type(&mut self, v: OutputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_op_return_data(&mut self, v: ::std::vec::Vec<u8>) {
self.op_return_data = ::std::option::Option::Some(v);
}
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()
}
pub fn take_op_return_data(&mut self) -> ::std::vec::Vec<u8> {
self.op_return_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_orig_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.orig_hash = ::std::option::Option::Some(v);
}
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()
}
pub fn take_orig_hash(&mut self) -> ::std::vec::Vec<u8> {
self.orig_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_orig_index(&mut self, v: u32) {
self.orig_index = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PrevTx {
pub version: ::std::option::Option<u32>,
pub lock_time: ::std::option::Option<u32>,
pub inputs_count: ::std::option::Option<u32>,
pub outputs_count: ::std::option::Option<u32>,
pub extra_data_len: ::std::option::Option<u32>,
pub expiry: ::std::option::Option<u32>,
pub version_group_id: ::std::option::Option<u32>,
pub timestamp: ::std::option::Option<u32>,
pub branch_id: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_version(&mut self, v: u32) {
self.version = ::std::option::Option::Some(v);
}
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()
}
pub fn set_lock_time(&mut self, v: u32) {
self.lock_time = ::std::option::Option::Some(v);
}
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()
}
pub fn set_inputs_count(&mut self, v: u32) {
self.inputs_count = ::std::option::Option::Some(v);
}
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()
}
pub fn set_outputs_count(&mut self, v: u32) {
self.outputs_count = ::std::option::Option::Some(v);
}
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()
}
pub fn set_extra_data_len(&mut self, v: u32) {
self.extra_data_len = ::std::option::Option::Some(v);
}
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()
}
pub fn set_expiry(&mut self, v: u32) {
self.expiry = ::std::option::Option::Some(v);
}
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()
}
pub fn set_version_group_id(&mut self, v: u32) {
self.version_group_id = ::std::option::Option::Some(v);
}
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()
}
pub fn set_timestamp(&mut self, v: u32) {
self.timestamp = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PrevInput {
pub prev_hash: ::std::option::Option<::std::vec::Vec<u8>>,
pub prev_index: ::std::option::Option<u32>,
pub script_sig: ::std::option::Option<::std::vec::Vec<u8>>,
pub sequence: ::std::option::Option<u32>,
pub decred_tree: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_prev_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.prev_hash = ::std::option::Option::Some(v);
}
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()
}
pub fn take_prev_hash(&mut self) -> ::std::vec::Vec<u8> {
self.prev_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_prev_index(&mut self, v: u32) {
self.prev_index = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_sig(&mut self, v: ::std::vec::Vec<u8>) {
self.script_sig = ::std::option::Option::Some(v);
}
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()
}
pub fn take_script_sig(&mut self) -> ::std::vec::Vec<u8> {
self.script_sig.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_sequence(&mut self, v: u32) {
self.sequence = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PrevOutput {
pub amount: ::std::option::Option<u64>,
pub script_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
pub decred_script_version: ::std::option::Option<u32>,
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()
}
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()
}
pub fn set_amount(&mut self, v: u64) {
self.amount = ::std::option::Option::Some(v);
}
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()
}
pub fn set_script_pubkey(&mut self, v: ::std::vec::Vec<u8>) {
self.script_pubkey = ::std::option::Option::Some(v);
}
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()
}
pub fn take_script_pubkey(&mut self) -> ::std::vec::Vec<u8> {
self.script_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPaymentRequest {
pub nonce: ::std::option::Option<::std::vec::Vec<u8>>,
pub recipient_name: ::std::option::Option<::std::string::String>,
pub memos: ::std::vec::Vec<tx_ack_payment_request::PaymentRequestMemo>,
pub amount: ::std::option::Option<u64>,
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a TxAckPaymentRequest {
fn default() -> &'a TxAckPaymentRequest {
<TxAckPaymentRequest as ::protobuf::Message>::default_instance()
}
}
impl TxAckPaymentRequest {
pub fn new() -> TxAckPaymentRequest {
::std::default::Default::default()
}
pub fn nonce(&self) -> &[u8] {
match self.nonce.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_nonce(&mut self) {
self.nonce = ::std::option::Option::None;
}
pub fn has_nonce(&self) -> bool {
self.nonce.is_some()
}
pub fn set_nonce(&mut self, v: ::std::vec::Vec<u8>) {
self.nonce = ::std::option::Option::Some(v);
}
pub fn mut_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.nonce.is_none() {
self.nonce = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.nonce.as_mut().unwrap()
}
pub fn take_nonce(&mut self) -> ::std::vec::Vec<u8> {
self.nonce.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn recipient_name(&self) -> &str {
match self.recipient_name.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_recipient_name(&mut self) {
self.recipient_name = ::std::option::Option::None;
}
pub fn has_recipient_name(&self) -> bool {
self.recipient_name.is_some()
}
pub fn set_recipient_name(&mut self, v: ::std::string::String) {
self.recipient_name = ::std::option::Option::Some(v);
}
pub fn mut_recipient_name(&mut self) -> &mut ::std::string::String {
if self.recipient_name.is_none() {
self.recipient_name = ::std::option::Option::Some(::std::string::String::new());
}
self.recipient_name.as_mut().unwrap()
}
pub fn take_recipient_name(&mut self) -> ::std::string::String {
self.recipient_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_amount(&mut self, v: u64) {
self.amount = ::std::option::Option::Some(v);
}
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()
}
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::std::option::Option::Some(v);
}
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()
}
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(5);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"nonce",
|m: &TxAckPaymentRequest| { &m.nonce },
|m: &mut TxAckPaymentRequest| { &mut m.nonce },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"recipient_name",
|m: &TxAckPaymentRequest| { &m.recipient_name },
|m: &mut TxAckPaymentRequest| { &mut m.recipient_name },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"memos",
|m: &TxAckPaymentRequest| { &m.memos },
|m: &mut TxAckPaymentRequest| { &mut m.memos },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"amount",
|m: &TxAckPaymentRequest| { &m.amount },
|m: &mut TxAckPaymentRequest| { &mut m.amount },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signature",
|m: &TxAckPaymentRequest| { &m.signature },
|m: &mut TxAckPaymentRequest| { &mut m.signature },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TxAckPaymentRequest>(
"TxAckPaymentRequest",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for TxAckPaymentRequest {
const NAME: &'static str = "TxAckPaymentRequest";
fn is_initialized(&self) -> bool {
if self.recipient_name.is_none() {
return false;
}
if self.signature.is_none() {
return false;
}
for v in &self.memos {
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.nonce = ::std::option::Option::Some(is.read_bytes()?);
},
18 => {
self.recipient_name = ::std::option::Option::Some(is.read_string()?);
},
26 => {
self.memos.push(is.read_message()?);
},
32 => {
self.amount = ::std::option::Option::Some(is.read_uint64()?);
},
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(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.nonce.as_ref() {
my_size += ::protobuf::rt::bytes_size(1, &v);
}
if let Some(v) = self.recipient_name.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
for value in &self.memos {
let len = value.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(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.nonce.as_ref() {
os.write_bytes(1, v)?;
}
if let Some(v) = self.recipient_name.as_ref() {
os.write_string(2, v)?;
}
for v in &self.memos {
::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
};
if let Some(v) = self.amount {
os.write_uint64(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() -> TxAckPaymentRequest {
TxAckPaymentRequest::new()
}
fn clear(&mut self) {
self.nonce = ::std::option::Option::None;
self.recipient_name = ::std::option::Option::None;
self.memos.clear();
self.amount = ::std::option::Option::None;
self.signature = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static TxAckPaymentRequest {
static instance: TxAckPaymentRequest = TxAckPaymentRequest {
nonce: ::std::option::Option::None,
recipient_name: ::std::option::Option::None,
memos: ::std::vec::Vec::new(),
amount: ::std::option::Option::None,
signature: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for TxAckPaymentRequest {
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("TxAckPaymentRequest").unwrap()).clone()
}
}
impl ::std::fmt::Display for TxAckPaymentRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for TxAckPaymentRequest {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod tx_ack_payment_request {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PaymentRequestMemo {
pub text_memo: ::protobuf::MessageField<TextMemo>,
pub refund_memo: ::protobuf::MessageField<RefundMemo>,
pub coin_purchase_memo: ::protobuf::MessageField<CoinPurchaseMemo>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a PaymentRequestMemo {
fn default() -> &'a PaymentRequestMemo {
<PaymentRequestMemo as ::protobuf::Message>::default_instance()
}
}
impl PaymentRequestMemo {
pub fn new() -> PaymentRequestMemo {
::std::default::Default::default()
}
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_message_field_accessor::<_, TextMemo>(
"text_memo",
|m: &PaymentRequestMemo| { &m.text_memo },
|m: &mut PaymentRequestMemo| { &mut m.text_memo },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, RefundMemo>(
"refund_memo",
|m: &PaymentRequestMemo| { &m.refund_memo },
|m: &mut PaymentRequestMemo| { &mut m.refund_memo },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CoinPurchaseMemo>(
"coin_purchase_memo",
|m: &PaymentRequestMemo| { &m.coin_purchase_memo },
|m: &mut PaymentRequestMemo| { &mut m.coin_purchase_memo },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PaymentRequestMemo>(
"TxAckPaymentRequest.PaymentRequestMemo",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for PaymentRequestMemo {
const NAME: &'static str = "PaymentRequestMemo";
fn is_initialized(&self) -> bool {
for v in &self.text_memo {
if !v.is_initialized() {
return false;
}
};
for v in &self.refund_memo {
if !v.is_initialized() {
return false;
}
};
for v in &self.coin_purchase_memo {
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.text_memo)?;
},
18 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.refund_memo)?;
},
26 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.coin_purchase_memo)?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.text_memo.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.refund_memo.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.coin_purchase_memo.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.text_memo.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
}
if let Some(v) = self.refund_memo.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
}
if let Some(v) = self.coin_purchase_memo.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() -> PaymentRequestMemo {
PaymentRequestMemo::new()
}
fn clear(&mut self) {
self.text_memo.clear();
self.refund_memo.clear();
self.coin_purchase_memo.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static PaymentRequestMemo {
static instance: PaymentRequestMemo = PaymentRequestMemo {
text_memo: ::protobuf::MessageField::none(),
refund_memo: ::protobuf::MessageField::none(),
coin_purchase_memo: ::protobuf::MessageField::none(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for PaymentRequestMemo {
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("TxAckPaymentRequest.PaymentRequestMemo").unwrap()).clone()
}
}
impl ::std::fmt::Display for PaymentRequestMemo {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for PaymentRequestMemo {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TextMemo {
pub text: ::std::option::Option<::std::string::String>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a TextMemo {
fn default() -> &'a TextMemo {
<TextMemo as ::protobuf::Message>::default_instance()
}
}
impl TextMemo {
pub fn new() -> TextMemo {
::std::default::Default::default()
}
pub fn text(&self) -> &str {
match self.text.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_text(&mut self) {
self.text = ::std::option::Option::None;
}
pub fn has_text(&self) -> bool {
self.text.is_some()
}
pub fn set_text(&mut self, v: ::std::string::String) {
self.text = ::std::option::Option::Some(v);
}
pub fn mut_text(&mut self) -> &mut ::std::string::String {
if self.text.is_none() {
self.text = ::std::option::Option::Some(::std::string::String::new());
}
self.text.as_mut().unwrap()
}
pub fn take_text(&mut self) -> ::std::string::String {
self.text.take().unwrap_or_else(|| ::std::string::String::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::<_, _>(
"text",
|m: &TextMemo| { &m.text },
|m: &mut TextMemo| { &mut m.text },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TextMemo>(
"TxAckPaymentRequest.TextMemo",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for TextMemo {
const NAME: &'static str = "TextMemo";
fn is_initialized(&self) -> bool {
if self.text.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.text = ::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(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.text.as_ref() {
my_size += ::protobuf::rt::string_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.text.as_ref() {
os.write_string(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() -> TextMemo {
TextMemo::new()
}
fn clear(&mut self) {
self.text = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static TextMemo {
static instance: TextMemo = TextMemo {
text: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for TextMemo {
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("TxAckPaymentRequest.TextMemo").unwrap()).clone()
}
}
impl ::std::fmt::Display for TextMemo {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for TextMemo {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct RefundMemo {
pub address: ::std::option::Option<::std::string::String>,
pub mac: ::std::option::Option<::std::vec::Vec<u8>>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a RefundMemo {
fn default() -> &'a RefundMemo {
<RefundMemo as ::protobuf::Message>::default_instance()
}
}
impl RefundMemo {
pub fn new() -> RefundMemo {
::std::default::Default::default()
}
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()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
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()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_mac(&mut self, v: ::std::vec::Vec<u8>) {
self.mac = ::std::option::Option::Some(v);
}
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()
}
pub fn take_mac(&mut self) -> ::std::vec::Vec<u8> {
self.mac.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(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &RefundMemo| { &m.address },
|m: &mut RefundMemo| { &mut m.address },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"mac",
|m: &RefundMemo| { &m.mac },
|m: &mut RefundMemo| { &mut m.mac },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RefundMemo>(
"TxAckPaymentRequest.RefundMemo",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for RefundMemo {
const NAME: &'static str = "RefundMemo";
fn is_initialized(&self) -> bool {
if self.address.is_none() {
return false;
}
if self.mac.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(())
}
#[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() -> RefundMemo {
RefundMemo::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 RefundMemo {
static instance: RefundMemo = RefundMemo {
address: ::std::option::Option::None,
mac: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for RefundMemo {
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("TxAckPaymentRequest.RefundMemo").unwrap()).clone()
}
}
impl ::std::fmt::Display for RefundMemo {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RefundMemo {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CoinPurchaseMemo {
pub coin_type: ::std::option::Option<u32>,
pub amount: ::std::option::Option<::std::string::String>,
pub address: ::std::option::Option<::std::string::String>,
pub mac: ::std::option::Option<::std::vec::Vec<u8>>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a CoinPurchaseMemo {
fn default() -> &'a CoinPurchaseMemo {
<CoinPurchaseMemo as ::protobuf::Message>::default_instance()
}
}
impl CoinPurchaseMemo {
pub fn new() -> CoinPurchaseMemo {
::std::default::Default::default()
}
pub fn coin_type(&self) -> u32 {
self.coin_type.unwrap_or(0)
}
pub fn clear_coin_type(&mut self) {
self.coin_type = ::std::option::Option::None;
}
pub fn has_coin_type(&self) -> bool {
self.coin_type.is_some()
}
pub fn set_coin_type(&mut self, v: u32) {
self.coin_type = ::std::option::Option::Some(v);
}
pub fn amount(&self) -> &str {
match self.amount.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_amount(&mut self) {
self.amount = ::std::option::Option::None;
}
pub fn has_amount(&self) -> bool {
self.amount.is_some()
}
pub fn set_amount(&mut self, v: ::std::string::String) {
self.amount = ::std::option::Option::Some(v);
}
pub fn mut_amount(&mut self) -> &mut ::std::string::String {
if self.amount.is_none() {
self.amount = ::std::option::Option::Some(::std::string::String::new());
}
self.amount.as_mut().unwrap()
}
pub fn take_amount(&mut self) -> ::std::string::String {
self.amount.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
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()
}
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_mac(&mut self, v: ::std::vec::Vec<u8>) {
self.mac = ::std::option::Option::Some(v);
}
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()
}
pub fn take_mac(&mut self) -> ::std::vec::Vec<u8> {
self.mac.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(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"coin_type",
|m: &CoinPurchaseMemo| { &m.coin_type },
|m: &mut CoinPurchaseMemo| { &mut m.coin_type },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"amount",
|m: &CoinPurchaseMemo| { &m.amount },
|m: &mut CoinPurchaseMemo| { &mut m.amount },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &CoinPurchaseMemo| { &m.address },
|m: &mut CoinPurchaseMemo| { &mut m.address },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"mac",
|m: &CoinPurchaseMemo| { &m.mac },
|m: &mut CoinPurchaseMemo| { &mut m.mac },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CoinPurchaseMemo>(
"TxAckPaymentRequest.CoinPurchaseMemo",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for CoinPurchaseMemo {
const NAME: &'static str = "CoinPurchaseMemo";
fn is_initialized(&self) -> bool {
if self.coin_type.is_none() {
return false;
}
if self.amount.is_none() {
return false;
}
if self.address.is_none() {
return false;
}
if self.mac.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.coin_type = ::std::option::Option::Some(is.read_uint32()?);
},
18 => {
self.amount = ::std::option::Option::Some(is.read_string()?);
},
26 => {
self.address = ::std::option::Option::Some(is.read_string()?);
},
34 => {
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(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.coin_type {
my_size += ::protobuf::rt::uint32_size(1, v);
}
if let Some(v) = self.amount.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.address.as_ref() {
my_size += ::protobuf::rt::string_size(3, &v);
}
if let Some(v) = self.mac.as_ref() {
my_size += ::protobuf::rt::bytes_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.coin_type {
os.write_uint32(1, v)?;
}
if let Some(v) = self.amount.as_ref() {
os.write_string(2, v)?;
}
if let Some(v) = self.address.as_ref() {
os.write_string(3, v)?;
}
if let Some(v) = self.mac.as_ref() {
os.write_bytes(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() -> CoinPurchaseMemo {
CoinPurchaseMemo::new()
}
fn clear(&mut self) {
self.coin_type = ::std::option::Option::None;
self.amount = ::std::option::Option::None;
self.address = ::std::option::Option::None;
self.mac = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static CoinPurchaseMemo {
static instance: CoinPurchaseMemo = CoinPurchaseMemo {
coin_type: ::std::option::Option::None,
amount: ::std::option::Option::None,
address: ::std::option::Option::None,
mac: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for CoinPurchaseMemo {
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("TxAckPaymentRequest.CoinPurchaseMemo").unwrap()).clone()
}
}
impl ::std::fmt::Display for CoinPurchaseMemo {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for CoinPurchaseMemo {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckInput {
pub tx: ::protobuf::MessageField<tx_ack_input::TxAckInputWrapper>,
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(())
}
#[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>;
}
pub mod tx_ack_input {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckInputWrapper {
pub input: ::protobuf::MessageField<super::TxInput>,
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(())
}
#[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>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckOutput {
pub tx: ::protobuf::MessageField<tx_ack_output::TxAckOutputWrapper>,
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(())
}
#[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>;
}
pub mod tx_ack_output {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckOutputWrapper {
pub output: ::protobuf::MessageField<super::TxOutput>,
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(())
}
#[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>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevMeta {
pub tx: ::protobuf::MessageField<PrevTx>,
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevInput {
pub tx: ::protobuf::MessageField<tx_ack_prev_input::TxAckPrevInputWrapper>,
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(())
}
#[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>;
}
pub mod tx_ack_prev_input {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevInputWrapper {
pub input: ::protobuf::MessageField<super::PrevInput>,
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(())
}
#[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>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevOutput {
pub tx: ::protobuf::MessageField<tx_ack_prev_output::TxAckPrevOutputWrapper>,
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(())
}
#[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>;
}
pub mod tx_ack_prev_output {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevOutputWrapper {
pub output: ::protobuf::MessageField<super::PrevOutput>,
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(())
}
#[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>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevExtraData {
pub tx: ::protobuf::MessageField<tx_ack_prev_extra_data::TxAckPrevExtraDataWrapper>,
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(())
}
#[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>;
}
pub mod tx_ack_prev_extra_data {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TxAckPrevExtraDataWrapper {
pub extra_data_chunk: ::std::option::Option<::std::vec::Vec<u8>>,
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()
}
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()
}
pub fn set_extra_data_chunk(&mut self, v: ::std::vec::Vec<u8>) {
self.extra_data_chunk = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetOwnershipProof {
pub address_n: ::std::vec::Vec<u32>,
pub coin_name: ::std::option::Option<::std::string::String>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
pub multisig: ::protobuf::MessageField<MultisigRedeemScriptType>,
pub user_confirmation: ::std::option::Option<bool>,
pub ownership_ids: ::std::vec::Vec<::std::vec::Vec<u8>>,
pub commitment_data: ::std::option::Option<::std::vec::Vec<u8>>,
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()
}
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()
}
pub fn set_coin_name(&mut self, v: ::std::string::String) {
self.coin_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coin_name(&mut self) -> ::std::string::String {
self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_script_type(&mut self, v: InputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
pub fn set_user_confirmation(&mut self, v: bool) {
self.user_confirmation = ::std::option::Option::Some(v);
}
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()
}
pub fn set_commitment_data(&mut self, v: ::std::vec::Vec<u8>) {
self.commitment_data = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct OwnershipProof {
pub ownership_proof: ::std::option::Option<::std::vec::Vec<u8>>,
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
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()
}
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()
}
pub fn set_ownership_proof(&mut self, v: ::std::vec::Vec<u8>) {
self.ownership_proof = ::std::option::Option::Some(v);
}
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()
}
pub fn take_ownership_proof(&mut self) -> ::std::vec::Vec<u8> {
self.ownership_proof.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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()
}
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::std::option::Option::Some(v);
}
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()
}
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(())
}
#[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>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct AuthorizeCoinJoin {
pub coordinator: ::std::option::Option<::std::string::String>,
pub max_rounds: ::std::option::Option<u64>,
pub max_coordinator_fee_rate: ::std::option::Option<u32>,
pub max_fee_per_kvbyte: ::std::option::Option<u32>,
pub address_n: ::std::vec::Vec<u32>,
pub coin_name: ::std::option::Option<::std::string::String>,
pub script_type: ::std::option::Option<::protobuf::EnumOrUnknown<InputScriptType>>,
pub amount_unit: ::std::option::Option<::protobuf::EnumOrUnknown<AmountUnit>>,
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()
}
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()
}
pub fn set_coordinator(&mut self, v: ::std::string::String) {
self.coordinator = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coordinator(&mut self) -> ::std::string::String {
self.coordinator.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_max_rounds(&mut self, v: u64) {
self.max_rounds = ::std::option::Option::Some(v);
}
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()
}
pub fn set_max_coordinator_fee_rate(&mut self, v: u32) {
self.max_coordinator_fee_rate = ::std::option::Option::Some(v);
}
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()
}
pub fn set_max_fee_per_kvbyte(&mut self, v: u32) {
self.max_fee_per_kvbyte = ::std::option::Option::Some(v);
}
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()
}
pub fn set_coin_name(&mut self, v: ::std::string::String) {
self.coin_name = ::std::option::Option::Some(v);
}
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()
}
pub fn take_coin_name(&mut self) -> ::std::string::String {
self.coin_name.take().unwrap_or_else(|| ::std::string::String::new())
}
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()
}
pub fn set_script_type(&mut self, v: InputScriptType) {
self.script_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
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()
}
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(())
}
#[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)]
pub enum InputScriptType {
SPENDADDRESS = 0,
SPENDMULTISIG = 1,
EXTERNAL = 2,
SPENDWITNESS = 3,
SPENDP2SHWITNESS = 4,
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)]
pub enum OutputScriptType {
PAYTOADDRESS = 0,
PAYTOSCRIPTHASH = 1,
PAYTOMULTISIG = 2,
PAYTOOPRETURN = 3,
PAYTOWITNESS = 4,
PAYTOP2SHWITNESS = 5,
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)]
pub enum DecredStakingSpendType {
SSGen = 0,
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)]
pub enum AmountUnit {
BITCOIN = 0,
MILLIBITCOIN = 1,
MICROBITCOIN = 2,
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")
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x16messages-bitcoin.proto\x12\x1ahw.trezor.messages.bitcoin\x1a\x0eme\
ssages.proto\x1a\x15messages-common.proto\"\xeb\x02\n\x18MultisigRedeemS\
criptType\x12]\n\x07pubkeys\x18\x01\x20\x03(\x0b2C.hw.trezor.messages.bi\
tcoin.MultisigRedeemScriptType.HDNodePathTypeR\x07pubkeys\x12\x1e\n\nsig\
natures\x18\x02\x20\x03(\x0cR\nsignatures\x12\x0c\n\x01m\x18\x03\x20\x02\
(\rR\x01m\x12;\n\x05nodes\x18\x04\x20\x03(\x0b2%.hw.trezor.messages.comm\
on.HDNodeTypeR\x05nodes\x12\x1b\n\taddress_n\x18\x05\x20\x03(\rR\x08addr\
essN\x1ah\n\x0eHDNodePathType\x129\n\x04node\x18\x01\x20\x02(\x0b2%.hw.t\
rezor.messages.common.HDNodeTypeR\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\x08addressN\x12(\n\x10ecdsa_curve_name\x18\x02\x20\
\x01(\tR\x0eecdsaCurveName\x12!\n\x0cshow_display\x18\x03\x20\x01(\x08R\
\x0bshowDisplay\x12$\n\tcoin_name\x18\x04\x20\x01(\t:\x07BitcoinR\x08coi\
nName\x12Z\n\x0bscript_type\x18\x05\x20\x01(\x0e2+.hw.trezor.messages.bi\
tcoin.InputScriptType:\x0cSPENDADDRESSR\nscriptType\x12*\n\x11ignore_xpu\
b_magic\x18\x06\x20\x01(\x08R\x0fignoreXpubMagic\"\xa5\x01\n\tPublicKey\
\x129\n\x04node\x18\x01\x20\x02(\x0b2%.hw.trezor.messages.common.HDNodeT\
ypeR\x04node\x12\x12\n\x04xpub\x18\x02\x20\x02(\tR\x04xpub\x12)\n\x10roo\
t_fingerprint\x18\x03\x20\x01(\rR\x0frootFingerprint\x12\x1e\n\ndescript\
or\x18\x04\x20\x01(\tR\ndescriptor\"\xe8\x02\n\nGetAddress\x12\x1b\n\tad\
dress_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.MultisigRedeemScriptTypeR\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\x0fignoreXpubMagic\x12\x1a\n\x08chunkify\x18\x07\x20\x01(\x08\
R\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.MultisigR\
edeemScriptTypeR\x08multisig\x12Z\n\x0bscript_type\x18\x04\x20\x01(\x0e2\
+.hw.trezor.messages.bitcoin.InputScriptType:\x0cSPENDADDRESSR\nscriptTy\
pe\"0\n\x0bOwnershipId\x12!\n\x0cownership_id\x18\x01\x20\x02(\x0cR\x0bo\
wnershipId\"\x88\x02\n\x0bSignMessage\x12\x1b\n\taddress_n\x18\x01\x20\
\x03(\rR\x08addressN\x12\x18\n\x07message\x18\x02\x20\x02(\x0cR\x07messa\
ge\x12$\n\tcoin_name\x18\x03\x20\x01(\t:\x07BitcoinR\x08coinName\x12Z\n\
\x0bscript_type\x18\x04\x20\x01(\x0e2+.hw.trezor.messages.bitcoin.InputS\
criptType:\x0cSPENDADDRESSR\nscriptType\x12$\n\x0eno_script_type\x18\x05\
\x20\x01(\x08R\x0cnoScriptType\x12\x1a\n\x08chunkify\x18\x06\x20\x01(\
\x08R\x08chunkify\"J\n\x10MessageSignature\x12\x18\n\x07address\x18\x01\
\x20\x02(\tR\x07address\x12\x1c\n\tsignature\x18\x02\x20\x02(\x0cR\tsign\
ature\"\xa3\x01\n\rVerifyMessage\x12\x18\n\x07address\x18\x01\x20\x02(\t\
R\x07address\x12\x1c\n\tsignature\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\x0coutputsCount\x12!\n\x0cinputs_count\x18\x02\x20\
\x02(\rR\x0binputsCount\x12$\n\tcoin_name\x18\x03\x20\x01(\t:\x07Bitcoin\
R\x08coinName\x12\x1b\n\x07version\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\x0eversionGroupId\x12\x1c\n\ttimestamp\x18\t\x20\
\x01(\rR\ttimestamp\x12\x1b\n\tbranch_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\x13decredStakingTicket\x12\"\n\tserialize\
\x18\r\x20\x01(\x08:\x04trueR\tserialize\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\x08chunk\
ify\x1a\xd2\x01\n\x0fCoinJoinRequest\x12\x19\n\x08fee_rate\x18\x01\x20\
\x02(\rR\x07feeRate\x12(\n\x10no_fee_threshold\x18\x02\x20\x02(\x04R\x0e\
noFeeThreshold\x124\n\x16min_registrable_amount\x18\x03\x20\x02(\x04R\
\x14minRegistrableAmount\x12&\n\x0fmask_public_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.t\
rezor.messages.bitcoin.TxRequest.RequestTypeR\x0brequestType\x12T\n\x07d\
etails\x18\x02\x20\x01(\x0b2:.hw.trezor.messages.bitcoin.TxRequest.TxReq\
uestDetailsTypeR\x07details\x12]\n\nserialized\x18\x03\x20\x01(\x0b2=.hw\
.trezor.messages.bitcoin.TxRequest.TxRequestSerializedTypeR\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\x06t\
xHash\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\x0fsignature_index\x18\x01\x20\
\x01(\rR\x0esignatureIndex\x12\x1c\n\tsignature\x18\x02\x20\x01(\x0cR\ts\
ignature\x12#\n\rserialized_tx\x18\x03\x20\x01(\x0cR\x0cserializedTx\"\
\x8a\x01\n\x0bRequestType\x12\x0b\n\x07TXINPUT\x10\0\x12\x0c\n\x08TXOUTP\
UT\x10\x01\x12\n\n\x06TXMETA\x10\x02\x12\x0e\n\nTXFINISHED\x10\x03\x12\
\x0f\n\x0bTXEXTRADATA\x10\x04\x12\x0f\n\x0bTXORIGINPUT\x10\x05\x12\x10\n\
\x0cTXORIGOUTPUT\x10\x06\x12\x10\n\x0cTXPAYMENTREQ\x10\x07\"\xf4\x0f\n\
\x05TxAck\x12A\n\x02tx\x18\x01\x20\x01(\x0b21.hw.trezor.messages.bitcoin\
.TxAck.TransactionTypeR\x02tx\x1a\xa3\x0f\n\x0fTransactionType\x12\x18\n\
\x07version\x18\x01\x20\x01(\rR\x07version\x12U\n\x06inputs\x18\x02\x20\
\x03(\x0b2=.hw.trezor.messages.bitcoin.TxAck.TransactionType.TxInputType\
R\x06inputs\x12b\n\x0bbin_outputs\x18\x03\x20\x03(\x0b2A.hw.trezor.messa\
ges.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.TransactionType.TxOutpu\
tTypeR\x07outputs\x12\x1d\n\ninputs_cnt\x18\x06\x20\x01(\rR\tinputsCnt\
\x12\x1f\n\x0boutputs_cnt\x18\x07\x20\x01(\rR\noutputsCnt\x12\x1d\n\next\
ra_data\x18\x08\x20\x01(\x0cR\textraData\x12$\n\x0eextra_data_len\x18\t\
\x20\x01(\rR\x0cextraDataLen\x12\x16\n\x06expiry\x18\n\x20\x01(\rR\x06ex\
piry\x12&\n\x0coverwintered\x18\x0b\x20\x01(\x08R\x0coverwinteredB\x02\
\x18\x01\x12(\n\x10version_group_id\x18\x0c\x20\x01(\rR\x0eversionGroupI\
d\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\x0bTxInputType\x12\x1b\n\
\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x1b\n\tprev_hash\x18\x02\
\x20\x02(\x0cR\x08prevHash\x12\x1d\n\nprev_index\x18\x03\x20\x02(\rR\tpr\
evIndex\x12\x1d\n\nscript_sig\x18\x04\x20\x01(\x0cR\tscriptSig\x12&\n\
\x08sequence\x18\x05\x20\x01(\r:\n4294967295R\x08sequence\x12Z\n\x0bscri\
pt_type\x18\x06\x20\x01(\x0e2+.hw.trezor.messages.bitcoin.InputScriptTyp\
e:\x0cSPENDADDRESSR\nscriptType\x12P\n\x08multisig\x18\x07\x20\x01(\x0b2\
4.hw.trezor.messages.bitcoin.MultisigRedeemScriptTypeR\x08multisig\x12\
\x16\n\x06amount\x18\x08\x20\x01(\x04R\x06amount\x12\x1f\n\x0bdecred_tre\
e\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\x0eownership\
Proof\x12'\n\x0fcommitment_data\x18\x0f\x20\x01(\x0cR\x0ecommitmentData\
\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_staking_spend\x18\
\x12\x20\x01(\x0e22.hw.trezor.messages.bitcoin.DecredStakingSpendTypeR\
\x12decredStakingSpend\x12#\n\rscript_pubkey\x18\x13\x20\x01(\x0cR\x0csc\
riptPubkey\x12(\n\x0ecoinjoin_flags\x18\x14\x20\x01(\r:\x010R\rcoinjoinF\
lags\x1a\x82\x01\n\x0fTxOutputBinType\x12\x16\n\x06amount\x18\x01\x20\
\x02(\x04R\x06amount\x12#\n\rscript_pubkey\x18\x02\x20\x02(\x0cR\x0cscri\
ptPubkey\x122\n\x15decred_script_version\x18\x03\x20\x01(\rR\x13decredSc\
riptVersion\x1a\xa0\x03\n\x0cTxOutputType\x12\x18\n\x07address\x18\x01\
\x20\x01(\tR\x07address\x12\x1b\n\taddress_n\x18\x02\x20\x03(\rR\x08addr\
essN\x12\x16\n\x06amount\x18\x03\x20\x02(\x04R\x06amount\x12[\n\x0bscrip\
t_type\x18\x04\x20\x01(\x0e2,.hw.trezor.messages.bitcoin.OutputScriptTyp\
e:\x0cPAYTOADDRESSR\nscriptType\x12P\n\x08multisig\x18\x05\x20\x01(\x0b2\
4.hw.trezor.messages.bitcoin.MultisigRedeemScriptTypeR\x08multisig\x12$\
\n\x0eop_return_data\x18\x06\x20\x01(\x0cR\x0copReturnData\x12\x1b\n\tor\
ig_hash\x18\n\x20\x01(\x0cR\x08origHash\x12\x1d\n\norig_index\x18\x0b\
\x20\x01(\rR\torigIndex\x120\n\x11payment_req_index\x18\x0c\x20\x01(\rR\
\x0fpaymentReqIndexB\x04\xc8\xf0\x19\x01:\x02\x18\x01\"\xff\x05\n\x07TxI\
nput\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x1b\n\tpre\
v_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\x02(\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\rcoinjoinFlagsJ\x04\x08\n\x10\x0bJ\x04\x08\x0b\x10\x0cJ\x04\x08\
\x0c\x10\r\"\xae\x03\n\x08TxOutput\x12\x18\n\x07address\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:\x0c\
PAYTOADDRESSR\nscriptType\x12P\n\x08multisig\x18\x05\x20\x01(\x0b24.hw.t\
rezor.messages.bitcoin.MultisigRedeemScriptTypeR\x08multisig\x12$\n\x0eo\
p_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\torigIndex\x120\n\x11payment_req_index\x18\x0c\x20\x01(\rR\x0fpaymen\
tReqIndexB\x04\xc8\xf0\x19\x01J\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\routpu\
ts_count\x18\x07\x20\x02(\rR\x0coutputsCount\x12'\n\x0eextra_data_len\
\x18\t\x20\x01(\r:\x010R\x0cextraDataLen\x12\x16\n\x06expiry\x18\n\x20\
\x01(\rR\x06expiry\x12(\n\x10version_group_id\x18\x0c\x20\x01(\rR\x0ever\
sionGroupId\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_index\x18\x03\x20\x02(\rR\tprevIndex\
\x12\x1d\n\nscript_sig\x18\x04\x20\x02(\x0cR\tscriptSig\x12\x1a\n\x08seq\
uence\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\nPrevOutput\x12\x16\n\x06amount\x18\x01\x20\
\x02(\x04R\x06amount\x12#\n\rscript_pubkey\x18\x02\x20\x02(\x0cR\x0cscri\
ptPubkey\x122\n\x15decred_script_version\x18\x03\x20\x01(\rR\x13decredSc\
riptVersion\"\xf2\x05\n\x13TxAckPaymentRequest\x12\x14\n\x05nonce\x18\
\x01\x20\x01(\x0cR\x05nonce\x12%\n\x0erecipient_name\x18\x02\x20\x02(\tR\
\rrecipientName\x12X\n\x05memos\x18\x03\x20\x03(\x0b2B.hw.trezor.message\
s.bitcoin.TxAckPaymentRequest.PaymentRequestMemoR\x05memos\x12\x16\n\x06\
amount\x18\x04\x20\x01(\x04R\x06amount\x12\x1c\n\tsignature\x18\x05\x20\
\x02(\x0cR\tsignature\x1a\xb8\x02\n\x12PaymentRequestMemo\x12U\n\ttext_m\
emo\x18\x01\x20\x01(\x0b28.hw.trezor.messages.bitcoin.TxAckPaymentReques\
t.TextMemoR\x08textMemo\x12[\n\x0brefund_memo\x18\x02\x20\x01(\x0b2:.hw.\
trezor.messages.bitcoin.TxAckPaymentRequest.RefundMemoR\nrefundMemo\x12n\
\n\x12coin_purchase_memo\x18\x03\x20\x01(\x0b2@.hw.trezor.messages.bitco\
in.TxAckPaymentRequest.CoinPurchaseMemoR\x10coinPurchaseMemo\x1a\x1e\n\
\x08TextMemo\x12\x12\n\x04text\x18\x01\x20\x02(\tR\x04text\x1a8\n\nRefun\
dMemo\x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\x12\x10\n\x03m\
ac\x18\x02\x20\x02(\x0cR\x03mac\x1as\n\x10CoinPurchaseMemo\x12\x1b\n\tco\
in_type\x18\x01\x20\x02(\rR\x08coinType\x12\x16\n\x06amount\x18\x02\x20\
\x02(\tR\x06amount\x12\x18\n\x07address\x18\x03\x20\x02(\tR\x07address\
\x12\x10\n\x03mac\x18\x04\x20\x02(\x0cR\x03mac:\x04\x88\xb2\x19\x01\"\
\xac\x01\n\nTxAckInput\x12H\n\x02tx\x18\x01\x20\x02(\x0b28.hw.trezor.mes\
sages.bitcoin.TxAckInput.TxAckInputWrapperR\x02tx\x1aN\n\x11TxAckInputWr\
apper\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.TxA\
ckOutputWrapperR\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\x0eTxAckPrevInput\x12P\n\x02tx\x18\x01\x20\x02(\x0b2@.hw.trezor.m\
essages.bitcoin.TxAckPrevInput.TxAckPrevInputWrapperR\x02tx\x1aT\n\x15Tx\
AckPrevInputWrapper\x12;\n\x05input\x18\x02\x20\x02(\x0b2%.hw.trezor.mes\
sages.bitcoin.PrevInputR\x05input:\x04\x90\xb2\x19\x16\"\xc5\x01\n\x0fTx\
AckPrevOutput\x12R\n\x02tx\x18\x01\x20\x02(\x0b2B.hw.trezor.messages.bit\
coin.TxAckPrevOutput.TxAckPrevOutputWrapperR\x02tx\x1aX\n\x16TxAckPrevOu\
tputWrapper\x12>\n\x06output\x18\x03\x20\x02(\x0b2&.hw.trezor.messages.b\
itcoin.PrevOutputR\x06output:\x04\x90\xb2\x19\x16\"\xbb\x01\n\x12TxAckPr\
evExtraData\x12X\n\x02tx\x18\x01\x20\x02(\x0b2H.hw.trezor.messages.bitco\
in.TxAckPrevExtraData.TxAckPrevExtraDataWrapperR\x02tx\x1aE\n\x19TxAckPr\
evExtraDataWrapper\x12(\n\x10extra_data_chunk\x18\x08\x20\x02(\x0cR\x0ee\
xtraDataChunk:\x04\x90\xb2\x19\x16\"\x88\x03\n\x11GetOwnershipProof\x12\
\x1b\n\taddress_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:\x0cSPENDWITN\
ESSR\nscriptType\x12P\n\x08multisig\x18\x04\x20\x01(\x0b24.hw.trezor.mes\
sages.bitcoin.MultisigRedeemScriptTypeR\x08multisig\x122\n\x11user_confi\
rmation\x18\x05\x20\x01(\x08:\x05falseR\x10userConfirmation\x12#\n\rowne\
rship_ids\x18\x06\x20\x03(\x0cR\x0cownershipIds\x12)\n\x0fcommitment_dat\
a\x18\x07\x20\x01(\x0c:\0R\x0ecommitmentData\"W\n\x0eOwnershipProof\x12'\
\n\x0fownership_proof\x18\x01\x20\x02(\x0cR\x0eownershipProof\x12\x1c\n\
\tsignature\x18\x02\x20\x02(\x0cR\tsignature\"\xab\x03\n\x11AuthorizeCoi\
nJoin\x12\x20\n\x0bcoordinator\x18\x01\x20\x02(\tR\x0bcoordinator\x12\
\x1d\n\nmax_rounds\x18\x02\x20\x02(\x04R\tmaxRounds\x127\n\x18max_coordi\
nator_fee_rate\x18\x03\x20\x02(\rR\x15maxCoordinatorFeeRate\x12+\n\x12ma\
x_fee_per_kvbyte\x18\x04\x20\x02(\rR\x0fmaxFeePerKvbyte\x12\x1b\n\taddre\
ss_n\x18\x05\x20\x03(\rR\x08addressN\x12$\n\tcoin_name\x18\x06\x20\x01(\
\t:\x07BitcoinR\x08coinName\x12Z\n\x0bscript_type\x18\x07\x20\x01(\x0e2+\
.hw.trezor.messages.bitcoin.InputScriptType:\x0cSPENDADDRESSR\nscriptTyp\
e\x12P\n\x0bamount_unit\x18\x08\x20\x01(\x0e2&.hw.trezor.messages.bitcoi\
n.AmountUnit:\x07BITCOINR\namountUnit*~\n\x0fInputScriptType\x12\x10\n\
\x0cSPENDADDRESS\x10\0\x12\x11\n\rSPENDMULTISIG\x10\x01\x12\x0c\n\x08EXT\
ERNAL\x10\x02\x12\x10\n\x0cSPENDWITNESS\x10\x03\x12\x14\n\x10SPENDP2SHWI\
TNESS\x10\x04\x12\x10\n\x0cSPENDTAPROOT\x10\x05*\x99\x01\n\x10OutputScri\
ptType\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\x07BI\
TCOIN\x10\0\x12\x10\n\x0cMILLIBITCOIN\x10\x01\x12\x10\n\x0cMICROBITCOIN\
\x10\x02\x12\x0b\n\x07SATOSHI\x10\x03B?\n#com.satoshilabs.trezor.lib.pro\
tobufB\x14TrezorMessageBitcoin\x80\xa6\x1d\x01\
";
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()
})
}
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::file_descriptor().clone());
deps.push(super::messages_common::file_descriptor().clone());
let mut messages = ::std::vec::Vec::with_capacity(45);
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(TxAckPaymentRequest::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_payment_request::PaymentRequestMemo::generated_message_descriptor_data());
messages.push(tx_ack_payment_request::TextMemo::generated_message_descriptor_data());
messages.push(tx_ack_payment_request::RefundMemo::generated_message_descriptor_data());
messages.push(tx_ack_payment_request::CoinPurchaseMemo::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(5);
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(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)
})
}