v2: added filter to get asset list

Signed-off-by: nfel <nfilsaraee@gmail.com>
This commit is contained in:
nfel 2025-05-17 12:13:56 +03:30
parent 027ac46240
commit e8ae988700
Signed by: nfel
GPG Key ID: DCC0BF3F92B0D45F
2 changed files with 17 additions and 5 deletions

View File

@ -71,10 +71,6 @@ message Wallet {
Asset Asset
*/ */
message AssetList {
repeated Asset list = 1;
}
message Asset { message Asset {
int64 id = 1; int64 id = 1;
string name = 2; string name = 2;
@ -140,6 +136,22 @@ enum AssetType {
ASSET_TYPE_NETWORK_GAS = 3; ASSET_TYPE_NETWORK_GAS = 3;
} }
message AssetList {
repeated Asset list = 1;
}
message AssetFilter {
repeated int64 ids = 1;
repeated AssetType types = 2; // AssetType
repeated AssetType token_types = 3; // AssetType
repeated AssetStatus statuses = 4;
optional bool can_buy = 5;
optional bool can_sell = 6;
optional bool can_deposit = 7;
optional bool can_withdraw = 8;
}
message AssetDiscountReq { message AssetDiscountReq {
auth.v1.InternalIAM iam = 1; auth.v1.InternalIAM iam = 1;
string code = 2; string code = 2;

View File

@ -17,7 +17,7 @@ service WalletService {
rpc GetNetworkList(base.v1.Empty) returns (NetworkList); rpc GetNetworkList(base.v1.Empty) returns (NetworkList);
rpc GetAssetList(base.v1.Empty) returns (AssetList); rpc GetAssetList(AssetFilter) returns (AssetList);
rpc UserGetAssetList(auth.v1.InternalIAM) returns (AssetList); rpc UserGetAssetList(auth.v1.InternalIAM) 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);