teos.extended_appointment¶
-
class
ExtendedAppointment
(locator, encrypted_blob, to_self_delay, user_id, user_signature, start_block)[source]¶ Bases:
common.appointment.Appointment
The
ExtendedAppointment
contains extended information about an appointment between a user and the tower.It extends the
Appointment
with information relevant to the tower, such as theuser_id
,user_signature
andstart_block
.- 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.user_id (
str
) – the public key that identifies the user (33-bytes hex str).user_signature (
str
) – the signature of the appointment by the user.start_block (
str
) – the block height at where the towers started watching for this appointment.
-
classmethod
from_dict
(appointment_data)[source]¶ Builds an appointment from a dictionary.
This method is useful to load data from a database.
- Parameters
appointment_data (
dict
) – a dictionary containing the following keys:{locator, to_self_delay, encrypted_blob, user_id}
- Returns
An appointment initialized using the provided data.
- Return type
- Raises
ValueError – If one of the mandatory keys is missing in
appointment_data
.