bitbadgesjs-sdk - v0.22.7
    Preparing search index...

    Class CollectionPermissions

    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, TimedUpdateWithTokenIdsPermission, TokenIdsActionPermission, 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.
    • TimedUpdateWithTokenIdsPermission: defines when the manager can update a timeline-based field for specific tokens and what times of the timeline can be updated.
    • TokenIdsActionPermission: defines when the manager can perform an action for specific tokens
    • 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 token 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).

    from message badges.CollectionPermissions

    Hierarchy

    Index

    Constructors

    Properties

    canArchiveCollection: badges.TimedUpdatePermission[] = []

    Permissions related to archiving the collection.

    from field: repeated badges.TimedUpdatePermission canArchiveCollection = 2;

    canDeleteCollection: badges.ActionPermission[] = []

    Permissions related to deleting the collection.

    from field: repeated badges.ActionPermission canDeleteCollection = 1;

    canUpdateCollectionApprovals: badges.CollectionApprovalPermission[] = []

    Permissions related to updating collection approvals.

    from field: repeated badges.CollectionApprovalPermission canUpdateCollectionApprovals = 9;

    canUpdateCollectionMetadata: badges.TimedUpdatePermission[] = []

    Permissions related to updating the metadata of the collection.

    from field: repeated badges.TimedUpdatePermission canUpdateCollectionMetadata = 6;

    canUpdateCustomData: badges.TimedUpdatePermission[] = []

    Permissions related to updating custom data for the collection.

    from field: repeated badges.TimedUpdatePermission canUpdateCustomData = 4;

    canUpdateManager: badges.TimedUpdatePermission[] = []

    Permissions related to updating the collection's manager.

    from field: repeated badges.TimedUpdatePermission canUpdateManager = 5;

    canUpdateStandards: badges.TimedUpdatePermission[] = []

    Permissions related to updating standards for the collection.

    from field: repeated badges.TimedUpdatePermission canUpdateStandards = 3;

    canUpdateTokenMetadata: badges.TimedUpdateWithTokenIdsPermission[] = []

    Permissions related to updating token metadata for specific tokens.

    from field: repeated badges.TimedUpdateWithTokenIdsPermission canUpdateTokenMetadata = 8;

    canUpdateValidTokenIds: badges.TokenIdsActionPermission[] = []

    Permissions related to creating more tokens for the collection.

    from field: repeated badges.TokenIdsActionPermission canUpdateValidTokenIds = 7;

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

    Methods