Class MsgUpdateUserApprovals<T>

MsgUpdateUserApprovals represents the message for updating user approvals.

For a transfer to be successful, the transfer has to satisfy the following conditions:

  • Be approved on the collection level
  • Be approved by the recipient's incoming transfers (if not forcefully overriden by the collection)
  • Be approved by the sender's outgoing transfers (if not forcefully overriden by the collection)
  • The sender must have enough badges to transfer
  • All restrictions and challenges for each approval must be satisfied (merkle challenges, approved amounts, max num transfers, ...)

For successful execution, the user must have the necessary permissions to update the corresponding fields. If not, it will throw an error. Permissions are updated last, so any permissions checked are the permissions BEFORE the update.

To specify you would like to update a field, the corresponding update field must be set to true. If it is set to false, we ignore it.

Type Parameters

Hierarchy (view full)

Implements

Constructors

Properties

autoApproveSelfInitiatedIncomingTransfers?: boolean

The new auto approve self initiated incoming transfers. Must have the necessary permissions to update.

autoApproveSelfInitiatedOutgoingTransfers?: boolean

The new auto approve self initiated outgoing transfers. Must have the necessary permissions to update.

collectionId: T

The ID of the collection to transfer badges from.

creator: string

The creator of the transaction.

incomingApprovals?: UserIncomingApproval<T>[]

The new incoming approvals. Must have the necessary permissions to update.

outgoingApprovals?: UserOutgoingApproval<T>[]

The new outgoing approvals. Must have the necessary permissions to update.

updateAutoApproveSelfInitiatedIncomingTransfers?: boolean

Whether or not to update the auto approve self initiated incoming transfers (i.e. to == the user and initiator == the user).

updateAutoApproveSelfInitiatedOutgoingTransfers?: boolean

Whether or not to update the auto approve self initiated outgoing transfers (i.e. from == the user and initiator == the user).

updateIncomingApprovals?: boolean

Whether or not to update the incoming approvals.

updateOutgoingApprovals?: boolean

Whether or not to update the outgoing approvals.

updateUserPermissions?: boolean

Whether or not to update the user permissions.

userPermissions?: UserPermissions<T>

The new user permissions. Must have the necessary permissions to update.

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