common.appointment¶
-
class
Appointment
(locator, encrypted_blob, to_self_delay)[source]¶ Bases:
object
The
Appointment
contains the information regarding an appointment between a client and the Watchtower.- Parameters
locator (
str
) – A 16-byte hex-encoded value used by the tower to detect channel breaches. It serves as a trigger for the tower to decrypt and broadcast the penalty transaction.encrypted_blob (
str
) – An encrypted blob of data containing a penalty transaction. The tower will decrypt it and broadcast the penalty transaction upon seeing a breach on the blockchain.to_self_delay (
int
) – Theto_self_delay
encoded in thecsv
of theto_remote
output of the commitment transaction that this appointment is covering.
-
classmethod
from_dict
(appointment_data)[source]¶ Builds an appointment from a dictionary.
- Parameters
appointment_data (
dict
) – a dictionary containing the following keys:{locator, to_self_delay, encrypted_blob}
- Returns
An appointment initialized using the provided data.
- Return type
- Raises
ValueError – If one of the mandatory keys is missing in
appointment_data
.