pub struct WalletCoinRecord {
pub coin_id: String,
pub asset: Asset,
pub amount: u64,
pub parent_coin_info: String,
pub puzzle_hash: String,
pub created_height: Option<u32>,
pub spent_height: Option<u32>,
}Expand description
One spendable coin, as the node’s chain read saw it (control.wallet.coins).
The first three fields are byte-identical to dig-app’s frozen CoinRecord, so its
CoinsResponse deserializes this losslessly and ignores the rest. The rest is what a spend
actually needs: a coin cannot be spent from an id and an amount alone — the parent and the
puzzle hash are what reconstruct the Coin — and the heights are how a caller tells a confirmed
coin from one it only saw in the mempool.
Fields§
§coin_id: StringThe coin id, lowercase 64-hex, unprefixed.
asset: AssetThe asset this coin is denominated in.
amount: u64The coin’s amount, in the asset’s base unit.
parent_coin_info: StringThe parent coin’s id, lowercase 64-hex, unprefixed.
puzzle_hash: StringThe coin’s puzzle hash, lowercase 64-hex, unprefixed.
created_height: Option<u32>The height the coin was created at, or null while it is still only in the mempool.
spent_height: Option<u32>The height the coin was spent at, or null when it is unspent.
Trait Implementations§
Source§impl Clone for WalletCoinRecord
impl Clone for WalletCoinRecord
Source§fn clone(&self) -> WalletCoinRecord
fn clone(&self) -> WalletCoinRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more