From 286b8e549bbd928e4a19c37465dbadc02a12656b Mon Sep 17 00:00:00 2001 From: nfel Date: Fri, 14 Aug 2026 19:49:25 +0330 Subject: [PATCH] feat(proto): add publisher ICO order flow --- market/v1/msg.proto | 3 +++ market/v1/srv.proto | 3 +++ wallet/v1/msg.proto | 2 ++ 3 files changed, 8 insertions(+) diff --git a/market/v1/msg.proto b/market/v1/msg.proto index 9f21643..4443016 100644 --- a/market/v1/msg.proto +++ b/market/v1/msg.proto @@ -71,6 +71,7 @@ message MarketOrder { repeated string tags = 20; repeated string comment = 21; optional MarketOrder source = 22; // purchase is done via this field + bool is_ico = 23; // repeated string attachments = 14; // possible files included by // seller/buyer } @@ -130,6 +131,7 @@ message NewMarketReq { MarketOrderSide side = 8; // TODO: maker market order as optional optional uint64 maker_order_id = 9; + bool is_ico = 10; } enum MarketOrdersSortBy { @@ -164,6 +166,7 @@ message OrderListFilter { optional MarketOrdersSortBy sort_by = 19; optional uint32 page_no = 21; optional uint32 page_size = 22; + optional bool is_ico = 23; } /* Contract */ diff --git a/market/v1/srv.proto b/market/v1/srv.proto index 5a1ef52..170144e 100644 --- a/market/v1/srv.proto +++ b/market/v1/srv.proto @@ -5,6 +5,7 @@ package market.v1; import "auth/v1/msg.proto"; import "base/v1/msg.proto"; import "market/v1/msg.proto"; +import "wallet/v1/msg.proto"; service MarketplaceSrv { 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 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 NewMarketOrder(NewMarketReq) returns (MarketOrder); // insert new buy order to market rpc GenerateMarketContract(MarketContractReq) returns (ContractMarketRes); rpc ConfirmMarketContract(ConfirmMarketContractReq) returns (base.v1.StatusRes); + rpc SettleICOBuy(wallet.v1.ConfirmBuyAssetReq) returns (wallet.v1.BuyAssetRes); } diff --git a/wallet/v1/msg.proto b/wallet/v1/msg.proto index 013ed93..0e49f55 100644 --- a/wallet/v1/msg.proto +++ b/wallet/v1/msg.proto @@ -814,12 +814,14 @@ message CalcBuyAssetRes { double calculated_asset_amount = 3; EffectiveCommission commission = 4; optional AssetDiscountRes discount_detail = 5; + uint64 maker_order_id = 6; } message BuyAssetRes { bool success = 1; string irt_hash = 2; string asset_hash = 3; + uint64 order_id = 4; } /* Contract */