feat(proto): add authenticated asset admin commands

This commit is contained in:
2026-08-31 23:59:25 +03:30
parent a719f8ff56
commit e316e225a0
2 changed files with 59 additions and 4 deletions
+6 -1
View File
@@ -18,6 +18,11 @@ service InternalWalletSrv {
// Calculate stellar pub-priv key based on national id // Calculate stellar pub-priv key based on national id
rpc GetPublicKeyByNationalID(NationalIDReq) returns (PubKeyRes); rpc GetPublicKeyByNationalID(NationalIDReq) returns (PubKeyRes);
// Commission Logs // Commission Logs
rpc InitReferrerCommissionLog(InitReferrerCommissionLogIn) returns (base.v1.Empty); rpc InitReferrerCommissionLog(InitReferrerCommissionLogIn) returns (base.v1.Empty);
// Authenticated administrative asset lifecycle. Delete is represented as
// deactivation/locking so referenced financial history remains intact.
rpc AdminUpsertAsset(AdminUpsertAssetReq) returns (AdminAssetMutationRes);
rpc AdminDeactivateAsset(AdminDeactivateAssetReq) returns (base.v1.StatusRes);
} }
+53 -3
View File
@@ -366,7 +366,7 @@ message Transaction {
BalanceChange balance_change = 18; BalanceChange balance_change = 18;
} }
enum BalanceChange{ enum BalanceChange {
NO_CHANGE = 0; NO_CHANGE = 0;
INCREASE = 1; INCREASE = 1;
DECREASE = 2; DECREASE = 2;
@@ -656,7 +656,6 @@ message IPGConfirmReq {
// string amount = 7; // string amount = 7;
} }
message WithdrawLog { message WithdrawLog {
uint64 id = 1; uint64 id = 1;
Accounting accounting = 2; Accounting accounting = 2;
@@ -743,7 +742,7 @@ message WithdrawIRTReq {
auth.v1.InternalIAM iam = 1; auth.v1.InternalIAM iam = 1;
double amount = 2; double amount = 2;
int64 bank_info_id = 3; int64 bank_info_id = 3;
auth.v1.TFA tfa = 4; auth.v1.TFA tfa = 4;
} }
message WithdrawIRTRes { message WithdrawIRTRes {
@@ -812,3 +811,54 @@ message ContractRes {
string contract_hash = 4; string contract_hash = 4;
string contract_content = 5; string contract_content = 5;
} }
// Administrative asset commands are intentionally separate from the public
// Asset response. They contain the complete persistence-owned asset aggregate
// and are accepted only by the authenticated InternalWalletSrv boundary.
message AdminAssetInput {
int64 id = 1;
string name = 2;
string code = 3;
string issuer = 4;
string distributor = 5;
string network_code = 6;
string anchor = 7;
int32 decimal = 8;
string max_supply = 9;
optional string buy_min_amount = 10;
optional string buy_max_amount = 11;
string image = 12;
repeated string images = 13;
repeated string videos = 14;
string description = 15;
string url = 16;
string meta_json = 17;
bool is_active = 18;
bool is_locked = 19;
bool is_base_asset = 20;
bool show_if_empty = 21;
bool has_policy = 22;
bool has_whitelisting = 23;
bool can_buy = 24;
bool can_sell = 25;
bool can_deposit = 26;
bool can_withdraw = 27;
bool can_trade = 28;
AssetTokenType token_type = 29;
AssetType type = 30;
AssetStatus status = 31;
}
message AdminUpsertAssetReq {
AdminAssetInput asset = 1;
uint64 actor_user_id = 2;
}
message AdminDeactivateAssetReq {
int64 asset_id = 1;
uint64 actor_user_id = 2;
}
message AdminAssetMutationRes {
int64 asset_id = 1;
}