#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShieldedPoolParameters {
#[deprecated]
#[prost(message, optional, tag = "1")]
pub fixed_fmd_params: ::core::option::Option<FmdParameters>,
#[prost(message, optional, tag = "2")]
pub fmd_meta_params: ::core::option::Option<FmdMetaParameters>,
}
impl ::prost::Name for ShieldedPoolParameters {
const NAME: &'static str = "ShieldedPoolParameters";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisContent {
#[prost(message, optional, tag = "1")]
pub shielded_pool_params: ::core::option::Option<ShieldedPoolParameters>,
#[prost(message, repeated, tag = "3")]
pub allocations: ::prost::alloc::vec::Vec<genesis_content::Allocation>,
}
pub mod genesis_content {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Allocation {
#[prost(message, optional, tag = "1")]
pub amount: ::core::option::Option<super::super::super::super::num::v1::Amount>,
#[prost(string, tag = "2")]
pub denom: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub address: ::core::option::Option<
super::super::super::super::keys::v1::Address,
>,
}
impl ::prost::Name for Allocation {
const NAME: &'static str = "Allocation";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.GenesisContent.{}", Self::NAME
)
}
}
}
impl ::prost::Name for GenesisContent {
const NAME: &'static str = "GenesisContent";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FmdMetaParameters {
#[prost(uint64, tag = "1")]
pub fmd_grace_period_blocks: u64,
#[prost(oneof = "fmd_meta_parameters::Algorithm", tags = "2, 3")]
pub algorithm: ::core::option::Option<fmd_meta_parameters::Algorithm>,
}
pub mod fmd_meta_parameters {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlgorithmSlidingWindow {
#[prost(uint32, tag = "1")]
pub window_update_periods: u32,
#[prost(uint32, tag = "2")]
pub targeted_detections_per_window: u32,
}
impl ::prost::Name for AlgorithmSlidingWindow {
const NAME: &'static str = "AlgorithmSlidingWindow";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.FmdMetaParameters.{}",
Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Algorithm {
#[prost(uint32, tag = "2")]
FixedPrecisionBits(u32),
#[prost(message, tag = "3")]
SlidingWindow(AlgorithmSlidingWindow),
}
}
impl ::prost::Name for FmdMetaParameters {
const NAME: &'static str = "FmdMetaParameters";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FmdMetaParametersAlgorithmState {
#[prost(oneof = "fmd_meta_parameters_algorithm_state::State", tags = "1, 2")]
pub state: ::core::option::Option<fmd_meta_parameters_algorithm_state::State>,
}
pub mod fmd_meta_parameters_algorithm_state {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FixedState {}
impl ::prost::Name for FixedState {
const NAME: &'static str = "FixedState";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState.{}",
Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlidingWindowState {
#[prost(uint32, tag = "1")]
pub approximate_clue_count: u32,
}
impl ::prost::Name for SlidingWindowState {
const NAME: &'static str = "SlidingWindowState";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState.{}",
Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum State {
#[prost(message, tag = "1")]
Fixed(FixedState),
#[prost(message, tag = "2")]
SlidingWindow(SlidingWindowState),
}
}
impl ::prost::Name for FmdMetaParametersAlgorithmState {
const NAME: &'static str = "FmdMetaParametersAlgorithmState";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FmdParameters {
#[prost(uint32, tag = "1")]
pub precision_bits: u32,
#[prost(uint64, tag = "2")]
pub as_of_block_height: u64,
}
impl ::prost::Name for FmdParameters {
const NAME: &'static str = "FmdParameters";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Note {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
#[prost(bytes = "vec", tag = "2")]
pub rseed: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub address: ::core::option::Option<super::super::super::keys::v1::Address>,
}
impl ::prost::Name for Note {
const NAME: &'static str = "Note";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NoteView {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::ValueView>,
#[prost(bytes = "vec", tag = "2")]
pub rseed: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub address: ::core::option::Option<super::super::super::keys::v1::AddressView>,
}
impl ::prost::Name for NoteView {
const NAME: &'static str = "NoteView";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NoteCiphertext {
#[prost(bytes = "vec", tag = "1")]
pub inner: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for NoteCiphertext {
const NAME: &'static str = "NoteCiphertext";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotePayload {
#[prost(message, optional, tag = "1")]
pub note_commitment: ::core::option::Option<
super::super::super::super::crypto::tct::v1::StateCommitment,
>,
#[prost(bytes = "vec", tag = "2")]
pub ephemeral_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub encrypted_note: ::core::option::Option<NoteCiphertext>,
}
impl ::prost::Name for NotePayload {
const NAME: &'static str = "NotePayload";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZkOutputProof {
#[prost(bytes = "vec", tag = "1")]
pub inner: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for ZkOutputProof {
const NAME: &'static str = "ZKOutputProof";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZkSpendProof {
#[prost(bytes = "vec", tag = "1")]
pub inner: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for ZkSpendProof {
const NAME: &'static str = "ZKSpendProof";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZkNullifierDerivationProof {
#[prost(bytes = "vec", tag = "1")]
pub inner: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for ZkNullifierDerivationProof {
const NAME: &'static str = "ZKNullifierDerivationProof";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Spend {
#[prost(message, optional, tag = "1")]
pub body: ::core::option::Option<SpendBody>,
#[prost(message, optional, tag = "2")]
pub auth_sig: ::core::option::Option<
super::super::super::super::crypto::decaf377_rdsa::v1::SpendAuthSignature,
>,
#[prost(message, optional, tag = "3")]
pub proof: ::core::option::Option<ZkSpendProof>,
}
impl ::prost::Name for Spend {
const NAME: &'static str = "Spend";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventSpend {
#[prost(message, optional, tag = "1")]
pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
}
impl ::prost::Name for EventSpend {
const NAME: &'static str = "EventSpend";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventOutput {
#[prost(message, optional, tag = "1")]
pub note_commitment: ::core::option::Option<
super::super::super::super::crypto::tct::v1::StateCommitment,
>,
}
impl ::prost::Name for EventOutput {
const NAME: &'static str = "EventOutput";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventBroadcastClue {
#[prost(message, optional, tag = "1")]
pub clue: ::core::option::Option<
super::super::super::super::crypto::decaf377_fmd::v1::Clue,
>,
#[prost(message, optional, tag = "2")]
pub tx: ::core::option::Option<super::super::super::txhash::v1::TransactionId>,
}
impl ::prost::Name for EventBroadcastClue {
const NAME: &'static str = "EventBroadcastClue";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpendBody {
#[prost(message, optional, tag = "1")]
pub balance_commitment: ::core::option::Option<
super::super::super::asset::v1::BalanceCommitment,
>,
#[prost(message, optional, tag = "6")]
pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
#[prost(message, optional, tag = "4")]
pub rk: ::core::option::Option<
super::super::super::super::crypto::decaf377_rdsa::v1::SpendVerificationKey,
>,
#[prost(bytes = "vec", tag = "7")]
pub encrypted_backref: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for SpendBody {
const NAME: &'static str = "SpendBody";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpendView {
#[prost(oneof = "spend_view::SpendView", tags = "1, 2")]
pub spend_view: ::core::option::Option<spend_view::SpendView>,
}
pub mod spend_view {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Visible {
#[prost(message, optional, tag = "1")]
pub spend: ::core::option::Option<super::Spend>,
#[prost(message, optional, tag = "2")]
pub note: ::core::option::Option<super::NoteView>,
}
impl ::prost::Name for Visible {
const NAME: &'static str = "Visible";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.SpendView.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Opaque {
#[prost(message, optional, tag = "1")]
pub spend: ::core::option::Option<super::Spend>,
}
impl ::prost::Name for Opaque {
const NAME: &'static str = "Opaque";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.SpendView.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SpendView {
#[prost(message, tag = "1")]
Visible(Visible),
#[prost(message, tag = "2")]
Opaque(Opaque),
}
}
impl ::prost::Name for SpendView {
const NAME: &'static str = "SpendView";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpendPlan {
#[prost(message, optional, tag = "1")]
pub note: ::core::option::Option<Note>,
#[prost(uint64, tag = "2")]
pub position: u64,
#[prost(bytes = "vec", tag = "3")]
pub randomizer: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub value_blinding: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "6")]
pub proof_blinding_s: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for SpendPlan {
const NAME: &'static str = "SpendPlan";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Output {
#[prost(message, optional, tag = "1")]
pub body: ::core::option::Option<OutputBody>,
#[prost(message, optional, tag = "2")]
pub proof: ::core::option::Option<ZkOutputProof>,
}
impl ::prost::Name for Output {
const NAME: &'static str = "Output";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputBody {
#[prost(message, optional, tag = "1")]
pub note_payload: ::core::option::Option<NotePayload>,
#[prost(message, optional, tag = "2")]
pub balance_commitment: ::core::option::Option<
super::super::super::asset::v1::BalanceCommitment,
>,
#[prost(bytes = "vec", tag = "3")]
pub wrapped_memo_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub ovk_wrapped_key: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for OutputBody {
const NAME: &'static str = "OutputBody";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputView {
#[prost(oneof = "output_view::OutputView", tags = "1, 2")]
pub output_view: ::core::option::Option<output_view::OutputView>,
}
pub mod output_view {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Visible {
#[prost(message, optional, tag = "1")]
pub output: ::core::option::Option<super::Output>,
#[prost(message, optional, tag = "2")]
pub note: ::core::option::Option<super::NoteView>,
#[prost(message, optional, tag = "3")]
pub payload_key: ::core::option::Option<
super::super::super::super::keys::v1::PayloadKey,
>,
}
impl ::prost::Name for Visible {
const NAME: &'static str = "Visible";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.OutputView.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Opaque {
#[prost(message, optional, tag = "1")]
pub output: ::core::option::Option<super::Output>,
}
impl ::prost::Name for Opaque {
const NAME: &'static str = "Opaque";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.OutputView.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum OutputView {
#[prost(message, tag = "1")]
Visible(Visible),
#[prost(message, tag = "2")]
Opaque(Opaque),
}
}
impl ::prost::Name for OutputView {
const NAME: &'static str = "OutputView";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputPlan {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
#[prost(message, optional, tag = "2")]
pub dest_address: ::core::option::Option<super::super::super::keys::v1::Address>,
#[prost(bytes = "vec", tag = "3")]
pub rseed: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub value_blinding: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "6")]
pub proof_blinding_s: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for OutputPlan {
const NAME: &'static str = "OutputPlan";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetMetadataByIdRequest {
#[prost(message, optional, tag = "2")]
pub asset_id: ::core::option::Option<super::super::super::asset::v1::AssetId>,
}
impl ::prost::Name for AssetMetadataByIdRequest {
const NAME: &'static str = "AssetMetadataByIdRequest";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetMetadataByIdResponse {
#[prost(message, optional, tag = "1")]
pub denom_metadata: ::core::option::Option<super::super::super::asset::v1::Metadata>,
}
impl ::prost::Name for AssetMetadataByIdResponse {
const NAME: &'static str = "AssetMetadataByIdResponse";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetMetadataByIdsRequest {
#[prost(message, repeated, tag = "1")]
pub asset_id: ::prost::alloc::vec::Vec<super::super::super::asset::v1::AssetId>,
}
impl ::prost::Name for AssetMetadataByIdsRequest {
const NAME: &'static str = "AssetMetadataByIdsRequest";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetMetadataByIdsResponse {
#[prost(message, optional, tag = "1")]
pub denom_metadata: ::core::option::Option<super::super::super::asset::v1::Metadata>,
}
impl ::prost::Name for AssetMetadataByIdsResponse {
const NAME: &'static str = "AssetMetadataByIdsResponse";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FungibleTokenTransferPacketMetadata {
#[prost(string, tag = "1")]
pub channel: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub sequence: u64,
}
impl ::prost::Name for FungibleTokenTransferPacketMetadata {
const NAME: &'static str = "FungibleTokenTransferPacketMetadata";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventOutboundFungibleTokenTransfer {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
#[prost(message, optional, tag = "2")]
pub sender: ::core::option::Option<super::super::super::keys::v1::Address>,
#[prost(string, tag = "3")]
pub receiver: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub meta: ::core::option::Option<FungibleTokenTransferPacketMetadata>,
}
impl ::prost::Name for EventOutboundFungibleTokenTransfer {
const NAME: &'static str = "EventOutboundFungibleTokenTransfer";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventOutboundFungibleTokenRefund {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
#[prost(message, optional, tag = "2")]
pub sender: ::core::option::Option<super::super::super::keys::v1::Address>,
#[prost(string, tag = "3")]
pub receiver: ::prost::alloc::string::String,
#[prost(enumeration = "event_outbound_fungible_token_refund::Reason", tag = "4")]
pub reason: i32,
#[prost(message, optional, tag = "5")]
pub meta: ::core::option::Option<FungibleTokenTransferPacketMetadata>,
}
pub mod event_outbound_fungible_token_refund {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Reason {
Unspecified = 0,
Timeout = 1,
Error = 2,
}
impl Reason {
pub fn as_str_name(&self) -> &'static str {
match self {
Reason::Unspecified => "REASON_UNSPECIFIED",
Reason::Timeout => "REASON_TIMEOUT",
Reason::Error => "REASON_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REASON_UNSPECIFIED" => Some(Self::Unspecified),
"REASON_TIMEOUT" => Some(Self::Timeout),
"REASON_ERROR" => Some(Self::Error),
_ => None,
}
}
}
}
impl ::prost::Name for EventOutboundFungibleTokenRefund {
const NAME: &'static str = "EventOutboundFungibleTokenRefund";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventInboundFungibleTokenTransfer {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
#[prost(string, tag = "2")]
pub sender: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub receiver: ::core::option::Option<super::super::super::keys::v1::Address>,
#[prost(message, optional, tag = "4")]
pub meta: ::core::option::Option<FungibleTokenTransferPacketMetadata>,
}
impl ::prost::Name for EventInboundFungibleTokenTransfer {
const NAME: &'static str = "EventInboundFungibleTokenTransfer";
const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.shielded_pool.v1.{}", Self::NAME
)
}
}
#[cfg(feature = "rpc")]
pub mod query_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct QueryServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl QueryServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> QueryServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> QueryServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
QueryServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn asset_metadata_by_id(
&mut self,
request: impl tonic::IntoRequest<super::AssetMetadataByIdRequest>,
) -> std::result::Result<
tonic::Response<super::AssetMetadataByIdResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataById",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.shielded_pool.v1.QueryService",
"AssetMetadataById",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn asset_metadata_by_ids(
&mut self,
request: impl tonic::IntoRequest<super::AssetMetadataByIdsRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::AssetMetadataByIdsResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataByIds",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"penumbra.core.component.shielded_pool.v1.QueryService",
"AssetMetadataByIds",
),
);
self.inner.server_streaming(req, path, codec).await
}
}
}
#[cfg(feature = "rpc")]
pub mod query_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait QueryService: Send + Sync + 'static {
async fn asset_metadata_by_id(
&self,
request: tonic::Request<super::AssetMetadataByIdRequest>,
) -> std::result::Result<
tonic::Response<super::AssetMetadataByIdResponse>,
tonic::Status,
>;
type AssetMetadataByIdsStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::AssetMetadataByIdsResponse,
tonic::Status,
>,
>
+ Send
+ 'static;
async fn asset_metadata_by_ids(
&self,
request: tonic::Request<super::AssetMetadataByIdsRequest>,
) -> std::result::Result<
tonic::Response<Self::AssetMetadataByIdsStream>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct QueryServiceServer<T: QueryService> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: QueryService> QueryServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServiceServer<T>
where
T: QueryService,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataById" => {
#[allow(non_camel_case_types)]
struct AssetMetadataByIdSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::UnaryService<super::AssetMetadataByIdRequest>
for AssetMetadataByIdSvc<T> {
type Response = super::AssetMetadataByIdResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AssetMetadataByIdRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::asset_metadata_by_id(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AssetMetadataByIdSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataByIds" => {
#[allow(non_camel_case_types)]
struct AssetMetadataByIdsSvc<T: QueryService>(pub Arc<T>);
impl<
T: QueryService,
> tonic::server::ServerStreamingService<
super::AssetMetadataByIdsRequest,
> for AssetMetadataByIdsSvc<T> {
type Response = super::AssetMetadataByIdsResponse;
type ResponseStream = T::AssetMetadataByIdsStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AssetMetadataByIdsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as QueryService>::asset_metadata_by_ids(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AssetMetadataByIdsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: QueryService> Clone for QueryServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
impl<T: QueryService> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: QueryService> tonic::server::NamedService for QueryServiceServer<T> {
const NAME: &'static str = "penumbra.core.component.shielded_pool.v1.QueryService";
}
}