From 8e64e1ca1fe0474d535863492f865e09743164bb Mon Sep 17 00:00:00 2001 From: hossein_225 Date: Mon, 9 Dec 2024 11:56:34 +0330 Subject: [PATCH] improve InternalTransferAsset rpc --- auth/v1/msg.proto | 6 ++++++ wallet/v1/msg.proto | 22 ++++++++++++++-------- wallet/v1/srv.proto | 4 +++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/auth/v1/msg.proto b/auth/v1/msg.proto index cecaa7c..98ab4bf 100644 --- a/auth/v1/msg.proto +++ b/auth/v1/msg.proto @@ -208,3 +208,9 @@ message CheckTFAReq { optional string algorithm = 3; optional string reason = 4; // Can be later used as a lookup } + +message Otp { + string status = 1; + int64 code = 2; + string transaction_id = 3; +} \ No newline at end of file diff --git a/wallet/v1/msg.proto b/wallet/v1/msg.proto index 17156a4..56ea0dd 100644 --- a/wallet/v1/msg.proto +++ b/wallet/v1/msg.proto @@ -289,17 +289,23 @@ message UserBuyAssetReq { Transfer */ -message UserTransferAssetReq { +message InternalTransferAssetReq { auth.v1.InternalIAM iam = 1; - int64 asset_id = 2; - double amount = 3; - string to_wallet_address = 4; - string to_wallet_memo = 5; + string recipient = 2; + string amount = 3; + int64 network_id = 4; + int64 asset_id = 5; + bool approval = 6; + auth.v1.Otp otp = 7; } -message UserTransferRes { - int64 transaction_id = 1; - string tracking_code = 2; +message InternalTransferAssetRes { + string recipient = 1; + string recipient_first_name = 2; + string recipient_last_name = 3; + string amount = 4; + string transaction_id = 5; + string transaction_hash = 6; } // represent the information regarding the sale of the token diff --git a/wallet/v1/srv.proto b/wallet/v1/srv.proto index a352673..db06ba9 100644 --- a/wallet/v1/srv.proto +++ b/wallet/v1/srv.proto @@ -19,7 +19,6 @@ service WalletService { rpc UserInitWallet(UserInitWalletReq) returns (base.v1.StatusRes); rpc UserGetWalletList(auth.v1.InternalIAM) returns (WalletList); - rpc UserTransferAsset(UserTransferAssetReq) returns (UserTransferRes); rpc UserGetTransactionList(UserGetTransactionListReq) returns (TransactionList); @@ -41,4 +40,7 @@ service WalletService { rpc RedeemTokenList(auth.v1.ReqWithIAMAndParams) returns (RedeemTokenResList); rpc GetPublicKeyByNationalID(GetPublicKeyByNationalIDReq) returns (GetPublicKeyByNationalIDRes); + + // Assets routing + rpc InternalTransferAsset(InternalTransferAssetReq) returns (InternalTransferAssetRes); }