---
description: JavaScript User APIs
---

# User

## Set Nickname

| Name                             | Parameters Description                                                                   | Response |
| -------------------------------- | ---------------------------------------------------------------------------------------- | -------- |
| `setDisplayName(name, callback)` | <ul><li><code>name</code>: nick name</li><li><code>callback</code> (optional):</li></ul> | N/A      |

## Set Profile Image

| Name                          | Parameters Description                                                                               | Response |
| ----------------------------- | ---------------------------------------------------------------------------------------------------- | -------- |
| `setAvatarUrl(url, callback)` | <ul><li><code>url</code>: new profile image URL</li><li><code>callback</code> (optional): </li></ul> | N/A      |

## Query Profile Information

| Name                                   | Parameters Description                                                                                                                                                                  | Response                                                                                                     |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `getProfileInfo(userId,info,callback)` | <ul><li><code>userId</code>: user id</li><li><code>info</code> (optional): information requested (e.g. 'displayname', 'avatar_url')</li><li><code>callback</code> (optional):</li></ul> | <p>avatar_url: profile image</p><p>displayname: user nick name</p><p>wallet_address: user wallet address</p> |

## Generate userId by wallet address

| Name                    | Parameters Description       | Response               |
| ----------------------- | ---------------------------- | ---------------------- |
| `getUidByAddress(addr)` | `addr`: user wallet address； | userId: string \| null |
