pub struct AssetQueryApi<'api> { /* private fields */ }
Implementations§
Source§impl<'api> AssetQueryApi<'api>
impl<'api> AssetQueryApi<'api>
Sourcepub async fn unique_ticker_registration(
&self,
key_0: Ticker,
) -> Result<Option<TickerRegistration<u64>>>
pub async fn unique_ticker_registration( &self, key_0: Ticker, ) -> Result<Option<TickerRegistration<u64>>>
Maps each [Ticker
] to its registration details ([TickerRegistration
]).
Sourcepub async fn ticker_config(&self) -> Result<TickerRegistrationConfig<u64>>
pub async fn ticker_config(&self) -> Result<TickerRegistrationConfig<u64>>
Returns [TickerRegistrationConfig
] for assessing if a ticker is valid.
Sourcepub async fn assets(&self, key_0: AssetId) -> Result<Option<AssetDetails>>
pub async fn assets(&self, key_0: AssetId) -> Result<Option<AssetDetails>>
Maps each [AssetId
] to its underling [AssetDetails
].
Sourcepub async fn asset_names(&self, key_0: AssetId) -> Result<Option<AssetName>>
pub async fn asset_names(&self, key_0: AssetId) -> Result<Option<AssetName>>
Maps each [AssetId
] to its underling [AssetName
].
Sourcepub async fn balance_of(
&self,
key_0: AssetId,
key_1: IdentityId,
) -> Result<u128>
pub async fn balance_of( &self, key_0: AssetId, key_1: IdentityId, ) -> Result<u128>
Tracks the total [Balance
] for each [AssetId
] per [IdentityId
].
Sourcepub async fn asset_identifiers(
&self,
key_0: AssetId,
) -> Result<Vec<AssetIdentifier>>
pub async fn asset_identifiers( &self, key_0: AssetId, ) -> Result<Vec<AssetIdentifier>>
Maps each [AssetId
] to its asset identifiers ([AssetIdentifier
]).
Sourcepub async fn custom_type_id_sequence(&self) -> Result<CustomAssetTypeId>
pub async fn custom_type_id_sequence(&self) -> Result<CustomAssetTypeId>
The next AssetType::Custom
ID in the sequence.
Numbers in the sequence start from 1 rather than 0.
Sourcepub async fn custom_types(&self, key_0: CustomAssetTypeId) -> Result<Vec<u8>>
pub async fn custom_types(&self, key_0: CustomAssetTypeId) -> Result<Vec<u8>>
Maps custom asset type ids to the registered string contents.
Sourcepub async fn custom_types_inverse(
&self,
key_0: Vec<u8>,
) -> Result<Option<CustomAssetTypeId>>
pub async fn custom_types_inverse( &self, key_0: Vec<u8>, ) -> Result<Option<CustomAssetTypeId>>
Inverse map of CustomTypes
, from registered string contents to custom asset type ids.
Sourcepub async fn funding_round(&self, key_0: AssetId) -> Result<FundingRoundName>
pub async fn funding_round(&self, key_0: AssetId) -> Result<FundingRoundName>
Maps each [AssetId
] to the name of its founding round ([FundingRoundName
]).
Sourcepub async fn issued_in_funding_round(
&self,
key_0: (AssetId, FundingRoundName),
) -> Result<u128>
pub async fn issued_in_funding_round( &self, key_0: (AssetId, FundingRoundName), ) -> Result<u128>
The total [Balance
] of tokens issued in all recorded funding rounds ([FundingRoundName
]).
Sourcepub async fn frozen(&self, key_0: AssetId) -> Result<bool>
pub async fn frozen(&self, key_0: AssetId) -> Result<bool>
Returns true
if transfers for the token associated to [AssetId
] are frozen. Otherwise, returns false
.
Sourcepub async fn asset_documents(
&self,
key_0: AssetId,
key_1: DocumentId,
) -> Result<Option<Document>>
pub async fn asset_documents( &self, key_0: AssetId, key_1: DocumentId, ) -> Result<Option<Document>>
All [Document
] attached to an asset.
Sourcepub async fn asset_documents_id_sequence(
&self,
key_0: AssetId,
) -> Result<DocumentId>
pub async fn asset_documents_id_sequence( &self, key_0: AssetId, ) -> Result<DocumentId>
[DocumentId
] counter per [AssetId
].
Sourcepub async fn asset_metadata_values(
&self,
key_0: AssetId,
key_1: AssetMetadataKey,
) -> Result<Option<AssetMetadataValue>>
pub async fn asset_metadata_values( &self, key_0: AssetId, key_1: AssetMetadataKey, ) -> Result<Option<AssetMetadataValue>>
Metatdata values for an asset.
Sourcepub async fn asset_metadata_value_details(
&self,
key_0: AssetId,
key_1: AssetMetadataKey,
) -> Result<Option<AssetMetadataValueDetail<u64>>>
pub async fn asset_metadata_value_details( &self, key_0: AssetId, key_1: AssetMetadataKey, ) -> Result<Option<AssetMetadataValueDetail<u64>>>
Details for an asset’s Metadata values.
Sourcepub async fn asset_metadata_local_name_to_key(
&self,
key_0: AssetId,
key_1: AssetMetadataName,
) -> Result<Option<AssetMetadataLocalKey>>
pub async fn asset_metadata_local_name_to_key( &self, key_0: AssetId, key_1: AssetMetadataName, ) -> Result<Option<AssetMetadataLocalKey>>
Asset Metadata Local Name -> Key.
Sourcepub async fn asset_metadata_global_name_to_key(
&self,
key_0: AssetMetadataName,
) -> Result<Option<AssetMetadataGlobalKey>>
pub async fn asset_metadata_global_name_to_key( &self, key_0: AssetMetadataName, ) -> Result<Option<AssetMetadataGlobalKey>>
Asset Metadata Global Name -> Key.
Sourcepub async fn asset_metadata_local_key_to_name(
&self,
key_0: AssetId,
key_1: AssetMetadataLocalKey,
) -> Result<Option<AssetMetadataName>>
pub async fn asset_metadata_local_key_to_name( &self, key_0: AssetId, key_1: AssetMetadataLocalKey, ) -> Result<Option<AssetMetadataName>>
Asset Metadata Local Key -> Name.
Sourcepub async fn asset_metadata_global_key_to_name(
&self,
key_0: AssetMetadataGlobalKey,
) -> Result<Option<AssetMetadataName>>
pub async fn asset_metadata_global_key_to_name( &self, key_0: AssetMetadataGlobalKey, ) -> Result<Option<AssetMetadataName>>
Asset Metadata Global Key -> Name.
Sourcepub async fn asset_metadata_local_specs(
&self,
key_0: AssetId,
key_1: AssetMetadataLocalKey,
) -> Result<Option<AssetMetadataSpec>>
pub async fn asset_metadata_local_specs( &self, key_0: AssetId, key_1: AssetMetadataLocalKey, ) -> Result<Option<AssetMetadataSpec>>
Asset Metadata Local Key specs.
Sourcepub async fn asset_metadata_global_specs(
&self,
key_0: AssetMetadataGlobalKey,
) -> Result<Option<AssetMetadataSpec>>
pub async fn asset_metadata_global_specs( &self, key_0: AssetMetadataGlobalKey, ) -> Result<Option<AssetMetadataSpec>>
Asset Metadata Global Key specs.
Sourcepub async fn assets_exempt_from_affirmation(
&self,
key_0: AssetId,
) -> Result<bool>
pub async fn assets_exempt_from_affirmation( &self, key_0: AssetId, ) -> Result<bool>
A list of assets that exempt all users from affirming its receivement.
Sourcepub async fn pre_approved_asset(
&self,
key_0: IdentityId,
key_1: AssetId,
) -> Result<bool>
pub async fn pre_approved_asset( &self, key_0: IdentityId, key_1: AssetId, ) -> Result<bool>
All assets that don’t need an affirmation to be received by an identity.
Sourcepub async fn mandatory_mediators(
&self,
key_0: AssetId,
) -> Result<BTreeSet<IdentityId>>
pub async fn mandatory_mediators( &self, key_0: AssetId, ) -> Result<BTreeSet<IdentityId>>
The list of mandatory mediators for every ticker.
Sourcepub async fn current_asset_metadata_local_key(
&self,
key_0: AssetId,
) -> Result<Option<AssetMetadataLocalKey>>
pub async fn current_asset_metadata_local_key( &self, key_0: AssetId, ) -> Result<Option<AssetMetadataLocalKey>>
The last [AssetMetadataLocalKey
] used for [AssetId
].
Sourcepub async fn current_asset_metadata_global_key(
&self,
) -> Result<Option<AssetMetadataGlobalKey>>
pub async fn current_asset_metadata_global_key( &self, ) -> Result<Option<AssetMetadataGlobalKey>>
The last [AssetMetadataGlobalKey
] used for a global key.
Sourcepub async fn tickers_owned_by_user(
&self,
key_0: IdentityId,
key_1: Ticker,
) -> Result<bool>
pub async fn tickers_owned_by_user( &self, key_0: IdentityId, key_1: Ticker, ) -> Result<bool>
All tickers owned by a user.
Sourcepub async fn security_tokens_owned_by_user(
&self,
key_0: IdentityId,
key_1: AssetId,
) -> Result<bool>
pub async fn security_tokens_owned_by_user( &self, key_0: IdentityId, key_1: AssetId, ) -> Result<bool>
All security tokens owned by a user.
Sourcepub async fn asset_id_ticker(&self, key_0: AssetId) -> Result<Option<Ticker>>
pub async fn asset_id_ticker(&self, key_0: AssetId) -> Result<Option<Ticker>>
Maps all [AssetId
] that are mapped to a [Ticker
].
Sourcepub async fn ticker_asset_id(&self, key_0: Ticker) -> Result<Option<AssetId>>
pub async fn ticker_asset_id(&self, key_0: Ticker) -> Result<Option<AssetId>>
Maps all [Ticker
] that are linked to an [AssetId
].
Sourcepub async fn asset_nonce(&self, key_0: AccountId) -> Result<u64>
pub async fn asset_nonce(&self, key_0: AccountId) -> Result<u64>
A per account nonce that is used for generating an [AssetId
].
Sourcepub async fn storage_version(&self) -> Result<Version>
pub async fn storage_version(&self) -> Result<Version>
Storage version.
Trait Implementations§
Source§impl<'api> Clone for AssetQueryApi<'api>
impl<'api> Clone for AssetQueryApi<'api>
Source§fn clone(&self) -> AssetQueryApi<'api>
fn clone(&self) -> AssetQueryApi<'api>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'api> Freeze for AssetQueryApi<'api>
impl<'api> !RefUnwindSafe for AssetQueryApi<'api>
impl<'api> Send for AssetQueryApi<'api>
impl<'api> Sync for AssetQueryApi<'api>
impl<'api> Unpin for AssetQueryApi<'api>
impl<'api> !UnwindSafe for AssetQueryApi<'api>
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
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moreSource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.