Struct bitcoin_qt::WalletModel
source · pub struct WalletModel { /* private fields */ }
Expand description
| Interface to Bitcoin wallet from Qt | view code. |
Implementations§
source§impl WalletModel
impl WalletModel
pub fn node(&self) -> Rc<RefCell<dyn NodeInterface>>
pub fn wallet(&self) -> Rc<RefCell<dyn WalletInterface>>
pub fn client_model(&self) -> &mut ClientModel
sourcepub fn balance_changed(&mut self, balances: &WalletBalances)
pub fn balance_changed(&mut self, balances: &WalletBalances)
| Signal that balance in wallet changed |
sourcepub fn encryption_status_changed(&mut self)
pub fn encryption_status_changed(&mut self)
| Encryption status of wallet changed |
sourcepub fn require_unlock(&mut self)
pub fn require_unlock(&mut self)
| Signal emitted when wallet needs to be | unlocked | | It is valid behaviour for listeners to keep | the wallet locked after this signal; this | means that the unlocking failed or was | cancelled.
sourcepub fn message(&mut self, title: &String, message: &String, style: u32)
pub fn message(&mut self, title: &String, message: &String, style: u32)
| Fired when a message should be reported | to the user |
sourcepub fn coins_sent(
&mut self,
wallet: *mut WalletModel,
recipient: SendCoinsRecipient,
transaction: u32
)
pub fn coins_sent( &mut self, wallet: *mut WalletModel, recipient: SendCoinsRecipient, transaction: u32 )
| Coins sent: from wallet, to recipient, | in (serialized) transaction: |
sourcepub fn show_progress(&mut self, title: &String, n_progress: i32)
pub fn show_progress(&mut self, title: &String, n_progress: i32)
| Show progress dialog e.g. for rescan |
sourcepub fn notify_watchonly_changed(&mut self, have_watchonly: bool)
pub fn notify_watchonly_changed(&mut self, have_watchonly: bool)
| Watch-only address added |
sourcepub fn can_get_addresses_changed(&mut self)
pub fn can_get_addresses_changed(&mut self)
| Notify that there are now keys in the | keypool |
pub fn timer_timeout(&mut self)
pub fn new( wallet: Box<dyn WalletInterface>, client_model: &mut ClientModel, platform_style: *const PlatformStyle, parent: *mut u32 ) -> Self
sourcepub fn start_poll_balance(&mut self)
pub fn start_poll_balance(&mut self)
| Starts a timer to periodically update | the balance |
pub fn set_client_model(&mut self, client_model: *mut ClientModel)
sourcepub fn update_status(&mut self)
pub fn update_status(&mut self)
| Wallet status might have changed |
sourcepub fn poll_balance_changed(&mut self)
pub fn poll_balance_changed(&mut self)
| Current, immature or unconfirmed balance | might have changed - emit ‘balanceChanged’ | if so |
pub fn check_balance_changed(&mut self, new_balances: &WalletBalances)
sourcepub fn update_transaction(&mut self)
pub fn update_transaction(&mut self)
| New transaction, or transaction changed | status |
sourcepub fn update_address_book(
&mut self,
address: &String,
label: &String,
is_mine: bool,
purpose: &String,
status: i32
)
pub fn update_address_book( &mut self, address: &String, label: &String, is_mine: bool, purpose: &String, status: i32 )
| New, updated or removed address book | entry |
sourcepub fn update_watch_only_flag(&mut self, have_watchonly: bool)
pub fn update_watch_only_flag(&mut self, have_watchonly: bool)
| Watch-only added |
sourcepub fn validate_address(&mut self, address: &String) -> bool
pub fn validate_address(&mut self, address: &String) -> bool
| Check address for validity |
sourcepub fn prepare_transaction(
&mut self,
transaction: &mut WalletModelTransaction,
coin_control: &CoinControl
) -> SendCoinsReturn
pub fn prepare_transaction( &mut self, transaction: &mut WalletModelTransaction, coin_control: &CoinControl ) -> SendCoinsReturn
| prepare transaction for getting txfee | before sending coins |
sourcepub fn send_coins(
&mut self,
transaction: &mut WalletModelTransaction
) -> SendCoinsReturn
pub fn send_coins( &mut self, transaction: &mut WalletModelTransaction ) -> SendCoinsReturn
| Send coins to a list of recipients |
pub fn get_options_model(&mut self) -> *mut OptionsModel
pub fn get_address_table_model(&mut self) -> *mut AddressTableModel
pub fn get_transaction_table_model(&mut self) -> *mut TransactionTableModel
pub fn get_recent_requests_table_model( &mut self ) -> *mut RecentRequestsTableModel
pub fn get_encryption_status(&self) -> EncryptionStatus
sourcepub fn set_wallet_encrypted(&mut self, passphrase: &SecureString) -> bool
pub fn set_wallet_encrypted(&mut self, passphrase: &SecureString) -> bool
| Wallet encryption |
sourcepub fn set_wallet_locked(
&mut self,
locked: bool,
pass_phrase: Option<&SecureString>
) -> bool
pub fn set_wallet_locked( &mut self, locked: bool, pass_phrase: Option<&SecureString> ) -> bool
| Passphrase only needed when unlocking |
pub fn change_passphrase( &mut self, old_pass: &SecureString, new_pass: &SecureString ) -> bool
pub fn subscribe_to_core_signals(&mut self)
pub fn unsubscribe_from_core_signals(&mut self)
sourcepub fn request_unlock(&mut self) -> UnlockContext
pub fn request_unlock(&mut self) -> UnlockContext
| WalletModel::UnlockContext implementation |