public abstract class Transaction extends java.lang.Object implements Stored
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createTransactionHash(java.lang.String transactionPayload,
byte[] generationHashBytes)
Generates hash for a serialized transaction payload.
|
Deadline |
getDeadline()
Returns the deadline to include the transaction.
|
java.util.Optional<TransactionGroup> |
getGroup() |
java.math.BigInteger |
getMaxFee()
Returns the fee for the transaction.
|
NetworkType |
getNetworkType()
Returns the network type.
|
java.util.Optional<java.lang.String> |
getRecordId()
Returns database record id of the entity.
|
java.util.Optional<java.lang.String> |
getSignature()
Returns the transaction signature (missing if part of an aggregate transaction).
|
byte[] |
getSignBytes(byte[] payloadBytes,
byte[] generationHashBytes)
Get the bytes required for signing.
|
java.util.Optional<PublicAccount> |
getSigner()
Returns the transaction creator public account.
|
long |
getSize()
It returns the transaction's byte array size useful to calculate its fee.
|
java.util.Optional<TransactionInfo> |
getTransactionInfo()
Returns meta data object contains additional information about the transaction.
|
TransactionType |
getType()
Returns the transaction type.
|
java.lang.Integer |
getVersion()
Returns the transaction version.
|
boolean |
hasMissingSignatures()
Returns if a transaction has missing signatures.
|
boolean |
isConfirmed()
Return if a transaction is known to be confirmed
|
boolean |
isPartial()
Returns if a transaction is partial waiting for more cosignatures
|
boolean |
isTransactionFullyLoaded()
Returns if the transaction has been fully loaded from rest, if not, the transaction cannot be
serialized.
|
boolean |
isUnannounced()
Returns if a transaction is not known by the network.
|
boolean |
isUnconfirmed()
Returns if a transaction is pending to be included in a block.
|
byte[] |
serialize()
Serialises a transaction model into binary (unsigned payload).
|
SignedTransaction |
signWith(Account account,
java.lang.String generationHash)
Serialize and sign transaction creating a new SignedTransaction.
|
Transaction |
toAggregate(PublicAccount signer)
Convert an aggregate transaction to an inner transaction including transaction signer.
|
public TransactionType getType()
public NetworkType getNetworkType()
public java.lang.Integer getVersion()
public Deadline getDeadline()
public java.math.BigInteger getMaxFee()
public java.util.Optional<java.lang.String> getSignature()
public java.util.Optional<PublicAccount> getSigner()
public java.util.Optional<TransactionInfo> getTransactionInfo()
public byte[] serialize()
public long getSize()
public java.lang.String createTransactionHash(java.lang.String transactionPayload, byte[] generationHashBytes)
transactionPayload
- Transaction payloadgenerationHashBytes
- the generation hash.public byte[] getSignBytes(byte[] payloadBytes, byte[] generationHashBytes)
payloadBytes
- Payload bytes.generationHashBytes
- Generation hash bytes.public SignedTransaction signWith(Account account, java.lang.String generationHash)
account
- The account to sign the transaction.generationHash
- The generation hash for the network.SignedTransaction
public Transaction toAggregate(PublicAccount signer)
signer
- Transaction signer.public boolean isUnconfirmed()
public boolean isPartial()
public boolean hasMissingSignatures()
public boolean isUnannounced()
public boolean isConfirmed()
public java.util.Optional<TransactionGroup> getGroup()
public boolean isTransactionFullyLoaded()
public java.util.Optional<java.lang.String> getRecordId()
Stored
getRecordId
in interface Stored