Provides a Sybil-resistance service by verifying various aspects of a user's NEAR Social profile, e.g. profile completeness (more checks to come soon)
pub type TimestampMs = u64;pub struct Contract {
owner: AccountId,
verified_complete_profiles: UnorderedMap<AccountId, TimestampMs>,
}pub enum CheckType {
CompleteSocialProfile,
}
pub struct CheckExternal {
account_id: AccountId,
check_type: CheckType,
verified_at: TimestampMs,
}// INIT
pub fn new(owner: Option<AccountId>) -> Self
// CHECKS
#[payable]
pub fn verify_social_profile_completeness(&mut self) -> bool // Uses approx. 190 bytes of storage. returns True if social profile was successfully verified as complete.
pub fn remove_complete_social_profile_check(&mut self)// CHECKS
pub fn has_complete_social_profile_check(&self, account_id: AccountId) -> bool
pub fn fetch_complete_social_profile_check(
&self,
account_id: AccountId,
) -> Option<CheckExternal>