Package io.nem.symbol.catapult.builders
Class SecretLockTransactionBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.TransactionBuilder
-
- io.nem.symbol.catapult.builders.SecretLockTransactionBuilder
-
- All Implemented Interfaces:
Serializer
public class SecretLockTransactionBuilder extends TransactionBuilder implements Serializer
Binary layout for a non-embedded secret lock transaction
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSecretLockTransactionBuilder(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, AmountDto fee, TimestampDto deadline, Hash256Dto secret, UnresolvedMosaicBuilder mosaic, BlockDurationDto duration, LockHashAlgorithmDto hashAlgorithm, UnresolvedAddressDto recipientAddress)Constructor.protectedSecretLockTransactionBuilder(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 SecretLockTransactionBuildercreate(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, AmountDto fee, TimestampDto deadline, Hash256Dto secret, UnresolvedMosaicBuilder mosaic, BlockDurationDto duration, LockHashAlgorithmDto hashAlgorithm, UnresolvedAddressDto recipientAddress)Creates an instance of SecretLockTransactionBuilder.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 SecretLockTransactionBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of SecretLockTransactionBuilder from a stream.byte[]serialize()Serializes an object to bytes.-
Methods inherited from class io.nem.symbol.catapult.builders.TransactionBuilder
create, getDeadline, getFee, getNetwork, getSignature, getSignerPublicKey, getStreamSize, getType, getVersion
-
-
-
-
Constructor Detail
-
SecretLockTransactionBuilder
protected SecretLockTransactionBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
SecretLockTransactionBuilder
protected SecretLockTransactionBuilder(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, AmountDto fee, TimestampDto deadline, Hash256Dto secret, UnresolvedMosaicBuilder mosaic, BlockDurationDto duration, LockHashAlgorithmDto hashAlgorithm, UnresolvedAddressDto recipientAddress)
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.secret- Secret.mosaic- Locked mosaic.duration- Number of blocks for which a lock should be valid.hashAlgorithm- Hash algorithm.recipientAddress- Locked mosaic recipient address.
-
-
Method Detail
-
loadFromBinary
public static SecretLockTransactionBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of SecretLockTransactionBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of SecretLockTransactionBuilder.
-
create
public static SecretLockTransactionBuilder create(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, AmountDto fee, TimestampDto deadline, Hash256Dto secret, UnresolvedMosaicBuilder mosaic, BlockDurationDto duration, LockHashAlgorithmDto hashAlgorithm, UnresolvedAddressDto recipientAddress)
Creates an instance of SecretLockTransactionBuilder.- 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.secret- Secret.mosaic- Locked mosaic.duration- Number of blocks for which a lock should be valid.hashAlgorithm- Hash algorithm.recipientAddress- Locked mosaic recipient address.- Returns:
- Instance of SecretLockTransactionBuilder.
-
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.
-
getRecipientAddress
public UnresolvedAddressDto getRecipientAddress()
Gets locked mosaic recipient address.- Returns:
- Locked mosaic recipient address.
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Overrides:
getSizein classTransactionBuilder- Returns:
- Size in bytes.
-
getBody
public SecretLockTransactionBodyBuilder 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.
-
-