diff --git a/wallet/v1/internal_srv.proto b/wallet/v1/internal_srv.proto index d890e42..a3786cf 100644 --- a/wallet/v1/internal_srv.proto +++ b/wallet/v1/internal_srv.proto @@ -18,6 +18,11 @@ service InternalWalletSrv { // Calculate stellar pub-priv key based on national id rpc GetPublicKeyByNationalID(NationalIDReq) returns (PubKeyRes); - // Commission Logs + // Commission Logs 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); } diff --git a/wallet/v1/msg.proto b/wallet/v1/msg.proto index 56e7168..4d4269b 100644 --- a/wallet/v1/msg.proto +++ b/wallet/v1/msg.proto @@ -366,7 +366,7 @@ message Transaction { BalanceChange balance_change = 18; } -enum BalanceChange{ +enum BalanceChange { NO_CHANGE = 0; INCREASE = 1; DECREASE = 2; @@ -656,7 +656,6 @@ message IPGConfirmReq { // string amount = 7; } - message WithdrawLog { uint64 id = 1; Accounting accounting = 2; @@ -743,7 +742,7 @@ message WithdrawIRTReq { auth.v1.InternalIAM iam = 1; double amount = 2; int64 bank_info_id = 3; - auth.v1.TFA tfa = 4; + auth.v1.TFA tfa = 4; } message WithdrawIRTRes { @@ -812,3 +811,54 @@ message ContractRes { string contract_hash = 4; 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; +}