improve InternalTransferAsset rpc #2

Merged
nfel merged 4 commits from transfer into v2 2024-12-09 09:02:32 +00:00
3 changed files with 28 additions and 10 deletions

View File

@ -208,3 +208,9 @@ message CheckTFAReq {
optional string algorithm = 3; optional string algorithm = 3;
optional string reason = 4; // Can be later used as a lookup optional string reason = 4; // Can be later used as a lookup
} }
message TFA {
string key = 1;
int64 code = 2;
string transaction_id = 3;
}

View File

@ -289,17 +289,27 @@ message UserBuyAssetReq {
Transfer Transfer
*/ */
message UserTransferAssetReq { message Recipient {
auth.v1.InternalIAM iam = 1; string id = 1;
int64 asset_id = 2; optional string first_name = 2;
double amount = 3; optional string last_name = 3;
string to_wallet_address = 4;
string to_wallet_memo = 5;
} }
message UserTransferRes { message InternalTransferAssetReq {
int64 transaction_id = 1; auth.v1.InternalIAM iam = 1;
string tracking_code = 2; Recipient recipient = 2;
string amount = 3;
optional int64 network_id = 4;
int64 asset_id = 5;
optional bool approval = 6;
optional auth.v1.TFA tfa = 7;
}
message InternalTransferAssetRes {
Recipient recipient = 1;
string amount = 2;
string transaction_id = 3;
string transaction_hash = 4;
} }
// represent the information regarding the sale of the token // represent the information regarding the sale of the token

View File

@ -19,7 +19,6 @@ service WalletService {
rpc UserInitWallet(UserInitWalletReq) returns (base.v1.StatusRes); rpc UserInitWallet(UserInitWalletReq) returns (base.v1.StatusRes);
rpc UserGetWalletList(auth.v1.InternalIAM) returns (WalletList); rpc UserGetWalletList(auth.v1.InternalIAM) returns (WalletList);
rpc UserTransferAsset(UserTransferAssetReq) returns (UserTransferRes);
rpc UserGetTransactionList(UserGetTransactionListReq) returns (TransactionList); rpc UserGetTransactionList(UserGetTransactionListReq) returns (TransactionList);
@ -41,4 +40,7 @@ service WalletService {
rpc RedeemTokenList(auth.v1.ReqWithIAMAndParams) returns (RedeemTokenResList); rpc RedeemTokenList(auth.v1.ReqWithIAMAndParams) returns (RedeemTokenResList);
rpc GetPublicKeyByNationalID(GetPublicKeyByNationalIDReq) returns (GetPublicKeyByNationalIDRes); rpc GetPublicKeyByNationalID(GetPublicKeyByNationalIDReq) returns (GetPublicKeyByNationalIDRes);
// Assets routing
rpc InternalTransferAsset(InternalTransferAssetReq) returns (InternalTransferAssetRes);
} }