TimeLock
@iota/notarization API documentation
Class: TimeLock
Represents a time lock configuration.
It allows the creation and inspection of time lock configurations for notarization objects.
Properties
type
readonlytype:TimeLockType
Retrieves the type of the time lock.
Returns
The TimeLockType representing the type of the time lock.
args
readonlyargs:any
Retrieves the arguments associated with the time lock.
Returns
An any value containing the arguments for the time lock:
- For
UnlockAt, the timestamp is returned. - For other types,
undefinedis returned.
Methods
toJSON()
toJSON():
Object
- Return copy of self without private attributes.
Returns
Object
toString()
toString():
string
Return stringified version of self.
Returns
string
withUnlockAt()
staticwithUnlockAt(time):TimeLock
Creates a time lock that unlocks at a specific timestamp.
Arguments
time- The timestamp in seconds since the Unix epoch at which the object will unlock.
Returns
A new TimeLock instance configured to unlock at the specified timestamp.
Parameters
time
number
Returns
TimeLock
withUntilDestroyed()
staticwithUntilDestroyed():TimeLock
Creates a time lock that remains locked until the object is destroyed.
Returns
A new TimeLock instance configured to remain locked until destruction.
Returns
TimeLock
withNone()
staticwithNone():TimeLock
Creates a time lock with no restrictions.
Returns
A new TimeLock instance with no time lock applied.
Returns
TimeLock