From cbc7524120ddb6da825c73faf995908cd3f529df Mon Sep 17 00:00:00 2001 From: AmirMahdi Qiasvand Date: Tue, 29 Jul 2025 11:56:51 +0330 Subject: [PATCH] feat: add market contract rpc --- wallet/v1/msg.proto | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/wallet/v1/msg.proto b/wallet/v1/msg.proto index 77fabe5..ae04827 100644 --- a/wallet/v1/msg.proto +++ b/wallet/v1/msg.proto @@ -9,7 +9,9 @@ import "base/v1/msg.proto"; INTERNAL DATA */ -message InternalTransactionData { int64 transaction_id = 1; } +message InternalTransactionData { + int64 transaction_id = 1; +} /* Federation @@ -155,7 +157,7 @@ message AssetList { message AssetFilter { repeated int64 ids = 1; - repeated AssetType type = 2; // AssetType + repeated AssetType type = 2; // AssetType repeated AssetType token_type = 3; // AssetType repeated AssetStatus status = 4; repeated string name = 5; @@ -181,8 +183,7 @@ message AssetDiscountRes { double static_amount = 4; double percentage = 5; double max_amount = 6; - double effective_amount = - 7; // based of asset price and discount amount in req + double effective_amount = 7; // based of asset price and discount amount in req optional int64 supported_asset = 8; } @@ -197,7 +198,9 @@ message GetAssetReq { optional string code = 3; } -message AssetMeta { PropertyMeta property = 1; } +message AssetMeta { + PropertyMeta property = 1; +} message PropertyMeta { string description = 1; @@ -218,7 +221,7 @@ message PropertyMeta { } message PropertyDetail { - repeated Content badge = 1; // 2> + repeated Content badge = 1; // 2> repeated Content content = 2; // 4> } @@ -291,8 +294,7 @@ message UserBNPLReq { optional float amount = 7; optional PaymentPeriodInfo payment_period = 8; optional bool has_agreed_contract = 9; - optional int32 current_step = - 10; // Can be useful for admin to change the current step + optional int32 current_step = 10; // Can be useful for admin to change the current step optional int64 asset_id = 11; } @@ -480,7 +482,9 @@ message NationalIDReq { string national_id = 2; } -message PubKeyRes { string pub_key = 1; } +message PubKeyRes { + string pub_key = 1; +} /* Network Details @@ -608,7 +612,9 @@ message IPGConfirmReq { string final_amount = 7; } -message IPGConfirmRes { string receipt_link = 1; } +message IPGConfirmRes { + string receipt_link = 1; +} message SaleManualReq { auth.v1.InternalIAM iam = 1; @@ -657,7 +663,7 @@ message DeclineBuyContractReq { message ConfirmBuyAssetReq { auth.v1.InternalIAM iam = 1; - uint64 agreement_id = 2; // Only in asset that require agreement contract + uint64 agreement_id = 2; // Only in asset that require agreement contract optional auth.v1.TFA tfa = 3; // This might be used in the future } @@ -686,6 +692,8 @@ enum ContractType { CONTRACT_TYPE_MARKET = 1; CONTRACT_TYPE_BNPL = 2; CONTRACT_TYPE_REDEEM = 3; + CONTRACT_TYPE_MARKE_MAKER = 4; + CONTRACT_TYPE_MARKE_TAKER = 5; } // agreement_id