Skip to content

Sybil Provider that utilizes NEAR Social profile for humanity checks

Notifications You must be signed in to change notification settings

PotLock/near-social-sybil-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEAR Social Sybil Provider

Purpose

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)

Contract Structure

General Types

pub type TimestampMs = u64;

Contract

pub struct Contract {
    owner: AccountId,
    verified_complete_profiles: UnorderedMap<AccountId, TimestampMs>,
}

Checks

pub enum CheckType {
    CompleteSocialProfile,
}

pub struct CheckExternal {
    account_id: AccountId,
    check_type: CheckType,
    verified_at: TimestampMs,
}

Methods

Write Methods

// 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)

Read Methods

// 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>

About

Sybil Provider that utilizes NEAR Social profile for humanity checks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •