A BadgeCollection is the top-level object for a collection of badges. It defines everything about the collection, such as the manager, metadata, etc.

All collections are identified by a collectionId assigned by the blockchain, which is a uint64 that increments (i.e. the first collection has ID 1).

All collections can have a manager who is responsible for managing the collection and can be granted certain admin permissions, such as the ability to mint new badges.

Certain fields are timeline-based, which means they may have different values at different block heights. We fetch the value according to the current time. For example, we may set the manager to be Alice from Time1 to Time2, and then set the manager to be Bob from Time2 to Time3.

Collections may have different balance types: standard vs. off-chain - indexed vs. inherited.vs off-chain - non-indexed vs non-public.

See documentation for more details.

from message badges.BadgeCollection

Hierarchy

Constructors

Properties

aliasAddress: string = ""

The generated address of the badge collection.

from field: string aliasAddress = 15;

badgeMetadataTimeline: proto.badges.BadgeMetadataTimeline[] = []

The metadata for each badge in the collection, also subject to changes over time.

from field: repeated badges.BadgeMetadataTimeline badgeMetadataTimeline = 3;

balancesType: string = ""

The type of balances this collection uses ("Standard", "Off-Chain - Indexed", "Off-Chain - Non-Indexed", or "Non-Public").

from field: string balancesType = 4;

collectionApprovals: proto.badges.CollectionApproval[] = []

Transferability of the collection for collections with standard balances, subject to changes over time. Overrides user approvals for a transfer if specified. Transfer must satisfy both user and collection-level approvals. Only applicable to on-chain balances.

from field: repeated badges.CollectionApproval collectionApprovals = 10;

collectionId: string = ""

The unique identifier for this collection. This is assigned by the blockchain. First collection has ID 1.

from field: string collectionId = 1;

collectionMetadataTimeline: proto.badges.CollectionMetadataTimeline[] = []

The metadata for the collection itself, which can vary over time.

from field: repeated badges.CollectionMetadataTimeline collectionMetadataTimeline = 2;

collectionPermissions?: proto.badges.CollectionPermissions

Permissions that define what the manager of the collection can do or not do.

from field: badges.CollectionPermissions collectionPermissions = 9;

createdBy: string = ""

The user or entity who created the badge collection.

from field: string createdBy = 14;

customDataTimeline: proto.badges.CustomDataTimeline[] = []

An arbitrary field that can store any data, subject to changes over time.

from field: repeated badges.CustomDataTimeline customDataTimeline = 7;

defaultBalances?: proto.badges.UserBalanceStore

The default store of a balance for a user, upon genesis.

from field: badges.UserBalanceStore defaultBalances = 13;

isArchivedTimeline: proto.badges.IsArchivedTimeline[] = []

Whether the collection is archived or not, subject to changes over time. When archived, it becomes read-only, and no transactions can be processed until it is unarchived.

from field: repeated badges.IsArchivedTimeline isArchivedTimeline = 12;

managerTimeline: proto.badges.ManagerTimeline[] = []

The address of the manager of this collection, subject to changes over time.

from field: repeated badges.ManagerTimeline managerTimeline = 8;

offChainBalancesMetadataTimeline: proto.badges.OffChainBalancesMetadataTimeline[] = []

Metadata for fetching balances for collections with off-chain balances, subject to changes over time.

from field: repeated badges.OffChainBalancesMetadataTimeline offChainBalancesMetadataTimeline = 5;

standardsTimeline: proto.badges.StandardsTimeline[] = []

Standards that define how to interpret the fields of the collection, subject to changes over time.

from field: repeated badges.StandardsTimeline standardsTimeline = 11;

validBadgeIds: proto.badges.UintRange[] = []

The valid badge IDs for this collection.

from field: repeated badges.UintRange validBadgeIds = 16;

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

Methods