pub enum Progress {
Start,
SplitWithArkoor,
ArkoorRegistrationRequired {
offboard_vtxo_ids: Vec<VtxoId>,
change_vtxo_ids: Vec<VtxoId>,
},
ReadyForOffboard {
offboard_vtxo_ids: Vec<VtxoId>,
prior_txid: Option<Txid>,
},
OffboardTxPrepared {
offboard_vtxo_ids: Vec<VtxoId>,
offboard_tx: Transaction,
forfeit_cosign_nonces: Vec<PublicNonce>,
movement_id: MovementId,
},
ReadyForBroadcast {
offboard_vtxo_ids: Vec<VtxoId>,
signed_offboard_tx: Transaction,
movement_id: MovementId,
},
AwaitingConfirmations {
offboard_vtxo_ids: Vec<VtxoId>,
offboard_txid: Txid,
offboard_tx: Transaction,
movement_id: MovementId,
created_at: DateTime<Utc>,
},
}Expand description
The phases of offboarding.
SplitWithArkoor and ArkoorRegistrationRequired are only reached from
the SendOnchain kind; the OffboardWhole kind transitions directly
from Start to ReadyForOffboard.
Variants§
Start
Inputs need locking, but we have selected VTXOs to offboard.
SplitWithArkoor
SendOnchain intermediate: We need to perform an arkoor to split the VTXOs so we can
offboard the exact amount requested.
ArkoorRegistrationRequired
SendOnchain intermediate: arkoor done, yet to be registered with the server.
Both the offboard vtxos and the change are held locked until registration
succeeds; only then is the change released as spendable.
ReadyForOffboard
VTXOs are locked, (potential) split is done, now we can start the actual offboard.
Fields
offboard_vtxo_ids: Vec<VtxoId>In the case of SendOnchain this is the arkoor VTXOs we just created, in the case
of OffboardWhole this is the VTXOs we selected to offboard.
prior_txid: Option<Txid>Set when we fell back here from Progress::OffboardTxPrepared because the server’s session disappeared before we could finish it, and its tx wasn’t visible on chain. If the fresh prepare then gets rejected because the inputs are spent, the prior tx probably did make it out after all, so we keep looking for it on chain instead of failing the action.
OffboardTxPrepared
Offboard tx built by the server and validated by us; our forfeits are not signed yet — that happens inside the finish step, with fresh nonces on every attempt, so that this checkpoint stays value-deterministic across re-drives.
Fields
offboard_tx: Transactionforfeit_cosign_nonces: Vec<PublicNonce>The server’s forfeit cosign nonces from the prepare response; stable across prepare replays.
movement_id: MovementIdReadyForBroadcast
AwaitingConfirmations
Offboard tx broadcast; waiting for confirmation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Progress
impl<'de> Deserialize<'de> for Progress
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>,
impl Eq for Progress
impl StructuralPartialEq for Progress
Auto Trait Implementations§
impl Freeze for Progress
impl RefUnwindSafe for Progress
impl Send for Progress
impl Sync for Progress
impl Unpin for Progress
impl UnsafeUnpin for Progress
impl UnwindSafe for Progress
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§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