Package org.symbol.sdk.symbol.models
Class Transaction
java.lang.Object
org.symbol.sdk.CatbufferType
org.symbol.sdk.symbol.models.Transaction
- All Implemented Interfaces:
Serializer,BaseTransaction
- Direct Known Subclasses:
AccountAddressRestrictionTransactionV1,AccountKeyLinkTransactionV1,AccountMetadataTransactionV1,AccountMosaicRestrictionTransactionV1,AccountOperationRestrictionTransactionV1,AddressAliasTransactionV1,AggregateBondedTransactionV1,AggregateBondedTransactionV2,AggregateBondedTransactionV3,AggregateCompleteTransactionV1,AggregateCompleteTransactionV2,AggregateCompleteTransactionV3,HashLockTransactionV1,MosaicAddressRestrictionTransactionV1,MosaicAliasTransactionV1,MosaicDefinitionTransactionV1,MosaicGlobalRestrictionTransactionV1,MosaicMetadataTransactionV1,MosaicSupplyChangeTransactionV1,MosaicSupplyRevocationTransactionV1,MultisigAccountModificationTransactionV1,NamespaceMetadataTransactionV1,NamespaceRegistrationTransactionV1,NodeKeyLinkTransactionV1,SecretLockTransactionV1,SecretProofTransactionV1,TransferTransactionV1,VotingKeyLinkTransactionV1,VrfKeyLinkTransactionV1
public sealed class Transaction
extends CatbufferType
implements BaseTransaction
permits AccountAddressRestrictionTransactionV1, AccountKeyLinkTransactionV1, AccountMetadataTransactionV1, AccountMosaicRestrictionTransactionV1, AccountOperationRestrictionTransactionV1, AddressAliasTransactionV1, AggregateBondedTransactionV1, AggregateBondedTransactionV2, AggregateBondedTransactionV3, AggregateCompleteTransactionV1, AggregateCompleteTransactionV2, AggregateCompleteTransactionV3, HashLockTransactionV1, MosaicAddressRestrictionTransactionV1, MosaicAliasTransactionV1, MosaicDefinitionTransactionV1, MosaicGlobalRestrictionTransactionV1, MosaicMetadataTransactionV1, MosaicSupplyChangeTransactionV1, MosaicSupplyRevocationTransactionV1, MultisigAccountModificationTransactionV1, NamespaceMetadataTransactionV1, NamespaceRegistrationTransactionV1, NodeKeyLinkTransactionV1, SecretLockTransactionV1, SecretProofTransactionV1, TransferTransactionV1, VotingKeyLinkTransactionV1, VrfKeyLinkTransactionV1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Timestampprotected final longprotected Amountprotected NetworkTypeprotected Signatureprotected PublicKeyprotected TransactionTypeprotected final longprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the deadline field.getFee()Gets the fee field.Reads a named field.Gets the network field.Gets the signature field.Gets the signerPublicKey field.getType()Gets the type field.intGets the version field.protected voidserializeInto(Writer buffer) Writes this object's fields into the supplied buffer.voidsetDeadline(Timestamp value) Sets the deadline field.voidSets the fee field.voidSets a named field.voidsetNetwork(NetworkType value) Sets the network field.voidsetSignature(Signature value) Sets the signature field.voidsetSignerPublicKey(PublicKey value) Sets the signerPublicKey field.voidsetType(TransactionType value) Sets the type field.voidsetVersion(int value) Sets the version field.intsize()Calculates the size of the object.toJson()Converts this object to a JSON-serializable representation.toString()Returns a string representation of this object.Returns the type-hint map driving the rule-based descriptor pipeline.Methods inherited from class org.symbol.sdk.CatbufferType
asByteArray, asBytes, asInt, asList, asLong, serialize, sort, toJsonStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.symbol.sdk.symbol.BaseTransaction
sortMethods inherited from interface org.symbol.sdk.Serializer
serialize
-
Field Details
-
signature
-
signerPublicKey
-
version
protected int version -
network
-
type
-
fee
-
deadline
-
verifiableEntityHeaderReserved_1
protected final long verifiableEntityHeaderReserved_1- See Also:
-
entityBodyReserved_1
protected final long entityBodyReserved_1- See Also:
-
TYPE_HINTS
-
-
Constructor Details
-
Transaction
public Transaction()Creates a new Transaction.
-
-
Method Details
-
typeHints
- Transaction.typeHints
- Returns the type-hint map driving the rule-based descriptor pipeline.
- Overrides:
typeHintsin classCatbufferType- Returns:
- Field-name → rule-key map.
-
setField
- Transaction.setField
- Sets a named field. Used by the rule-based descriptor pipeline.
- Specified by:
setFieldin interfaceBaseTransaction- Overrides:
setFieldin classCatbufferType- Parameters:
name- Field name (descriptor key).value- Value to assign.
-
getField
- Transaction.getField
- Reads a named field. Used by the facade-level entity inspection helpers.
- Specified by:
getFieldin interfaceBaseTransaction- Overrides:
getFieldin classCatbufferType- Parameters:
name- Field name.- Returns:
- Field value.
-
getSignature
- Transaction.getSignature
- Gets the signature field.
- Returns:
- The signature field.
-
setSignature
- Transaction.setSignature
- Sets the signature field.
- Parameters:
value- New signature value.
-
getSignerPublicKey
- Transaction.getSignerPublicKey
- Gets the signerPublicKey field.
- Specified by:
getSignerPublicKeyin interfaceBaseTransaction- Returns:
- The signerPublicKey field.
-
setSignerPublicKey
- Transaction.setSignerPublicKey
- Sets the signerPublicKey field.
- Parameters:
value- New signerPublicKey value.
-
getVersion
public int getVersion()- Transaction.getVersion
- Gets the version field.
- Specified by:
getVersionin interfaceBaseTransaction- Returns:
- The version field.
-
setVersion
public void setVersion(int value) - Transaction.setVersion
- Sets the version field.
- Parameters:
value- New version value.
-
getNetwork
- Transaction.getNetwork
- Gets the network field.
- Specified by:
getNetworkin interfaceBaseTransaction- Returns:
- The network field.
-
setNetwork
- Transaction.setNetwork
- Sets the network field.
- Parameters:
value- New network value.
-
getType
- Transaction.getType
- Gets the type field.
- Specified by:
getTypein interfaceBaseTransaction- Returns:
- The type field.
-
setType
- Transaction.setType
- Sets the type field.
- Parameters:
value- New type value.
-
getFee
- Transaction.getFee
- Gets the fee field.
- Returns:
- The fee field.
-
setFee
- Transaction.setFee
- Sets the fee field.
- Parameters:
value- New fee value.
-
getDeadline
- Transaction.getDeadline
- Gets the deadline field.
- Returns:
- The deadline field.
-
setDeadline
- Transaction.setDeadline
- Sets the deadline field.
- Parameters:
value- New deadline value.
-
size
public int size()- Transaction.size
- Calculates the size of the object.
- Specified by:
sizein interfaceSerializer- Returns:
- Size of this object in bytes.
-
serializeInto
- Transaction.serializeInto
- Writes this object's fields into the supplied buffer.
- Specified by:
serializeIntoin classCatbufferType- Parameters:
buffer- Output writer.
-
toString
- Transaction.toString
- Returns a string representation of this object.
-
toJson
- Transaction.toJson
- Converts this object to a JSON-serializable representation.
- Specified by:
toJsonin classCatbufferType- Returns:
- JSON-serializable representation of this object.
-