pub struct CoinEntry {
pub coin: Coin,
/* private fields */
}Expand description
Represents a coin entry in the coin store.
The CoinEntry struct contains information about the coin’s height,
status, associated coin data, and the address it belongs to.
Fields§
§coin: CoinImplementations§
Source§impl CoinEntry
impl CoinEntry
Sourcepub fn height(&self) -> Option<u64>
pub fn height(&self) -> Option<u64>
Returns the height of the coin in the blockchain.
§Returns
An Option<u64> representing the height of the coin,
or None if the coin is not confirmed.
Sourcepub fn status(&self) -> CoinStatus
pub fn status(&self) -> CoinStatus
Sourcepub fn status_str(&self) -> String
pub fn status_str(&self) -> String
Returns a string representation of the coin’s status.
§Returns
A string describing the coin’s status.
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
Returns the label associated with the coin.
§Returns
A string representation of the coin’s label, or an empty string if no label is set.
Sourcepub fn amount_sat(&self) -> u64
pub fn amount_sat(&self) -> u64
Sourcepub fn amount_btc(&self) -> f64
pub fn amount_btc(&self) -> f64
Sourcepub fn outpoint_str(&self) -> String
pub fn outpoint_str(&self) -> String
Returns a string representation of the coin’s outpoint.
§Returns
A string describing the coin’s outpoint.
Sourcepub fn txin(&self) -> TxIn
pub fn txin(&self) -> TxIn
Generate the TxIn from the coin.
§Returns
A bitcoin::TxIn representing the input transaction associated with the coin.
Sourcepub fn txout(&self) -> TxOut
pub fn txout(&self) -> TxOut
Returns the TxOut of this coin.
§Returns
A bitcoin::TxOut representing the output transaction associated with the coin.
Sourcepub fn deriv(&self) -> (AddrAccount, u32)
pub fn deriv(&self) -> (AddrAccount, u32)
Returns the derivation path associated with the coin.
§Returns
A tuple containing the AddrAccount and the index of the coin’s derivation path.
Sourcepub fn address(&self) -> String
pub fn address(&self) -> String
Returns the address associated with the coin.
§Returns
A string representation of the coin’s address.
Sourcepub fn rust_address(&self) -> RustAddress
pub fn rust_address(&self) -> RustAddress
Returns the address associated with the coin as an ‘RustAddress’
§Returns
A boxed AddressEntry representation of the coin’s address.