CollectionPermissions defines the permissions for the collection (i.e., what the manager can and cannot do).

There are five types of permissions for a collection: ActionPermission, TimedUpdatePermission, TimedUpdateWithBadgeIdsPermission, BalancesActionPermission, and CollectionApprovalPermission.

The permission type allows fine-grained access control for each action.

  • ActionPermission: defines when the manager can perform an action.
  • TimedUpdatePermission: defines when the manager can update a timeline-based field and what times of the timeline can be updated.
  • TimedUpdateWithBadgeIdsPermission: defines when the manager can update a timeline-based field for specific badges and what times of the timeline can be updated.
  • BalancesActionPermission: defines when the manager can perform an action for specific badges and specific badge ownership times.
  • CollectionApprovalPermission: defines when the manager can update the transferability of the collection and what transfers can be updated vs. locked.

Note there are a few different times here which could get confusing:

  • timelineTimes: the times when a timeline-based field is a specific value
  • permanentlyPermitted/ForbiddenTimes - the times that a permission can be performed
  • transferTimes - the times that a transfer occurs
  • ownershipTimes - the times when a badge is owned by a user

The permitted/permanentlyForbiddenTimes are used to determine when a permission can be executed. Once a time is set to be permitted or forbidden, it is PERMANENT and cannot be changed. If a time is not set to be permitted or forbidden, it is considered NEUTRAL and can be updated but is ALLOWED by default.

IMPORTANT: We take first-match only for the permissions. This means that if you forbid time T in array index 0 and permit time T in index 1, we will only check the first permission (forbid time T) and not the second permission (permit time T).

Generated

from message badges.CollectionPermissions

Hierarchy

Constructors

Properties

canArchiveCollection: proto.badges.TimedUpdatePermission[] = []

Permissions related to archiving the collection.

Generated

from field: repeated badges.TimedUpdatePermission canArchiveCollection = 2;

canCreateMoreBadges: proto.badges.BalancesActionPermission[] = []

Permissions related to creating more badges for the collection.

Generated

from field: repeated badges.BalancesActionPermission canCreateMoreBadges = 8;

canDeleteCollection: proto.badges.ActionPermission[] = []

Permissions related to deleting the collection.

Generated

from field: repeated badges.ActionPermission canDeleteCollection = 1;

canUpdateBadgeMetadata: proto.badges.TimedUpdateWithBadgeIdsPermission[] = []

Permissions related to updating badge metadata for specific badges.

Generated

from field: repeated badges.TimedUpdateWithBadgeIdsPermission canUpdateBadgeMetadata = 9;

canUpdateCollectionApprovals: proto.badges.CollectionApprovalPermission[] = []

Permissions related to updating collection approvals.

Generated

from field: repeated badges.CollectionApprovalPermission canUpdateCollectionApprovals = 10;

canUpdateCollectionMetadata: proto.badges.TimedUpdatePermission[] = []

Permissions related to updating the metadata of the collection.

Generated

from field: repeated badges.TimedUpdatePermission canUpdateCollectionMetadata = 7;

canUpdateCustomData: proto.badges.TimedUpdatePermission[] = []

Permissions related to updating custom data for the collection.

Generated

from field: repeated badges.TimedUpdatePermission canUpdateCustomData = 5;

canUpdateManager: proto.badges.TimedUpdatePermission[] = []

Permissions related to updating the collection's manager.

Generated

from field: repeated badges.TimedUpdatePermission canUpdateManager = 6;

canUpdateOffChainBalancesMetadata: proto.badges.TimedUpdatePermission[] = []

Permissions related to updating off-chain balances metadata.

Generated

from field: repeated badges.TimedUpdatePermission canUpdateOffChainBalancesMetadata = 3;

canUpdateStandards: proto.badges.TimedUpdatePermission[] = []

Permissions related to updating standards for the collection.

Generated

from field: repeated badges.TimedUpdatePermission canUpdateStandards = 4;

fields: FieldList = ...
runtime: ProtoRuntime = proto3
typeName: "badges.CollectionPermissions" = "badges.CollectionPermissions"

Methods