pub struct WalletCoinsResult {
pub coins: Vec<WalletCoinRecord>,
pub source: Option<WalletReadSource>,
pub synced: bool,
pub peak_height: Option<u32>,
}Expand description
control.wallet.coins — an address’s spendable coins for one asset.
§An empty list is an ANSWER, never a fallback
coins: [] means the node consulted a chain and that address holds nothing. It is NEVER what a
caller gets when the chain could not be reached: those are catalogued errors
(crate::error::ControlErrorCode::WalletNoChainSource / WalletNotSynced /
WalletReadFailed / WalletRateLimited). The distinction is the whole point of the method —
a well-shaped empty result on an unreachable chain would tell somebody who holds funds that they
hold nothing, and a spend built on that answer refuses with a shortfall that is not true.
Fields§
§coins: Vec<WalletCoinRecord>The spendable coins found at the address, possibly empty (see the type docs).
source: Option<WalletReadSource>Which tier answered, or None from a node too old to disclose it. See WalletReadSource.
synced: boolWhether THESE coins reflect a caught-up local view; always false for a fallback answer.
peak_height: Option<u32>The peak height these coins reflect, or null when none applies (every fallback answer).
Trait Implementations§
Source§impl Clone for WalletCoinsResult
impl Clone for WalletCoinsResult
Source§fn clone(&self) -> WalletCoinsResult
fn clone(&self) -> WalletCoinsResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more