pub struct AccountRegistry<'a, T: AccountVerification> { /* private fields */ }
Expand description
API for querying and verifying a sender’s identity in the context of Abstract Accounts.
§Example
use abstract_sdk::prelude::*;
let acc_registry: AccountRegistry<MockModule> = module.account_registry(deps.as_ref()).unwrap();
Implementations§
Source§impl<T: AccountVerification> AccountRegistry<'_, T>
impl<T: AccountVerification> AccountRegistry<'_, T>
Sourcepub fn assert_is_account(
&self,
maybe_account: &Addr,
) -> AbstractSdkResult<Account>
pub fn assert_is_account( &self, maybe_account: &Addr, ) -> AbstractSdkResult<Account>
Verify if the provided address is indeed an Abstract Account.
Sourcepub fn account(&self, account_id: &AccountId) -> AbstractSdkResult<Account>
pub fn account(&self, account_id: &AccountId) -> AbstractSdkResult<Account>
Get the account for a given account id.
Sourcepub fn account_id(
&self,
maybe_account_contract_addr: &Addr,
) -> AbstractSdkResult<AccountId>
pub fn account_id( &self, maybe_account_contract_addr: &Addr, ) -> AbstractSdkResult<AccountId>
Get AccountId for given address.
Sourcepub fn namespace_registration_fee(&self) -> AbstractSdkResult<Option<Coin>>
pub fn namespace_registration_fee(&self) -> AbstractSdkResult<Option<Coin>>
Get namespace registration fee
Sourcepub fn assert_is_account_admin(
&self,
env: &Env,
maybe_account: &Addr,
) -> AbstractSdkResult<Account>
pub fn assert_is_account_admin( &self, env: &Env, maybe_account: &Addr, ) -> AbstractSdkResult<Account>
Verify if the provided address is indeed an Abstract Account AND if the current execution has admin rights.
Trait Implementations§
Source§impl<'a, T: Clone + AccountVerification> Clone for AccountRegistry<'a, T>
impl<'a, T: Clone + AccountVerification> Clone for AccountRegistry<'a, T>
Source§fn clone(&self) -> AccountRegistry<'a, T>
fn clone(&self) -> AccountRegistry<'a, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a, T> Freeze for AccountRegistry<'a, T>
impl<'a, T> !RefUnwindSafe for AccountRegistry<'a, T>
impl<'a, T> !Send for AccountRegistry<'a, T>
impl<'a, T> !Sync for AccountRegistry<'a, T>
impl<'a, T> Unpin for AccountRegistry<'a, T>
impl<'a, T> !UnwindSafe for AccountRegistry<'a, T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more