Class: MustOwnTokens<T>
MustOwnToken is used to represent a must own token for an approval.
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:479
MustOwnToken is used to represent a must own token for an approval.
Extends
BaseNumberTypeClass<MustOwnTokens<T>>
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new MustOwnTokens<
T>(mustOwnToken):MustOwnTokens<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:488
Parameters
mustOwnToken
Returns
MustOwnTokens<T>
Overrides
BaseNumberTypeClass.constructor
Properties
amountRange
amountRange:
UintRange<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:480
The min/max acceptable amount of tokens that must be owned (can be any values, including 0-0).
Implementation of
collectionId
collectionId:
string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:487
The collection IDs to own.
Implementation of
mustSatisfyForAllAssets
mustSatisfyForAllAssets:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:483
Whether or not the user must own all the specified tokens. If false, we will accept if they meet criteria for at least one token.
Implementation of
iMustOwnTokens.mustSatisfyForAllAssets
overrideWithCurrentTime
overrideWithCurrentTime:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:482
Whether or not to override the ownershipTimes with the current time.
Implementation of
iMustOwnTokens.overrideWithCurrentTime
ownershipCheckParty?
optionalownershipCheckParty?:string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:485
The party to check ownership for. Options are "initiator", "sender", or "recipient". Defaults to "initiator" if empty.
Implementation of
iMustOwnTokens.ownershipCheckParty
ownershipTimes
ownershipTimes:
UintRangeArray<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:484
The range of the times that the tokens must be owned.
Implementation of
tokenIds
tokenIds:
UintRangeArray<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:481
The range of the token IDs that must be owned.
Implementation of
Methods
clone()
clone():
MustOwnTokens
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
MustOwnTokens
Inherited from
convert()
convert<
U>(convertFunction,options?):MustOwnTokens<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:503
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
MustOwnTokens<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:499
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():
MustOwnTokens
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:507
Returns
MustOwnTokens
fromJson()
staticfromJson<U>(jsonValue,convertFunction,options?):MustOwnTokens<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:511
Type Parameters
U
U extends NumberType
Parameters
jsonValue
JsonValue
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
MustOwnTokens<U>
fromJsonString()
staticfromJsonString<U>(jsonString,convertFunction,options?):MustOwnTokens<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:519
Type Parameters
U
U extends NumberType
Parameters
jsonString
string
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
MustOwnTokens<U>
fromProto()
staticfromProto<U>(item,convertFunction):MustOwnTokens<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:527
Type Parameters
U
U extends NumberType
Parameters
item
MustOwnTokens
convertFunction
(item) => U
Returns
MustOwnTokens<U>