syntax = "proto3"; package crash_event; option go_package = ".;crash_event"; message Response { oneof message { ResponseError error = 1; ResponseGameplay gameplay = 2; ResponsePlay play = 3; ResponseNext next = 4; ResponseCashOut cashout = 5; } } message Request { oneof message { RequestGameplay gameplay = 1; RequestPlay play = 2; RequestCashOut cashout = 3; } } message ResponseError { // 1: không phải time cược // 2: mức cược k tồn tại // 3: không đủ chip // 4: cửa đặt không tồn tại // 5: không tìm được thông tin user // 6: action không hợp lệ uint32 code = 1; // 1: RequestBet // 2: RequestTipDealer uint32 tag = 2; } message RequestGameplay {} message ResponseGameplay { bool is_playing = 1; // đang chơi hay ko? int64 current_bet = 2; // mức cược hiện tại float current_cashout_multiplier = 3; // tỉ lệ nhân cash-out hiện tại float current_multiplier = 4; // tỉ lệ nhân hiện tại int64 current_profit = 5; // lợi nhuận hiện tại tính theo tiền repeated int64 bets = 6; // mực cược dùng được repeated int64 show_bets = 7; // mức cược nhìn int64 user_money = 8; // tiền user float min_multiplier = 9; // list multiplier chọn nhanh để cashout float max_multiplier = 10; } message RequestPlay { int64 bet = 1; float cashout_at = 2; } message ResponsePlay { int64 bet = 1; float cashout_at = 2; int64 max_profit = 3; } enum CrashStatus { Processing = 0; Crash = 1; } message ResponseNext { float elapse = 1; // round đã chạy bao nhiêu giây int64 start_time = 2; // time bắt đầu round tính theo nano float multiplier = 3; // multiplier hiện tại CrashStatus status = 4; // trạng thái int64 timestamp = 5; // thời điểm đạt multiplier này tính theo nao seconds bool is_cashed_out = 6; // true nếu đã CO int64 profit = 7; // lợi nhuận hiện tại float profit_multiplier = 8; // lợi nhuận tính theo hệ số nhân } message RequestCashOut { int64 timestamp = 1; } message ResponseCashOut { float multiplier = 1; int64 profit = 2; int64 user_money = 3; }