feat(proto): add publisher ICO order flow
This commit is contained in:
@@ -71,6 +71,7 @@ message MarketOrder {
|
|||||||
repeated string tags = 20;
|
repeated string tags = 20;
|
||||||
repeated string comment = 21;
|
repeated string comment = 21;
|
||||||
optional MarketOrder source = 22; // purchase is done via this field
|
optional MarketOrder source = 22; // purchase is done via this field
|
||||||
|
bool is_ico = 23;
|
||||||
// repeated string attachments = 14; // possible files included by
|
// repeated string attachments = 14; // possible files included by
|
||||||
// seller/buyer
|
// seller/buyer
|
||||||
}
|
}
|
||||||
@@ -130,6 +131,7 @@ message NewMarketReq {
|
|||||||
MarketOrderSide side = 8;
|
MarketOrderSide side = 8;
|
||||||
// TODO: maker market order as optional
|
// TODO: maker market order as optional
|
||||||
optional uint64 maker_order_id = 9;
|
optional uint64 maker_order_id = 9;
|
||||||
|
bool is_ico = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum MarketOrdersSortBy {
|
enum MarketOrdersSortBy {
|
||||||
@@ -164,6 +166,7 @@ message OrderListFilter {
|
|||||||
optional MarketOrdersSortBy sort_by = 19;
|
optional MarketOrdersSortBy sort_by = 19;
|
||||||
optional uint32 page_no = 21;
|
optional uint32 page_no = 21;
|
||||||
optional uint32 page_size = 22;
|
optional uint32 page_size = 22;
|
||||||
|
optional bool is_ico = 23;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Contract */
|
/* Contract */
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ package market.v1;
|
|||||||
import "auth/v1/msg.proto";
|
import "auth/v1/msg.proto";
|
||||||
import "base/v1/msg.proto";
|
import "base/v1/msg.proto";
|
||||||
import "market/v1/msg.proto";
|
import "market/v1/msg.proto";
|
||||||
|
import "wallet/v1/msg.proto";
|
||||||
|
|
||||||
service MarketplaceSrv {
|
service MarketplaceSrv {
|
||||||
rpc MarketplaceSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
rpc MarketplaceSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
||||||
@@ -16,10 +17,12 @@ service MarketplaceSrv {
|
|||||||
rpc GetMarketAssetList(MarketAssetListReq) returns (MarketAssetList); // assets that can be listed in marketplace
|
rpc GetMarketAssetList(MarketAssetListReq) returns (MarketAssetList); // assets that can be listed in marketplace
|
||||||
|
|
||||||
rpc CalcMarketOrder(CalcMarketReq) returns (CalcMarketRes);
|
rpc CalcMarketOrder(CalcMarketReq) returns (CalcMarketRes);
|
||||||
|
rpc CalcICOBuy(wallet.v1.BuyAssetReq) returns (wallet.v1.CalcBuyAssetRes);
|
||||||
|
|
||||||
rpc CancelOrder(auth.v1.IdReqWithIAMAndTFA) returns (base.v1.StatusRes); // cancel an order
|
rpc CancelOrder(auth.v1.IdReqWithIAMAndTFA) returns (base.v1.StatusRes); // cancel an order
|
||||||
|
|
||||||
rpc NewMarketOrder(NewMarketReq) returns (MarketOrder); // insert new buy order to market
|
rpc NewMarketOrder(NewMarketReq) returns (MarketOrder); // insert new buy order to market
|
||||||
rpc GenerateMarketContract(MarketContractReq) returns (ContractMarketRes);
|
rpc GenerateMarketContract(MarketContractReq) returns (ContractMarketRes);
|
||||||
rpc ConfirmMarketContract(ConfirmMarketContractReq) returns (base.v1.StatusRes);
|
rpc ConfirmMarketContract(ConfirmMarketContractReq) returns (base.v1.StatusRes);
|
||||||
|
rpc SettleICOBuy(wallet.v1.ConfirmBuyAssetReq) returns (wallet.v1.BuyAssetRes);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -814,12 +814,14 @@ message CalcBuyAssetRes {
|
|||||||
double calculated_asset_amount = 3;
|
double calculated_asset_amount = 3;
|
||||||
EffectiveCommission commission = 4;
|
EffectiveCommission commission = 4;
|
||||||
optional AssetDiscountRes discount_detail = 5;
|
optional AssetDiscountRes discount_detail = 5;
|
||||||
|
uint64 maker_order_id = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BuyAssetRes {
|
message BuyAssetRes {
|
||||||
bool success = 1;
|
bool success = 1;
|
||||||
string irt_hash = 2;
|
string irt_hash = 2;
|
||||||
string asset_hash = 3;
|
string asset_hash = 3;
|
||||||
|
uint64 order_id = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Contract */
|
/* Contract */
|
||||||
|
|||||||
Reference in New Issue
Block a user