hasBetaPass()

The hasBetaPass() function is a method that can be used to check if a user has access to the beta version of the Portrait Protocol. The beta version of the Portrait Protocol is currently in early development and is not publicly available. The only way to access the beta version of the Portrait Protocol is to acquire a beta pass.

Syntax

hasBetaPass(identity: UserPortraitAddress | UserPortraitENSName): boolean

Parameters

identity: A required parameter of type UserPortraitAddress or UserPortraitENSName. This parameter is the Ethereum address or ENS name of the user whose beta access is being checked.

Return Value

This function returns a boolean value. If the user has access to the beta version of the Portrait Protocol, it will return true. If the user does not have access to the beta version of the Portrait Protocol, it will return false.

Usage

This function is useful in situations where you need to check if a user has access to the beta version of the Portrait Protocol. The function takes an Ethereum address or ENS name as input and checks if the user has a beta pass.

Example

import { Portrait } from 'portrait-sdk';

const portrait = new Portrait()

const address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'; // Ethereum address
const hasBetaPass = portrait.hasBetaPass(address);

if (hasBetaPass) {
  console.log(`${address} has access to the beta version of the Portrait Protocol`);
} else {
  console.log(`${address} does not have access to the beta version of the Portrait Protocol`);
}

In this example, the hasBetaPass() function is used to check if the given Ethereum address has access to the beta version of the Portrait Protocol. If the address has access, the function logs a message indicating that the user has access. If the address does not have access, the function logs a message indicating that the user does not have access.

Last updated