Class: PredeterminedOrderCalculationMethod
PredeterminedOrderCalculationMethod represents the order calculation method for the predetermined balances. Only one option can be set to true. For manual…
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:744
PredeterminedOrderCalculationMethod represents the order calculation method for the predetermined balances. Only one option can be set to true. For manual balances, the order number corresponds to the index of the balance in the array. For incremented balances, the order number corresponds to the number of times we increment.
Extends
CustomTypeClass<PredeterminedOrderCalculationMethod>
Implements
Constructors
Constructor
new PredeterminedOrderCalculationMethod(
msg):PredeterminedOrderCalculationMethod
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:755
Parameters
msg
iPredeterminedOrderCalculationMethod
Returns
PredeterminedOrderCalculationMethod
Overrides
Properties
challengeTrackerId
challengeTrackerId:
string
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:753
Use the merkle challenge leaf index as the order number. Must specify ONE merkle challenge with the useLeafIndexForTransferOrder flag set to true. If so, we will use the leaf index of each merkle proof to calculate the order number. This is used to reserve specific balances for specific leaves (such as codes or whitelist address leafs)
Implementation of
iPredeterminedOrderCalculationMethod.challengeTrackerId
useMerkleChallengeLeafIndex
useMerkleChallengeLeafIndex:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:752
Use the merkle challenge leaf index as the order number. Must specify ONE merkle challenge with the useLeafIndexForTransferOrder flag set to true. If so, we will use the leaf index of each merkle proof to calculate the order number. This is used to reserve specific balances for specific leaves (such as codes or whitelist address leafs)
Implementation of
iPredeterminedOrderCalculationMethod.useMerkleChallengeLeafIndex
useOverallNumTransfers
useOverallNumTransfers:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:748
Use the overall number of transfers this approval has been used with as the order number. Ex: If this approval has been used 2 times by ANY address, then the order number for the next transfer will be 3.
Implementation of
iPredeterminedOrderCalculationMethod.useOverallNumTransfers
usePerFromAddressNumTransfers
usePerFromAddressNumTransfers:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:750
Use the number of times this approval has been used by each from address as the order number. Ex: If this approval has been used 2 times by from address A, then the order number for the next transfer by from address A will be 3.
Implementation of
iPredeterminedOrderCalculationMethod.usePerFromAddressNumTransfers
usePerInitiatedByAddressNumTransfers
usePerInitiatedByAddressNumTransfers:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:751
Use the number of times this approval has been used by each initiated by address as the order number. Ex: If this approval has been used 2 times by initiated by address A, then the order number for the next transfer by initiated by address A will be 3.
Implementation of
iPredeterminedOrderCalculationMethod.usePerInitiatedByAddressNumTransfers
usePerToAddressNumTransfers
usePerToAddressNumTransfers:
boolean
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:749
Use the number of times this approval has been used by each to address as the order number. Ex: If this approval has been used 2 times by to address A, then the order number for the next transfer by to address A will be 3.
Implementation of
iPredeterminedOrderCalculationMethod.usePerToAddressNumTransfers
Methods
clone()
clone():
PredeterminedOrderCalculationMethod
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:105
Deep copies the object and returns a new instance.
Returns
PredeterminedOrderCalculationMethod
Inherited from
convert()
convert<
U>(_convertFunction?,options?):CustomType<any>
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:124
Type Parameters
U
U extends NumberType
Parameters
_convertFunction?
(val) => U
options?
Returns
CustomType<any>
Deprecated
This function is unnecessary as this field has no numeric types.
Please use the .clone() method instead.
Inherited from
equals()
equals<
U>(other,normalizeNumberTypes?):boolean
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:101
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/common/base.ts:111
Internal helper method to convert the number fields of the object to a different NumberType equivalent.
Returns
string[]
Inherited from
CustomTypeClass.getNumberFieldNames
hasNumberFields()
hasNumberFields():
boolean
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:115
Checks if the object has number fields.
Returns
boolean
Inherited from
CustomTypeClass.hasNumberFields
toJson()
toJson():
JsonObject
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:93
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:97
Converts the object to a JSON string.
Returns
string
Inherited from
toProto()
toProto():
PredeterminedOrderCalculationMethod
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:765
Returns
PredeterminedOrderCalculationMethod
fromJson()
staticfromJson(jsonValue,options?):PredeterminedOrderCalculationMethod
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:769
Parameters
jsonValue
JsonValue
options?
Partial<JsonReadOptions>
Returns
PredeterminedOrderCalculationMethod
fromJsonString()
staticfromJsonString(jsonString,options?):PredeterminedOrderCalculationMethod
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:773
Parameters
jsonString
string
options?
Partial<JsonReadOptions>
Returns
PredeterminedOrderCalculationMethod
fromProto()
staticfromProto(item):PredeterminedOrderCalculationMethod
Defined in: packages/bitbadgesjs-sdk/src/core/approvals.ts:777
Parameters
item
PredeterminedOrderCalculationMethod
Returns
PredeterminedOrderCalculationMethod