feat: add market contract rpc

This commit is contained in:
AmirMahdi Qiasvand 2025-07-29 11:56:51 +03:30
parent f5a99c7adf
commit cbc7524120

View File

@ -9,7 +9,9 @@ import "base/v1/msg.proto";
INTERNAL DATA INTERNAL DATA
*/ */
message InternalTransactionData { int64 transaction_id = 1; } message InternalTransactionData {
int64 transaction_id = 1;
}
/* /*
Federation Federation
@ -155,7 +157,7 @@ message AssetList {
message AssetFilter { message AssetFilter {
repeated int64 ids = 1; repeated int64 ids = 1;
repeated AssetType type = 2; // AssetType repeated AssetType type = 2; // AssetType
repeated AssetType token_type = 3; // AssetType repeated AssetType token_type = 3; // AssetType
repeated AssetStatus status = 4; repeated AssetStatus status = 4;
repeated string name = 5; repeated string name = 5;
@ -181,8 +183,7 @@ message AssetDiscountRes {
double static_amount = 4; double static_amount = 4;
double percentage = 5; double percentage = 5;
double max_amount = 6; double max_amount = 6;
double effective_amount = double effective_amount = 7; // based of asset price and discount amount in req
7; // based of asset price and discount amount in req
optional int64 supported_asset = 8; optional int64 supported_asset = 8;
} }
@ -197,7 +198,9 @@ message GetAssetReq {
optional string code = 3; optional string code = 3;
} }
message AssetMeta { PropertyMeta property = 1; } message AssetMeta {
PropertyMeta property = 1;
}
message PropertyMeta { message PropertyMeta {
string description = 1; string description = 1;
@ -218,7 +221,7 @@ message PropertyMeta {
} }
message PropertyDetail { message PropertyDetail {
repeated Content badge = 1; // 2> repeated Content badge = 1; // 2>
repeated Content content = 2; // 4> repeated Content content = 2; // 4>
} }
@ -291,8 +294,7 @@ message UserBNPLReq {
optional float amount = 7; optional float amount = 7;
optional PaymentPeriodInfo payment_period = 8; optional PaymentPeriodInfo payment_period = 8;
optional bool has_agreed_contract = 9; optional bool has_agreed_contract = 9;
optional int32 current_step = optional int32 current_step = 10; // Can be useful for admin to change the current step
10; // Can be useful for admin to change the current step
optional int64 asset_id = 11; optional int64 asset_id = 11;
} }
@ -480,7 +482,9 @@ message NationalIDReq {
string national_id = 2; string national_id = 2;
} }
message PubKeyRes { string pub_key = 1; } message PubKeyRes {
string pub_key = 1;
}
/* /*
Network Details Network Details
@ -608,7 +612,9 @@ message IPGConfirmReq {
string final_amount = 7; string final_amount = 7;
} }
message IPGConfirmRes { string receipt_link = 1; } message IPGConfirmRes {
string receipt_link = 1;
}
message SaleManualReq { message SaleManualReq {
auth.v1.InternalIAM iam = 1; auth.v1.InternalIAM iam = 1;
@ -657,7 +663,7 @@ message DeclineBuyContractReq {
message ConfirmBuyAssetReq { message ConfirmBuyAssetReq {
auth.v1.InternalIAM iam = 1; 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 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_MARKET = 1;
CONTRACT_TYPE_BNPL = 2; CONTRACT_TYPE_BNPL = 2;
CONTRACT_TYPE_REDEEM = 3; CONTRACT_TYPE_REDEEM = 3;
CONTRACT_TYPE_MARKE_MAKER = 4;
CONTRACT_TYPE_MARKE_TAKER = 5;
} }
// agreement_id // agreement_id