diff --git a/proto/operator.proto b/proto/operator.proto index e861a061a..49c73ad0a 100644 --- a/proto/operator.proto +++ b/proto/operator.proto @@ -106,29 +106,50 @@ message Notification { } } -enum NotificationType { - NOTIFICATION_TYPE_UNSPECIFIED = 0; - NOTIFICATION_TYPE_CHANNEL_OPENING = 1; - NOTIFICATION_TYPE_CHANNEL_OPENED = 2; - NOTIFICATION_TYPE_CHANNEL_CLOSED = 3; - NOTIFICATION_TYPE_CHALLENGE_STARTED = 4; - NOTIFICATION_TYPE_CHALLENGE_CLEARED = 5; - NOTIFICATION_TYPE_CHALLENGE_FINISHED = 6; - NOTIFICATION_TYPE_MARGIN_UPDATED = 7; -} - -enum ChannelStatus { - CHANNEL_STATUS_UNSPECIFIED = 0; - CHANNEL_STATUS_OPENING = 1; - CHANNEL_STATUS_OPEN = 2; - CHANNEL_STATUS_CHALLENGING = 3; - CHANNEL_STATUS_CLOSED = 4; +enum ClearingEvent { + CLEARING_EVENT_UNSPECIFIED = 0; + CLEARING_EVENT_INSTANTIATED = 1; + CLEARING_EVENT_ACCEPTED = 2; + CLEARING_EVENT_FAILED = 3; + CLEARING_EVENT_INITIATOR_FUNDED = 4; + CLEARING_EVENT_RESPONDER_FUNDED = 5; + CLEARING_EVENT_POSTFUND_PROPOSED = 6; + CLEARING_EVENT_POSTFUND_ACCEPTED = 7; + CLEARING_EVENT_MOVE_TO_OPERATIONAL = 8; + CLEARING_EVENT_ISSUE_MARGIN_CALL = 9; + CLEARING_EVENT_STARTED_SETTLEMENT = 10; + CLEARING_EVENT_ISSUE_POST_SETTLEMENT_MARGIN = 11; + CLEARING_EVENT_FINALIZE_SETTLEMENT = 12; + CLEARING_EVENT_FAILED_SETTLEMENT = 13; + CLEARING_EVENT_CHALLENGE = 14; + CLEARING_EVENT_FINALIZE = 15; + CLEARING_EVENT_WITHDRAW = 16; + CLEARING_EVENT_CLEAR_CHALLENGE = 17; + CLEARING_EVENT_CHALLENGE_TIMEOUT = 18; +} + +enum ClearingState { + CLEARING_STATE_UNSPECIFIED = 0; + CLEARING_STATE_INSTANTIATED = 1; + CLEARING_STATE_ACCEPTED= 2; + CLEARING_STATE_FAILED = 3; + CLEARING_STATE_INITIATOR_FUNDED = 4; + CLEARING_STATE_FUNDED = 5; + CLEARING_STATE_OPERATIONAL = 6; + CLEARING_STATE_ISSUING_MARGIN_CALL = 7; + CLEARING_STATE_ACTIVE_SETTLEMENT = 8; + CLEARING_STATE_ISSUING_POST_SETTLEMENT_MARGIN = 9; + CLEARING_STATE_CHALLENGING = 10; + CLEARING_STATE_FINALIZING = 11; + CLEARING_STATE_WITHDRAWING = 12; + CLEARING_STATE_CONCLUDING = 13; + CLEARING_STATE_DEFAULT = 14; } message StreamNotification { string channel_id = 1; - NotificationType notification_type = 2; - ChannelStatus channel_status = 3; + ClearingEvent event = 2; + ClearingState state = 3; core.ProtocolIndex my_role = 4; auth.Peer peer = 5; core.MarginLimitType margin_limit_type = 6;