> For the complete documentation index, see [llms.txt](https://ryan-44.gitbook.io/portrait/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ryan-44.gitbook.io/portrait/portrait-sdk/user-portraits/read/getportraithash.md).

# getPortraitHash()

```typescript
/**
   * 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);
  }
```
