Skip to content

Commit

Permalink
Add OfferInfo field isActivated, rpc EditOffer to proto
Browse files Browse the repository at this point in the history
  • Loading branch information
ghubstan committed Jun 13, 2021
1 parent d9dd718 commit 1daf471
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions proto/src/main/proto/grpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ service Offers {
}
rpc CreateOffer (CreateOfferRequest) returns (CreateOfferReply) {
}
rpc EditOffer (EditOfferRequest) returns (EditOfferReply) {
}
rpc CancelOffer (CancelOfferRequest) returns (CancelOfferReply) {
}
}
Expand Down Expand Up @@ -128,6 +130,35 @@ message CreateOfferReply {
OfferInfo offer = 1;
}

message EditOfferRequest {
string id = 1;
string price = 2;
bool useMarketBasedPrice = 3;
double marketPriceMargin = 4;
uint64 triggerPrice = 5;
// Send a signed int, not a bool (with default=false).
// -1 = do not change activation state
// 0 = disable
// 1 = enable
sint32 enable = 6;
// The EditType constricts what offer details can be modified and simplifies param validation.
enum EditType {
ACTIVATION_STATE_ONLY = 0;
FIXED_PRICE_ONLY = 1;
FIXED_PRICE_AND_ACTIVATION_STATE = 2;
MKT_PRICE_MARGIN_ONLY = 3;
MKT_PRICE_MARGIN_AND_ACTIVATION_STATE = 4;
TRIGGER_PRICE_ONLY = 5;
TRIGGER_PRICE_AND_ACTIVATION_STATE = 6;
MKT_PRICE_MARGIN_AND_TRIGGER_PRICE = 7;
MKT_PRICE_MARGIN_AND_TRIGGER_PRICE_AND_ACTIVATION_STATE = 8;
}
EditType editType = 7;
}

message EditOfferReply {
}

message CancelOfferRequest {
string id = 1;
}
Expand Down Expand Up @@ -159,6 +190,7 @@ message OfferInfo {
string offerFeePaymentTxId = 21;
uint64 txFee = 22;
uint64 makerFee = 23;
bool isActivated = 24;
}

message AvailabilityResultWithDescription {
Expand Down

0 comments on commit 1daf471

Please sign in to comment.