Package io.nem.symbol.catapult.builders
Class MosaicMetadataTransactionBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.TransactionBuilder
-
- io.nem.symbol.catapult.builders.MosaicMetadataTransactionBuilder
-
- All Implemented Interfaces:
Serializer
public class MosaicMetadataTransactionBuilder extends TransactionBuilder implements Serializer
Binary layout for a non-embedded mosaic metadata transaction
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMosaicMetadataTransactionBuilder(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, AmountDto fee, TimestampDto deadline, KeyDto targetPublicKey, long scopedMetadataKey, UnresolvedMosaicIdDto targetMosaicId, short valueSizeDelta, java.nio.ByteBuffer value)Constructor.protectedMosaicMetadataTransactionBuilder(java.io.DataInputStream stream)Constructor - Creates an object from stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MosaicMetadataTransactionBuildercreate(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, AmountDto fee, TimestampDto deadline, KeyDto targetPublicKey, long scopedMetadataKey, UnresolvedMosaicIdDto targetMosaicId, short valueSizeDelta, java.nio.ByteBuffer value)Creates an instance of MosaicMetadataTransactionBuilder.MosaicMetadataTransactionBodyBuildergetBody()Gets the body builder of the object.longgetScopedMetadataKey()Gets metadata key scoped to source, target and type.intgetSize()Gets the size of the object.UnresolvedMosaicIdDtogetTargetMosaicId()Gets target mosaic identifier.KeyDtogetTargetPublicKey()Gets metadata target public key.java.nio.ByteBuffergetValue()Gets difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).shortgetValueSizeDelta()Gets change in value size in bytes.static MosaicMetadataTransactionBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of MosaicMetadataTransactionBuilder from a stream.byte[]serialize()Serializes an object to bytes.-
Methods inherited from class io.nem.symbol.catapult.builders.TransactionBuilder
create, getDeadline, getEntityBody_Reserved1, getFee, getNetwork, getSignature, getSignerPublicKey, getStreamSize, getType, getVerifiableEntityHeader_Reserved1, getVersion
-
-
-
-
Constructor Detail
-
MosaicMetadataTransactionBuilder
protected MosaicMetadataTransactionBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
MosaicMetadataTransactionBuilder
protected MosaicMetadataTransactionBuilder(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, AmountDto fee, TimestampDto deadline, KeyDto targetPublicKey, long scopedMetadataKey, UnresolvedMosaicIdDto targetMosaicId, short valueSizeDelta, java.nio.ByteBuffer value)
Constructor.- Parameters:
signature- Entity signature.signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.fee- Transaction fee.deadline- Transaction deadline.targetPublicKey- Metadata target public key.scopedMetadataKey- Metadata key scoped to source, target and type.targetMosaicId- Target mosaic identifier.valueSizeDelta- Change in value size in bytes.value- Difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).
-
-
Method Detail
-
loadFromBinary
public static MosaicMetadataTransactionBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of MosaicMetadataTransactionBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of MosaicMetadataTransactionBuilder.
-
create
public static MosaicMetadataTransactionBuilder create(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, AmountDto fee, TimestampDto deadline, KeyDto targetPublicKey, long scopedMetadataKey, UnresolvedMosaicIdDto targetMosaicId, short valueSizeDelta, java.nio.ByteBuffer value)
Creates an instance of MosaicMetadataTransactionBuilder.- Parameters:
signature- Entity signature.signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.fee- Transaction fee.deadline- Transaction deadline.targetPublicKey- Metadata target public key.scopedMetadataKey- Metadata key scoped to source, target and type.targetMosaicId- Target mosaic identifier.valueSizeDelta- Change in value size in bytes.value- Difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).- Returns:
- Instance of MosaicMetadataTransactionBuilder.
-
getTargetPublicKey
public KeyDto getTargetPublicKey()
Gets metadata target public key.- Returns:
- Metadata target public key.
-
getScopedMetadataKey
public long getScopedMetadataKey()
Gets metadata key scoped to source, target and type.- Returns:
- Metadata key scoped to source, target and type.
-
getTargetMosaicId
public UnresolvedMosaicIdDto getTargetMosaicId()
Gets target mosaic identifier.- Returns:
- Target mosaic identifier.
-
getValueSizeDelta
public short getValueSizeDelta()
Gets change in value size in bytes.- Returns:
- Change in value size in bytes.
-
getValue
public java.nio.ByteBuffer getValue()
Gets difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).- Returns:
- Difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Overrides:
getSizein classTransactionBuilder- Returns:
- Size in bytes.
-
getBody
public MosaicMetadataTransactionBodyBuilder getBody()
Gets the body builder of the object.- Overrides:
getBodyin classTransactionBuilder- Returns:
- Body builder.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Overrides:
serializein classTransactionBuilder- Returns:
- Serialized bytes.
-
-