Skip to main content

Delegation Permissions

Introduction

Making a project and managing it is a team effort. In Honeycomb, you can delegate permissions to other users to help you manage your project.

This page highlights all the delegate permissions available in Honeycomb Protocol and how much control each permission grants to the delegatee.

Delegation Permissions

Projects, Users, and Profiles

The project owner has full control over the project and they can manage all aspects of the project, including adding and removing team members, changing project settings, and they can delegate the following permissions for the HiveControl service:

  1. HiveControlPermissionInput.ManageProjectDriver: This permission allows the delegatee to add/change the project driver.
  2. HiveControlPermissionInput.ManageServices: This permission allows the delegatee to add or remove Honeycomb Protocol services from the project.
  3. HiveControlPermissionInput.ManageCriterias: This permission allows the delegatee to manage the project's badge criterias.
  4. HiveControlPermissionInput.UpdatePlatformData: This permission allows the delegatee to update the platform data of a project's profiles.

Chararcters

These are the permissions for the CharacterManager service:

  1. CharacterManager.ManageAssemblerConfig: This permission allows the delegatee to create and manage the assembler configuration.
  2. CharacterManager.ManageCharacterModels: This permissions allows the delegatee to add or remove character models into a project.
  3. CharacterManager.AssignCharacterTraits: This permission allows the delegatee to assign character traits to a character model.

Resources

These are the permissions for the ResourceManager service:

  1. ResourceManagerPermissionInput.CreateResources: This permission allows the delegatee to create new resources for a project.
  2. ResourceManagerPermissionInput.MintResources: This permission allows a delegatee to mint resources.
  3. ResourceManagerPermissionInput.BurnResources: This permission allows a delegatee to burn resources.
  4. ResourceManagerPermissionInput.CreateFaucet: This permission allows a delegatee to create a claim faucet.
  5. ResourceManagerPermissionInput.CreateRecipe: This permission allows a delegatee to define recipes for crafting/cooking items.

Missions

These are the permissions for the NectarMissions service:

  1. NectarMissionsPermissionInput.ManageMissionPool: This permission allows the delegatee to create and manage the mission pool.
  2. NectarMissionsPermissionInput.WithdrawMissionPoolRewards: This permission allows the delegatee to withdraw mission pool rewards.

Staking

These are the permissions for the NectarStaking service:

  1. NectarStakingPermissionInput.ManageStakingPool: This permission allows the delegatee to create and manage the staking pool.
  2. NectarStakingPermissionInput.WithdrawStakingPoolRewards: This permission allows the delegatee to withdraw staking pool rewards.

Example Usage

The following example demonstrates how to delegate permissions to another wallet:

import {
ResourceManagerPermissionInput,
CharacterManagerPermissionInput,
} from "@honeycomb-protocol/edge-client";
import client from "./utils";

const {
createCreateDelegateAuthorityTransaction: txResponse, // This is the transaction response, you'll need to sign and send this transaction
} = await client.createCreateDelegateAuthorityTransaction({
authority: adminPublicKey.toString(),
delegate: delegatePublicAddress.toString(),
project: projectAddress.toString(),
payer: txPayerPublicKey.toString(), // Optional, the transaction payer's public key
serviceDelegations: {
ResourceManager: [
{
permission: ResourceManagerPermissionInput.CreateResources,
},
],
CharacterManager: [
{
index: 0,
permission: CharacterManagerPermissionInput.ManageCharacterModels,
},
],
},
});

For each service, you can put an array in the serviceDelegations object. The arrays contain permission inputs for a given service. You can import the permission input enums from @honeycomb-protocol/edge-client. The example above shows how to delegate permissions for the ResourceManager and CharacterManager services.