Setting Circles Profiles
Circles is built around the ERC-1155 token standard, which allows tokens to include metadata. Since Circles is all about personal currency, it makes sense to use this metadata to define a profile.
The profile data is stored on IPFS, and the Circles avatar references the CIDv0 of the profile on-chain. Using the profile interface from the Circles SDK, you can create user profiles for all avatars.
Required Field:
name
: A string representing the user's name
Optional Fields:
description
: A string for additional user informationpreviewImageUrl
: A string URL for a preview/thumbnail imageimageUrl
: A string URL for a full-size profile imagelocation
: A string representing the user's location (e.g., "Berlin, Germany")geoLocation
: A tuple of two numbers representing coordinates[latitude, longitude]
extensions
: A flexibleRecord
type for storing additional custom data
Example for creating user profile:
Let's create a test profile object.
You should already have circles SDK initialized to create profile.
Creating profile for your groups
The Group profile is used for groups created using Circles, each of which has its own token symbol. The GroupProfile
inherits all fields from the base Profile
—such as name
, description
, images, location
, etc.—and adds a required symbol
field representing the group's token symbol.
Profile schema
Profile picture
You can include a profile picture in the profile document (the previewImageUrl
). If you choose to do so, make sure the picture you are using has the following properties:
Format: The image must be in PNG, JPEG, or GIF format.
Dimensions: The image must be exactly 256x256 pixels.
File size: The image must not exceed 150KB.
Encoding: The image must be base64 encoded and included as a data URL in the
previewImageUrl
field.
These requirements are enforced by the server to ensure consistency and performance across the platform.
Profiles that don't adhere to the spec aren't considered and won't be served by Circles' profile service.
Last updated
Was this helpful?