pub struct PrepareUnilateralExitResponse {
pub leaves: Vec<UnilateralExitLeaf>,
pub recoverable_value_sat: u64,
pub total_fee_sat: u64,
pub cpfp_fee_sat: u64,
pub fanout_fee_sat: u64,
pub sweep_fee_sat: u64,
pub single_utxo_funding_sat: u64,
pub per_branch_funding: Vec<PerBranchFunding>,
pub fee_rate_sat_per_vbyte: u64,
pub destination: String,
pub exit_chain_state: ExitChainState,
}Expand description
Response from prepare_unilateral_exit: which leaves would exit, the exact
fee at the requested rate, and how much to fund.
Fields§
§leaves: Vec<UnilateralExitLeaf>§recoverable_value_sat: u64Total value of the selected leaves, in satoshis.
total_fee_sat: u64Total on-chain fee when funding with a single UTXO (fanned out across branches), in satoshis. Exact for the given funding kind; nodes the operators report on-chain are assumed already paid, so a partially-exited tree quotes a lower fee than a fresh one.
The sum of the three components below, which say who pays what:
cpfp_fee_sat + fanout_fee_sat + sweep_fee_sat. The first two come from
your funding UTXO, the third off the value being recovered.
cpfp_fee_sat: u64The part of total_fee_sat the CPFP children pay, funded by your UTXOs.
It does not reduce what the exit recovers.
fanout_fee_sat: u64The part of total_fee_sat paid for the fan-out transaction, funded by
your UTXO. Funding one UTXO per branch (per_branch_funding) avoids it.
Zero for a single branch (no fan-out).
sweep_fee_sat: u64The part of total_fee_sat the final sweep pays. The sweep takes its fee
from the value it moves, so this is the one component subtracted from
what reaches destination.
single_utxo_funding_sat: u64Fund a single UTXO of at least this many satoshis to exit with a fan-out.
Above cpfp_fee_sat + fanout_fee_sat by design: it carries the sweep fee
and a per-branch dust allowance as headroom, both of which come back to
you in the sweep.
per_branch_funding: Vec<PerBranchFunding>To skip the fan-out, fund one UTXO per branch of at least the given amount (one entry per selected leaf).
fee_rate_sat_per_vbyte: u64The fee rate this quote was computed at, in sat/vByte.
destination: String§exit_chain_state: ExitChainStateWhat the chain has already done to these leaves, read while preparing.
Pass it back to unilateral_exit, which builds only the steps it does
not already cover.
Trait Implementations§
Source§impl Clone for PrepareUnilateralExitResponse
impl Clone for PrepareUnilateralExitResponse
Source§fn clone(&self) -> PrepareUnilateralExitResponse
fn clone(&self) -> PrepareUnilateralExitResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for PrepareUnilateralExitResponse
impl<'de> Deserialize<'de> for PrepareUnilateralExitResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for PrepareUnilateralExitResponse
impl RefUnwindSafe for PrepareUnilateralExitResponse
impl Send for PrepareUnilateralExitResponse
impl Sync for PrepareUnilateralExitResponse
impl Unpin for PrepareUnilateralExitResponse
impl UnsafeUnpin for PrepareUnilateralExitResponse
impl UnwindSafe for PrepareUnilateralExitResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request