#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Proposal {
#[prost(uint32, tag = "1")]
pub proto_version: u32,
#[prost(enumeration = "FeeRule", tag = "2")]
pub fee_rule: i32,
#[prost(uint32, tag = "3")]
pub min_target_height: u32,
#[prost(message, repeated, tag = "4")]
pub steps: ::prost::alloc::vec::Vec<ProposalStep>,
#[prost(message, optional, tag = "5")]
pub confirmations_policy: ::core::option::Option<ConfirmationsPolicy>,
#[prost(uint32, optional, tag = "6")]
pub proposed_version: ::core::option::Option<u32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfirmationsPolicy {
#[prost(uint32, tag = "1")]
pub trusted: u32,
#[prost(uint32, tag = "2")]
pub untrusted: u32,
#[prost(bool, tag = "3")]
pub allow_zero_conf_shielding: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalStep {
#[prost(string, tag = "1")]
pub transaction_request: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub payment_output_pools: ::prost::alloc::vec::Vec<PaymentOutputPool>,
#[prost(uint32, tag = "3")]
pub anchor_height: u32,
#[prost(message, repeated, tag = "4")]
pub inputs: ::prost::alloc::vec::Vec<ProposedInput>,
#[prost(message, optional, tag = "5")]
pub balance: ::core::option::Option<TransactionBalance>,
#[prost(bool, tag = "6")]
pub is_shielding: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaymentOutputPool {
#[prost(uint32, tag = "1")]
pub payment_index: u32,
#[prost(enumeration = "ValuePool", tag = "2")]
pub value_pool: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReceivedOutput {
#[prost(bytes = "vec", tag = "1")]
pub txid: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "ValuePool", tag = "2")]
pub value_pool: i32,
#[prost(uint32, tag = "3")]
pub index: u32,
#[prost(uint64, tag = "4")]
pub value: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PriorStepOutput {
#[prost(uint32, tag = "1")]
pub step_index: u32,
#[prost(uint32, tag = "2")]
pub payment_index: u32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PriorStepChange {
#[prost(uint32, tag = "1")]
pub step_index: u32,
#[prost(uint32, tag = "2")]
pub change_index: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProposedInput {
#[prost(oneof = "proposed_input::Value", tags = "1, 2, 3")]
pub value: ::core::option::Option<proposed_input::Value>,
}
pub mod proposed_input {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Value {
#[prost(message, tag = "1")]
ReceivedOutput(super::ReceivedOutput),
#[prost(message, tag = "2")]
PriorStepOutput(super::PriorStepOutput),
#[prost(message, tag = "3")]
PriorStepChange(super::PriorStepChange),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionBalance {
#[prost(message, repeated, tag = "1")]
pub proposed_change: ::prost::alloc::vec::Vec<ChangeValue>,
#[prost(uint64, tag = "2")]
pub fee_required: u64,
#[prost(message, optional, tag = "3")]
pub dummy_outputs: ::core::option::Option<DummyOutputs>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DummyOutputs {
#[prost(uint32, tag = "1")]
pub sapling: u32,
#[prost(uint32, tag = "2")]
pub orchard: u32,
#[prost(uint32, tag = "3")]
pub ironwood: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChangeValue {
#[prost(uint64, tag = "1")]
pub value: u64,
#[prost(enumeration = "ValuePool", tag = "2")]
pub value_pool: i32,
#[prost(message, optional, tag = "3")]
pub memo: ::core::option::Option<MemoBytes>,
#[prost(bool, tag = "4")]
pub is_ephemeral: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MemoBytes {
#[prost(bytes = "vec", tag = "1")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ValuePool {
PoolNotSpecified = 0,
Transparent = 1,
Sapling = 2,
Orchard = 3,
Ironwood = 4,
}
impl ValuePool {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::PoolNotSpecified => "PoolNotSpecified",
Self::Transparent => "Transparent",
Self::Sapling => "Sapling",
Self::Orchard => "Orchard",
Self::Ironwood => "Ironwood",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PoolNotSpecified" => Some(Self::PoolNotSpecified),
"Transparent" => Some(Self::Transparent),
"Sapling" => Some(Self::Sapling),
"Orchard" => Some(Self::Orchard),
"Ironwood" => Some(Self::Ironwood),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FeeRule {
NotSpecified = 0,
PreZip313 = 1,
Zip313 = 2,
Zip317 = 3,
}
impl FeeRule {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::NotSpecified => "FeeRuleNotSpecified",
Self::PreZip313 => "PreZip313",
Self::Zip313 => "Zip313",
Self::Zip317 => "Zip317",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FeeRuleNotSpecified" => Some(Self::NotSpecified),
"PreZip313" => Some(Self::PreZip313),
"Zip313" => Some(Self::Zip313),
"Zip317" => Some(Self::Zip317),
_ => None,
}
}
}