Compare commits

...

8 Commits

5 changed files with 54 additions and 4 deletions
+4
View File
@@ -43,6 +43,7 @@ message PermissionList {
message UserSendOtpReq {
string mobile = 1;
string referral_code = 2;
}
message UserSendOtpRes {
int64 expired_at = 1;
@@ -55,6 +56,7 @@ message UserSendOtpRes {
message UserLoginReq {
string mobile = 1;
string otp_code = 2;
string referral_code = 3;
}
message UserRefreshTokenReq {
string refresh_token = 1;
@@ -128,6 +130,7 @@ message User {
string email = 4;
UserStatus status = 5;
repeated int64 roles = 6;
int64 referrer_user_id = 7;
}
message UserAddress {
@@ -185,6 +188,7 @@ message UserIdentityBasic {
string first_name = 4;
string last_name = 5;
string wallet_address = 6;
bool is_identity_verified = 7;
}
message UserUpdateIdentityReq {
+4
View File
@@ -51,6 +51,8 @@ enum ErrCode {
BANK_INFO_NOT_FOUND = 3007;
RECIPIENT_NOT_FOUND = 3008;
USER_NOT_FOUND = 3009;
INVALID_REFERRAL_CODE = 3011;
MARKET_AGREEMENT_ALREADY_ACCEPTED = 3010;
// Resource state errors
ASSET_NOT_ACTIVE = 4000;
@@ -117,6 +119,8 @@ enum ErrCode {
NOT_ENOUGH_LOCKED_BALANCE = 7034;
NOT_ENOUGH_BALANCE_TO_LOCK = 7035;
IPG_GEN_TOKEN_FAILED = 7036;
USER_INFO_NATIONAL_ID_BIRTHDATE_MISS_MATCH = 7037;
// Server errors
SERVER_ERROR_FREEZED_BALANCE_NEGATIVE = 8000;
+3
View File
@@ -17,4 +17,7 @@ service InternalWalletSrv {
// Calculate stellar pub-priv key based on national id
rpc GetPublicKeyByNationalID(NationalIDReq) returns (PubKeyRes);
// Commission Logs
rpc InitReferrerCommissionLog(InitReferrerCommissionLogIn) returns (base.v1.Empty);
}
+38 -4
View File
@@ -6,7 +6,7 @@ import "auth/v1/msg.proto";
import "base/v1/msg.proto";
/*
INTERNAL DATA
INTERNAL DATA;
*/
message InternalTransactionData {
@@ -192,6 +192,7 @@ message AssetPrice {
string updated_at = 1;
double market_price = 2;
double ico_price = 3;
double current_price = 4;
}
message GetAssetReq {
@@ -354,6 +355,7 @@ enum TransactionType {
IRT_DEPOSIT = 13;
IRT_WITHDRAWAL = 14;
COMMISSION = 15;
REFERRAL_COMMISSION = 16;
}
enum TransactionStatus {
@@ -441,7 +443,7 @@ message TransferAssetRes {
}
/*
Redeem Token
Redeem Token;
*/
message RedeemTokenReq {
auth.v1.InternalIAM iam = 1;
@@ -496,7 +498,7 @@ message PubKeyRes {
}
/*
Network Details
Network Details;
*/
enum NetworkType {
UNKNOWN_NETWORK_TYPE = 0;
@@ -580,6 +582,38 @@ message CommissionRes {
uint64 commission_log_id = 1;
}
message InitReferrerCommissionLogIn {
int64 referrer_id = 1;
int64 user_id = 2;
double amount = 3;
}
message ReferrerCommissionLogOut {
double amount = 1;
string mobile = 2;
bool is_identity_verified = 3;
double commission_percentage = 4;
}
message ReferrerCommissionLogsList {
repeated ReferrerCommissionLogOut list = 1;
uint32 page_no = 2;
uint32 page_size = 3;
uint32 total_count = 4;
}
message TotalReferralCommissionIn {
int64 referrer_id = 1;
}
message TotalReferralCommissionOut {
double claimed = 1;
double unclaimed = 2;
}
message ClaimReferralCommissionIn {
auth.v1.User user = 1;
}
/*
* IPG - Internet Payment Gateway
* 1. Get Token
@@ -680,7 +714,7 @@ message Accounting {
uint64 id = 1;
int64 user_id = 2;
int64 balance = 3;
auth.v1.User user = 4;
auth.v1.UserIdentityBasic user = 4;
}
message IPGGenTokenPayload {
+5
View File
@@ -24,6 +24,11 @@ service WalletService {
rpc UserGetTransactionList(TransactionListFilter) returns (TransactionList);
// Commission Logs
rpc GetReferrerCommissionLogsList(auth.v1.InternalIAM) returns (ReferrerCommissionLogsList);
rpc GetTotalReferralCommission(TotalReferralCommissionIn) returns (TotalReferralCommissionOut);
rpc ClaimReferralCommission(ClaimReferralCommissionIn) returns (base.v1.StatusRes);
// Get Token from IPG is and internal api
rpc IPGGetToken(IPGGetTokenReq) returns (IPGGetTokenRes);
// IPG Confirm is a public api