diff --git a/api/api.proto b/api/api.proto index a9cbbd83434..b98060c7364 100644 --- a/api/api.proto +++ b/api/api.proto @@ -147,6 +147,24 @@ service Wallet { body: "*" }; } + rpc FreezeBalance (FreezeBalanceContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/freezebalance" + body: "*" + }; + } + rpc UnfreezeBalance (EmptyMessage) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/unfreezebalance" + body: "*" + }; + } + rpc WithdrawBalance (EmptyMessage) returns (Transaction) { + option (google.api.http) = { + post: "/withdrawbalance" + body: "*" + }; + } }; diff --git a/core/Contract.proto b/core/Contract.proto index 37a210ecc58..e0b109d3634 100644 --- a/core/Contract.proto +++ b/core/Contract.proto @@ -102,3 +102,7 @@ message DeployContract { bytes script = 2; } +message FreezeBalanceContract { + int64 frozen_balance = 1; + int64 frozen_duration 2; +} diff --git a/core/Tron.proto b/core/Tron.proto index c532a6b0f94..854366643e1 100644 --- a/core/Tron.proto +++ b/core/Tron.proto @@ -31,7 +31,13 @@ message Account { // the vote num to this super rep. int64 vote_count = 2; } - + // frozen balance + message Frozen { + // the frozen trx balance + int64 frozen_balance = 1; + // the expire time + int64 expire_time = 2; + } bytes account_name = 1; AccountType type = 2; // the create adress @@ -42,10 +48,16 @@ message Account { repeated Vote votes = 5; // the other asset owned by this account map asset = 6; + // the frozen balance + repeated Frozen frozen = 7; // this account create time int64 create_time = 9; // this last opration time, including transfer, voting and so on. int64 latest_opration_time = 10; + // witness block producing allowance + int64 allowance = 11; + // last withdraw time + int64 latest_withdraw_time = 12; // not used so far bytes code = 13; }