orbis.updateProfile()

Used to for users to update their profile details.

How to use?

let res = await orbis.updateProfile({
  pfp: "https://...",
  username: "baptiste"
});

Parameters

  • content: JSON object containing the profile details with the following optional elements
  • pfp: string A valid URL pointing to the user’s profile picture
  • cover: string A valid URL pointing to the user’s cover picture
  • username: string Username of the user, not unique for now
  • description: string Description of the user
  • pfpIsNft: object Can be used to set an NFT as a verified profile picture
  • chain: string Only ethereum or polygon are supported
  • contract: string The contract address
  • tokenId: string The id of the token in the smart-contract
  • timestamp: string Current timestamp
  • data: object optional Can be used to attach some custom data to a profile

Example

/** Example to use a verified Azuki as a profile picture */
let res = await orbis.updateProfile({
  pfp: "https://...",
  username: "Baptiste",
  pfpIsNft: {
    chain: "ethereum",
    contract: "0xed5af388653567af2f388e6224dc7c4b3241c544",
    tokenId: "0x00000000000000000000000000000000000000000000000000000000000013c4",
    timestamp: "1658297026"
  }
});

Returns

{
  status: 200,
  doc: "kjzl6cwe1...e4wvxhiqj",
  result: "Success creating TileDocument."
}