pub struct QueryApi<'api> { /* private fields */ }
Implementations§
source§impl<'api> QueryApi<'api>
impl<'api> QueryApi<'api>
sourcepub async fn tickers(&self, key_0: Ticker) -> Result<TickerRegistration<u64>>
pub async fn tickers(&self, key_0: Ticker) -> Result<TickerRegistration<u64>>
Ticker registration details. (ticker) -> TickerRegistration
sourcepub async fn ticker_config(&self) -> Result<TickerRegistrationConfig<u64>>
pub async fn ticker_config(&self) -> Result<TickerRegistrationConfig<u64>>
Ticker registration config. (ticker) -> TickerRegistrationConfig
sourcepub async fn tokens(&self, key_0: Ticker) -> Result<SecurityToken>
pub async fn tokens(&self, key_0: Ticker) -> Result<SecurityToken>
Details of the token corresponding to the token ticker. (ticker) -> SecurityToken details [returns SecurityToken struct]
sourcepub async fn asset_names(&self, key_0: Ticker) -> Result<AssetName>
pub async fn asset_names(&self, key_0: Ticker) -> Result<AssetName>
Asset name of the token corresponding to the token ticker.
(ticker) -> AssetName
sourcepub async fn balance_of(&self, key_0: Ticker, key_1: IdentityId) -> Result<u128>
pub async fn balance_of(&self, key_0: Ticker, key_1: IdentityId) -> Result<u128>
The total asset ticker balance per identity. (ticker, DID) -> Balance
sourcepub async fn identifiers(&self, key_0: Ticker) -> Result<Vec<AssetIdentifier>>
pub async fn identifiers(&self, key_0: Ticker) -> Result<Vec<AssetIdentifier>>
A map of a ticker name and asset identifiers.
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<CustomAssetTypeId>
pub async fn custom_types_inverse(
&self,
key_0: Vec<u8>
) -> Result<CustomAssetTypeId>
Inverse map of CustomTypes
, from registered string contents to custom asset type ids.
sourcepub async fn funding_round(&self, key_0: Ticker) -> Result<FundingRoundName>
pub async fn funding_round(&self, key_0: Ticker) -> Result<FundingRoundName>
The name of the current funding round. ticker -> funding round
sourcepub async fn issued_in_funding_round(
&self,
key_0: (Ticker, FundingRoundName)
) -> Result<u128>
pub async fn issued_in_funding_round(
&self,
key_0: (Ticker, FundingRoundName)
) -> Result<u128>
The total balances of tokens issued in all recorded funding rounds. (ticker, funding round) -> balance
sourcepub async fn frozen(&self, key_0: Ticker) -> Result<bool>
pub async fn frozen(&self, key_0: Ticker) -> Result<bool>
The set of frozen assets implemented as a membership map. ticker -> bool
sourcepub async fn asset_ownership_relations(
&self,
key_0: IdentityId,
key_1: Ticker
) -> Result<AssetOwnershipRelation>
pub async fn asset_ownership_relations(
&self,
key_0: IdentityId,
key_1: Ticker
) -> Result<AssetOwnershipRelation>
Tickers and token owned by a user (user, ticker) -> AssetOwnership
sourcepub async fn asset_documents(
&self,
key_0: Ticker,
key_1: DocumentId
) -> Result<Document>
pub async fn asset_documents(
&self,
key_0: Ticker,
key_1: DocumentId
) -> Result<Document>
Documents attached to an Asset (ticker, doc_id) -> document
sourcepub async fn asset_documents_id_sequence(
&self,
key_0: Ticker
) -> Result<DocumentId>
pub async fn asset_documents_id_sequence(
&self,
key_0: Ticker
) -> Result<DocumentId>
Per-ticker document ID counter. (ticker) -> doc_id
sourcepub async fn classic_tickers(
&self,
key_0: Ticker
) -> Result<Option<ClassicTickerRegistration>>
pub async fn classic_tickers(
&self,
key_0: Ticker
) -> Result<Option<ClassicTickerRegistration>>
Ticker registration details on Polymath Classic / Ethereum.
sourcepub async fn balance_of_at_scope(
&self,
key_0: IdentityId,
key_1: IdentityId
) -> Result<u128>
pub async fn balance_of_at_scope(
&self,
key_0: IdentityId,
key_1: IdentityId
) -> Result<u128>
Balances get stored on the basis of the ScopeId
.
Right now it is only helpful for the UI purposes but in future it can be used to do miracles on-chain.
(ScopeId, IdentityId) => Balance.
sourcepub async fn aggregate_balance(
&self,
key_0: Ticker,
key_1: IdentityId
) -> Result<u128>
pub async fn aggregate_balance(
&self,
key_0: Ticker,
key_1: IdentityId
) -> Result<u128>
Store aggregate balance of those identities that has the same ScopeId
.
(Ticker, ScopeId) => Balance.
sourcepub async fn scope_id_of(
&self,
key_0: Ticker,
key_1: IdentityId
) -> Result<IdentityId>
pub async fn scope_id_of(
&self,
key_0: Ticker,
key_1: IdentityId
) -> Result<IdentityId>
Tracks the ScopeId of the identity for a given ticker. (Ticker, IdentityId) => ScopeId.
sourcepub async fn disable_investor_uniqueness(&self, key_0: Ticker) -> Result<bool>
pub async fn disable_investor_uniqueness(&self, key_0: Ticker) -> Result<bool>
Decides whether investor uniqueness requirement is enforced for this asset.
false
means that it is enforced.
Ticker => bool.
sourcepub async fn asset_metadata_values(
&self,
key_0: Ticker,
key_1: AssetMetadataKey
) -> Result<Option<AssetMetadataValue>>
pub async fn asset_metadata_values(
&self,
key_0: Ticker,
key_1: AssetMetadataKey
) -> Result<Option<AssetMetadataValue>>
Metatdata values for an asset.
sourcepub async fn asset_metadata_value_details(
&self,
key_0: Ticker,
key_1: AssetMetadataKey
) -> Result<Option<AssetMetadataValueDetail<u64>>>
pub async fn asset_metadata_value_details(
&self,
key_0: Ticker,
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: Ticker,
key_1: AssetMetadataName
) -> Result<Option<AssetMetadataLocalKey>>
pub async fn asset_metadata_local_name_to_key(
&self,
key_0: Ticker,
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: Ticker,
key_1: AssetMetadataLocalKey
) -> Result<Option<AssetMetadataName>>
pub async fn asset_metadata_local_key_to_name(
&self,
key_0: Ticker,
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: Ticker,
key_1: AssetMetadataLocalKey
) -> Result<Option<AssetMetadataSpec>>
pub async fn asset_metadata_local_specs(
&self,
key_0: Ticker,
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 asset_metadata_next_local_key(
&self,
key_0: Ticker
) -> Result<AssetMetadataLocalKey>
pub async fn asset_metadata_next_local_key(
&self,
key_0: Ticker
) -> Result<AssetMetadataLocalKey>
Next Asset Metadata Local Key.
sourcepub async fn asset_metadata_next_global_key(
&self
) -> Result<AssetMetadataGlobalKey>
pub async fn asset_metadata_next_global_key(
&self
) -> Result<AssetMetadataGlobalKey>
Next Asset Metadata Global Key.
sourcepub async fn storage_version(&self) -> Result<Version>
pub async fn storage_version(&self) -> Result<Version>
Storage version.
Trait Implementations§
Auto Trait Implementations§
impl<'api> !RefUnwindSafe for QueryApi<'api>
impl<'api> Send for QueryApi<'api>
impl<'api> Sync for QueryApi<'api>
impl<'api> Unpin for QueryApi<'api>
impl<'api> !UnwindSafe for QueryApi<'api>
Blanket Implementations§
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.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> 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 more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.