Skip to main content

Honeycomb Profiles

One of the key features of Honeycomb Users is the ability for users to have multiple profiles for each platform. This allows users to tailor their identities and preferences specifically for different applications or services. By managing multiple profiles, users can maintain separate sets of data, preferences, and settings based on the context of each platform they interact with.

Even for a single project there can be differentiated with a profile level identity.

const project = honeycomb.project().address;
const identity = ... // undefined(default), string, PublicKey

await honeycomb.identity().create().profile(
project,
identity
);
const profile = await honeycomb.identity().profile(project, identity);

Handling Profile

The IdentityProfile and IdentityProfileEntity classes within Honeycomb provide an effortless and seamless way to interact with user profiles, allowing developers to manage and access user-project-specific data with ease. With straightforward methods and intuitive data structures, developers can create, update, and retrieve profile information without the complexity of traditional identity management systems.

When working with big amount of data a merkle tree is created on chain which verifies the authenticity of off chain data

Note: Profiles in Honeycomb are subject to the data configuration specified in the project settings. Only the data fields allowed and defined in the project configuration can be handled and stored in user profiles. Any additional or unauthorized data beyond the defined configuration will not be processed or stored. It is essential to ensure that the project configuration aligns with the intended data handling requirements for profiles.

// Managing profile data
const data: Map<string, string | string[] | IdentityProfileEntity<ProfileEntityData>> = profile.data;

await profile.add(
"Level", // Label of the data
"1", // Value must be of type string/string[]
)

await profile.set(
"Level", // Label of the data
"2", // Value must be of type string/string[]
)

await profile.remove("Level")

// Managing big amount of data
await profile.add(
"Achievements",
"tree"
)

const achievements = profile.entity("Achievements");

// Before doing anything you must set the previous data, so it won't corrupt the merkle tree
achievements.setLeaves(...);

achievements.add(...);

achievements.set(0, ...);

achievements.remove(0);

achievements.verifyProfileData(0);

API References