To create a group following the ERC1155 standard, which allows you to utilize personal tokens as a collateral and mint group tokens, you would require to call the following function.
Your wallet should not have been signed up as a different avatar and once connected to SDK would be registered as s a group avatar in Circles v2.
You need to pass the profile and the address of the mint policy contract when calling the function.
There are some limits from the profile service:
Profile Name Length:
The maximum allowed length for profile names is 36 characters (config.maxNameLength
). This is enforced in the validateProfile
function, where it checks if the name exceeds this limit.
Profile Description Length:
The maximum allowed length for descriptions is 500 characters (config.descriptionLength
), and the validateProfile
function checks this.
Image URL Length:
The maximum allowed length for image URLs is 2000 characters (config.imageUrlLength
), validated in the same function.
Image Validation:
The code limits image size to 150 KB (config.maxImageSizeKB
), and images must be exactly 256x256 pixels (config.imageDimension
).
The supported image formats are PNG, JPEG, and GIF.
Incase, you want to check how to manage circles profiles, you can simply checkout this guide :
Setting Circles ProfilesThis method allows a group to mint new Group Circles using trusted collateral tokens. The group specifies which collateral to use and the corresponding amounts.
To invite group members, you need to trust them. Trusting them would simply mean that you are inviting them to join group and would be accepting their personal token as collateral. Now, once invited, a group member will require to trust the group avatar address so that they can mint the group tokens.
You would be requiring to initialize the Circles data property to find groups and get memberships.
Otherwise you can create an instance like this:
Functionality: This method allows you to fetch a list of groups from the Circles system, with options for pagination and filtering. This is useful for applications that need to display groups or for querying specific groups based on certain criteria.
Parameters:
pageSize
: A number specifying how many groups should be returned in the response.
params
: An optional parameter that can include various filters for the query, such as group types or statuses.
This method is designed to fetch all group memberships associated with a specific avatar. This is useful for applications that want to display or manage the groups that a user belongs to.
Parameters:
avatar
: A string representing the address of the avatar for which group memberships are being requested.
pageSize
: A number that specifies the maximum number of group memberships to return.
This method retrieves the total amount of Circles associated with the avatar, which can be either Personal Circles or Group Circles, depending on the calling context.