Skip to content

Commit

Permalink
feat(proto): update notification states and events
Browse files Browse the repository at this point in the history
  • Loading branch information
philanton committed Dec 1, 2023
1 parent dee0ff1 commit e6c46d0
Showing 1 changed file with 40 additions and 19 deletions.
59 changes: 40 additions & 19 deletions proto/operator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e6c46d0

Please sign in to comment.