Package io.nem.symbol.catapult.builders
Class EmbeddedSecretLockTransactionBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.EmbeddedTransactionHeaderBuilder
-
- io.nem.symbol.catapult.builders.EmbeddedTransactionBuilder
-
- io.nem.symbol.catapult.builders.EmbeddedSecretLockTransactionBuilder
-
- All Implemented Interfaces:
Serializer
public class EmbeddedSecretLockTransactionBuilder extends EmbeddedTransactionBuilder implements Serializer
Binary layout for an embedded secret lock transaction
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEmbeddedSecretLockTransactionBuilder(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, UnresolvedAddressDto recipientAddress, Hash256Dto secret, UnresolvedMosaicBuilder mosaic, BlockDurationDto duration, LockHashAlgorithmDto hashAlgorithm)Constructor.protectedEmbeddedSecretLockTransactionBuilder(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 EmbeddedSecretLockTransactionBuildercreate(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, UnresolvedAddressDto recipientAddress, Hash256Dto secret, UnresolvedMosaicBuilder mosaic, BlockDurationDto duration, LockHashAlgorithmDto hashAlgorithm)Creates an instance of EmbeddedSecretLockTransactionBuilder.SecretLockTransactionBodyBuildergetBody()Gets the body builder of the object.BlockDurationDtogetDuration()Gets number of blocks for which a lock should be valid.LockHashAlgorithmDtogetHashAlgorithm()Gets hash algorithm.UnresolvedMosaicBuildergetMosaic()Gets locked mosaic.UnresolvedAddressDtogetRecipientAddress()Gets locked mosaic recipient address.Hash256DtogetSecret()Gets secret.intgetSize()Gets the size of the object.static EmbeddedSecretLockTransactionBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of EmbeddedSecretLockTransactionBuilder from a stream.byte[]serialize()Serializes an object to bytes.-
Methods inherited from class io.nem.symbol.catapult.builders.EmbeddedTransactionBuilder
create, getNetwork, getSignerPublicKey, getType, getVersion
-
Methods inherited from class io.nem.symbol.catapult.builders.EmbeddedTransactionHeaderBuilder
create, getStreamSize
-
-
-
-
Constructor Detail
-
EmbeddedSecretLockTransactionBuilder
protected EmbeddedSecretLockTransactionBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
EmbeddedSecretLockTransactionBuilder
protected EmbeddedSecretLockTransactionBuilder(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, UnresolvedAddressDto recipientAddress, Hash256Dto secret, UnresolvedMosaicBuilder mosaic, BlockDurationDto duration, LockHashAlgorithmDto hashAlgorithm)
Constructor.- Parameters:
signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.recipientAddress- Locked mosaic recipient address.secret- Secret.mosaic- Locked mosaic.duration- Number of blocks for which a lock should be valid.hashAlgorithm- Hash algorithm.
-
-
Method Detail
-
loadFromBinary
public static EmbeddedSecretLockTransactionBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of EmbeddedSecretLockTransactionBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of EmbeddedSecretLockTransactionBuilder.
-
create
public static EmbeddedSecretLockTransactionBuilder create(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, UnresolvedAddressDto recipientAddress, Hash256Dto secret, UnresolvedMosaicBuilder mosaic, BlockDurationDto duration, LockHashAlgorithmDto hashAlgorithm)
Creates an instance of EmbeddedSecretLockTransactionBuilder.- Parameters:
signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.recipientAddress- Locked mosaic recipient address.secret- Secret.mosaic- Locked mosaic.duration- Number of blocks for which a lock should be valid.hashAlgorithm- Hash algorithm.- Returns:
- Instance of EmbeddedSecretLockTransactionBuilder.
-
getRecipientAddress
public UnresolvedAddressDto getRecipientAddress()
Gets locked mosaic recipient address.- Returns:
- Locked mosaic recipient address.
-
getSecret
public Hash256Dto getSecret()
Gets secret.- Returns:
- Secret.
-
getMosaic
public UnresolvedMosaicBuilder getMosaic()
Gets locked mosaic.- Returns:
- Locked mosaic.
-
getDuration
public BlockDurationDto getDuration()
Gets number of blocks for which a lock should be valid.- Returns:
- Number of blocks for which a lock should be valid.
-
getHashAlgorithm
public LockHashAlgorithmDto getHashAlgorithm()
Gets hash algorithm.- Returns:
- Hash algorithm.
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Overrides:
getSizein classEmbeddedTransactionBuilder- Returns:
- Size in bytes.
-
getBody
public SecretLockTransactionBodyBuilder getBody()
Gets the body builder of the object.- Overrides:
getBodyin classEmbeddedTransactionBuilder- Returns:
- Body builder.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Overrides:
serializein classEmbeddedTransactionBuilder- Returns:
- Serialized bytes.
-
-