crate::ix!();
pub struct OutputEntry {
destination: TxDestination,
amount: Amount,
vout: i32,
}
pub struct Balance {
mine_trusted: Amount,
mine_untrusted_pending: Amount,
mine_immature: Amount,
watchonly_trusted: Amount, watchonly_untrusted_pending: Amount, watchonly_immature: Amount, }
#[EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)]
pub fn input_is_mine(
wallet: &Wallet,
txin: &TxIn) -> IsMineType
{
todo!();
}
pub fn all_inputs_mine(
wallet: &Wallet,
tx: &Transaction,
filter: &IsMineFilter) -> bool
{
todo!();
}
pub fn output_get_credit(
wallet: &Wallet,
txout: &TxOut,
filter: &IsMineFilter) -> Amount
{
todo!();
}
pub fn tx_get_credit(
wallet: &Wallet,
tx: &Transaction,
filter: &IsMineFilter) -> Amount {
todo!();
}
#[EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)]
pub fn script_is_change(
wallet: &Wallet,
script: &Script) -> bool {
todo!();
}
#[EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)]
pub fn output_is_change(
wallet: &Wallet,
txout: &TxOut) -> bool {
todo!();
}
#[EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)]
pub fn output_get_change(
wallet: &Wallet,
txout: &TxOut) -> Amount {
todo!();
}
pub fn tx_get_change(
wallet: &Wallet,
tx: &Transaction) -> Amount {
todo!();
}
pub fn get_cachable_amount(
wallet: &Wallet,
wtx: &WalletTx,
ty: WalletTxAmountType,
filter: &IsMineFilter,
recalculate: Option<bool>) -> Amount
{
let recalculate: bool = recalculate.unwrap_or(false);
todo!();
}
pub fn cached_tx_get_credit(
wallet: &Wallet,
wtx: &WalletTx,
filter: &IsMineFilter) -> Amount
{
todo!();
}
pub fn cached_tx_get_debit(
wallet: &Wallet,
wtx: &WalletTx,
filter: &IsMineFilter) -> Amount
{
todo!();
}
pub fn cached_tx_get_change(
wallet: &Wallet,
wtx: &WalletTx) -> Amount {
todo!();
}
pub fn cached_tx_get_immature_credit(
wallet: &Wallet,
wtx: &WalletTx,
use_cache: Option<bool>) -> Amount {
let use_cache: bool = use_cache.unwrap_or(true);
todo!();
}
pub fn cached_tx_get_immature_watch_only_credit(
wallet: &Wallet,
wtx: &WalletTx,
use_cache: Option<bool>) -> Amount {
let use_cache: bool = use_cache.unwrap_or(true);
todo!();
}
#[NO_THREAD_SAFETY_ANALYSIS]
pub fn cached_tx_get_available_credit(
wallet: &Wallet,
wtx: &WalletTx,
use_cache: Option<bool>,
filter: Option<IsMineFilter>) -> Amount {
let use_cache: bool = use_cache.unwrap_or(true);
let filter: IsMineFilter = filter.unwrap_or(
IsMineType::ISMINE_SPENDABLE.bits().try_into().unwrap()
);
todo!();
}
pub fn cached_tx_get_amounts(
wallet: &Wallet,
wtx: &WalletTx,
list_received: &mut LinkedList<OutputEntry>,
list_sent: &mut LinkedList<OutputEntry>,
n_fee: &mut Amount,
filter: &IsMineFilter) {
todo!();
}
pub fn cached_tx_is_from_me(
wallet: &Wallet,
wtx: &WalletTx,
filter: &IsMineFilter) -> bool {
todo!();
}
#[EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)]
pub fn cached_tx_is_trusted_with_trusted_parents(
wallet: &Wallet,
wtx: &WalletTx,
trusted_parents: &mut HashSet<u256>) -> bool {
todo!();
}
pub fn cached_tx_is_trusted(
wallet: &Wallet,
wtx: &WalletTx) -> bool {
todo!();
}
pub fn get_balance(
wallet: &Wallet,
min_depth: Option<i32>,
avoid_reuse: Option<bool>) -> Balance {
let min_depth: i32 = min_depth.unwrap_or(0);
let avoid_reuse: bool = avoid_reuse.unwrap_or(true);
todo!();
}
pub fn get_address_balances(wallet: &Wallet) -> HashMap<TxDestination,Amount> {
todo!();
}
#[EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)]
pub fn get_address_groupings(wallet: &Wallet) -> HashSet<HashSet<TxDestination>> {
todo!();
}