pub struct Account { /* private fields */ }
Implementations§
source§impl Account
impl Account
pub fn of(addr: CanonicalAddr) -> Self
pub fn addr(&self) -> &CanonicalAddr
pub fn balance(&self, storage: &dyn Storage) -> StdResult<Uint128>
pub fn add_balance( &self, storage: &mut dyn Storage, amount: Uint128, decoys: Option<&Decoys> ) -> StdResult<()>
pub fn subtract_balance( &self, storage: &mut dyn Storage, amount: Uint128, decoys: Option<&Decoys> ) -> StdResult<()>
pub fn update_allowance<F>( &self, storage: &mut dyn Storage, spender: &Self, func: F ) -> StdResult<Allowance>where F: FnOnce(Allowance) -> StdResult<Allowance>,
pub fn allowance( &self, storage: &dyn Storage, spender: &Account ) -> StdResult<Allowance>
pub fn viewing_key( &self, storage: &dyn Storage ) -> StdResult<Option<ViewingKeyHashed>>
pub fn set_viewing_key( &self, storage: &mut dyn Storage, key: &ViewingKey ) -> StdResult<()>
pub fn receiver_hash(&self, storage: &dyn Storage) -> StdResult<Option<String>>
pub fn set_receiver_hash( &self, storage: &mut dyn Storage, code_hash: String ) -> StdResult<()>
pub fn allowances( &self, deps: Deps<'_>, page: u32, page_size: u32 ) -> StdResult<(Vec<GivenAllowance>, u64)>
pub fn received_allowances( &self, deps: Deps<'_>, page: u32, page_size: u32 ) -> StdResult<(Vec<ReceivedAllowance>, u64)>
source§impl Account
impl Account
pub fn add_tx( &self, storage: &mut dyn Storage, tx: &RichTxCanon, decoys: Option<&Decoys> ) -> StdResult<()>
pub fn add_transfer( &self, storage: &mut dyn Storage, tx: &Tx<CanonicalAddr>, decoys: Option<&Decoys> ) -> StdResult<()>
pub fn txs( &self, deps: Deps<'_>, page: u32, page_size: u32, filter_decoys: bool ) -> StdResult<(Vec<RichTx>, u64)>
pub fn transfers( &self, deps: Deps<'_>, page: u32, page_size: u32, filter_decoys: bool ) -> StdResult<(Vec<Tx<Addr>>, u64)>
Trait Implementations§
source§impl From<Account> for CanonicalAddr
impl From<Account> for CanonicalAddr
source§impl From<CanonicalAddr> for Account
impl From<CanonicalAddr> for Account
source§fn from(addr: CanonicalAddr) -> Self
fn from(addr: CanonicalAddr) -> Self
Converts to this type from the input type.
source§impl PartialEq<Account> for Account
impl PartialEq<Account> for Account
impl StructuralPartialEq for Account
Auto Trait Implementations§
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more