updateProfile
Used to update a user's profile.
User must have an active session for this query to work.
How to use?
const res = await orbis.updateProfile(options);
Parameters
options
- object containing the profile details with the following optional elementspfp
-string
A valid URL pointing to the user's profile picturecover
-string
A valid URL pointing to the user's cover pictureusername
-string
Username of the user, not unique for nowdescription
-string
Description of the userpfpIsNft
-object
Can be used to set an NFT as a verified profile picturechain
-string
Only ethereum or polygon are supportedcontract
-string
The contract addresstokenId
-string
The id of the token in the smart-contracttimestamp
-string
Current timestamp
data
-object
optional
Can be used to attach some custom data to a profile
Returns
{
status: 200,
doc: "kjzl6cwe1...e4wvxhiqj",
result: "Success creating TileDocument."
}
Examples
Set an NFT as a profile picture
This example sets an Azuki NFT as a profile picture.
Ownership of the NFT will be verified by Orbis Nodes using an on-chain query.
const res = await orbis.updateProfile({
pfp: "https://...",
username: "Baptiste",
pfpIsNft: {
chain: "ethereum",
contract: "0xed5af388653567af2f388e6224dc7c4b3241c544",
tokenId: "0x00000000000000000000000000000000000000000000000000000000000013c4",
timestamp: "1658297026"
}
});