Compare commits

...

20 Commits

Author SHA1 Message Date
nfel faf4ac4465 issue: /#11 image added
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-23 18:15:01 +03:30
nfel 0ab540e9c0 issue: /#11 network list added
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-23 17:41:45 +03:30
nfel 03aaf185f7 Merge pull request 'improve TransferAsset messages & add ExternalTransferAsset rpc' (#10) from wallet/#24 into v2
Reviewed-on: https://git.kahrobatoken.com/Kahroba/proto/pulls/10
2024-12-23 09:14:41 +00:00
hoessein_225 219a8e107d improve TransactionType 2024-12-23 11:25:57 +03:30
hoessein_225 ce274776a6 improve TransferAsset messages & add ExternalTransferAsset rpc 2024-12-21 16:46:42 +03:30
nfel aac5d5e784 Merge pull request 'add type to Asset' (#9) from wallet/#22 into v2
Reviewed-on: https://git.kahrobatoken.com/Kahroba/proto/pulls/9
2024-12-21 11:51:27 +00:00
hoessein_225 552bd3c428 add type to Asset 2024-12-21 15:17:26 +03:30
nfel 21c190e5a5 Merge pull request 'wallet/#14' (#8) from wallet/#14 into v2
Reviewed-on: https://git.kahrobatoken.com/Kahroba/proto/pulls/8
2024-12-21 11:16:42 +00:00
nfel fe1f8ca568 Merge pull request 'improve type and GetPublicKeyByNationalIDReq' (#7) from feat/#19 into v2
Reviewed-on: https://git.kahrobatoken.com/Kahroba/proto/pulls/7
2024-12-21 08:13:50 +00:00
hoessein_225 ecb8eed62c improve type and GetPublicKeyByNationalIDReq 2024-12-21 11:34:50 +03:30
hoessein_225 3d1e544c00 improve Identity message 2024-12-17 12:07:21 +03:30
nfel dd0c898404 wallet: /#14 :)
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-16 15:53:09 +03:30
nfel f496cb4d32 wallet: /#14 rejection reason for bnpl is optional
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-16 15:50:43 +03:30
nfel ff86d65eb3 wallet: /#14 removed multiple company from user + identity now is source of truth
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-16 15:29:25 +03:30
nfel f23d1251b5 v2: redeem added to tfa code state
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-14 17:35:52 +03:30
nfel 5eb260df3a v2: changed tfa check
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-14 17:09:24 +03:30
nfel 72cb1d8117 v2: changed tfa check
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-14 16:55:50 +03:30
nfel 0cd6107abe v2: changed TFAReq Msg to accept trx id and state
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-14 16:45:12 +03:30
nfel 4b1ff1c31d v2: user_id added to recepient msg
Signed-off-by: nfel <nfilsaraee@gmail.com>
2024-12-10 15:09:54 +03:30
nfel 5df728fd9c Merge pull request 'improve recipient' (#6) from recipient into v2
Reviewed-on: https://git.kahrobatoken.com/Kahroba/proto/pulls/6
2024-12-10 08:22:22 +00:00
3 changed files with 60 additions and 11 deletions
+16 -5
View File
@@ -75,8 +75,8 @@ message CheckIAMReq {
message InternalIAM { message InternalIAM {
User user = 1; User user = 1;
IdentityBasic identity = 2; IdentityBasic identity = 2;
repeated Company company = 3;
} }
message IdReqWithIAM { message IdReqWithIAM {
int64 id = 1; int64 id = 1;
InternalIAM iam = 2; InternalIAM iam = 2;
@@ -110,6 +110,7 @@ message Company {
bool can_provide_bnpl = 5; bool can_provide_bnpl = 5;
} }
// Identity is bound to current user's real identity
message Identity { message Identity {
string national_id = 1; string national_id = 1;
string national_serial_id = 2; string national_serial_id = 2;
@@ -134,11 +135,14 @@ message Identity {
string mobile = 21; string mobile = 21;
optional Company company = 22; optional Company company = 22;
optional string employee_info = 23; optional string employee_info = 23;
string pub_key = 24;
optional float balance = 25;
} }
message IdentityBasic { message IdentityBasic {
string first_name = 1; string first_name = 1;
string last_name = 2; string last_name = 2;
optional Company company = 3;
} }
message UserIdentityBasic { message UserIdentityBasic {
@@ -194,6 +198,8 @@ message TFAReq {
optional string mobile = 2; optional string mobile = 2;
optional string email = 3; optional string email = 3;
optional string reason = 4; // issued jwt reason -> can be login, redeem, withdrawal optional string reason = 4; // issued jwt reason -> can be login, redeem, withdrawal
optional string transaction_id = 5;
optional TfaStateEnum state = 6;
} }
// Two Factor Authentication Exchange Response // Two Factor Authentication Exchange Response
@@ -205,8 +211,11 @@ message TFAExRes {
message CheckTFAReq { message CheckTFAReq {
InternalIAM iam = 1; InternalIAM iam = 1;
string code = 2; string code = 2;
optional string algorithm = 3; TFAReq req = 3;
optional string reason = 4; // Can be later used as a lookup // optional string algorithm = 3;
// optional string reason = 4; // Can be later used as a lookup
// optional string transaction_id = 5;
// optional TfaStateEnum state = 6;
} }
message TFA { message TFA {
@@ -220,13 +229,15 @@ enum TfaStateEnum {
LOGIN = 1; LOGIN = 1;
INTERNAL_TRANSFER = 2; INTERNAL_TRANSFER = 2;
EXTERNAL_TRANSFER = 3; EXTERNAL_TRANSFER = 3;
REDEEM_TOKEN = 4;
} }
message Recipient { message Recipient {
string key = 1; string key = 1;
optional string first_name = 2; optional string first_name = 2;
optional string last_name = 3; optional string last_name = 3;
optional string public_key = 4; optional int64 user_id = 4;
optional string public_key = 5;
} }
message LookUpNameReq { message LookUpNameReq {
@@ -235,4 +246,4 @@ message LookUpNameReq {
message LookUpNameRes { message LookUpNameRes {
Recipient recipient = 1; Recipient recipient = 1;
} }
+40 -5
View File
@@ -75,6 +75,7 @@ message Asset {
repeated string images = 30; repeated string images = 30;
int32 status = 31; int32 status = 31;
AssetMeta meta = 32; AssetMeta meta = 32;
string type = 33;
} }
message GetAssetReq { message GetAssetReq {
@@ -145,6 +146,7 @@ message UserBNPLResp {
optional string updated_at = 12; optional string updated_at = 12;
optional string created_at = 13; optional string created_at = 13;
Asset selected_asset = 14; Asset selected_asset = 14;
optional string rejection_reason = 15;
} }
message UserBNPLReq { message UserBNPLReq {
@@ -223,8 +225,11 @@ enum TransactionType {
UNKNOWN = 0; UNKNOWN = 0;
BUY = 1; BUY = 1;
SELL = 2; SELL = 2;
TRANSFER = 3; INTERNAL_TRANSFER = 3;
REDEEM = 4; EXTERNAL_TRANSFER = 4;
REDEEM = 5;
TRUST_LINE = 6;
WAGE = 7;
} }
enum TransactionStatus { enum TransactionStatus {
UNDETERMINED = 0; UNDETERMINED = 0;
@@ -289,7 +294,7 @@ message UserBuyAssetReq {
Transfer Transfer
*/ */
message InternalTransferAssetReq { message TransferAssetReq {
auth.v1.InternalIAM iam = 1; auth.v1.InternalIAM iam = 1;
auth.v1.Recipient recipient = 2; auth.v1.Recipient recipient = 2;
double amount = 3; double amount = 3;
@@ -299,9 +304,10 @@ message InternalTransferAssetReq {
optional auth.v1.TFA tfa = 7; optional auth.v1.TFA tfa = 7;
} }
message InternalTransferAssetRes { message TransferAssetRes {
auth.v1.Recipient recipient = 1; auth.v1.Recipient recipient = 1;
double amount = 2; double amount = 2;
// TODO: Change to Asset
string transaction_id = 3; string transaction_id = 3;
string transaction_hash = 4; string transaction_hash = 4;
} }
@@ -383,9 +389,38 @@ message RedeemTokenResList {
} }
message GetPublicKeyByNationalIDReq { message GetPublicKeyByNationalIDReq {
string national_id = 1; auth.v1.InternalIAM iam = 1;
string national_id = 2;
} }
message GetPublicKeyByNationalIDRes { message GetPublicKeyByNationalIDRes {
string pub_key = 1; string pub_key = 1;
} }
/*
Network Details
*/
enum NetworkType {
UNKNOWN_NETWORK_TYPE = 0;
ETH = 1;
XLM = 2;
BTC = 3;
}
message Network {
int64 id = 1;
string name = 2;
string code = 3;
string explorer = 4;
int64 gas_asset_id = 5;
string description = 6;
NetworkType type = 7;
bool is_active = 8;
string image = 9;
string updated_at = 10;
string created_at = 11;
}
message NetworkList {
repeated Network list = 1;
}
+4 -1
View File
@@ -13,6 +13,8 @@ service WalletService {
rpc AdminGetFederation(GetFederationReq) returns (Federation); rpc AdminGetFederation(GetFederationReq) returns (Federation);
rpc UserGetFederation(auth.v1.InternalIAM) returns (Federation); rpc UserGetFederation(auth.v1.InternalIAM) returns (Federation);
rpc GetNetworkList(base.v1.Empty) returns (NetworkList);
rpc UserGetAssetList(base.v1.Empty) returns (AssetList); rpc UserGetAssetList(base.v1.Empty) returns (AssetList);
rpc AdminGetAssetList(base.v1.Empty) returns (AssetList); rpc AdminGetAssetList(base.v1.Empty) returns (AssetList);
rpc GetAsset(GetAssetReq) returns (Asset); rpc GetAsset(GetAssetReq) returns (Asset);
@@ -42,5 +44,6 @@ service WalletService {
rpc GetPublicKeyByNationalID(GetPublicKeyByNationalIDReq) returns (GetPublicKeyByNationalIDRes); rpc GetPublicKeyByNationalID(GetPublicKeyByNationalIDReq) returns (GetPublicKeyByNationalIDRes);
// Assets routing // Assets routing
rpc InternalTransferAsset(InternalTransferAssetReq) returns (InternalTransferAssetRes); rpc InternalTransferAsset(TransferAssetReq) returns (TransferAssetRes);
rpc ExternalTransferAsset(TransferAssetReq) returns (TransferAssetRes);
} }