Last active
December 4, 2023 16:30
-
-
Save altuntasfatih/ec93b3726e73af290067d7edd9fa7d95 to your computer and use it in GitHub Desktop.
Protobuf definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; | |
| package contract; | |
| service Connect { | |
| rpc InitMoneyTransfer (InitMoneyTransferRequest) returns (Transfer) {} | |
| rpc ApproveTransfer (ApproveRequest) returns (Transfer) {} | |
| rpc RejectTransfer (RejectRequest) returns (Transfer) {} | |
| } | |
| service Game { | |
| rpc HandleApproved (Transfer) returns (Response) {} | |
| rpc HandleRejected (Transfer) returns (Response) {} | |
| rpc HandleExpired (Transfer) returns (Response) {} | |
| } | |
| service Wallet { | |
| rpc HandleTransfer(Transfer) returns (Response) {} | |
| rpc HandleExpired (Transfer) returns (Response) {} | |
| } | |
| enum TransferStatus { | |
| OPEN = 0; | |
| APPROVED = 1; | |
| REJECTED = 2; | |
| EXPIRED = 3; | |
| } | |
| message Transfer { | |
| int64 id = 1; | |
| string uuid = 2; | |
| float amount = 3; | |
| TransferStatus status = 4; | |
| string expires_at = 5; | |
| } | |
| message InitMoneyTransferRequest { float amount = 2; } | |
| message ApproveRequest { string uuid = 1; } | |
| message RejectRequest { string uuid = 1; } | |
| message Response {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment