pub trait CoinReadInternal {
// Required methods
fn get_state(&self) -> Arc<dyn StateRead>;
fn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
object_id: &'life1 ObjectID,
) -> Pin<Box<dyn Future<Output = RpcInterimResult<Option<Object>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_balance<'life0, 'async_trait>(
&'life0 self,
owner: SuiAddress,
coin_type: TypeTag,
) -> Pin<Box<dyn Future<Output = RpcInterimResult<TotalBalance>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all_balance<'life0, 'async_trait>(
&'life0 self,
owner: SuiAddress,
) -> Pin<Box<dyn Future<Output = RpcInterimResult<Arc<HashMap<TypeTag, TotalBalance>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_package_object<'life0, 'life1, 'async_trait>(
&'life0 self,
package_id: &'life1 ObjectID,
object_struct_tag: StructTag,
) -> Pin<Box<dyn Future<Output = RpcInterimResult<Object>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_coins_iterator<'life0, 'async_trait>(
&'life0 self,
owner: SuiAddress,
cursor: (String, u64, ObjectID),
limit: Option<usize>,
one_coin_type_only: bool,
) -> Pin<Box<dyn Future<Output = RpcInterimResult<CoinPage>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
CoinReadInternal trait to capture logic of interactions with AuthorityState and metrics This allows us to also mock internal implementation for testing