diff --git a/api/api.proto b/api/api.proto index 45544d293a1..56245fb5ec6 100644 --- a/api/api.proto +++ b/api/api.proto @@ -152,6 +152,16 @@ service Wallet { }; } + rpc UpdateAsset (UpdateAssetContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/updateasset" + body: "*" + additional_bindings { + get: "/wallet/updateasset" + } + }; + } + rpc ListNodes (EmptyMessage) returns (NodeList) { option (google.api.http) = { post: "/wallet/listnodes" @@ -171,6 +181,15 @@ service Wallet { } }; } + rpc GetAccountNet (Account) returns (AccountNetMessage) { + option (google.api.http) = { + post: "/wallet/getaccountnet" + body: "*" + additional_bindings { + get: "/wallet/getaccountnet" + } + }; + }; rpc GetAssetIssueByName (BytesMessage) returns (AssetIssueContract) { option (google.api.http) = { post: "/wallet/getassetissuebyname" @@ -529,4 +548,12 @@ message TimePaginatedMessage { TimeMessage timeMessage = 1; int64 offset = 2; int64 limit = 3; -} \ No newline at end of file +} +message AccountNetMessage { + int64 freeNetUsed = 1; + int64 freeNetLimit = 2; + int64 NetUsed = 3; + int64 NetLimit = 4; + map assetNetUsed = 5; + map assetNetLimit = 6; +} diff --git a/core/Contract.proto b/core/Contract.proto index 98c4455eceb..d9da2664dfd 100644 --- a/core/Contract.proto +++ b/core/Contract.proto @@ -93,6 +93,10 @@ message AssetIssueContract { int32 vote_score = 16; bytes description = 20; bytes url = 21; + int64 free_asset_net_limit = 22; + int64 public_free_asset_net_limit = 23; + int64 public_free_asset_net_usage = 24; + int64 public_latest_free_net_time = 25; } message ParticipateAssetIssueContract { @@ -123,4 +127,12 @@ message UnfreezeAssetContract { message WithdrawBalanceContract { bytes owner_address = 1; +} + +message UpdateAssetContract { + bytes owner_address = 1; + bytes description = 2; + bytes url = 3; + int64 new_limit = 4; + int64 new_public_limit = 5; } \ No newline at end of file diff --git a/core/Tron.proto b/core/Tron.proto index 5a06b62c507..9d92e294f07 100644 --- a/core/Tron.proto +++ b/core/Tron.proto @@ -42,7 +42,7 @@ message Account { bytes account_name = 1; AccountType type = 2; - // the create adress + // the create address bytes address = 3; // the trx balance int64 balance = 4; @@ -51,16 +51,14 @@ message Account { // the other asset owned by this account map asset = 6; // latest asset operation time - map latest_asset_operation_time = 18; // the frozen balance repeated Frozen frozen = 7; // bandwidth, get from frozen - int64 bandwidth = 8; + int64 net_usage = 8; // this account create time int64 create_time = 9; - // this last opration time, including transfer, voting and so on. + // this last operation time, including transfer, voting and so on. //FIXME fix grammar int64 latest_opration_time = 10; - // witness block producing allowance int64 allowance = 11; // last withdraw time @@ -73,14 +71,20 @@ message Account { repeated Frozen frozen_supply = 16; // asset_issued_name bytes asset_issued_name = 17; + map latest_asset_operation_time = 18; + int64 free_net_usage = 19; + map free_asset_net_usage = 20; + int64 latest_consume_time = 21; + int64 latest_consume_free_time = 22; } +//FIXME authority? message acuthrity { AccountId account = 1; bytes permission_name = 2; } - +//FIXME permission message permision { AccountId account = 1; } @@ -98,6 +102,7 @@ message Witness { bool isJobs = 9; } + // Vote Change message Votes { bytes address = 1; @@ -145,6 +150,7 @@ message Transaction { UnfreezeBalanceContract = 12; WithdrawBalanceContract = 13; UnfreezeAssetContract = 14; + UpdateAssetContract = 15; CustomContract = 20; } ContractType type = 1; @@ -168,7 +174,7 @@ message Transaction { int64 ref_block_num = 3; bytes ref_block_hash = 4; int64 expiration = 8; - repeated acuthrity auths = 9; + repeated acuthrity auths = 9; //FIXME authority // data not used bytes data = 10; //only support size = 1, repeated list here for extenstion @@ -184,6 +190,10 @@ message Transaction { repeated Result ret = 5; } +message Transactions { + repeated Transaction transactions = 1; +} + message BlockHeader { message raw { int64 timestamp = 1; @@ -289,7 +299,15 @@ message DisconnectMessage { } message HelloMessage { + message BlockId { + bytes hash = 1; + int64 number = 2; + } + Endpoint from = 1; int32 version = 2; int64 timestamp = 3; + BlockId genesisBlockId = 4; + BlockId solidBlockId = 5; + BlockId headBlockId = 6; }