forked from Qortal/qortal
interim commit after refactoring TransactionData, and subclasses
This commit is contained in:
parent
da1bd82c19
commit
431e15c7ae
@ -7,7 +7,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.account.GenesisAccount;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -36,10 +35,10 @@ public class ATTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public ATTransactionData(long timestamp, int txGroupId, byte[] reference, String atAddress, String recipient, BigDecimal amount, Long assetId,
|
||||
byte[] message, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.AT, timestamp, txGroupId, reference, GenesisAccount.PUBLIC_KEY, fee, approvalStatus, height, signature);
|
||||
public ATTransactionData(BaseTransactionData baseTransactionData, String atAddress, String recipient, BigDecimal amount, Long assetId, byte[] message) {
|
||||
super(TransactionType.AT, baseTransactionData);
|
||||
|
||||
this.creatorPublicKey = GenesisAccount.PUBLIC_KEY;
|
||||
this.atAddress = atAddress;
|
||||
this.recipient = recipient;
|
||||
this.amount = amount;
|
||||
@ -47,14 +46,6 @@ public class ATTransactionData extends TransactionData {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
// Never from network/API!
|
||||
|
||||
/** New, unsigned */
|
||||
public ATTransactionData(long timestamp, int txGroupId, byte[] reference, String atAddress, String recipient, BigDecimal amount, Long assetId,
|
||||
byte[] message, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, atAddress, recipient, amount, assetId, message, fee, null, null, null);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
||||
public String getATAddress() {
|
||||
|
@ -1,7 +1,5 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
@ -10,7 +8,6 @@ import javax.xml.bind.annotation.XmlElement;
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.account.GenesisAccount;
|
||||
import org.qora.block.GenesisBlock;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -46,9 +43,9 @@ public class AccountFlagsTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public AccountFlagsTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, String target, int andMask, int orMask,
|
||||
int xorMask, Integer previousFlags, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.ACCOUNT_FLAGS, timestamp, groupId, reference, creatorPublicKey, fee, approvalStatus, height, signature);
|
||||
public AccountFlagsTransactionData(BaseTransactionData baseTransactionData,
|
||||
String target, int andMask, int orMask, int xorMask, Integer previousFlags) {
|
||||
super(TransactionType.ACCOUNT_FLAGS, baseTransactionData);
|
||||
|
||||
this.target = target;
|
||||
this.andMask = andMask;
|
||||
@ -58,15 +55,9 @@ public class AccountFlagsTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public AccountFlagsTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, String target, int andMask, int orMask,
|
||||
int xorMask, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, groupId, reference, creatorPublicKey, target, andMask, orMask, xorMask, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public AccountFlagsTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, String target, int andMask, int orMask,
|
||||
int xorMask, BigDecimal fee) {
|
||||
this(timestamp, groupId, reference, creatorPublicKey, target, andMask, orMask, xorMask, fee, null);
|
||||
public AccountFlagsTransactionData(BaseTransactionData baseTransactionData,
|
||||
String target, int andMask, int orMask, int xorMask) {
|
||||
this(baseTransactionData, target, andMask, orMask, xorMask, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -40,25 +37,14 @@ public class AddGroupAdminTransactionData extends TransactionData {
|
||||
this.creatorPublicKey = this.ownerPublicKey;
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public AddGroupAdminTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId, String member, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.ADD_GROUP_ADMIN, timestamp, txGroupId, reference, ownerPublicKey, fee, approvalStatus, height, signature);
|
||||
public AddGroupAdminTransactionData(BaseTransactionData baseTransactionData, int groupId, String member) {
|
||||
super(TransactionType.ADD_GROUP_ADMIN, baseTransactionData);
|
||||
|
||||
this.ownerPublicKey = ownerPublicKey;
|
||||
this.ownerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.member = member;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public AddGroupAdminTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId, String member, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, groupId, member, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public AddGroupAdminTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId, String member, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, groupId, member, fee, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
||||
public byte[] getOwnerPublicKey() {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
@ -9,7 +8,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.data.PaymentData;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -53,12 +51,12 @@ public class ArbitraryTransactionData extends TransactionData {
|
||||
this.creatorPublicKey = this.senderPublicKey;
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public ArbitraryTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, int version, int service,
|
||||
byte[] data, DataType dataType, List<PaymentData> payments, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.ARBITRARY, timestamp, txGroupId, reference, senderPublicKey, fee, approvalStatus, height, signature);
|
||||
/** V3 */
|
||||
public ArbitraryTransactionData(BaseTransactionData baseTransactionData,
|
||||
int version, int service, byte[] data, DataType dataType, List<PaymentData> payments) {
|
||||
super(TransactionType.ARBITRARY, baseTransactionData);
|
||||
|
||||
this.senderPublicKey = senderPublicKey;
|
||||
this.senderPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.version = version;
|
||||
this.service = service;
|
||||
this.data = data;
|
||||
@ -66,28 +64,10 @@ public class ArbitraryTransactionData extends TransactionData {
|
||||
this.payments = payments;
|
||||
}
|
||||
|
||||
/** From network/API (V3) */
|
||||
public ArbitraryTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, int version, int service,
|
||||
byte[] data, DataType dataType, List<PaymentData> payments, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, version, service, data, dataType, payments, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** From network/API (V1) */
|
||||
public ArbitraryTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, int version, int service, byte[] data,
|
||||
DataType dataType, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, version, service, data, dataType, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned (V3) */
|
||||
public ArbitraryTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, int version, int service, byte[] data,
|
||||
DataType dataType, List<PaymentData> payments, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, version, service, data, dataType, payments, fee, null);
|
||||
}
|
||||
|
||||
/** New, unsigned (V1) */
|
||||
public ArbitraryTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, int version, int service, byte[] data,
|
||||
DataType dataType, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, version, service, data, dataType, null, fee, null);
|
||||
/** V1 */
|
||||
public ArbitraryTransactionData(BaseTransactionData baseTransactionData,
|
||||
int version, int service, byte[] data, DataType dataType) {
|
||||
this(baseTransactionData, version, service, data, dataType, null);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
@ -0,0 +1,28 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
|
||||
public class BaseTransactionData extends TransactionData {
|
||||
|
||||
/** Constructor for use by repository. */
|
||||
public BaseTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, BigDecimal fee,
|
||||
ApprovalStatus approvalStatus, Integer blockHeight, Integer approvalHeight, byte[] signature) {
|
||||
this.timestamp = timestamp;
|
||||
this.txGroupId = txGroupId;
|
||||
this.reference = reference;
|
||||
this.creatorPublicKey = creatorPublicKey;
|
||||
this.fee = fee;
|
||||
this.approvalStatus = approvalStatus;
|
||||
this.blockHeight = blockHeight;
|
||||
this.approvalHeight = approvalHeight;
|
||||
this.signature = signature;
|
||||
}
|
||||
|
||||
/** Constructor for use by transaction transformer. */
|
||||
public BaseTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, fee, null, null, null, signature);
|
||||
}
|
||||
|
||||
}
|
@ -8,7 +8,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -31,6 +30,7 @@ public class BuyNameTransactionData extends TransactionData {
|
||||
private BigDecimal amount;
|
||||
@Schema(description = "seller's address", example = "QgV4s3xnzLhVBEJxcYui4u4q11yhUHsd9v")
|
||||
private String seller;
|
||||
|
||||
// For internal use when orphaning
|
||||
@XmlTransient
|
||||
@Schema(hidden = true)
|
||||
@ -48,11 +48,11 @@ public class BuyNameTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public BuyNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] buyerPublicKey, String name, BigDecimal amount, String seller,
|
||||
byte[] nameReference, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.BUY_NAME, timestamp, txGroupId, reference, buyerPublicKey, fee, approvalStatus, height, signature);
|
||||
public BuyNameTransactionData(BaseTransactionData baseTransactionData,
|
||||
String name, BigDecimal amount, String seller, byte[] nameReference) {
|
||||
super(TransactionType.BUY_NAME, baseTransactionData);
|
||||
|
||||
this.buyerPublicKey = buyerPublicKey;
|
||||
this.buyerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.name = name;
|
||||
this.amount = amount;
|
||||
this.seller = seller;
|
||||
@ -60,14 +60,8 @@ public class BuyNameTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public BuyNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] buyerPublicKey, String name, BigDecimal amount, String seller,
|
||||
BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, buyerPublicKey, name, amount, seller, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public BuyNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] buyerPublicKey, String name, BigDecimal amount, String seller, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, buyerPublicKey, name, amount, seller, fee, null);
|
||||
public BuyNameTransactionData(BaseTransactionData baseTransactionData, String name, BigDecimal amount, String seller) {
|
||||
this(baseTransactionData, name, amount, seller, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.qora.transaction.Transaction;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -28,23 +25,12 @@ public class CancelAssetOrderTransactionData extends TransactionData {
|
||||
super(TransactionType.CANCEL_ASSET_ORDER);
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public CancelAssetOrderTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, byte[] orderId, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(Transaction.TransactionType.CANCEL_ASSET_ORDER, timestamp, txGroupId, reference, creatorPublicKey, fee, approvalStatus, height, signature);
|
||||
public CancelAssetOrderTransactionData(BaseTransactionData baseTransactionData, byte[] orderId) {
|
||||
super(Transaction.TransactionType.CANCEL_ASSET_ORDER, baseTransactionData);
|
||||
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public CancelAssetOrderTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, byte[] orderId, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, orderId, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public CancelAssetOrderTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, byte[] orderId, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, orderId, fee, null);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
||||
public byte[] getOrderId() {
|
||||
|
@ -1,13 +1,11 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -42,24 +40,18 @@ public class CancelGroupBanTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public CancelGroupBanTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String member, byte[] banReference,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.CANCEL_GROUP_BAN, timestamp, txGroupId, reference, adminPublicKey, fee, approvalStatus, height, signature);
|
||||
public CancelGroupBanTransactionData(BaseTransactionData baseTransactionData, int groupId, String member, byte[] banReference) {
|
||||
super(TransactionType.CANCEL_GROUP_BAN, baseTransactionData);
|
||||
|
||||
this.adminPublicKey = adminPublicKey;
|
||||
this.adminPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.member = member;
|
||||
this.banReference = banReference;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public CancelGroupBanTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String member, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, member, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public CancelGroupBanTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String member, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, member, fee, null);
|
||||
public CancelGroupBanTransactionData(BaseTransactionData baseTransactionData, int groupId, String member) {
|
||||
this(baseTransactionData, groupId, member, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -42,24 +39,18 @@ public class CancelGroupInviteTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public CancelGroupInviteTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String invitee, byte[] inviteReference,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.CANCEL_GROUP_INVITE, timestamp, txGroupId, reference, adminPublicKey, fee, approvalStatus, height, signature);
|
||||
public CancelGroupInviteTransactionData(BaseTransactionData baseTransactionData, int groupId, String invitee, byte[] inviteReference) {
|
||||
super(TransactionType.CANCEL_GROUP_INVITE, baseTransactionData);
|
||||
|
||||
this.adminPublicKey = adminPublicKey;
|
||||
this.adminPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.invitee = invitee;
|
||||
this.inviteReference = inviteReference;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public CancelGroupInviteTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String invitee, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, invitee, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public CancelGroupInviteTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String invitee, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, invitee, fee, null);
|
||||
public CancelGroupInviteTransactionData(BaseTransactionData baseTransactionData, int groupId, String invitee) {
|
||||
this(baseTransactionData, groupId, invitee, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,12 +1,9 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -33,25 +30,13 @@ public class CancelSellNameTransactionData extends TransactionData {
|
||||
this.creatorPublicKey = this.ownerPublicKey;
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public CancelSellNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String name,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.CANCEL_SELL_NAME, timestamp, txGroupId, reference, ownerPublicKey, fee, approvalStatus, height, signature);
|
||||
public CancelSellNameTransactionData(BaseTransactionData baseTransactionData, String name) {
|
||||
super(TransactionType.CANCEL_SELL_NAME, baseTransactionData);
|
||||
|
||||
this.ownerPublicKey = ownerPublicKey;
|
||||
this.ownerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public CancelSellNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String name, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, name, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public CancelSellNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String name, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, name, fee, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
||||
public byte[] getOwnerPublicKey() {
|
||||
|
@ -8,7 +8,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.qora.block.BlockChain;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -80,9 +79,9 @@ public class CreateAssetOrderTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** Constructs using data from repository, including optional asset names. */
|
||||
public CreateAssetOrderTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, long haveAssetId, long wantAssetId,
|
||||
BigDecimal amount, BigDecimal price, BigDecimal fee, String haveAssetName, String wantAssetName, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.CREATE_ASSET_ORDER, timestamp, txGroupId, reference, creatorPublicKey, fee, approvalStatus, height, signature);
|
||||
public CreateAssetOrderTransactionData(BaseTransactionData baseTransactionData,
|
||||
long haveAssetId, long wantAssetId, BigDecimal amount, BigDecimal price, String haveAssetName, String wantAssetName) {
|
||||
super(TransactionType.CREATE_ASSET_ORDER, baseTransactionData);
|
||||
|
||||
this.haveAssetId = haveAssetId;
|
||||
this.wantAssetId = wantAssetId;
|
||||
@ -93,22 +92,9 @@ public class CreateAssetOrderTransactionData extends TransactionData {
|
||||
this.wantAssetName = wantAssetName;
|
||||
}
|
||||
|
||||
/** Constructs using data from repository, excluding optional asset names. */
|
||||
public CreateAssetOrderTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, long haveAssetId, long wantAssetId,
|
||||
BigDecimal amount, BigDecimal price, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, haveAssetId, wantAssetId, amount, price, fee, null, null, approvalStatus, height, signature);
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public CreateAssetOrderTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, long haveAssetId, long wantAssetId,
|
||||
BigDecimal amount, BigDecimal price, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, haveAssetId, wantAssetId, amount, price, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public CreateAssetOrderTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, long haveAssetId, long wantAssetId,
|
||||
BigDecimal amount, BigDecimal price, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, haveAssetId, wantAssetId, amount, price, fee, null);
|
||||
/** Constructor excluding optional asset names. */
|
||||
public CreateAssetOrderTransactionData(BaseTransactionData baseTransactionData, long haveAssetId, long wantAssetId, BigDecimal amount, BigDecimal price) {
|
||||
this(baseTransactionData, haveAssetId, wantAssetId, amount, price, null, null);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
@ -1,14 +1,11 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.group.Group.ApprovalThreshold;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -69,12 +66,11 @@ public class CreateGroupTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public CreateGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String owner, String groupName, String description,
|
||||
boolean isOpen, ApprovalThreshold approvalThreshold, int minimumBlockDelay, int maximumBlockDelay, Integer groupId,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.CREATE_GROUP, timestamp, txGroupId, reference, creatorPublicKey, fee, approvalStatus, height, signature);
|
||||
public CreateGroupTransactionData(BaseTransactionData baseTransactionData,
|
||||
String owner, String groupName, String description, boolean isOpen,
|
||||
ApprovalThreshold approvalThreshold, int minimumBlockDelay, int maximumBlockDelay, Integer groupId) {
|
||||
super(TransactionType.CREATE_GROUP, baseTransactionData);
|
||||
|
||||
this.creatorPublicKey = creatorPublicKey;
|
||||
this.owner = owner;
|
||||
this.groupName = groupName;
|
||||
this.description = description;
|
||||
@ -86,15 +82,10 @@ public class CreateGroupTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public CreateGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String owner, String groupName, String description,
|
||||
boolean isOpen, ApprovalThreshold approvalThreshold, int minimumBlockDelay, int maximumBlockDelay, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, owner, groupName, description, isOpen, approvalThreshold, minimumBlockDelay, maximumBlockDelay, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public CreateGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String owner, String groupName, String description,
|
||||
boolean isOpen, ApprovalThreshold approvalThreshold, int minimumBlockDelay, int maximumBlockDelay, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, owner, groupName, description, isOpen, approvalThreshold, minimumBlockDelay, maximumBlockDelay, fee, null);
|
||||
public CreateGroupTransactionData(BaseTransactionData baseTransactionData,
|
||||
String owner, String groupName, String description, boolean isOpen,
|
||||
ApprovalThreshold approvalThreshold, int minimumBlockDelay, int maximumBlockDelay) {
|
||||
this(baseTransactionData, owner, groupName, description, isOpen, approvalThreshold, minimumBlockDelay, maximumBlockDelay, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
@ -8,7 +7,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.data.voting.PollOptionData;
|
||||
import org.qora.transaction.Transaction;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -31,11 +29,9 @@ public class CreatePollTransactionData extends TransactionData {
|
||||
super(TransactionType.CREATE_POLL);
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public CreatePollTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String owner,
|
||||
String pollName, String description, List<PollOptionData> pollOptions,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(Transaction.TransactionType.CREATE_POLL, timestamp, txGroupId, reference, creatorPublicKey, fee, approvalStatus, height, signature);
|
||||
public CreatePollTransactionData(BaseTransactionData baseTransactionData,
|
||||
String owner, String pollName, String description, List<PollOptionData> pollOptions) {
|
||||
super(Transaction.TransactionType.CREATE_POLL, baseTransactionData);
|
||||
|
||||
this.owner = owner;
|
||||
this.pollName = pollName;
|
||||
@ -43,18 +39,6 @@ public class CreatePollTransactionData extends TransactionData {
|
||||
this.pollOptions = pollOptions;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public CreatePollTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String owner,
|
||||
String pollName, String description, List<PollOptionData> pollOptions, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, owner, pollName, description, pollOptions, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public CreatePollTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String owner,
|
||||
String pollName, String description, List<PollOptionData> pollOptions, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, owner, pollName, description, pollOptions, fee, null);
|
||||
}
|
||||
|
||||
// Getters/setters
|
||||
|
||||
public String getOwner() {
|
||||
|
@ -5,7 +5,6 @@ import java.math.BigDecimal;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -32,10 +31,9 @@ public class DeployAtTransactionData extends TransactionData {
|
||||
super(TransactionType.DEPLOY_AT);
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public DeployAtTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String aTAddress, String name, String description,
|
||||
String aTType, String tags, byte[] creationBytes, BigDecimal amount, long assetId, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.DEPLOY_AT, timestamp, txGroupId, reference, creatorPublicKey, fee, approvalStatus, height, signature);
|
||||
public DeployAtTransactionData(BaseTransactionData baseTransactionData,
|
||||
String aTAddress, String name, String description, String aTType, String tags, byte[] creationBytes, BigDecimal amount, long assetId) {
|
||||
super(TransactionType.DEPLOY_AT, baseTransactionData);
|
||||
|
||||
this.aTAddress = aTAddress;
|
||||
this.name = name;
|
||||
@ -47,18 +45,6 @@ public class DeployAtTransactionData extends TransactionData {
|
||||
this.assetId = assetId;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public DeployAtTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String name, String description,
|
||||
String aTType, String tags, byte[] creationBytes, BigDecimal amount, long assetId, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, null, name, description, aTType, tags, creationBytes, amount, assetId, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public DeployAtTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, String name, String description,
|
||||
String aTType, String tags, byte[] creationBytes, BigDecimal amount, long assetId, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, creatorPublicKey, name, description, aTType, tags, creationBytes, amount, assetId, fee, null);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
||||
public String getName() {
|
||||
|
@ -1,12 +1,9 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -25,24 +22,12 @@ public class EnableForgingTransactionData extends TransactionData {
|
||||
super(TransactionType.ENABLE_FORGING);
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public EnableForgingTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, String target,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.ENABLE_FORGING, timestamp, groupId, reference, creatorPublicKey, fee, approvalStatus, height, signature);
|
||||
public EnableForgingTransactionData(BaseTransactionData baseTransactionData, String target) {
|
||||
super(TransactionType.ENABLE_FORGING, baseTransactionData);
|
||||
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public EnableForgingTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, String target, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, groupId, reference, creatorPublicKey, target, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public EnableForgingTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, String target, BigDecimal fee) {
|
||||
this(timestamp, groupId, reference, creatorPublicKey, target, fee, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
||||
public String getTarget() {
|
||||
|
@ -6,10 +6,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.account.GenesisAccount;
|
||||
import org.qora.asset.Asset;
|
||||
import org.qora.group.Group;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -38,9 +35,10 @@ public class GenesisTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository (V2) */
|
||||
public GenesisTransactionData(long timestamp, String recipient, BigDecimal amount, long assetId, byte[] signature) {
|
||||
public GenesisTransactionData(BaseTransactionData baseTransactionData, String recipient, BigDecimal amount, long assetId) {
|
||||
// No groupID, null reference, zero fee, no approval required, height always 1
|
||||
super(TransactionType.GENESIS, timestamp, Group.NO_GROUP, null, GenesisAccount.PUBLIC_KEY, BigDecimal.ZERO, ApprovalStatus.NOT_REQUIRED, 1, signature);
|
||||
// super(TransactionType.GENESIS, timestamp, Group.NO_GROUP, null, GenesisAccount.PUBLIC_KEY, BigDecimal.ZERO, ApprovalStatus.NOT_REQUIRED, 1, signature);
|
||||
super(TransactionType.GENESIS, baseTransactionData);
|
||||
|
||||
this.recipient = recipient;
|
||||
this.amount = amount;
|
||||
@ -48,20 +46,8 @@ public class GenesisTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository (V1, where asset locked to QORA) */
|
||||
public GenesisTransactionData(long timestamp, String recipient, BigDecimal amount, byte[] signature) {
|
||||
this(timestamp, recipient, amount, Asset.QORA, signature);
|
||||
}
|
||||
|
||||
// Never from network/API!
|
||||
|
||||
/** New, unsigned (V2) */
|
||||
public GenesisTransactionData(long timestamp, String recipient, BigDecimal amount, long assetId) {
|
||||
this(timestamp, recipient, amount, assetId, null);
|
||||
}
|
||||
|
||||
/** New, unsigned (V1) */
|
||||
public GenesisTransactionData(long timestamp, String recipient, BigDecimal amount) {
|
||||
this(timestamp, recipient, amount, Asset.QORA, null);
|
||||
public GenesisTransactionData(BaseTransactionData baseTransactionData, String recipient, BigDecimal amount) {
|
||||
this(baseTransactionData, recipient, amount, Asset.QORA);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -57,26 +54,18 @@ public class GroupApprovalTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public GroupApprovalTransactionData(long timestamp, int groupId, byte[] reference, byte[] adminPublicKey, byte[] pendingSignature, boolean approval,
|
||||
byte[] priorReference, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.GROUP_APPROVAL, timestamp, groupId, reference, adminPublicKey, fee, approvalStatus, height, signature);
|
||||
public GroupApprovalTransactionData(BaseTransactionData baseTransactionData, byte[] pendingSignature, boolean approval, byte[] priorReference) {
|
||||
super(TransactionType.GROUP_APPROVAL, baseTransactionData);
|
||||
|
||||
this.adminPublicKey = adminPublicKey;
|
||||
this.adminPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.pendingSignature = pendingSignature;
|
||||
this.approval = approval;
|
||||
this.priorReference = priorReference;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public GroupApprovalTransactionData(long timestamp, int groupId, byte[] reference, byte[] adminPublicKey, byte[] pendingSignature, boolean approval,
|
||||
BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, groupId, reference, adminPublicKey, pendingSignature, approval, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public GroupApprovalTransactionData(long timestamp, int groupId, byte[] reference, byte[] adminPublicKey, byte[] pendingSignature, boolean approval,
|
||||
BigDecimal fee) {
|
||||
this(timestamp, groupId, reference, adminPublicKey, pendingSignature, approval, fee, null);
|
||||
public GroupApprovalTransactionData(BaseTransactionData baseTransactionData, byte[] pendingSignature, boolean approval) {
|
||||
this(baseTransactionData, pendingSignature, approval, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -77,12 +74,12 @@ public class GroupBanTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public GroupBanTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String member,
|
||||
String reason, int timeToLive, byte[] memberReference, byte[] adminReference, byte[] joinInviteReference, Integer previousGroupId,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.GROUP_BAN, timestamp, txGroupId, reference, adminPublicKey, fee, approvalStatus, height, signature);
|
||||
public GroupBanTransactionData(BaseTransactionData baseTransactionData,
|
||||
int groupId, String member, String reason, int timeToLive,
|
||||
byte[] memberReference, byte[] adminReference, byte[] joinInviteReference, Integer previousGroupId) {
|
||||
super(TransactionType.GROUP_BAN, baseTransactionData);
|
||||
|
||||
this.adminPublicKey = adminPublicKey;
|
||||
this.adminPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.offender = member;
|
||||
this.reason = reason;
|
||||
@ -94,15 +91,8 @@ public class GroupBanTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public GroupBanTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String offender, String reason,
|
||||
int timeToLive, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, offender, reason, timeToLive, null, null, null, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public GroupBanTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String offender, String reason,
|
||||
int timeToLive, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, offender, reason, timeToLive, fee, null);
|
||||
public GroupBanTransactionData(BaseTransactionData baseTransactionData, int groupId, String member, String reason, int timeToLive) {
|
||||
this(baseTransactionData, groupId, member, reason, timeToLive, null, null, null, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,14 +1,11 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -52,11 +49,11 @@ public class GroupInviteTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public GroupInviteTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String invitee, int timeToLive, byte[] joinReference, Integer previousGroupId,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.GROUP_INVITE, timestamp, txGroupId, reference, adminPublicKey, fee, approvalStatus, height, signature);
|
||||
public GroupInviteTransactionData(BaseTransactionData baseTransactionData,
|
||||
int groupId, String invitee, int timeToLive, byte[] joinReference, Integer previousGroupId) {
|
||||
super(TransactionType.GROUP_INVITE, baseTransactionData);
|
||||
|
||||
this.adminPublicKey = adminPublicKey;
|
||||
this.adminPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.invitee = invitee;
|
||||
this.timeToLive = timeToLive;
|
||||
@ -65,13 +62,8 @@ public class GroupInviteTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public GroupInviteTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String invitee, int timeToLive, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, invitee, timeToLive, null, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public GroupInviteTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String invitee, int timeToLive, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, invitee, timeToLive, fee, null);
|
||||
public GroupInviteTransactionData(BaseTransactionData baseTransactionData, int groupId, String invitee, int timeToLive) {
|
||||
this(baseTransactionData, groupId, invitee, timeToLive, null, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -74,12 +71,11 @@ public class GroupKickTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public GroupKickTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String member,
|
||||
String reason, byte[] memberReference, byte[] adminReference, byte[] joinReference, Integer previousGroupId,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.GROUP_KICK, timestamp, txGroupId, reference, adminPublicKey, fee, approvalStatus, height, signature);
|
||||
public GroupKickTransactionData(BaseTransactionData baseTransactionData,
|
||||
int groupId, String member, String reason, byte[] memberReference, byte[] adminReference, byte[] joinReference, Integer previousGroupId) {
|
||||
super(TransactionType.GROUP_KICK, baseTransactionData);
|
||||
|
||||
this.adminPublicKey = adminPublicKey;
|
||||
this.adminPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.member = member;
|
||||
this.reason = reason;
|
||||
@ -90,14 +86,8 @@ public class GroupKickTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public GroupKickTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String member, String reason,
|
||||
BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, member, reason, null, null, null, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public GroupKickTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] adminPublicKey, int groupId, String member, String reason, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, adminPublicKey, groupId, member, reason, fee, null);
|
||||
public GroupKickTransactionData(BaseTransactionData baseTransactionData, int groupId, String member, String reason) {
|
||||
this(baseTransactionData, groupId, member, reason, null, null, null, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,7 +1,5 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
@ -9,7 +7,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.account.GenesisAccount;
|
||||
import org.qora.block.GenesisBlock;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -61,13 +58,12 @@ public class IssueAssetTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public IssueAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] issuerPublicKey, Long assetId, String owner,
|
||||
String assetName, String description, long quantity, boolean isDivisible, String data,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.ISSUE_ASSET, timestamp, txGroupId, reference, issuerPublicKey, fee, approvalStatus, height, signature);
|
||||
public IssueAssetTransactionData(BaseTransactionData baseTransactionData,
|
||||
Long assetId, String owner, String assetName, String description, long quantity, boolean isDivisible, String data) {
|
||||
super(TransactionType.ISSUE_ASSET, baseTransactionData);
|
||||
|
||||
this.assetId = assetId;
|
||||
this.issuerPublicKey = issuerPublicKey;
|
||||
this.issuerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.owner = owner;
|
||||
this.assetName = assetName;
|
||||
this.description = description;
|
||||
@ -77,15 +73,8 @@ public class IssueAssetTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public IssueAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] issuerPublicKey, String owner, String assetName,
|
||||
String description, long quantity, boolean isDivisible, String data, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, issuerPublicKey, null, owner, assetName, description, quantity, isDivisible, data, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public IssueAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] issuerPublicKey, String owner, String assetName,
|
||||
String description, long quantity, boolean isDivisible, String data, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, issuerPublicKey, owner, assetName, description, quantity, isDivisible, data, fee, null);
|
||||
public IssueAssetTransactionData(BaseTransactionData baseTransactionData, String owner, String assetName, String description, long quantity, boolean isDivisible, String data) {
|
||||
this(baseTransactionData, null, owner, assetName, description, quantity, isDivisible, data);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
@ -1,14 +1,11 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -48,24 +45,18 @@ public class JoinGroupTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public JoinGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] joinerPublicKey, int groupId, byte[] inviteReference, Integer previousGroupId,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.JOIN_GROUP, timestamp, txGroupId, reference, joinerPublicKey, fee, approvalStatus, height, signature);
|
||||
public JoinGroupTransactionData(BaseTransactionData baseTransactionData, int groupId, byte[] inviteReference, Integer previousGroupId) {
|
||||
super(TransactionType.JOIN_GROUP, baseTransactionData);
|
||||
|
||||
this.joinerPublicKey = joinerPublicKey;
|
||||
this.joinerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.inviteReference = inviteReference;
|
||||
this.previousGroupId = previousGroupId;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public JoinGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] joinerPublicKey, int groupId, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, joinerPublicKey, groupId, null, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public JoinGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] joinerPublicKey, int groupId, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, joinerPublicKey, groupId, fee, null);
|
||||
public JoinGroupTransactionData(BaseTransactionData baseTransactionData, int groupId) {
|
||||
this(baseTransactionData, groupId, null, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -50,11 +47,11 @@ public class LeaveGroupTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public LeaveGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] leaverPublicKey, int groupId, byte[] memberReference, byte[] adminReference, Integer previousGroupId,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.LEAVE_GROUP, timestamp, txGroupId, reference, leaverPublicKey, fee, approvalStatus, height, signature);
|
||||
public LeaveGroupTransactionData(BaseTransactionData baseTransactionData,
|
||||
int groupId, byte[] memberReference, byte[] adminReference, Integer previousGroupId) {
|
||||
super(TransactionType.LEAVE_GROUP, baseTransactionData);
|
||||
|
||||
this.leaverPublicKey = leaverPublicKey;
|
||||
this.leaverPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.memberReference = memberReference;
|
||||
this.adminReference = adminReference;
|
||||
@ -62,13 +59,8 @@ public class LeaveGroupTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public LeaveGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] leaverPublicKey, int groupId, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, leaverPublicKey, groupId, null, null, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public LeaveGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] leaverPublicKey, int groupId, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, leaverPublicKey, groupId, fee, null);
|
||||
public LeaveGroupTransactionData(BaseTransactionData baseTransactionData, int groupId) {
|
||||
this(baseTransactionData, groupId, null, null, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -7,7 +7,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.asset.Asset;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -38,12 +37,11 @@ public class MessageTransactionData extends TransactionData {
|
||||
this.creatorPublicKey = this.senderPublicKey;
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public MessageTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, int version, String recipient, Long assetId,
|
||||
BigDecimal amount, byte[] data, boolean isText, boolean isEncrypted, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.MESSAGE, timestamp, txGroupId, reference, senderPublicKey, fee, approvalStatus, height, signature);
|
||||
public MessageTransactionData(BaseTransactionData baseTransactionData,
|
||||
int version, String recipient, Long assetId, BigDecimal amount, byte[] data, boolean isText, boolean isEncrypted) {
|
||||
super(TransactionType.MESSAGE, baseTransactionData);
|
||||
|
||||
this.senderPublicKey = senderPublicKey;
|
||||
this.senderPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.version = version;
|
||||
this.recipient = recipient;
|
||||
|
||||
@ -58,18 +56,6 @@ public class MessageTransactionData extends TransactionData {
|
||||
this.isEncrypted = isEncrypted;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public MessageTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, int version, String recipient, Long assetId,
|
||||
BigDecimal amount, byte[] data, boolean isText, boolean isEncrypted, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, version, recipient, assetId, amount, data, isText, isEncrypted, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public MessageTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, int version, String recipient, Long assetId,
|
||||
BigDecimal amount, byte[] data, boolean isText, boolean isEncrypted, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, version, recipient, assetId, amount, data, isText, isEncrypted, fee, null);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
||||
public byte[] getSenderPublicKey() {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
@ -9,7 +8,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.data.PaymentData;
|
||||
import org.qora.transaction.Transaction;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -34,25 +32,13 @@ public class MultiPaymentTransactionData extends TransactionData {
|
||||
this.creatorPublicKey = this.senderPublicKey;
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public MultiPaymentTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, List<PaymentData> payments,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(Transaction.TransactionType.MULTI_PAYMENT, timestamp, txGroupId, reference, senderPublicKey, fee, approvalStatus, height, signature);
|
||||
public MultiPaymentTransactionData(BaseTransactionData baseTransactionData, List<PaymentData> payments) {
|
||||
super(Transaction.TransactionType.MULTI_PAYMENT, baseTransactionData);
|
||||
|
||||
this.senderPublicKey = senderPublicKey;
|
||||
this.senderPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.payments = payments;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public MultiPaymentTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, List<PaymentData> payments, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, payments, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public MultiPaymentTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, List<PaymentData> payments, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, payments, fee, null);
|
||||
}
|
||||
|
||||
// Getters/setters
|
||||
|
||||
public byte[] getSenderPublicKey() {
|
||||
|
@ -7,7 +7,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -41,25 +40,14 @@ public class PaymentTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public PaymentTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, String recipient, BigDecimal amount,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.PAYMENT, timestamp, txGroupId, reference, senderPublicKey, fee, approvalStatus, height, signature);
|
||||
public PaymentTransactionData(BaseTransactionData baseTransactionData, String recipient, BigDecimal amount) {
|
||||
super(TransactionType.PAYMENT, baseTransactionData);
|
||||
|
||||
this.senderPublicKey = senderPublicKey;
|
||||
this.senderPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.recipient = recipient;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public PaymentTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, String recipient, BigDecimal amount, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, recipient, amount, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public PaymentTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, String recipient, BigDecimal amount, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, recipient, amount, fee, null);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
||||
public byte[] getSenderPublicKey() {
|
||||
|
@ -7,7 +7,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -44,12 +43,11 @@ public class ProxyForgingTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public ProxyForgingTransactionData(long timestamp, int groupId, byte[] reference, byte[] forgerPublicKey, String recipient,
|
||||
byte[] proxyPublicKey, BigDecimal share, BigDecimal previousShare,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.PROXY_FORGING, timestamp, groupId, reference, forgerPublicKey, fee, approvalStatus, height, signature);
|
||||
public ProxyForgingTransactionData(BaseTransactionData baseTransactionData,
|
||||
String recipient, byte[] proxyPublicKey, BigDecimal share, BigDecimal previousShare) {
|
||||
super(TransactionType.PROXY_FORGING, baseTransactionData);
|
||||
|
||||
this.forgerPublicKey = forgerPublicKey;
|
||||
this.forgerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.recipient = recipient;
|
||||
this.proxyPublicKey = proxyPublicKey;
|
||||
this.share = share;
|
||||
@ -57,13 +55,9 @@ public class ProxyForgingTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public ProxyForgingTransactionData(long timestamp, int groupId, byte[] reference, byte[] forgerPublicKey, String recipient, byte[] proxyPublicKey, BigDecimal share, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, groupId, reference, forgerPublicKey, recipient, proxyPublicKey, share, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public ProxyForgingTransactionData(long timestamp, int groupId, byte[] reference, byte[] forgerPublicKey, String recipient, byte[] proxyPublicKey, BigDecimal share, BigDecimal fee) {
|
||||
this(timestamp, groupId, reference, forgerPublicKey, recipient, proxyPublicKey, share, fee, null);
|
||||
public ProxyForgingTransactionData(BaseTransactionData baseTransactionData,
|
||||
String recipient, byte[] proxyPublicKey, BigDecimal share) {
|
||||
this(baseTransactionData, recipient, proxyPublicKey, share, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,12 +1,9 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -38,26 +35,15 @@ public class RegisterNameTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public RegisterNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] registrantPublicKey, String owner, String name, String data,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.REGISTER_NAME, timestamp, txGroupId, reference, registrantPublicKey, fee, approvalStatus, height, signature);
|
||||
public RegisterNameTransactionData(BaseTransactionData baseTransactionData, String owner, String name, String data) {
|
||||
super(TransactionType.REGISTER_NAME, baseTransactionData);
|
||||
|
||||
this.registrantPublicKey = registrantPublicKey;
|
||||
this.registrantPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.owner = owner;
|
||||
this.name = name;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public RegisterNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] registrantPublicKey, String owner, String name, String data, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, registrantPublicKey, owner, name, data, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public RegisterNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] registrantPublicKey, String owner, String name, String data, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, registrantPublicKey, owner, name, data, fee, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
||||
public byte[] getRegistrantPublicKey() {
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -42,24 +39,18 @@ public class RemoveGroupAdminTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public RemoveGroupAdminTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId, String admin, byte[] adminReference,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.REMOVE_GROUP_ADMIN, timestamp, txGroupId, reference, ownerPublicKey, fee, approvalStatus, height, signature);
|
||||
public RemoveGroupAdminTransactionData(BaseTransactionData baseTransactionData, int groupId, String admin, byte[] adminReference) {
|
||||
super(TransactionType.REMOVE_GROUP_ADMIN, baseTransactionData);
|
||||
|
||||
this.ownerPublicKey = ownerPublicKey;
|
||||
this.ownerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.groupId = groupId;
|
||||
this.admin = admin;
|
||||
this.adminReference = adminReference;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public RemoveGroupAdminTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId, String admin, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, groupId, admin, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public RemoveGroupAdminTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId, String admin, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, groupId, admin, fee, null);
|
||||
public RemoveGroupAdminTransactionData(BaseTransactionData baseTransactionData, int groupId, String admin) {
|
||||
this(baseTransactionData, groupId, admin, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -7,7 +7,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -40,26 +39,14 @@ public class SellNameTransactionData extends TransactionData {
|
||||
this.creatorPublicKey = this.ownerPublicKey;
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public SellNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String name, BigDecimal amount,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.SELL_NAME, timestamp, txGroupId, reference, ownerPublicKey, fee, approvalStatus, height, signature);
|
||||
public SellNameTransactionData(BaseTransactionData baseTransactionData, String name, BigDecimal amount) {
|
||||
super(TransactionType.SELL_NAME, baseTransactionData);
|
||||
|
||||
this.ownerPublicKey = ownerPublicKey;
|
||||
this.ownerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.name = name;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public SellNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String name, BigDecimal amount, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, name, amount, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public SellNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String name, BigDecimal amount, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, name, amount, fee, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
||||
public byte[] getOwnerPublicKey() {
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -43,22 +40,16 @@ public class SetGroupTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public SetGroupTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, int defaultGroupId, Integer previousDefaultGroupId,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.SET_GROUP, timestamp, groupId, reference, creatorPublicKey, fee, approvalStatus, height, signature);
|
||||
public SetGroupTransactionData(BaseTransactionData baseTransactionData, int defaultGroupId, Integer previousDefaultGroupId) {
|
||||
super(TransactionType.SET_GROUP, baseTransactionData);
|
||||
|
||||
this.defaultGroupId = defaultGroupId;
|
||||
this.previousDefaultGroupId = previousDefaultGroupId;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public SetGroupTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, int defaultGroupId, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, groupId, reference, creatorPublicKey, defaultGroupId, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public SetGroupTransactionData(long timestamp, int groupId, byte[] reference, byte[] creatorPublicKey, int defaultGroupId, BigDecimal fee) {
|
||||
this(timestamp, groupId, reference, creatorPublicKey, defaultGroupId, fee, null);
|
||||
public SetGroupTransactionData(BaseTransactionData baseTransactionData, int defaultGroupId) {
|
||||
this(baseTransactionData, defaultGroupId, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -63,13 +63,19 @@ public abstract class TransactionData {
|
||||
protected byte[] signature;
|
||||
@Schema(description = "groupID for this transaction")
|
||||
protected int txGroupId;
|
||||
@Schema(description = "group-approval status")
|
||||
protected ApprovalStatus approvalStatus;
|
||||
|
||||
// Not always present
|
||||
@Schema(accessMode = AccessMode.READ_ONLY, hidden = true, description = "height of block containing transaction")
|
||||
protected Integer blockHeight;
|
||||
|
||||
// Not always present
|
||||
@Schema(description = "group-approval status")
|
||||
protected ApprovalStatus approvalStatus;
|
||||
|
||||
// Not always present
|
||||
@Schema(accessMode = AccessMode.READ_ONLY, hidden = true, description = "block height when transaction approved")
|
||||
protected Integer approvalHeight;
|
||||
|
||||
// Constructors
|
||||
|
||||
// For JAXB
|
||||
@ -81,20 +87,19 @@ public abstract class TransactionData {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public TransactionData(TransactionType type, long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, BigDecimal fee, ApprovalStatus approvalStatus, Integer blockHeight, byte[] signature) {
|
||||
/** Constructor for use by transaction subclasses. */
|
||||
protected TransactionData(TransactionType type, BaseTransactionData baseTransactionData) {
|
||||
this.type = type;
|
||||
this.timestamp = timestamp;
|
||||
this.txGroupId = txGroupId;
|
||||
this.reference = reference;
|
||||
this.creatorPublicKey = creatorPublicKey;
|
||||
this.fee = fee;
|
||||
this.approvalStatus = approvalStatus;
|
||||
this.blockHeight = blockHeight;
|
||||
this.signature = signature;
|
||||
}
|
||||
|
||||
public TransactionData(TransactionType type, long timestamp, int txGroupId, byte[] reference, byte[] creatorPublicKey, BigDecimal fee) {
|
||||
this(type, timestamp, txGroupId, reference, creatorPublicKey, fee, null, null, null);
|
||||
this.timestamp = baseTransactionData.timestamp;
|
||||
this.txGroupId = baseTransactionData.txGroupId;
|
||||
this.reference = baseTransactionData.reference;
|
||||
this.creatorPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.fee = baseTransactionData.fee;
|
||||
this.signature = baseTransactionData.signature;
|
||||
this.blockHeight = baseTransactionData.blockHeight;
|
||||
this.approvalStatus = baseTransactionData.approvalStatus;
|
||||
this.approvalHeight = baseTransactionData.approvalHeight;
|
||||
}
|
||||
|
||||
// Getters/setters
|
||||
@ -140,14 +145,6 @@ public abstract class TransactionData {
|
||||
this.fee = fee;
|
||||
}
|
||||
|
||||
public ApprovalStatus getApprovalStatus() {
|
||||
return approvalStatus;
|
||||
}
|
||||
|
||||
public void setApprovalStatus(ApprovalStatus approvalStatus) {
|
||||
this.approvalStatus = approvalStatus;
|
||||
}
|
||||
|
||||
public byte[] getSignature() {
|
||||
return this.signature;
|
||||
}
|
||||
@ -165,6 +162,24 @@ public abstract class TransactionData {
|
||||
this.blockHeight = blockHeight;
|
||||
}
|
||||
|
||||
public ApprovalStatus getApprovalStatus() {
|
||||
return approvalStatus;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public void setApprovalStatus(ApprovalStatus approvalStatus) {
|
||||
this.approvalStatus = approvalStatus;
|
||||
}
|
||||
|
||||
public Integer getApprovalHeight() {
|
||||
return this.approvalHeight;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public void setApprovalHeight(Integer approvalHeight) {
|
||||
this.approvalHeight = approvalHeight;
|
||||
}
|
||||
|
||||
// JAXB special
|
||||
|
||||
@XmlElement(name = "creatorAddress")
|
||||
|
@ -6,7 +6,6 @@ import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -41,33 +40,19 @@ public class TransferAssetTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** Constructs using data from repository, including optional assetName. */
|
||||
public TransferAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, String recipient, BigDecimal amount,
|
||||
long assetId, BigDecimal fee, String assetName, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.TRANSFER_ASSET, timestamp, txGroupId, reference, senderPublicKey, fee, approvalStatus, height, signature);
|
||||
public TransferAssetTransactionData(BaseTransactionData baseTransactionData, String recipient, BigDecimal amount, long assetId, String assetName) {
|
||||
super(TransactionType.TRANSFER_ASSET, baseTransactionData);
|
||||
|
||||
this.senderPublicKey = senderPublicKey;
|
||||
this.senderPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.recipient = recipient;
|
||||
this.amount = amount;
|
||||
this.assetId = assetId;
|
||||
this.assetName = assetName;
|
||||
}
|
||||
|
||||
/** Constructs using data from repository, excluding optional assetName. */
|
||||
public TransferAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, String recipient, BigDecimal amount,
|
||||
long assetId, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, recipient, amount, assetId, fee, null, null, null, signature);
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public TransferAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, String recipient, BigDecimal amount,
|
||||
long assetId, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, recipient, amount, assetId, fee, null, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public TransferAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] senderPublicKey, String recipient, BigDecimal amount,
|
||||
long assetId, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, senderPublicKey, recipient, amount, assetId, fee, null);
|
||||
/** Constructor excluding optional assetName. */
|
||||
public TransferAssetTransactionData(BaseTransactionData baseTransactionData, String recipient, BigDecimal amount, long assetId) {
|
||||
this(baseTransactionData, recipient, amount, assetId, null);
|
||||
}
|
||||
|
||||
// Getters/setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -44,12 +41,12 @@ public class UpdateAssetTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public UpdateAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, long assetId, String newOwner,
|
||||
String newDescription, String newData, BigDecimal fee, byte[] orphanReference, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.UPDATE_ASSET, timestamp, txGroupId, reference, ownerPublicKey, fee, approvalStatus, height, signature);
|
||||
public UpdateAssetTransactionData(BaseTransactionData baseTransactionData,
|
||||
long assetId, String newOwner, String newDescription, String newData, byte[] orphanReference) {
|
||||
super(TransactionType.UPDATE_ASSET, baseTransactionData);
|
||||
|
||||
this.assetId = assetId;
|
||||
this.ownerPublicKey = ownerPublicKey;
|
||||
this.ownerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.newOwner = newOwner;
|
||||
this.newDescription = newDescription;
|
||||
this.newData = newData;
|
||||
@ -57,15 +54,8 @@ public class UpdateAssetTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public UpdateAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, long assetId, String newOwner,
|
||||
String newDescription, String newData, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, assetId, newOwner, newDescription, newData, fee, null, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public UpdateAssetTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, long assetId, String newOwner,
|
||||
String newDescription, String newData, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, assetId, newOwner, newDescription, newData, fee, null);
|
||||
public UpdateAssetTransactionData(BaseTransactionData baseTransactionData, long assetId, String newOwner, String newDescription, String newData) {
|
||||
this(baseTransactionData, assetId, newOwner, newDescription, newData, null);
|
||||
}
|
||||
|
||||
// Getters/Setters
|
||||
|
@ -1,7 +1,5 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
@ -9,7 +7,6 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;
|
||||
import org.qora.group.Group.ApprovalThreshold;
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -83,13 +80,12 @@ public class UpdateGroupTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public UpdateGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId,
|
||||
String newOwner, String newDescription, boolean newIsOpen, ApprovalThreshold newApprovalThreshold,
|
||||
int newMinimumBlockDelay, int newMaximumBlockDelay, byte[] groupReference,
|
||||
BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.UPDATE_GROUP, timestamp, txGroupId, reference, ownerPublicKey, fee, approvalStatus, height, signature);
|
||||
public UpdateGroupTransactionData(BaseTransactionData baseTransactionData,
|
||||
int groupId, String newOwner, String newDescription, boolean newIsOpen, ApprovalThreshold newApprovalThreshold,
|
||||
int newMinimumBlockDelay, int newMaximumBlockDelay, byte[] groupReference) {
|
||||
super(TransactionType.UPDATE_GROUP, baseTransactionData);
|
||||
|
||||
this.ownerPublicKey = ownerPublicKey;
|
||||
this.ownerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.newOwner = newOwner;
|
||||
this.groupId = groupId;
|
||||
this.newDescription = newDescription;
|
||||
@ -101,19 +97,10 @@ public class UpdateGroupTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public UpdateGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId,
|
||||
String newOwner, String newDescription, boolean newIsOpen, ApprovalThreshold newApprovalThreshold,
|
||||
int newMinimumBlockDelay, int newMaximumBlockDelay, BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, groupId, newOwner, newDescription, newIsOpen, newApprovalThreshold,
|
||||
newMinimumBlockDelay, newMaximumBlockDelay, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public UpdateGroupTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, int groupId,
|
||||
String newOwner, String newDescription, boolean newIsOpen, ApprovalThreshold newApprovalThreshold,
|
||||
int newMinimumBlockDelay, int newMaximumBlockDelay, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, groupId, newOwner, newDescription, newIsOpen, newApprovalThreshold,
|
||||
newMinimumBlockDelay, newMaximumBlockDelay, fee, null);
|
||||
public UpdateGroupTransactionData(BaseTransactionData baseTransactionData,
|
||||
int groupId, String newOwner, String newDescription, boolean newIsOpen, ApprovalThreshold newApprovalThreshold,
|
||||
int newMinimumBlockDelay, int newMaximumBlockDelay) {
|
||||
this(baseTransactionData, groupId, newOwner, newDescription, newIsOpen, newApprovalThreshold, newMinimumBlockDelay, newMaximumBlockDelay, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,13 +1,10 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -43,11 +40,10 @@ public class UpdateNameTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public UpdateNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String newOwner, String name, String newData,
|
||||
byte[] nameReference, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.UPDATE_NAME, timestamp, txGroupId, reference, ownerPublicKey, fee, approvalStatus, height, signature);
|
||||
public UpdateNameTransactionData(BaseTransactionData baseTransactionData, String newOwner, String name, String newData, byte[] nameReference) {
|
||||
super(TransactionType.UPDATE_NAME, baseTransactionData);
|
||||
|
||||
this.ownerPublicKey = ownerPublicKey;
|
||||
this.ownerPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.newOwner = newOwner;
|
||||
this.name = name;
|
||||
this.newData = newData;
|
||||
@ -55,15 +51,8 @@ public class UpdateNameTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public UpdateNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String newOwner, String name, String newData,
|
||||
BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, newOwner, name, newData, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public UpdateNameTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] ownerPublicKey, String newOwner, String name, String newData,
|
||||
BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, ownerPublicKey, newOwner, name, newData, fee, null);
|
||||
public UpdateNameTransactionData(BaseTransactionData baseTransactionData, String newOwner, String name, String newData) {
|
||||
this(baseTransactionData, newOwner, name, newData, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
@ -1,12 +1,9 @@
|
||||
package org.qora.data.transaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.qora.transaction.Transaction.ApprovalStatus;
|
||||
import org.qora.transaction.Transaction.TransactionType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -34,25 +31,18 @@ public class VoteOnPollTransactionData extends TransactionData {
|
||||
}
|
||||
|
||||
/** From repository */
|
||||
public VoteOnPollTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] voterPublicKey, String pollName, int optionIndex,
|
||||
Integer previousOptionIndex, BigDecimal fee, ApprovalStatus approvalStatus, Integer height, byte[] signature) {
|
||||
super(TransactionType.VOTE_ON_POLL, timestamp, txGroupId, reference, voterPublicKey, fee, approvalStatus, height, signature);
|
||||
public VoteOnPollTransactionData(BaseTransactionData baseTransactionData, String pollName, int optionIndex, Integer previousOptionIndex) {
|
||||
super(TransactionType.VOTE_ON_POLL, baseTransactionData);
|
||||
|
||||
this.voterPublicKey = voterPublicKey;
|
||||
this.voterPublicKey = baseTransactionData.creatorPublicKey;
|
||||
this.pollName = pollName;
|
||||
this.optionIndex = optionIndex;
|
||||
this.previousOptionIndex = previousOptionIndex;
|
||||
}
|
||||
|
||||
/** From network/API */
|
||||
public VoteOnPollTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] voterPublicKey, String pollName, int optionIndex,
|
||||
BigDecimal fee, byte[] signature) {
|
||||
this(timestamp, txGroupId, reference, voterPublicKey, pollName, optionIndex, null, fee, null, null, signature);
|
||||
}
|
||||
|
||||
/** New, unsigned */
|
||||
public VoteOnPollTransactionData(long timestamp, int txGroupId, byte[] reference, byte[] voterPublicKey, String pollName, int optionIndex, BigDecimal fee) {
|
||||
this(timestamp, txGroupId, reference, voterPublicKey, pollName, optionIndex, fee, null);
|
||||
public VoteOnPollTransactionData(BaseTransactionData baseTransactionData, String pollName, int optionIndex) {
|
||||
this(baseTransactionData, pollName, optionIndex, null);
|
||||
}
|
||||
|
||||
// Getters / setters
|
||||
|
Loading…
x
Reference in New Issue
Block a user