Struct bitcoin_qt::WalletModel

source ·
pub struct WalletModel { /* private fields */ }
Expand description

| Interface to Bitcoin wallet from Qt | view code. |

Implementations§

source§

impl WalletModel

source

pub fn node(&self) -> Rc<RefCell<dyn NodeInterface>>

source

pub fn wallet(&self) -> Rc<RefCell<dyn WalletInterface>>

source

pub fn client_model(&self) -> &mut ClientModel

source

pub fn balance_changed(&mut self, balances: &WalletBalances)

| Signal that balance in wallet changed |

source

pub fn encryption_status_changed(&mut self)

| Encryption status of wallet changed |

source

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.

source

pub fn message(&mut self, title: &String, message: &String, style: u32)

| Fired when a message should be reported | to the user |

source

pub fn coins_sent( &mut self, wallet: *mut WalletModel, recipient: SendCoinsRecipient, transaction: u32 )

| Coins sent: from wallet, to recipient, | in (serialized) transaction: |

source

pub fn show_progress(&mut self, title: &String, n_progress: i32)

| Show progress dialog e.g. for rescan |

source

pub fn notify_watchonly_changed(&mut self, have_watchonly: bool)

| Watch-only address added |

source

pub fn unload(&mut self)

| Signal that wallet is about to be removed |

source

pub fn can_get_addresses_changed(&mut self)

| Notify that there are now keys in the | keypool |

source

pub fn timer_timeout(&mut self)

source

pub fn new( wallet: Box<dyn WalletInterface>, client_model: &mut ClientModel, platform_style: *const PlatformStyle, parent: *mut u32 ) -> Self

source

pub fn start_poll_balance(&mut self)

| Starts a timer to periodically update | the balance |

source

pub fn set_client_model(&mut self, client_model: *mut ClientModel)

source

pub fn update_status(&mut self)

| Wallet status might have changed |

source

pub fn poll_balance_changed(&mut self)

| Current, immature or unconfirmed balance | might have changed - emit ‘balanceChanged’ | if so |

source

pub fn check_balance_changed(&mut self, new_balances: &WalletBalances)

source

pub fn update_transaction(&mut self)

| New transaction, or transaction changed | status |

source

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 |

source

pub fn update_watch_only_flag(&mut self, have_watchonly: bool)

| Watch-only added |

source

pub fn validate_address(&mut self, address: &String) -> bool

| Check address for validity |

source

pub fn prepare_transaction( &mut self, transaction: &mut WalletModelTransaction, coin_control: &CoinControl ) -> SendCoinsReturn

| prepare transaction for getting txfee | before sending coins |

source

pub fn send_coins( &mut self, transaction: &mut WalletModelTransaction ) -> SendCoinsReturn

| Send coins to a list of recipients |

source

pub fn get_options_model(&mut self) -> *mut OptionsModel

source

pub fn get_address_table_model(&mut self) -> *mut AddressTableModel

source

pub fn get_transaction_table_model(&mut self) -> *mut TransactionTableModel

source

pub fn get_recent_requests_table_model( &mut self ) -> *mut RecentRequestsTableModel

source

pub fn get_encryption_status(&self) -> EncryptionStatus

source

pub fn set_wallet_encrypted(&mut self, passphrase: &SecureString) -> bool

| Wallet encryption |

source

pub fn set_wallet_locked( &mut self, locked: bool, pass_phrase: Option<&SecureString> ) -> bool

| Passphrase only needed when unlocking |

source

pub fn change_passphrase( &mut self, old_pass: &SecureString, new_pass: &SecureString ) -> bool

source

pub fn subscribe_to_core_signals(&mut self)

source

pub fn unsubscribe_from_core_signals(&mut self)

source

pub fn request_unlock(&mut self) -> UnlockContext

| WalletModel::UnlockContext implementation |

source

pub fn bump_fee(&mut self, hash: u256, new_hash: &mut u256) -> bool

source

pub fn display_address(&mut self, address: String) -> bool

source

pub fn is_wallet_enabled(&mut self) -> bool

source

pub fn get_wallet_name(&self) -> String

source

pub fn get_display_name(&self) -> String

source

pub fn is_multiwallet(&mut self) -> bool

source

pub fn refresh(&mut self, pk_hash_only: Option<bool>)

source

pub fn get_last_block_processed(&self) -> u256

Trait Implementations§

source§

impl Drop for WalletModel

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,

§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> StaticUpcast<T> for T

§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V