getPortraitHash()
/**
* Get a User Portrait Hash
* @param {UserPortraitAddress | UserPortraitENSName} identity - The identity of the user that the user would like to get a hash for.
* @returns {string} - The hash of the User Portrait.
* @beta
* @throws {Error} - Will throw an error if the identity is not a valid address or ENS name.
*/
getPortraitHash(identity: Identity): string {
const address = isAddress(identity)
? identity
: this.portrait.defaultProvider.resolveName(identity);
return this.portrait.portraitUserContract.getPersonalIpfsCID(address);
}
Last updated