// This file is @generated by prost-build.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Empty {}
/// rpc: Withdraw
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WithdrawRequest {
    /// The chain/network the funds sit on (network key, e.g. "flare-coston2").
    #[prost(string, tag = "1")]
    pub network: ::prost::alloc::string::String,
    /// Token contract address on `network`.
    #[prost(string, tag = "2")]
    pub token: ::prost::alloc::string::String,
    /// The withdrawer's wallet address on `network`. The resulting voucher pays
    /// this address regardless of who submits it on-chain.
    #[prost(string, tag = "3")]
    pub account: ::prost::alloc::string::String,
    /// Amount in token base units, as a decimal string (u128).
    #[prost(string, tag = "4")]
    pub amount: ::prost::alloc::string::String,
    /// Signature by `account`'s key over the canonical request bytes
    /// ("network|token|account|amount"): Secp256k1 on EVM, Ed25519 on Solana.
    #[prost(bytes = "vec", tag = "5")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WithdrawResponse {
    /// The voucher fields the holder submits to MidribV2.withdraw(...).
    #[prost(string, tag = "1")]
    pub account: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub token: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub amount: ::prost::alloc::string::String,
    #[prost(uint64, tag = "4")]
    pub nonce: u64,
    #[prost(uint64, tag = "5")]
    pub expiry: u64,
    /// The TEE (instance-owner) EIP-712 signature over the voucher.
    #[prost(bytes = "vec", tag = "6")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelOrderRequest {
    #[prost(message, optional, tag = "1")]
    pub order: ::core::option::Option<OrderToCancel>,
    #[prost(bytes = "vec", tag = "2")]
    pub signature_hash: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelOrderResponse {
    /// Whether the order was found and canceled
    #[prost(bool, tag = "1")]
    pub order_canceled: bool,
    /// Transaction hashes associated with this cancellation
    #[prost(message, repeated, tag = "2")]
    pub transaction_hashes: ::prost::alloc::vec::Vec<TransactionHash>,
    /// Current state of the orderbook after this operation
    #[prost(message, repeated, tag = "3")]
    pub current_orderbook: ::prost::alloc::vec::Vec<OrderbookEntry>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderbookRequest {
    /// Used to keep the client alive
    #[prost(bool, tag = "1")]
    pub continue_stream: bool,
    /// The market id to stream orders for
    #[prost(string, tag = "2")]
    pub market_id: ::prost::alloc::string::String,
    /// If true, returns existing open orders when stream starts, then continues streaming
    #[prost(bool, optional, tag = "3")]
    pub historical_open_orders: ::core::option::Option<bool>,
    /// If this is sent too, then we filter by a specific trader
    #[prost(string, optional, tag = "4")]
    pub filter_by_trader: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TradeRequest {
    /// Used to keep the client alive
    #[prost(bool, tag = "1")]
    pub continue_stream: bool,
    /// The market id to stream orders for
    #[prost(string, tag = "2")]
    pub market_id: ::prost::alloc::string::String,
    /// If true, returns existing closed when stream starts, then continues streaming
    #[prost(bool, optional, tag = "3")]
    pub historical_closed_trades: ::core::option::Option<bool>,
    /// If this is sent too, then we filter by a specific trader
    #[prost(string, optional, tag = "4")]
    pub filter_by_trader: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SendOrderRequest {
    /// The order to send
    #[prost(message, optional, tag = "1")]
    pub order: ::core::option::Option<Order>,
    /// Valid EIP-712 signature hash of this order
    #[prost(bytes = "vec", tag = "2")]
    pub signature_hash: ::prost::alloc::vec::Vec<u8>,
    /// Order authorization carrying the SDK-derived canonical order id and the
    /// committed lock amount. Required. For message-typed fields proto3 tracks
    /// presence by default, so the generated Rust API is
    /// `Option<OrderAuthorization>`; the arborter handler enforces presence at
    /// the request boundary.
    #[prost(message, optional, tag = "3")]
    pub authorization: ::core::option::Option<OrderAuthorization>,
}
/// SDK-derived order authorization. Under the optimistic shadow ledger, order
/// entry never touches the chain — the arborter authenticates the order via the
/// outer envelope signature (`SendOrderRequest.signature_hash`) and consumes
/// only the two fields below. The legacy gasless on-chain-lock fields
/// (user_signature / deadline / nonce / open_deadline / amount_out) were removed
/// with the on-chain order machinery; the message and its `SendOrderRequest`
/// field were renamed from `GaslessAuthorization` / `gasless` to match.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderAuthorization {
    /// The canonical on-chain order id (32-byte hex, 0x-prefixed), derived by the
    /// SDK (`aspens::orders::derive_order_id`). The arborter uses it verbatim as
    /// the order's id throughout match / settle, so it MUST match the SDK's
    /// derivation exactly.
    #[prost(string, tag = "1")]
    pub order_id: ::prost::alloc::string::String,
    /// The committed lock amount on the origin chain (input token), in that
    /// token's native base units (NOT pair decimals). Decimal-string encoding of
    /// `u128` (no `0x` prefix, no separators) so values up to 2^128-1 round-trip
    /// exactly across the gRPC boundary — protobuf has no native 128-bit integer.
    #[prost(string, tag = "2")]
    pub amount_in: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Order {
    /// 'BID' or 'ASK'
    #[prost(enumeration = "Side", tag = "1")]
    pub side: i32,
    /// Order size
    #[prost(string, tag = "2")]
    pub quantity: ::prost::alloc::string::String,
    /// Optional. including is a LIMIT order. excluding is a MARKET order.
    #[prost(string, optional, tag = "3")]
    pub price: ::core::option::Option<::prost::alloc::string::String>,
    /// Identity the market: concat(base_chain_id "::" token_address "::" quote_chain_id "::" token_address)
    #[prost(string, tag = "4")]
    pub market_id: ::prost::alloc::string::String,
    /// User's pubkey (address) on the Base chain
    #[prost(string, tag = "5")]
    pub base_account_address: ::prost::alloc::string::String,
    /// User's pubkey (address) on the Quote chain
    #[prost(string, tag = "6")]
    pub quote_account_address: ::prost::alloc::string::String,
    /// 'DIRECT' (default) or 'DISCRETIONARY'
    #[prost(enumeration = "ExecutionType", tag = "7")]
    pub execution_type: i32,
    /// When execution_type == 'discretionary', include order_ids to match with.
    #[prost(uint64, repeated, tag = "8")]
    pub matching_order_ids: ::prost::alloc::vec::Vec<u64>,
    /// Post-only: if true, the order MUST rest on the book. If it would
    /// cross any opposing confirmed order at submission time the request
    /// is rejected with FAILED_PRECONDITION and no on-chain lock is
    /// performed. Limit orders only — incompatible with market (no price)
    /// and with DISCRETIONARY execution_type. Defaults to false, which
    /// preserves legacy take-or-rest behavior.
    #[prost(bool, tag = "9")]
    pub post_only: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Trade {
    /// When the engine registers this executed trade
    #[prost(uint64, tag = "1")]
    pub timestamp: u64,
    /// The setttled price net of fees
    #[prost(string, tag = "2")]
    pub price: ::prost::alloc::string::String,
    /// How much or many of the quote token
    #[prost(string, tag = "3")]
    pub qty: ::prost::alloc::string::String,
    /// Maker's internal trader id. Safely ignore.
    #[prost(string, tag = "4")]
    pub maker_id: ::prost::alloc::string::String,
    /// Taker's internal trader id. Safely ignore.
    #[prost(string, tag = "5")]
    pub taker_id: ::prost::alloc::string::String,
    /// The maker's base chain wallet address
    #[prost(string, tag = "6")]
    pub maker_base_address: ::prost::alloc::string::String,
    /// The maker's quote chain wallet address
    #[prost(string, tag = "7")]
    pub maker_quote_address: ::prost::alloc::string::String,
    /// The taker's base chain wallet address
    #[prost(string, tag = "8")]
    pub taker_base_address: ::prost::alloc::string::String,
    /// The taker's quote chain wallet address
    #[prost(string, tag = "9")]
    pub taker_quote_address: ::prost::alloc::string::String,
    /// Who is the buyer in this trade (MAKER or TAKER)
    #[prost(enumeration = "TradeRole", tag = "10")]
    pub buyer_is: i32,
    /// Who is the seller in this trade (MAKER or TAKER)
    #[prost(enumeration = "TradeRole", tag = "11")]
    pub seller_is: i32,
    /// The order_id that created this trade.
    #[prost(uint64, tag = "12")]
    pub order_hit: u64,
}
/// Transaction hash information
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionHash {
    /// Type of transaction hash
    #[prost(string, tag = "1")]
    pub hash_type: ::prost::alloc::string::String,
    /// The transaction hash value
    #[prost(string, tag = "2")]
    pub hash_value: ::prost::alloc::string::String,
}
/// rpc: SendOrder
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendOrderResponse {
    /// Whether the order has unmatched volume and has been added to the book.
    #[prost(bool, tag = "1")]
    pub order_in_book: bool,
    /// If the order lands in the book, what remains unfilled from the order.
    #[prost(message, optional, tag = "2")]
    pub order: ::core::option::Option<Order>,
    /// Which other orders, if any, this order was matched with.
    #[prost(message, repeated, tag = "3")]
    pub trades: ::prost::alloc::vec::Vec<Trade>,
    /// Transaction hashes associated with this order
    #[prost(message, repeated, tag = "4")]
    pub transaction_hashes: ::prost::alloc::vec::Vec<TransactionHash>,
    /// Current state of the orderbook after this operation
    #[prost(message, repeated, tag = "5")]
    pub current_orderbook: ::prost::alloc::vec::Vec<OrderbookEntry>,
    /// The unique identifier for this order
    #[prost(uint64, tag = "6")]
    pub order_id: u64,
}
/// rpc: CancelOrder
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderToCancel {
    /// Identity the market: concat(base_chain_id "::" token_address "::" quote_chain_id "::" token_address)
    #[prost(string, tag = "1")]
    pub market_id: ::prost::alloc::string::String,
    /// 'BID' or 'ASK'
    #[prost(enumeration = "Side", tag = "2")]
    pub side: i32,
    /// the token address
    #[prost(string, tag = "3")]
    pub token_address: ::prost::alloc::string::String,
    /// Internal order Id.
    #[prost(uint64, tag = "4")]
    pub order_id: u64,
}
/// rpc: Orderbook
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderbookEntry {
    /// when the order first landed in The Orderbook
    #[prost(uint64, tag = "1")]
    pub timestamp: u64,
    /// internal id of the order
    #[prost(uint64, tag = "2")]
    pub order_id: u64,
    /// price of the order - in non-decimal form
    #[prost(string, tag = "3")]
    pub price: ::prost::alloc::string::String,
    /// quantity of the order - in non-decimal form
    #[prost(string, tag = "4")]
    pub quantity: ::prost::alloc::string::String,
    /// 'BID = 1' or 'ASK = 2'
    #[prost(enumeration = "Side", tag = "5")]
    pub side: i32,
    /// The maker's base chain wallet address
    #[prost(string, tag = "6")]
    pub maker_base_address: ::prost::alloc::string::String,
    /// The maker's quote chain wallet address
    #[prost(string, tag = "7")]
    pub maker_quote_address: ::prost::alloc::string::String,
    /// The market ID this order belongs to
    #[prost(string, tag = "8")]
    pub market_id: ::prost::alloc::string::String,
    /// The actual state of the order (Pending, Confirmed, Matched, Canceled, Settled)
    #[prost(enumeration = "OrderState", tag = "9")]
    pub state: i32,
    /// Mirrors Order.post_only for the resting order. Lets streaming
    /// clients distinguish post-only liquidity from regular limits.
    #[prost(bool, tag = "10")]
    pub post_only: bool,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Side {
    Unspecified = 0,
    Bid = 1,
    Ask = 2,
}
impl Side {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "SIDE_UNSPECIFIED",
            Self::Bid => "SIDE_BID",
            Self::Ask => "SIDE_ASK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SIDE_UNSPECIFIED" => Some(Self::Unspecified),
            "SIDE_BID" => Some(Self::Bid),
            "SIDE_ASK" => Some(Self::Ask),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecutionType {
    /// Default - direct
    Unspecified = 0,
    /// For dealroom use.
    Discretionary = 1,
}
impl ExecutionType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "EXECUTION_TYPE_UNSPECIFIED",
            Self::Discretionary => "EXECUTION_TYPE_DISCRETIONARY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXECUTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "EXECUTION_TYPE_DISCRETIONARY" => Some(Self::Discretionary),
            _ => None,
        }
    }
}
/// The actual state of an order in the matching engine
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderState {
    Unspecified = 0,
    /// Order submitted, funds locked on-chain, shows in orderbook but NOT matchable
    Pending = 1,
    /// OrderOpen blockchain event received, order is now matchable
    Confirmed = 2,
    /// Order matched by matching engine, trade recorded
    Matched = 3,
    /// Order canceled
    Canceled = 4,
    /// On-chain settlement completed successfully
    Settled = 5,
}
impl OrderState {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "ORDER_STATE_UNSPECIFIED",
            Self::Pending => "ORDER_STATE_PENDING",
            Self::Confirmed => "ORDER_STATE_CONFIRMED",
            Self::Matched => "ORDER_STATE_MATCHED",
            Self::Canceled => "ORDER_STATE_CANCELED",
            Self::Settled => "ORDER_STATE_SETTLED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ORDER_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_STATE_PENDING" => Some(Self::Pending),
            "ORDER_STATE_CONFIRMED" => Some(Self::Confirmed),
            "ORDER_STATE_MATCHED" => Some(Self::Matched),
            "ORDER_STATE_CANCELED" => Some(Self::Canceled),
            "ORDER_STATE_SETTLED" => Some(Self::Settled),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TradeRole {
    Unspecified = 0,
    Maker = 1,
    Taker = 2,
}
impl TradeRole {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TRADE_ROLE_UNSPECIFIED",
            Self::Maker => "MAKER",
            Self::Taker => "TAKER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRADE_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
            "MAKER" => Some(Self::Maker),
            "TAKER" => Some(Self::Taker),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod arborter_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    #[derive(Debug, Clone)]
    pub struct ArborterServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ArborterServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        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> ArborterServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
        ) -> ArborterServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            ArborterServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[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 send_order(
            &mut self,
            request: impl tonic::IntoRequest<super::SendOrderRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SendOrderResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/xyz.aspens.arborter.v1.ArborterService/SendOrder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "xyz.aspens.arborter.v1.ArborterService",
                        "SendOrder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn cancel_order(
            &mut self,
            request: impl tonic::IntoRequest<super::CancelOrderRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CancelOrderResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/xyz.aspens.arborter.v1.ArborterService/CancelOrder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "xyz.aspens.arborter.v1.ArborterService",
                        "CancelOrder",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn trades(
            &mut self,
            request: impl tonic::IntoRequest<super::TradeRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::Trade>>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/xyz.aspens.arborter.v1.ArborterService/Trades",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("xyz.aspens.arborter.v1.ArborterService", "Trades"),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        pub async fn orderbook(
            &mut self,
            request: impl tonic::IntoRequest<super::OrderbookRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::OrderbookEntry>>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/xyz.aspens.arborter.v1.ArborterService/Orderbook",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "xyz.aspens.arborter.v1.ArborterService",
                        "Orderbook",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Request a TEE-signed withdrawal voucher (Track A §8). The chain can no
        /// longer self-judge a withdrawal under the optimistic shadow ledger, so the
        /// arborter freezes the settled funds and returns an owner-signed voucher the
        /// holder submits to MidribV2.withdraw(voucher, signature).
        pub async fn withdraw(
            &mut self,
            request: impl tonic::IntoRequest<super::WithdrawRequest>,
        ) -> std::result::Result<
            tonic::Response<super::WithdrawResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/xyz.aspens.arborter.v1.ArborterService/Withdraw",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("xyz.aspens.arborter.v1.ArborterService", "Withdraw"),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
