Self Docs
  • Self Protocol
  • Use Self
    • Quickstart
    • Disclosures
    • Use deeplinking
    • Using mock passports
  • SDK Reference
    • SelfAppBuilder
    • SelfBackendVerifier
    • SelfQRcodeWrapper
  • Contract Integration
    • Basic Integration
    • Frontend Configuration
    • Deployed Contracts
    • Airdrop Example
    • Happy Birthday Example
    • Utilize Passport Attributes
  • Verification in the IdentityVerificationHub
  • Technical Docs
    • Overview
    • Architecture
Powered by GitBook
On this page
  1. SDK Reference

SelfBackendVerifier

The SelfBackendVerifier class is designed to facilitate the verification of user credentials and disclosures in applications using the Self system. It supports various modes of operation, allowing for both onchain and offchain proof verification. The class provides methods to configure verification parameters such as minimum age, nationality, and OFAC checks, and to generate intents for user interactions.

Parameters

Parameter
Type
Description

scope

string

An identifier for the application, used to distinguish different apps.

endpoint

string

The endpoint of the backend verifier.

user_identifier_type

UserIdType

The type of the user identifier. Hex denotes on chain addresses.

mockPassport

boolean

The passport type - false if the backend is verifying real passports.

Functions

Function
Parameters
Description
Output

setMinimumAge

age: number

Sets the minimum age requirement for verification. Throws an error if age is less than 10 or more than 100.

this

setNationality

country: (typeof countryNames)[number]

Sets the nationality requirement for verification.

this

excludeCountries

...countries: (typeof countryNames)[number][]

Excludes specified countries from verification.

this

enablePassportNoOfacCheck

Checks for the passport number in the OFAC list.

this

enableNameAndDobOfacCheck

Checks for the name and DOB (hashed together) in the OFAC list.

this

enableNameAndYobOfacCheck

Checks for the name and year of birth (hashed together) in the OFAC list.

this

verify

proof: OpenPassportAttestation

Verifies a proof against the configured verification parameters.

Promise<OpenPassportVerifierReport>

PreviousSelfAppBuilderNextSelfQRcodeWrapper

Last updated 1 month ago