Class: TransferWithIncrements<T>
TransferWithIncrements is a type that is used to better handle batch transfers, potentially with incremented tokenIDs.
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:176
TransferWithIncrements is a type that is used to better handle batch transfers, potentially with incremented tokenIDs.
Remarks
For example, if you have 100 addresses and want to send 1 token to each address, you would set toAddressesLength to 100 and incrementIdsBy to 1. This would send token IDs 1 to the first address, 2 to the second, and so on.
See
This type is compatible with the getBalancesAfterTransfers function and the getTransfersFromTransfersWithIncrements function.
Extends
BaseNumberTypeClass<TransferWithIncrements<T>>
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new TransferWithIncrements<
T>(data):TransferWithIncrements<T>
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:195
Parameters
data
Returns
TransferWithIncrements<T>
Overrides
BaseNumberTypeClass.constructor
Properties
balances
balances:
BalanceArray<T>
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:186
The balances to transfer.
Implementation of
iTransferWithIncrements.balances
durationFromTimestamp?
optionaldurationFromTimestamp?:T
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:183
The number of unix milliseconds to approve starting from now.
Implementation of
iTransferWithIncrements.durationFromTimestamp
from
from:
string
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:184
The address to transfer from.
Implementation of
incrementOwnershipTimesBy?
optionalincrementOwnershipTimesBy?:T
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:182
The number to increment the ownershipTimes by for each transfer.
Implementation of
iTransferWithIncrements.incrementOwnershipTimesBy
incrementTokenIdsBy?
optionalincrementTokenIdsBy?:T
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:181
The number to increment the tokenIDs by for each transfer.
Implementation of
iTransferWithIncrements.incrementTokenIdsBy
memo?
optionalmemo?:string
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:189
Arbitrary memo for the transfer.
Implementation of
merkleProofs?
optionalmerkleProofs?:MerkleProof[]
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:188
The merkle proofs that satisfy the mkerkle challenges in the approvals. If the transfer deducts from multiple approvals, we check all the merkle proofs and assert at least one is valid for every challenge.
Implementation of
iTransferWithIncrements.merkleProofs
onlyCheckPrioritizedCollectionApprovals?
optionalonlyCheckPrioritizedCollectionApprovals?:boolean
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:191
Whether or not to only check the prioritized approvals. If false, we will check all approvals with any prioritized first.
This only applies to the "collection" level approvals specified.
Implementation of
iTransferWithIncrements.onlyCheckPrioritizedCollectionApprovals
onlyCheckPrioritizedIncomingApprovals?
optionalonlyCheckPrioritizedIncomingApprovals?:boolean
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:192
Whether or not to only check the prioritized approvals. If false, we will check all approvals with any prioritized first.
This only applies to the "incoming" level approvals specified.
Implementation of
iTransferWithIncrements.onlyCheckPrioritizedIncomingApprovals
onlyCheckPrioritizedOutgoingApprovals?
optionalonlyCheckPrioritizedOutgoingApprovals?:boolean
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:193
Whether or not to only check the prioritized approvals. If false, we will check all approvals with any prioritized first.
This only applies to the "outgoing" level approvals specified.
Implementation of
iTransferWithIncrements.onlyCheckPrioritizedOutgoingApprovals
precalculateBalancesFromApproval?
optionalprecalculateBalancesFromApproval?:PrecalculateBalancesFromApprovalDetails<T>
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:187
If specified, we will precalculate from this approval and override the balances. This can only be used when the specified approval has predeterminedBalances set.
Implementation of
iTransferWithIncrements.precalculateBalancesFromApproval
prioritizedApprovals?
optionalprioritizedApprovals?:ApprovalIdentifierDetails<T>[]
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:190
The prioritized approvals to use for the transfer. If specified, we will check these first.
Implementation of
iTransferWithIncrements.prioritizedApprovals
toAddresses
toAddresses:
string[]
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:185
The addresses to transfer to.
Implementation of
iTransferWithIncrements.toAddresses
toAddressesLength?
optionaltoAddressesLength?:T
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:180
The number of addresses to send the tokens to. This takes priority over toAddresses.length (used when you don't know exact addresses (i.e. you know number of codes)).
Implementation of
iTransferWithIncrements.toAddressesLength
Methods
clone()
clone():
TransferWithIncrements
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151
Deep copies the object and returns a new instance.
Returns
TransferWithIncrements
Inherited from
convert()
convert<
U>(convertFunction,options?):TransferWithIncrements<U>
Defined in: packages/bitbadgesjs-sdk/src/core/transfers.ts:219
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
TransferWithIncrements<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/transfers.ts:215
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