Class: CollectionInvariants<T>
CollectionInvariants defines the invariants that apply to a collection. These are set upon genesis and cannot be modified.
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1662
CollectionInvariants defines the invariants that apply to a collection. These are set upon genesis and cannot be modified.
Extends
BaseNumberTypeClass<CollectionInvariants<T>>
Extended by
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new CollectionInvariants<
T>(data):CollectionInvariants<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1698
Parameters
data
Returns
CollectionInvariants<T>
Overrides
BaseNumberTypeClass.constructor
Properties
cosmosCoinBackedPath?
optionalcosmosCoinBackedPath?:CosmosCoinBackedPath<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1678
The IBC backed (sdk.coin) path for the collection. Only one path is allowed.
Implementation of
iCollectionInvariants.cosmosCoinBackedPath
disablePoolCreation
disablePoolCreation:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1690
If true, disallows pool creation with this collection's assets. When true, any attempt to create a pool with assets from this collection will fail.
Implementation of
iCollectionInvariants.disablePoolCreation
evmQueryChallenges?
optionalevmQueryChallenges?:EVMQueryChallenge<T>[]
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1696
EVM query invariants that must pass after all transfers complete. These are checked once per message after all balance updates, with access to ALL recipient addresses.
Implementation of
iCollectionInvariants.evmQueryChallenges
maxSupplyPerId
maxSupplyPerId:
T
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1673
Maximum supply per token ID. If set, no balance can exceed this amount. This prevents any single token ID from having more than the specified supply.
Implementation of
iCollectionInvariants.maxSupplyPerId
noCustomOwnershipTimes
noCustomOwnershipTimes:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1667
If true, all ownership times must be full ranges [{ start: 1, end: GoMaxUInt64 }]. This prevents time-based restrictions on token ownership.
Implementation of
iCollectionInvariants.noCustomOwnershipTimes
noForcefulPostMintTransfers
noForcefulPostMintTransfers:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1684
If true, disallows any collection approvals that have overridesFromOutgoingApprovals or overridesToIncomingApprovals set to true. This prevents forceful post-mint transfers that bypass user-level approvals.
Implementation of
iCollectionInvariants.noForcefulPostMintTransfers
Methods
clone()
clone():
CollectionInvariants
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
CollectionInvariants
Inherited from
convert()
convert<
U>(convertFunction,options?):CollectionInvariants<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1712
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
CollectionInvariants<U>
Overrides
equals()
equals<
U>(other,normalizeNumberTypes?):boolean
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:147
Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.
If normalizeNumberTypes is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").
Type Parameters
U
U extends CustomType<U>
Parameters
other
CustomType<U> | null | undefined
normalizeNumberTypes?
boolean
Returns
boolean
Inherited from
getNumberFieldNames()
getNumberFieldNames():
string[]
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1708
Internal helper method to convert the number fields of the object to a different NumberType equivalent.
Returns
string[]
Overrides
BaseNumberTypeClass.getNumberFieldNames
hasNumberFields()
hasNumberFields():
boolean
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:161
Checks if the object has number fields.
Returns
boolean
Inherited from
BaseNumberTypeClass.hasNumberFields
toJson()
toJson():
JsonObject
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:139
Converts the object to a JSON object with all primitive types.
Returns
JsonObject
Inherited from
toJsonString()
toJsonString():
string
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:143
Converts the object to a JSON string.
Returns
string
Inherited from
BaseNumberTypeClass.toJsonString
toProto()
toProto():
CollectionInvariants
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1716
Returns
CollectionInvariants
fromJson()
staticfromJson<T>(jsonValue,options?):CollectionInvariants<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1732
Type Parameters
T
T extends NumberType
Parameters
jsonValue
JsonValue
options?
Partial<JsonReadOptions>
Returns
CollectionInvariants<T>
fromJsonString()
staticfromJsonString<T>(jsonString,options?):CollectionInvariants<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1736
Type Parameters
T
T extends NumberType
Parameters
jsonString
string
options?
Partial<JsonReadOptions>
Returns
CollectionInvariants<T>
fromProto()
staticfromProto<T>(item,convertFunction):CollectionInvariants<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1740
Type Parameters
T
T extends NumberType
Parameters
item
CollectionInvariants
convertFunction
(val) => T
Returns
CollectionInvariants<T>