Skip to content

SecretLockTransactionV1Descriptor⚓︎

SecretLockTransactionV1Descriptor
Type safe descriptor used to generate a descriptor map for SecretLockTransactionV1Descriptor.

Start a token swap between different chains (V1, latest). Use a SecretLockTransaction to transfer mosaics between two accounts. The mosaics sent remain locked until a valid SecretProofTransaction unlocks them. The default expiration date is 365 days after announcement (See the maxSecretLockDuration network property). If the lock expires before a valid SecretProofTransaction is announced the locked amount goes back to the initiator of the SecretLockTransaction.

Constructors⚓︎

new SecretLockTransactionV1Descriptor()⚓︎

new SecretLockTransactionV1Descriptor(
   recipientAddress, 
   secret, 
   mosaic, 
   duration, 
   hashAlgorithm): SecretLockTransactionV1Descriptor

Creates a descriptor for SecretLockTransactionV1.

Parameters⚓︎

Parameter Type Description
recipientAddress Address Address that receives the funds once successfully unlocked by a SecretProofTransaction.
secret Hash256 Hashed proof.
mosaic UnresolvedMosaicDescriptor Locked mosaics.
duration BlockDuration Number of blocks to wait for the SecretProofTransaction.
hashAlgorithm LockHashAlgorithm Algorithm used to hash the proof.

Returns⚓︎

SecretLockTransactionV1Descriptor

Properties⚓︎

Property Type
rawDescriptor object
rawDescriptor.duration BlockDuration
rawDescriptor.hashAlgorithm LockHashAlgorithm
rawDescriptor.mosaic any
rawDescriptor.recipientAddress Address
rawDescriptor.secret Hash256
rawDescriptor.type string

Methods⚓︎

toMap()⚓︎

toMap(): object
SecretLockTransactionV1Descriptor.toMap
Builds a representation of this descriptor that can be passed to a factory function.

Returns⚓︎

object

Descriptor that can be passed to a factory function.