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-stringA valid URL pointing to the user's profile picturecover-stringA valid URL pointing to the user's cover pictureusername-stringUsername of the user, not unique for nowdescription-stringDescription of the userpfpIsNft-objectCan be used to set an NFT as a verified profile picturechain-stringOnly ethereum or polygon are supportedcontract-stringThe contract addresstokenId-stringThe id of the token in the smart-contracttimestamp-stringCurrent timestamp
data-objectoptionalCan 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"
}
});