🚀
ProticoSDK
  • 👋Welcome to Protico
  • Overview
    • 💡What we do
    • ✨Our Features
  • SDK
    • 🛠️Getting started
    • 📝Web3 Providers
      • Use existing provider
      • Initialize ProticoAuthCore
        • MetaMask
        • WalletConnect
        • Web3Auth
      • Login
      • Full example
    • 🧑Interact with Ceramic
      • Setting up Ceramic
      • 👤Profile
      • 🤝Contacts
    • Use Protico APIs
      • ⚙️Settings
      • 📋Whiteboard
      • 🗒️Announcement
      • ▪️Blocklist
    • 🔑User Keys
      • Encryption / Decryption
    • Considerations
      • Protico API Key
      • Rate Limiting
Powered by GitBook
On this page
  • BasicProfile
  • Parameters description
  • Getting a user's profile
  • Parameters description
  • Updating a user's profile
  • Resetting a user's profile
  1. SDK
  2. Interact with Ceramic

Profile

Assuming that you've successfully finished Setting up Ceramic, you can now use it to read and write the user's profile.

BasicProfile

While more data can be stored in the user profile using Ceramic, we use the following profile structure in Protico.

interface BasicProfile {
  name?: string;
  description?: string;
  avatar_url?: string;
  public_key?: string;
  isENSVerified?: boolean;
  social_connections?: Contact[];
  id?: string;
}

Parameters description

Parameter
Description
Optional

name

Username

Yes

description

User bio showing in their profile

Yes

avatar_url

User profile picture's url

Yes

public_key

User public key, used for message encryption

Yes

isENSVerified

Whether the username has been verified as an ENS associated with the address

Yes

social_connections

Yes

id

User Ceramic ID Read only

Yes

Getting a user's profile

const profile: BasicProfile = await ceramicClient.profile.get(address:string);

Parameters description

Parameter
Description
Optional

address

Wallet address associated with the user

No

Updating a user's profile

You can update any part of the user's profile by passing a partial BasicProfile object to the update function:

const profile: BasicProfile = 
    await ceramicClient.profile.update(newProfile : Partial<BasicProfile>);

Resetting a user's profile

This will completely reset the user's profile by replacing it with a default one.

const profile: BasicProfile = await ceramicClient.profile.clear();
PreviousSetting up CeramicNextContacts

Last updated 1 year ago

User contacts Do not manipulate this field directly, check instead.

🧑
👤
Contacts