Class TransferWithIncrements<T>

TransferWithIncrements is a type that is used to better handle batch transfers, potentially with incremented badgeIDs.

For example, if you have 100 addresses and want to send 1 badge to each address, you would set toAddressesLength to 100 and incrementIdsBy to 1. This would send badgeIDs 1 to the first address, 2 to the second, and so on.

This type is compatible with the getBalancesAfterTransfers function and the getTransfersFromTransfersWithIncrements function.

Type Parameters

Hierarchy (view full)

Implements

Constructors

Properties

balances: BalanceArray<T>

The balances to transfer.

from: string

The address to transfer from.

incrementBadgeIdsBy?: T

The number to increment the badgeIDs by for each transfer.

incrementOwnershipTimesBy?: T

The number to increment the ownershipTimes by for each transfer.

memo?: string

Arbitrary memo for the transfer.

merkleProofs?: MerkleProof[]

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.

onlyCheckPrioritizedCollectionApprovals?: boolean

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.

onlyCheckPrioritizedIncomingApprovals?: boolean

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.

onlyCheckPrioritizedOutgoingApprovals?: boolean

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.

precalculateBalancesFromApproval?: ApprovalIdentifierDetails

If specified, we will precalculate from this approval and override the balances. This can only be used when the specified approval has predeterminedBalances set.

prioritizedApprovals?: ApprovalIdentifierDetails[]

The prioritized approvals to use for the transfer. If specified, we will check these first.

toAddresses: string[]

The addresses to transfer to.

toAddressesLength?: T

The number of addresses to send the badges to. This takes priority over toAddresses.length (used when you don't know exact addresses (i.e. you know number of codes)).

zkProofSolutions?: ZkProofSolution[]

The zk proof solutions for approvals.

Methods

  • 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

    Parameters

    • other: undefined | null | CustomType<U>
    • OptionalnormalizeNumberTypes: boolean

    Returns boolean