drive/query/
identity_token_info_drive_query.rs

1use crate::drive::Drive;
2use bincode::{Decode, Encode};
3use dpp::identifier::Identifier;
4use grovedb::PathQuery;
5
6/// Identity token info drive query struct
7#[derive(Debug, PartialEq, Clone, Encode, Decode)]
8pub struct IdentityTokenInfoDriveQuery {
9    /// The identity who we are querying for
10    pub identity_id: Identifier,
11    /// The token id
12    pub token_id: Identifier,
13}
14
15impl IdentityTokenInfoDriveQuery {
16    /// Operations to construct a path query.
17    pub fn construct_path_query(&self) -> PathQuery {
18        Drive::token_info_for_identity_id_query(
19            self.token_id.to_buffer(),
20            self.identity_id.to_buffer(),
21        )
22    }
23}