Class HashLockTransactionV1Descriptor
- All Implemented Interfaces:
SymbolTransactionDescriptor,SymbolTypedDescriptor,TypedDescriptor
- HashLockTransactionV1Descriptor
Type safe descriptor used to generate a descriptor map for HashLockTransactionV1Descriptor.
Lock a deposit needed to announce an AggregateBondedTransaction (V1, latest). An AggregateBondedTransaction consumes network resources as it is stored in every node's partial cache while it waits to be fully signed. To avoid spam attacks a HashLockTransaction must be announced and confirmed before an AggregateBondedTransaction can be announced. The HashLockTransaction locks a certain amount of funds (10 XYM by default) until the aggregate is signed. Upon completion of the aggregate, the locked funds become available again to the account that signed the HashLockTransaction. If the lock expires before the aggregate is signed by all cosignatories (48h by default), the locked funds become a reward collected by the block harvester at the height where the lock expires.
Note: It is not necessary to sign the aggregate and its HashLockTransaction with the same account. For example, if Bob wants to announce an aggregate and does not have enough funds to announce a HashLockTransaction, he can ask Alice to announce the lock transaction for him by sharing the signed AggregateTransaction hash.
-
Constructor Summary
ConstructorsConstructorDescriptionHashLockTransactionV1Descriptor(UnresolvedMosaicDescriptor mosaic, BlockDuration duration, CryptoTypes.Hash256 hash) Creates a descriptor for HashLockTransactionV1. -
Method Summary
-
Constructor Details
-
HashLockTransactionV1Descriptor
public HashLockTransactionV1Descriptor(UnresolvedMosaicDescriptor mosaic, BlockDuration duration, CryptoTypes.Hash256 hash) Creates a descriptor for HashLockTransactionV1.- Parameters:
mosaic- Locked mosaic.duration- Number of blocks for which a lock should be valid. The default maximum is 48h (See themaxHashLockDurationnetwork property).hash- Hash of the AggregateBondedTransaction to be confirmed before unlocking the mosaics.
-
-
Method Details
-
toMap
- HashLockTransactionV1Descriptor.toMap
Builds a representation of this descriptor that can be passed to a factory function.
- Specified by:
toMapin interfaceTypedDescriptor- Returns:
Descriptor map that can be passed to a transaction factory.
-