pub struct StoredCrossChainSwap {
pub provider: String,
pub id: String,
pub is_terminal: bool,
pub updated_at: u64,
pub data: String,
pub secrets: String,
}Expand description
A cross-chain swap row as persisted and synced. Shared across providers
(Boltz, Orchestra, future) so each provider’s adapter writes opaque
JSON into data and (optionally) opaque ciphertext into secrets.
For providers with money-critical secrets, the adapter lifts them out of
the swap JSON, ECIES-encrypts them, and carries only the ciphertext in
secrets. The storage layer treats both fields as opaque, so it needs
no signer.
Fields§
§provider: StringProvider tag (e.g. "boltz", "orchestra").
id: StringProvider-scoped swap id (boltz swap id, orchestra quote-or-order id).
is_terminal: boolLifted from the underlying swap’s terminal flag into an indexed column
so list_active_cross_chain_swaps filters without parsing data.
updated_at: u64Lifted from the underlying swap’s updated_at into a column so the
row’s freshness is inspectable without parsing data.
data: StringSerialized JSON owned by the cross-chain provider’s storage adapter.
secrets: StringBase64 of the ECIES ciphertext of the provider’s lifted secrets. Empty for providers with no money-critical secrets to protect at rest.
Trait Implementations§
Source§impl Clone for StoredCrossChainSwap
impl Clone for StoredCrossChainSwap
Source§fn clone(&self) -> StoredCrossChainSwap
fn clone(&self) -> StoredCrossChainSwap
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoredCrossChainSwap
impl Debug for StoredCrossChainSwap
Source§impl<'de> Deserialize<'de> for StoredCrossChainSwap
impl<'de> Deserialize<'de> for StoredCrossChainSwap
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 StoredCrossChainSwap
impl RefUnwindSafe for StoredCrossChainSwap
impl Send for StoredCrossChainSwap
impl Sync for StoredCrossChainSwap
impl Unpin for StoredCrossChainSwap
impl UnsafeUnpin for StoredCrossChainSwap
impl UnwindSafe for StoredCrossChainSwap
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