Skip to main content

AutomatedSpend

Struct AutomatedSpend 

Source
pub struct AutomatedSpend {
Show 14 fields pub id: String, pub revision: u32, pub kind: String, pub purpose: String, pub authority: SpendAuthority, pub asset: SpendAsset, pub amount_mojos: String, pub fee_mojos: String, pub store_id: Option<String>, pub initiated_ms: u64, pub updated_ms: u64, pub status: SpendOutcome, pub funding_coin_ids: Vec<String>, pub chain_reference: Option<SpendChainReference>,
}
Expand description

One spend this node made WITHOUT per-transaction approval.

§Amounts are decimal STRINGS

amount_mojos and fee_mojos carry the full u64 range, which a JSON number does not survive through an f64 parser — and a silently rounded figure about somebody’s money is exactly the lie this record exists to prevent. Every money field in this crate is a string for that reason.

Fields§

§id: String

The audit id — stable for the life of the spend, and the value after_id resumes from.

§revision: u32

The revision of the record this row reflects. The audit trail is append-only and each entry is a snapshot; this row is the highest revision the node holds for this spend.

§kind: String

What the spend was for, as the producer’s stable token ("mirror-coin", …).

§purpose: String

One human sentence: why this happened without asking.

§authority: SpendAuthority

Whose standing consent was relied on, and which grant.

§asset: SpendAsset

Which asset moved.

§amount_mojos: String

How much, in the asset’s base units, as a decimal string.

§fee_mojos: String

The network fee in mojos of XCH, as a decimal string.

§store_id: Option<String>

The store this spend serves, when it serves one.

§initiated_ms: u64

When the node decided to spend, unix ms. The field the ordering and the time filters use.

§updated_ms: u64

When this revision was written, unix ms.

§status: SpendOutcome

Where the spend got to.

§funding_coin_ids: Vec<String>

The coins this spend CONSUMED, once known.

Never the confirmation evidence. The legacy implementation waited for a funding coin to be spent and called that confirmation, which a competing spend of the same coin satisfies identically while the intended coin never exists — so a client MUST NOT infer success from anything here. chain_reference is the only reference that carries an observed/expected flag.

§chain_reference: Option<SpendChainReference>

The chain reference to show, or null when the node knows no coin id yet — which is honest: there is nothing to look up.

The key MUST be present. null is meaningful, so an ABSENT key must not decode into it: a truncated or mis-routed payload would otherwise decode as a confident “there is nothing to look up”.

Trait Implementations§

Source§

impl Clone for AutomatedSpend

Source§

fn clone(&self) -> AutomatedSpend

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AutomatedSpend

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AutomatedSpend

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for AutomatedSpend

Source§

impl PartialEq for AutomatedSpend

Source§

fn eq(&self, other: &AutomatedSpend) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AutomatedSpend

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AutomatedSpend

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.