pub struct CheckpointQueryApi<'api> { /* private fields */ }
Implementations§
Source§impl<'api> CheckpointQueryApi<'api>
impl<'api> CheckpointQueryApi<'api>
Sourcepub async fn total_supply(
&self,
key_0: AssetId,
key_1: CheckpointId,
) -> Result<u128>
pub async fn total_supply( &self, key_0: AssetId, key_1: CheckpointId, ) -> Result<u128>
Total supply of the token at the checkpoint.
([AssetId
], checkpointId) -> total supply at given checkpoint
Sourcepub async fn balance(
&self,
key_0: (AssetId, CheckpointId),
key_1: IdentityId,
) -> Result<u128>
pub async fn balance( &self, key_0: (AssetId, CheckpointId), key_1: IdentityId, ) -> Result<u128>
Balance of a DID at a checkpoint.
([AssetId
], did, checkpoint ID) -> Balance of a DID at a checkpoint
Sourcepub async fn checkpoint_id_sequence(
&self,
key_0: AssetId,
) -> Result<CheckpointId>
pub async fn checkpoint_id_sequence( &self, key_0: AssetId, ) -> Result<CheckpointId>
Checkpoints ID generator sequence. ID of first checkpoint is 1 instead of 0.
([AssetId
]) -> no. of checkpoints
Sourcepub async fn balance_updates(
&self,
key_0: AssetId,
key_1: IdentityId,
) -> Result<Vec<CheckpointId>>
pub async fn balance_updates( &self, key_0: AssetId, key_1: IdentityId, ) -> Result<Vec<CheckpointId>>
Checkpoints where a DID’s balance was updated.
([AssetId
], did) -> [checkpoint ID where user balance changed]
Sourcepub async fn timestamps(
&self,
key_0: AssetId,
key_1: CheckpointId,
) -> Result<u64>
pub async fn timestamps( &self, key_0: AssetId, key_1: CheckpointId, ) -> Result<u64>
Checkpoint timestamps.
Every schedule-originated checkpoint maps its ID to its due time. Every checkpoint manually created maps its ID to the time of recording.
([AssetId
]) -> (checkpoint ID) -> checkpoint timestamp
Sourcepub async fn schedules_max_complexity(&self) -> Result<u64>
pub async fn schedules_max_complexity(&self) -> Result<u64>
The maximum complexity allowed for an asset’s schedules.
Sourcepub async fn schedule_id_sequence(&self, key_0: AssetId) -> Result<ScheduleId>
pub async fn schedule_id_sequence(&self, key_0: AssetId) -> Result<ScheduleId>
Checkpoint schedule ID sequence for assets.
([AssetId
]) -> schedule ID
Sourcepub async fn cached_next_checkpoints(
&self,
key_0: AssetId,
) -> Result<Option<NextCheckpoints>>
pub async fn cached_next_checkpoints( &self, key_0: AssetId, ) -> Result<Option<NextCheckpoints>>
Cached next checkpoint for each schedule.
This is used to quickly find the next checkpoint from a asset’s schedules.
([AssetId
]) -> next checkpoints
Sourcepub async fn scheduled_checkpoints(
&self,
key_0: AssetId,
key_1: ScheduleId,
) -> Result<Option<ScheduleCheckpoints>>
pub async fn scheduled_checkpoints( &self, key_0: AssetId, key_1: ScheduleId, ) -> Result<Option<ScheduleCheckpoints>>
Scheduled checkpoints.
([AssetId
], schedule ID) -> schedule checkpoints
Sourcepub async fn schedule_ref_count(
&self,
key_0: AssetId,
key_1: ScheduleId,
) -> Result<u32>
pub async fn schedule_ref_count( &self, key_0: AssetId, key_1: ScheduleId, ) -> Result<u32>
How many “strong” references are there to a given ScheduleId
?
The presence of a “strong” reference, in the sense of Rc<T>
,
entails that the referenced schedule cannot be removed.
Thus, as long as strong_ref_count(schedule_id) > 0
,
remove_schedule(schedule_id)
will error.
([AssetId
], schedule ID) -> strong ref count
Sourcepub async fn schedule_points(
&self,
key_0: AssetId,
key_1: ScheduleId,
) -> Result<Vec<CheckpointId>>
pub async fn schedule_points( &self, key_0: AssetId, key_1: ScheduleId, ) -> Result<Vec<CheckpointId>>
All the checkpoints a given schedule originated.
([AssetId
], schedule ID) -> [checkpoint ID]
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 CheckpointQueryApi<'api>
impl<'api> Clone for CheckpointQueryApi<'api>
Source§fn clone(&self) -> CheckpointQueryApi<'api>
fn clone(&self) -> CheckpointQueryApi<'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 CheckpointQueryApi<'api>
impl<'api> !RefUnwindSafe for CheckpointQueryApi<'api>
impl<'api> Send for CheckpointQueryApi<'api>
impl<'api> Sync for CheckpointQueryApi<'api>
impl<'api> Unpin for CheckpointQueryApi<'api>
impl<'api> !UnwindSafe for CheckpointQueryApi<'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
.