pub struct Coin {
pub txid: String,
pub vout: u32,
pub value: u64,
pub script: String,
pub tweak: String,
}Expand description
A deposit the operator holds, as a coin to spend: the outpoint, its value, its output script and the tweak its secret needs. With serde the field names are the teller’s; the other fields of a JavaScript coin (the rest of its deposit address) are ignored when read.
Fields§
§txid: StringThe funding transaction, 64 hex in the usual (display) order.
vout: u32The output’s index.
value: u64Satoshis.
script: StringThe output script, hex (5120 + x).
tweak: StringThe deposit’s tweak, 64 hex.
Implementations§
Source§impl Coin
impl Coin
Sourcepub fn from_deposit(
d: &DepositAddress,
txid: &str,
vout: u32,
value: u64,
) -> Self
pub fn from_deposit( d: &DepositAddress, txid: &str, vout: u32, value: u64, ) -> Self
The coin a deposit address received: { ...depositAddress, txid, vout, value }.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Coin
impl<'de> Deserialize<'de> for Coin
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Coin
impl StructuralPartialEq for Coin
Auto Trait Implementations§
impl Freeze for Coin
impl RefUnwindSafe for Coin
impl Send for Coin
impl Sync for Coin
impl Unpin for Coin
impl UnsafeUnpin for Coin
impl UnwindSafe for Coin
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.