Class: ApprovalAmounts<T>
ApprovalAmounts represents the maximum approved amounts for the token IDs / ownership times of this approval. Can be set to 0 to represent an unlimited amount…
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:799
ApprovalAmounts represents the maximum approved amounts for the token IDs / ownership times of this approval. Can be set to 0 to represent an unlimited amount is approved. If set to non-zero value, we track the running tally of the amount approved for each token ID / ownership time. Once it reaches the max, no more transfers are allowed.
Note that we only track the approval amounts if the approval is defined and not unlimited. If it is unlimited, we do not tally.
Extends
BaseNumberTypeClass<ApprovalAmounts<T>>
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new ApprovalAmounts<
T>(msg):ApprovalAmounts<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:807
Parameters
msg
Returns
ApprovalAmounts<T>
Overrides
BaseNumberTypeClass.constructor
Properties
amountTrackerId
amountTrackerId:
string
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:804
The ID of the approval tracker. This is the key used to track tallies.
Implementation of
iApprovalAmounts.amountTrackerId
overallApprovalAmount
overallApprovalAmount:
T
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:800
The overall maximum amount approved for the tokenIDs and ownershipTimes. Running tally that includes all transfers that match this approval.
Implementation of
iApprovalAmounts.overallApprovalAmount
perFromAddressApprovalAmount
perFromAddressApprovalAmount:
T
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:802
The maximum amount approved for the tokenIDs and ownershipTimes for each from address. Running tally that includes all transfers from each unique from address that match this approval.
Implementation of
iApprovalAmounts.perFromAddressApprovalAmount
perInitiatedByAddressApprovalAmount
perInitiatedByAddressApprovalAmount:
T
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:803
The maximum amount approved for the tokenIDs and ownershipTimes for each initiated by address. Running tally that includes all transfers from each unique initiated by address that match this approval.
Implementation of
iApprovalAmounts.perInitiatedByAddressApprovalAmount
perToAddressApprovalAmount
perToAddressApprovalAmount:
T
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:801
The maximum amount approved for the tokenIDs and ownershipTimes for each to address. Running tally that includes all transfers from each unique to address that match this approval.
Implementation of
iApprovalAmounts.perToAddressApprovalAmount
resetTimeIntervals
resetTimeIntervals:
ResetTimeIntervals<T>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:805
The time intervals to reset the tracker at.
Implementation of
iApprovalAmounts.resetTimeIntervals
Methods
clone()
clone():
ApprovalAmounts
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
ApprovalAmounts
Inherited from
convert()
convert<
U>(convertFunction,options?):ApprovalAmounts<U>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:821
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
ApprovalAmounts<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/approvals.ts:817
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():
ApprovalAmounts
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:834
Returns
ApprovalAmounts
fromJson()
staticfromJson<U>(jsonValue,convertFunction,options?):ApprovalAmounts<U>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:838
Type Parameters
U
U extends NumberType
Parameters
jsonValue
JsonValue
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
ApprovalAmounts<U>
fromJsonString()
staticfromJsonString<U>(jsonString,convertFunction,options?):ApprovalAmounts<U>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:846
Type Parameters
U
U extends NumberType
Parameters
jsonString
string
convertFunction
(item) => U
options?
Partial<JsonReadOptions>
Returns
ApprovalAmounts<U>
fromProto()
staticfromProto<U>(item,convertFunction):ApprovalAmounts<U>
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:854
Type Parameters
U
U extends NumberType
Parameters
item
ApprovalAmounts
convertFunction
(item) => U
Returns
ApprovalAmounts<U>