From b64fe73622ccb4d25711bacbf967da06e11792ae Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Thu, 20 Sep 2018 23:40:19 +0200 Subject: [PATCH 01/15] update protobufs add build protobuf script --- build-protobufs.sh | 6 + protobuf/api/api.proto | 890 ++ protobuf/core/Contract.proto | 229 + protobuf/core/Discover.proto | 44 + protobuf/core/Tron.proto | 485 + protobuf/core/TronInventoryItems.proto | 12 + src/protocol/core/Contract_pb.js | 3915 ++++++- src/protocol/core/Discover_pb.js | 192 +- src/protocol/core/TronInventoryItems_pb.js | 2 +- src/protocol/core/Tron_pb.js | 11127 +++++++++++++------ 10 files changed, 13116 insertions(+), 3786 deletions(-) create mode 100755 build-protobufs.sh create mode 100644 protobuf/api/api.proto create mode 100644 protobuf/core/Contract.proto create mode 100644 protobuf/core/Discover.proto create mode 100644 protobuf/core/Tron.proto create mode 100644 protobuf/core/TronInventoryItems.proto diff --git a/build-protobufs.sh b/build-protobufs.sh new file mode 100755 index 0000000..4e0b43b --- /dev/null +++ b/build-protobufs.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +docker run --rm -v $(pwd):$(pwd) -w $(pwd) znly/protoc \ + --proto_path=protobuf \ + --js_out=import_style=commonjs,binary:src/protocol \ + protobuf/core/*.proto protobuf/api/*.proto diff --git a/protobuf/api/api.proto b/protobuf/api/api.proto new file mode 100644 index 0000000..a84e460 --- /dev/null +++ b/protobuf/api/api.proto @@ -0,0 +1,890 @@ +syntax = "proto3"; +package protocol; + +import "core/Tron.proto"; +import "core/Contract.proto"; +import "google/api/annotations.proto"; + + +option java_package = "org.tron.api"; //Specify the name of the package that generated the Java file +option java_outer_classname = "GrpcAPI"; //Specify the class name of the generated Java file +option go_package = "github.com/tronprotocol/grpc-gateway/api"; + +service Wallet { + + rpc GetAccount (Account) returns (Account) { + option (google.api.http) = { + post: "/wallet/getaccount" + body: "*" + additional_bindings { + get: "/wallet/getaccount" + } + }; + }; + + rpc GetAccountById (Account) returns (Account) { + option (google.api.http) = { + post: "/wallet/getaccountbyid" + body: "*" + additional_bindings { + get: "/wallet/getaccountbyid" + } + }; + }; + + //Please use CreateTransaction2 instead of this function. + rpc CreateTransaction (TransferContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/createtransaction" + body: "*" + additional_bindings { + get: "/wallet/createtransaction" + } + }; + }; + //Use this function instead of CreateTransaction. + rpc CreateTransaction2 (TransferContract) returns (TransactionExtention) { + }; + + rpc BroadcastTransaction (Transaction) returns (Return) { + option (google.api.http) = { + post: "/wallet/broadcasttransaction" + body: "*" + additional_bindings { + get: "/wallet/broadcasttransaction" + } + }; + }; + //Please use UpdateAccount2 instead of this function. + rpc UpdateAccount (AccountUpdateContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/updateaccount" + body: "*" + additional_bindings { + get: "/wallet/updateaccount" + } + }; + }; + + + rpc SetAccountId (SetAccountIdContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/setaccountid" + body: "*" + additional_bindings { + get: "/wallet/setaccountid" + } + }; + }; + + //Use this function instead of UpdateAccount. + rpc UpdateAccount2 (AccountUpdateContract) returns (TransactionExtention) { + }; + + //Please use VoteWitnessAccount2 instead of this function. + rpc VoteWitnessAccount (VoteWitnessContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/votewitnessaccount" + body: "*" + additional_bindings { + get: "/wallet/votewitnessaccount" + } + }; + }; + + //modify the consume_user_resource_percent + rpc UpdateSetting (UpdateSettingContract) returns (TransactionExtention) { + }; + + //Use this function instead of VoteWitnessAccount. + rpc VoteWitnessAccount2 (VoteWitnessContract) returns (TransactionExtention) { + }; + //Please use CreateAssetIssue2 instead of this function. + rpc CreateAssetIssue (AssetIssueContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/createassetissue" + body: "*" + additional_bindings { + get: "/wallet/createassetissue" + } + }; + }; + //Use this function instead of CreateAssetIssue. + rpc CreateAssetIssue2 (AssetIssueContract) returns (TransactionExtention) { + }; + //Please use UpdateWitness2 instead of this function. + rpc UpdateWitness (WitnessUpdateContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/updatewitness" + body: "*" + additional_bindings { + get: "/wallet/updatewitness" + } + }; + }; + //Use this function instead of UpdateWitness. + rpc UpdateWitness2 (WitnessUpdateContract) returns (TransactionExtention) { + }; + //Please use CreateAccount2 instead of this function. + rpc CreateAccount (AccountCreateContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/createaccount" + body: "*" + additional_bindings { + get: "/wallet/createaccount" + } + }; + }; + //Use this function instead of CreateAccount. + rpc CreateAccount2 (AccountCreateContract) returns (TransactionExtention) { + } + //Please use CreateWitness2 instead of this function. + rpc CreateWitness (WitnessCreateContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/createwitness" + body: "*" + additional_bindings { + get: "/wallet/createwitness" + } + }; + }; + //Use this function instead of CreateWitness. + rpc CreateWitness2 (WitnessCreateContract) returns (TransactionExtention) { + } + //Please use TransferAsset2 instead of this function. + rpc TransferAsset (TransferAssetContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/transferasset" + body: "*" + additional_bindings { + get: "/wallet/transferasset" + } + }; + } + //Use this function instead of TransferAsset. + rpc TransferAsset2 (TransferAssetContract) returns (TransactionExtention) { + } + //Please use ParticipateAssetIssue2 instead of this function. + rpc ParticipateAssetIssue (ParticipateAssetIssueContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/participateassetissue" + body: "*" + additional_bindings { + get: "/wallet/participateassetissue" + } + }; + } + //Use this function instead of ParticipateAssetIssue. + rpc ParticipateAssetIssue2 (ParticipateAssetIssueContract) returns (TransactionExtention) { + } + //Please use FreezeBalance2 instead of this function. + rpc FreezeBalance (FreezeBalanceContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/freezebalance" + body: "*" + additional_bindings { + get: "/wallet/freezebalance" + } + }; + } + //Use this function instead of FreezeBalance. + rpc FreezeBalance2 (FreezeBalanceContract) returns (TransactionExtention) { + } + //Please use UnfreezeBalance2 instead of this function. + rpc UnfreezeBalance (UnfreezeBalanceContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/unfreezebalance" + body: "*" + additional_bindings { + get: "/wallet/unfreezebalance" + } + }; + } + //Use this function instead of UnfreezeBalance. + rpc UnfreezeBalance2 (UnfreezeBalanceContract) returns (TransactionExtention) { + } + //Please use UnfreezeAsset2 instead of this function. + rpc UnfreezeAsset (UnfreezeAssetContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/unfreezeasset" + body: "*" + additional_bindings { + get: "/wallet/unfreezeasset" + } + }; + } + //Use this function instead of UnfreezeAsset. + rpc UnfreezeAsset2 (UnfreezeAssetContract) returns (TransactionExtention) { + } + //Please use WithdrawBalance2 instead of this function. + rpc WithdrawBalance (WithdrawBalanceContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/withdrawbalance" + body: "*" + additional_bindings { + get: "/wallet/withdrawbalance" + } + }; + } + //Use this function instead of WithdrawBalance. + rpc WithdrawBalance2 (WithdrawBalanceContract) returns (TransactionExtention) { + } + //Please use UpdateAsset2 instead of this function. + rpc UpdateAsset (UpdateAssetContract) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/updateasset" + body: "*" + additional_bindings { + get: "/wallet/updateasset" + } + }; + } + //Use this function instead of UpdateAsset. + rpc UpdateAsset2 (UpdateAssetContract) returns (TransactionExtention) { + } + + rpc ProposalCreate (ProposalCreateContract) returns (TransactionExtention) { + } + + rpc ProposalApprove (ProposalApproveContract) returns (TransactionExtention) { + } + + rpc ProposalDelete (ProposalDeleteContract) returns (TransactionExtention) { + } + + rpc BuyStorage (BuyStorageContract) returns (TransactionExtention) { + } + + rpc BuyStorageBytes (BuyStorageBytesContract) returns (TransactionExtention) { + } + + rpc SellStorage (SellStorageContract) returns (TransactionExtention) { + } + + rpc ExchangeCreate (ExchangeCreateContract) returns (TransactionExtention) { + } + + rpc ExchangeInject (ExchangeInjectContract) returns (TransactionExtention) { + } + + rpc ExchangeWithdraw (ExchangeWithdrawContract) returns (TransactionExtention) { + } + + rpc ExchangeTransaction (ExchangeTransactionContract) returns (TransactionExtention) { + } + + rpc ListNodes (EmptyMessage) returns (NodeList) { + option (google.api.http) = { + post: "/wallet/listnodes" + body: "*" + additional_bindings { + get: "/wallet/listnodes" + } + }; + } + + rpc GetAssetIssueByAccount (Account) returns (AssetIssueList) { + option (google.api.http) = { + post: "/wallet/getassetissuebyaccount" + body: "*" + additional_bindings { + get: "/wallet/getassetissuebyaccount" + } + }; + } + rpc GetAccountNet (Account) returns (AccountNetMessage) { + option (google.api.http) = { + post: "/wallet/getaccountnet" + body: "*" + additional_bindings { + get: "/wallet/getaccountnet" + } + }; + }; + rpc GetAccountResource (Account) returns (AccountResourceMessage) { + }; + rpc GetAssetIssueByName (BytesMessage) returns (AssetIssueContract) { + option (google.api.http) = { + post: "/wallet/getassetissuebyname" + body: "*" + additional_bindings { + get: "/wallet/getassetissuebyname" + } + }; + } + //Please use GetNowBlock2 instead of this function. + rpc GetNowBlock (EmptyMessage) returns (Block) { + option (google.api.http) = { + post: "/wallet/getnowblock" + body: "*" + additional_bindings { + get: "/wallet/getnowblock" + } + }; + } + //Use this function instead of GetNowBlock. + rpc GetNowBlock2 (EmptyMessage) returns (BlockExtention) { + } + //Please use GetBlockByNum2 instead of this function. + rpc GetBlockByNum (NumberMessage) returns (Block) { + option (google.api.http) = { + post: "/wallet/getblockbynum" + body: "*" + additional_bindings { + get: "/wallet/getblockbynum" + } + }; + } + //Use this function instead of GetBlockByNum. + rpc GetBlockByNum2 (NumberMessage) returns (BlockExtention) { + } + + rpc GetTransactionCountByBlockNum (NumberMessage) returns (NumberMessage) { + } + + rpc GetBlockById (BytesMessage) returns (Block) { + option (google.api.http) = { + post: "/wallet/getblockbyid" + body: "*" + additional_bindings { + get: "/wallet/getblockbyid" + } + }; + } + //Please use GetBlockByLimitNext2 instead of this function. + rpc GetBlockByLimitNext (BlockLimit) returns (BlockList) { + option (google.api.http) = { + post: "/wallet/getblockbylimitnext" + body: "*" + additional_bindings { + get: "/wallet/getblockbylimitnext" + } + }; + } + //Use this function instead of GetBlockByLimitNext. + rpc GetBlockByLimitNext2 (BlockLimit) returns (BlockListExtention) { + } + //Please use GetBlockByLatestNum2 instead of this function. + rpc GetBlockByLatestNum (NumberMessage) returns (BlockList) { + option (google.api.http) = { + post: "/wallet/getblockbylatestnum" + body: "*" + additional_bindings { + get: "/wallet/getblockbylatestnum" + } + }; + } + //Use this function instead of GetBlockByLatestNum. + rpc GetBlockByLatestNum2 (NumberMessage) returns (BlockListExtention) { + } + rpc GetTransactionById (BytesMessage) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/gettransactionbyid" + body: "*" + additional_bindings { + get: "/wallet/gettransactionbyid" + } + }; + } + + rpc DeployContract (CreateSmartContract) returns (TransactionExtention) { + } + + rpc GetContract (BytesMessage) returns (SmartContract) { + } + + rpc TriggerContract (TriggerSmartContract) returns (TransactionExtention) { + } + + rpc ListWitnesses (EmptyMessage) returns (WitnessList) { + option (google.api.http) = { + post: "/wallet/listwitnesses" + body: "*" + additional_bindings { + get: "/wallet/listwitnesses" + } + }; + }; + + rpc ListProposals (EmptyMessage) returns (ProposalList) { + option (google.api.http) = { + post: "/wallet/listproposals" + body: "*" + additional_bindings { + get: "/wallet/listproposals" + } + }; + }; + + rpc GetProposalById (BytesMessage) returns (Proposal) { + option (google.api.http) = { + post: "/wallet/getproposalbyid" + body: "*" + additional_bindings { + get: "/wallet/getproposalbyid" + } + }; + }; + + rpc ListExchanges (EmptyMessage) returns (ExchangeList) { + option (google.api.http) = { + post: "/wallet/listexchanges" + body: "*" + additional_bindings { + get: "/wallet/listexchanges" + } + }; + }; + + rpc GetExchangeById (BytesMessage) returns (Exchange) { + option (google.api.http) = { + post: "/wallet/getexchangebyid" + body: "*" + additional_bindings { + get: "/wallet/getexchangebyid" + } + }; + }; + + rpc GetChainParameters (EmptyMessage) returns (ChainParameters) { + option (google.api.http) = { + post: "/wallet/getchainparameters" + body: "*" + additional_bindings { + get: "/wallet/getchainparameters" + } + }; + }; + + rpc GetAssetIssueList (EmptyMessage) returns (AssetIssueList) { + option (google.api.http) = { + post: "/wallet/getassetissuelist" + body: "*" + additional_bindings { + get: "/wallet/getassetissuelist" + } + }; + } + rpc GetPaginatedAssetIssueList (PaginatedMessage) returns (AssetIssueList) { + option (google.api.http) = { + post: "/wallet/getpaginatedassetissuelist" + body: "*" + additional_bindings { + get: "/wallet/getpaginatedassetissuelist" + } + }; + } + rpc TotalTransaction (EmptyMessage) returns (NumberMessage) { + option (google.api.http) = { + post: "/wallet/totaltransaction" + body: "*" + additional_bindings { + get: "/wallet/totaltransaction" + } + }; + } + rpc GetNextMaintenanceTime (EmptyMessage) returns (NumberMessage) { + option (google.api.http) = { + post: "/wallet/getnextmaintenancetime" + body: "*" + additional_bindings { + get: "/wallet/getnextmaintenancetime" + } + }; + } + //Warning: do not invoke this interface provided by others. + //Please use GetTransactionSign2 instead of this function. + rpc GetTransactionSign (TransactionSign) returns (Transaction) { + option (google.api.http) = { + post: "/wallet/gettransactionsign" + body: "*" + additional_bindings { + get: "/wallet/gettransactionsign" + } + }; + }; + //Warning: do not invoke this interface provided by others. + //Use this function instead of GetTransactionSign. + rpc GetTransactionSign2 (TransactionSign) returns (TransactionExtention) { + }; + //Warning: do not invoke this interface provided by others. + rpc CreateAddress (BytesMessage) returns (BytesMessage) { + option (google.api.http) = { + post: "/wallet/createaddress" + body: "*" + additional_bindings { + get: "/wallet/createaddress" + } + }; + }; + //Warning: do not invoke this interface provided by others. + rpc EasyTransfer (EasyTransferMessage) returns (EasyTransferResponse) { + option (google.api.http) = { + post: "/wallet/easytransfer" + body: "*" + additional_bindings { + get: "/wallet/easytransfer" + } + }; + }; + //Warning: do not invoke this interface provided by others. + rpc EasyTransferByPrivate (EasyTransferByPrivateMessage) returns (EasyTransferResponse) { + option (google.api.http) = { + post: "/wallet/easytransferbyprivate" + body: "*" + additional_bindings { + get: "/wallet/easytransferbyprivate" + } + }; + }; + //Warning: do not invoke this interface provided by others. + rpc GenerateAddress (EmptyMessage) returns (AddressPrKeyPairMessage) { + + option (google.api.http) = { + post: "/wallet/generateaddress" + body: "*" + additional_bindings { + get: "/wallet/generateaddress" + } + }; + } + + rpc GetTransactionInfoById (BytesMessage) returns (TransactionInfo) { + option (google.api.http) = { + post: "/wallet/gettransactioninfobyid" + body: "*" + additional_bindings { + get: "/wallet/gettransactioninfobyid" + } + }; + } +}; + + +service WalletSolidity { + + rpc GetAccount (Account) returns (Account) { + option (google.api.http) = { + post: "/walletsolidity/getaccount" + body: "*" + additional_bindings { + get: "/walletsolidity/getaccount" + } + }; + }; + rpc GetAccountById (Account) returns (Account) { + option (google.api.http) = { + post: "/walletsolidity/getaccountbyid" + body: "*" + additional_bindings { + get: "/walletsolidity/getaccountbyid" + } + }; + }; + + rpc ListWitnesses (EmptyMessage) returns (WitnessList) { + option (google.api.http) = { + post: "/walletsolidity/listwitnesses" + body: "*" + additional_bindings { + get: "/walletsolidity/listwitnesses" + } + }; + }; + rpc GetAssetIssueList (EmptyMessage) returns (AssetIssueList) { + option (google.api.http) = { + post: "/walletsolidity/getassetissuelist" + body: "*" + additional_bindings { + get: "/walletsolidity/getassetissuelist" + } + }; + } + rpc GetPaginatedAssetIssueList (PaginatedMessage) returns (AssetIssueList) { + option (google.api.http) = { + post: "/walletsolidity/getpaginatedassetissuelist" + body: "*" + additional_bindings { + get: "/walletsolidity/getpaginatedassetissuelist" + } + }; + } + //Please use GetNowBlock2 instead of this function. + rpc GetNowBlock (EmptyMessage) returns (Block) { + option (google.api.http) = { + post: "/walletsolidity/getnowblock" + body: "*" + additional_bindings { + get: "/walletsolidity/getnowblock" + } + }; + } + //Use this function instead of GetNowBlock. + rpc GetNowBlock2 (EmptyMessage) returns (BlockExtention) { + } + //Please use GetBlockByNum2 instead of this function. + rpc GetBlockByNum (NumberMessage) returns (Block) { + option (google.api.http) = { + post: "/walletsolidity/getblockbynum" + body: "*" + additional_bindings { + get: "/walletsolidity/getblockbynum" + } + }; + } + //Use this function instead of GetBlockByNum. + rpc GetBlockByNum2 (NumberMessage) returns (BlockExtention) { + } + + rpc GetTransactionCountByBlockNum (NumberMessage) returns (NumberMessage) { + } + + rpc GetTransactionById (BytesMessage) returns (Transaction) { + option (google.api.http) = { + post: "/walletsolidity/gettransactionbyid" + body: "*" + additional_bindings { + get: "/walletsolidity/gettransactionbyid" + } + }; + } + rpc GetTransactionInfoById (BytesMessage) returns (TransactionInfo) { + option (google.api.http) = { + post: "/walletsolidity/gettransactioninfobyid" + body: "*" + additional_bindings { + get: "/walletsolidity/gettransactioninfobyid" + } + }; + } + //Warning: do not invoke this interface provided by others. + rpc GenerateAddress (EmptyMessage) returns (AddressPrKeyPairMessage) { + option (google.api.http) = { + post: "/walletsolidity/generateaddress" + body: "*" + additional_bindings { + get: "/walletsolidity/generateaddress" + } + }; + } +}; + +service WalletExtension { + //Please use GetTransactionsFromThis2 instead of this function. + rpc GetTransactionsFromThis (AccountPaginated) returns (TransactionList) { + option (google.api.http) = { + post: "/walletextension/gettransactionsfromthis" + body: "*" + additional_bindings { + get: "/walletextension/gettransactionsfromthis" + } + }; + } + //Use this function instead of GetTransactionsFromThis. + rpc GetTransactionsFromThis2 (AccountPaginated) returns (TransactionListExtention) { + } + //Please use GetTransactionsToThis2 instead of this function. + rpc GetTransactionsToThis (AccountPaginated) returns (TransactionList) { + option (google.api.http) = { + post: "/walletextension/gettransactionstothis" + body: "*" + additional_bindings { + get: "/walletextension/gettransactionstothis" + } + }; + } + //Use this function instead of GetTransactionsToThis. + rpc GetTransactionsToThis2 (AccountPaginated) returns (TransactionListExtention) { + } +}; + +// the api of tron's db +service Database { + // for tapos + rpc getBlockReference (EmptyMessage) returns (BlockReference) { + + } + rpc GetDynamicProperties (EmptyMessage) returns (DynamicProperties) { + + } + rpc GetNowBlock (EmptyMessage) returns (Block) { + + } + rpc GetBlockByNum (NumberMessage) returns (Block) { + + } +}; + +message Return { + enum response_code { + SUCCESS = 0; + SIGERROR = 1; // error in signature + CONTRACT_VALIDATE_ERROR = 2; + CONTRACT_EXE_ERROR = 3; + BANDWITH_ERROR = 4; + DUP_TRANSACTION_ERROR = 5; + TAPOS_ERROR = 6; + TOO_BIG_TRANSACTION_ERROR = 7; + TRANSACTION_EXPIRATION_ERROR = 8; + SERVER_BUSY = 9; + OTHER_ERROR = 20; + } + + bool result = 1; + response_code code = 2; + bytes message = 3; +} + +message BlockReference { + int64 block_num = 1; + bytes block_hash = 2; +} + +// the api of tron's network such as node list. +service Network { + +}; + +message WitnessList { + repeated Witness witnesses = 1; +} +message ProposalList { + repeated Proposal proposals = 1; +} +message ExchangeList { + repeated Exchange exchanges = 1; +} +message AssetIssueList { + repeated AssetIssueContract assetIssue = 1; +} +message BlockList { + repeated Block block = 1; +} +message TransactionList { + repeated Transaction transaction = 1; +} + +// Gossip node list +message NodeList { + repeated Node nodes = 1; +} + +// Gossip node +message Node { + Address address = 1; +} + +// Gossip node address +message Address { + bytes host = 1; + int32 port = 2; +} + +message EmptyMessage { +} +message NumberMessage { + int64 num = 1; +} +message BytesMessage { + bytes value = 1; +} +message TimeMessage { + int64 beginInMilliseconds = 1; + int64 endInMilliseconds = 2; +} +message BlockLimit { + int64 startNum = 1; + int64 endNum = 2; +} +message TransactionLimit { + bytes transactionId = 1; + int64 limitNum = 2; +} +message AccountPaginated { + Account account = 1; + int64 offset = 2; + int64 limit = 3; +} +message TimePaginatedMessage { + TimeMessage timeMessage = 1; + int64 offset = 2; + int64 limit = 3; +} +//deprecated +message AccountNetMessage { + int64 freeNetUsed = 1; + int64 freeNetLimit = 2; + int64 NetUsed = 3; + int64 NetLimit = 4; + map assetNetUsed = 5; + map assetNetLimit = 6; + int64 TotalNetLimit = 7; + int64 TotalNetWeight = 8; +} +message AccountResourceMessage { + int64 freeNetUsed = 1; + int64 freeNetLimit = 2; + int64 NetUsed = 3; + int64 NetLimit = 4; + map assetNetUsed = 5; + map assetNetLimit = 6; + int64 TotalNetLimit = 7; + int64 TotalNetWeight = 8; + + int64 EnergyUsed = 13; + int64 EnergyLimit = 14; + int64 TotalEnergyLimit = 15; + int64 TotalEnergyWeight = 16; + + int64 storageUsed = 21; + int64 storageLimit = 22; +} + +message PaginatedMessage { + int64 offset = 1; + int64 limit = 2; +} + +message EasyTransferMessage { + bytes passPhrase = 1; + bytes toAddress = 2; + int64 amount = 3; +} + +message EasyTransferByPrivateMessage { + bytes privateKey = 1; + bytes toAddress = 2; + int64 amount = 3; +} + +message EasyTransferResponse { + Transaction transaction = 1; + Return result = 2; + bytes txid = 3; //transaction id = sha256(transaction.rowdata) +} + +message AddressPrKeyPairMessage { + string address = 1; + string privateKey = 2; +} + +message TransactionExtention { + Transaction transaction = 1; + bytes txid = 2; //transaction id = sha256(transaction.rowdata) + repeated bytes constant_result = 3; + Return result = 4; +} + +message BlockExtention { + repeated TransactionExtention transactions = 1; + BlockHeader block_header = 2; + bytes blockid = 3; +} + +message BlockListExtention { + repeated BlockExtention block = 1; +} + +message TransactionListExtention { + repeated TransactionExtention transaction = 1; +} \ No newline at end of file diff --git a/protobuf/core/Contract.proto b/protobuf/core/Contract.proto new file mode 100644 index 0000000..18eafde --- /dev/null +++ b/protobuf/core/Contract.proto @@ -0,0 +1,229 @@ +/* + * java-tron is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * java-tron is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +syntax = "proto3"; + +package protocol; + +option java_package = "org.tron.protos"; //Specify the name of the package that generated the Java file +option java_outer_classname = "Contract"; //Specify the class name of the generated Java file +option go_package = "github.com/tronprotocol/grpc-gateway/core"; + +import "core/Tron.proto"; + +message AccountCreateContract { + bytes owner_address = 1; + bytes account_address = 2; + AccountType type = 3; +} + +// Update account name. Account name is not unique now. +message AccountUpdateContract { + bytes account_name = 1; + bytes owner_address = 2; +} + +// Set account id if the account has no id. Account id is unique and case insensitive. +message SetAccountIdContract { + bytes account_id = 1; + bytes owner_address = 2; +} + +message TransferContract { + bytes owner_address = 1; + bytes to_address = 2; + int64 amount = 3; +} + +message TransferAssetContract { + bytes asset_name = 1; + bytes owner_address = 2; + bytes to_address = 3; + int64 amount = 4; +} + + +message VoteAssetContract { + bytes owner_address = 1; + repeated bytes vote_address = 2; + bool support = 3; + int32 count = 5; +} + +message VoteWitnessContract { + message Vote { + bytes vote_address = 1; + int64 vote_count = 2; + } + bytes owner_address = 1; + repeated Vote votes = 2; + bool support = 3; +} + +message UpdateSettingContract { + bytes owner_address = 1; + bytes contract_address = 2; + int64 consume_user_resource_percent = 3; +} + +message WitnessCreateContract { + bytes owner_address = 1; + bytes url = 2; +} + +message WitnessUpdateContract { + bytes owner_address = 1; + bytes update_url = 12; +} + +message AssetIssueContract { + message FrozenSupply { + int64 frozen_amount = 1; + int64 frozen_days = 2; + } + bytes owner_address = 1; + bytes name = 2; + bytes abbr = 3; + int64 total_supply = 4; + repeated FrozenSupply frozen_supply = 5; + int32 trx_num = 6; + int32 num = 8; + int64 start_time = 9; + int64 end_time = 10; + int64 order = 11; // the order of tokens of the same name + 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 { + bytes owner_address = 1; + bytes to_address = 2; + bytes asset_name = 3; // the namekey of target asset, include name and order + int64 amount = 4; // the amount of drops +} + + +enum ResourceCode { + BANDWIDTH = 0x00; + ENERGY = 0x01; +} + +message FreezeBalanceContract { + bytes owner_address = 1; + int64 frozen_balance = 2; + int64 frozen_duration = 3; + + ResourceCode resource = 10; +} + +message UnfreezeBalanceContract { + bytes owner_address = 1; + + ResourceCode resource = 10; +} + +message UnfreezeAssetContract { + bytes owner_address = 1; +} + +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; +} + +message ProposalCreateContract { + bytes owner_address = 1; + map parameters = 2; +} + +message ProposalApproveContract { + bytes owner_address = 1; + int64 proposal_id = 2; + bool is_add_approval = 3; // add or remove approval +} + +message ProposalDeleteContract { + bytes owner_address = 1; + int64 proposal_id = 2; +} + +message CreateSmartContract { + bytes owner_address = 1; + SmartContract new_contract = 2; +} + +message TriggerSmartContract { + bytes owner_address = 1; + bytes contract_address = 2; + int64 call_value = 3; + bytes data = 4; +} + +message BuyStorageContract { + bytes owner_address = 1; + int64 quant = 2; // trx quantity for buy storage (sun) +} + +message BuyStorageBytesContract { + bytes owner_address = 1; + int64 bytes = 2; // storage bytes for buy +} + +message SellStorageContract { + bytes owner_address = 1; + int64 storage_bytes = 2; +} + +message ExchangeCreateContract { + bytes owner_address = 1; + bytes first_token_id = 2; + int64 first_token_balance = 3; + bytes second_token_id = 4; + int64 second_token_balance = 5; +} + +message ExchangeInjectContract { + bytes owner_address = 1; + int64 exchange_id = 2; + bytes token_id = 3; + int64 quant = 4; +} + +message ExchangeWithdrawContract { + bytes owner_address = 1; + int64 exchange_id = 2; + bytes token_id = 3; + int64 quant = 4; +} + +message ExchangeTransactionContract { + bytes owner_address = 1; + int64 exchange_id = 2; + bytes token_id = 3; + int64 quant = 4; + int64 expected = 5; +} \ No newline at end of file diff --git a/protobuf/core/Discover.proto b/protobuf/core/Discover.proto new file mode 100644 index 0000000..4cc0d83 --- /dev/null +++ b/protobuf/core/Discover.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package protocol; + + +option java_package = "org.tron.protos"; //Specify the name of the package that generated the Java file +option java_outer_classname = "Discover"; //Specify the class name of the generated Java file +option go_package = "github.com/tronprotocol/grpc-gateway/core"; + +message Endpoint { + bytes address = 1; + int32 port = 2; + bytes nodeId = 3; +} + +message PingMessage { + Endpoint from = 1; + Endpoint to = 2; + int32 version = 3; + int64 timestamp = 4; +} + +message PongMessage { + Endpoint from = 1; + int32 echo = 2; + int64 timestamp = 3; +} + +message FindNeighbours { + Endpoint from = 1; + bytes targetId = 2; + int64 timestamp = 3; +} + +message Neighbours { + Endpoint from = 1; + repeated Endpoint neighbours = 2; + int64 timestamp = 3; +} + +message BackupMessage { + bool flag = 1; + int32 priority = 2; +} \ No newline at end of file diff --git a/protobuf/core/Tron.proto b/protobuf/core/Tron.proto new file mode 100644 index 0000000..38c4f3a --- /dev/null +++ b/protobuf/core/Tron.proto @@ -0,0 +1,485 @@ +syntax = "proto3"; + +import "google/protobuf/any.proto"; +import "core/Discover.proto"; + +package protocol; + + +option java_package = "org.tron.protos"; //Specify the name of the package that generated the Java file +option java_outer_classname = "Protocol"; //Specify the class name of the generated Java file +option go_package = "github.com/tronprotocol/grpc-gateway/core"; + +enum AccountType { + Normal = 0; + AssetIssue = 1; + Contract = 2; +} + +// AccountId, (name, address) use name, (null, address) use address, (name, null) use name, +message AccountId { + bytes name = 1; + bytes address = 2; +} + +// vote message +message Vote { + // the super rep address + bytes vote_address = 1; + // the vote num to this super rep. + int64 vote_count = 2; +} + +// Proposal +message Proposal { + int64 proposal_id = 1; + bytes proposer_address = 2; + map parameters = 3; + int64 expiration_time = 4; + int64 create_time = 5; + repeated bytes approvals = 6; + enum State { + PENDING = 0; + DISAPPROVED = 1; + APPROVED = 2; + CANCELED = 3; + } + State state = 7; +} + +// Exchange +message Exchange { + int64 exchange_id = 1; + bytes creator_address = 2; + int64 create_time = 3; + bytes first_token_id = 6; + int64 first_token_balance = 7; + bytes second_token_id = 8; + int64 second_token_balance = 9; +} + +message ChainParameters { + repeated ChainParameter chainParameter = 1; + message ChainParameter { + string key = 1; + int64 value = 2; + } +} + +/* Account */ +message Account { + /* frozen balance */ + message Frozen { + int64 frozen_balance = 1; // the frozen trx balance + int64 expire_time = 2; // the expire time + } + // account nick name + bytes account_name = 1; + AccountType type = 2; + // the create address + bytes address = 3; + // the trx balance + int64 balance = 4; + // the votes + repeated Vote votes = 5; + // the other asset owned by this account + map asset = 6; + + // the frozen balance + repeated Frozen frozen = 7; + // bandwidth, get from frozen + int64 net_usage = 8; + + // this account create time + int64 create_time = 0x09; + // this last operation time, including transfer, voting and so on. //FIXME fix grammar + int64 latest_opration_time = 10; + // witness block producing allowance + int64 allowance = 0x0B; + // last withdraw time + int64 latest_withdraw_time = 0x0C; + // not used so far + bytes code = 13; + bool is_witness = 14; + bool is_committee = 15; + // frozen asset(for asset issuer) + 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; + + // the identity of this account, case insensitive + bytes account_id = 23; + + message AccountResource { + // energy resource, get from frozen + int64 energy_usage = 1; + // the frozen balance for energy + Frozen frozen_balance_for_energy = 2; + int64 latest_consume_time_for_energy = 3; + + // storage resource, get from market + int64 storage_limit = 6; + int64 storage_usage = 7; + int64 latest_exchange_storage_time = 8; + } + AccountResource account_resource = 26; + + bytes codeHash = 30; +} + +message authority { + AccountId account = 1; + bytes permission_name = 2; +} + +message permission { + AccountId account = 1; +} + +// Witness +message Witness { + bytes address = 1; + int64 voteCount = 2; + bytes pubKey = 3; + string url = 4; + int64 totalProduced = 5; + int64 totalMissed = 6; + int64 latestBlockNum = 7; + int64 latestSlotNum = 8; + bool isJobs = 9; +} + +// Vote Change +message Votes { + bytes address = 1; + repeated Vote old_votes = 2; + repeated Vote new_votes = 3; +} + +// Transcation + +message TXOutput { + int64 value = 1; + bytes pubKeyHash = 2; +} + +message TXInput { + message raw { + bytes txID = 1; + int64 vout = 2; + bytes pubKey = 3; + } + raw raw_data = 1; + bytes signature = 4; +} + +message TXOutputs { + repeated TXOutput outputs = 1; +} + +message ResourceReceipt { + int64 energy_usage = 1; + int64 energy_fee = 2; + int64 origin_energy_usage = 3; + int64 energy_usage_total = 4; + int64 net_usage = 5; + int64 net_fee = 6; + Transaction.Result.contractResult result = 7; +} + +message Transaction { + message Contract { + enum ContractType { + AccountCreateContract = 0; + TransferContract = 1; + TransferAssetContract = 2; + VoteAssetContract = 3; + VoteWitnessContract = 4; + WitnessCreateContract = 5; + AssetIssueContract = 6; + WitnessUpdateContract = 8; + ParticipateAssetIssueContract = 9; + AccountUpdateContract = 10; + FreezeBalanceContract = 11; + UnfreezeBalanceContract = 12; + WithdrawBalanceContract = 13; + UnfreezeAssetContract = 14; + UpdateAssetContract = 15; + ProposalCreateContract = 16; + ProposalApproveContract = 17; + ProposalDeleteContract = 18; + SetAccountIdContract = 19; + CustomContract = 20; + // BuyStorageContract = 21; + // BuyStorageBytesContract = 22; + // SellStorageContract = 23; + CreateSmartContract = 30; + TriggerSmartContract = 31; + GetContract = 32; + UpdateSettingContract = 33; + ExchangeCreateContract = 41; + ExchangeInjectContract = 42; + ExchangeWithdrawContract = 43; + ExchangeTransactionContract = 44; + } + ContractType type = 1; + google.protobuf.Any parameter = 2; + bytes provider = 3; + bytes ContractName = 4; + } + + message Result { + enum code { + SUCESS = 0; + FAILED = 1; + } + enum contractResult { + DEFAULT = 0; + SUCCESS = 1; + REVERT = 2; + BAD_JUMP_DESTINATION = 3; + OUT_OF_MEMORY = 4; + PRECOMPILED_CONTRACT = 5; + STACK_TOO_SMALL = 6; + STACK_TOO_LARGE = 7; + ILLEGAL_OPERATION = 8; + STACK_OVERFLOW = 9; + OUT_OF_ENERGY = 10; + OUT_OF_TIME = 11; + JVM_STACK_OVER_FLOW = 12; + UNKNOWN = 13; + } + int64 fee = 1; + code ret = 2; + contractResult contractRet = 3; + + int64 withdraw_amount = 15; + int64 unfreeze_amount = 16; + } + + message raw { + bytes ref_block_bytes = 1; + int64 ref_block_num = 3; + bytes ref_block_hash = 4; + int64 expiration = 8; + repeated authority auths = 9; + // data not used + bytes data = 10; + //only support size = 1, repeated list here for extension + repeated Contract contract = 11; + // scripts not used + bytes scripts = 12; + int64 timestamp = 14; + int64 fee_limit = 18; + } + + raw raw_data = 1; + // only support size = 1, repeated list here for muti-sig extension + repeated bytes signature = 2; + repeated Result ret = 5; +} + +message TransactionInfo { + enum code { + SUCESS = 0; + FAILED = 1; + } + message Log { + bytes address = 1; + repeated bytes topics = 2; + bytes data = 3; + } + bytes id = 1; + int64 fee = 2; + int64 blockNumber = 3; + int64 blockTimeStamp = 4; + repeated bytes contractResult = 5; + bytes contract_address = 6; + ResourceReceipt receipt = 7; + repeated Log log = 8; + code result = 9; + bytes resMessage = 10; + + int64 withdraw_amount = 15; + int64 unfreeze_amount = 16; +} + +message Transactions { + repeated Transaction transactions = 1; +} + +message TransactionSign { + Transaction transaction = 1; + bytes privateKey = 2; +} + +message BlockHeader { + message raw { + int64 timestamp = 1; + bytes txTrieRoot = 2; + bytes parentHash = 3; + //bytes nonce = 5; + //bytes difficulty = 6; + int64 number = 7; + int64 witness_id = 8; + bytes witness_address = 9; + int32 version = 10; + } + raw raw_data = 1; + bytes witness_signature = 2; +} + +// block +message Block { + repeated Transaction transactions = 1; + BlockHeader block_header = 2; +} + +message ChainInventory { + message BlockId { + bytes hash = 1; + int64 number = 2; + } + repeated BlockId ids = 1; + int64 remain_num = 2; +} + +// Inventory +message BlockInventory { + enum Type { + SYNC = 0; + ADVTISE = 1; + FETCH = 2; + } + + message BlockId { + bytes hash = 1; + int64 number = 2; + } + repeated BlockId ids = 1; + Type type = 2; +} + +message Inventory { + enum InventoryType { + TRX = 0; + BLOCK = 1; + } + InventoryType type = 1; + repeated bytes ids = 2; +} + +message Items { + enum ItemType { + ERR = 0; + TRX = 1; + BLOCK = 2; + BLOCKHEADER = 3; + } + + ItemType type = 1; + repeated Block blocks = 2; + repeated BlockHeader block_headers = 3; + repeated Transaction transactions = 4; +} + +// DynamicProperties +message DynamicProperties { + int64 last_solidity_block_num = 1; +} + +enum ReasonCode { + REQUESTED = 0x00; + BAD_PROTOCOL = 0x02; + TOO_MANY_PEERS = 0x04; + DUPLICATE_PEER = 0x05; + INCOMPATIBLE_PROTOCOL = 0x06; + NULL_IDENTITY = 0x07; + PEER_QUITING = 0x08; + UNEXPECTED_IDENTITY = 0x09; + LOCAL_IDENTITY = 0x0A; + PING_TIMEOUT = 0x0B; + USER_REASON = 0x10; + RESET = 0x11; + SYNC_FAIL = 0x12; + FETCH_FAIL = 0x13; + BAD_TX = 0x14; + BAD_BLOCK = 0x15; + FORKED = 0x16; + UNLINKABLE = 0x17; + INCOMPATIBLE_VERSION = 0x18; + INCOMPATIBLE_CHAIN = 0x19; + TIME_OUT = 0x20; + CONNECT_FAIL = 0x21; + TOO_MANY_PEERS_WITH_SAME_IP = 0x22; + UNKNOWN = 0xFF; +} + +message DisconnectMessage { + ReasonCode reason = 1; +} + +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; +} + +message SmartContract { + message ABI { + message Entry { + enum EntryType { + UnknownEntryType = 0; + Constructor = 1; + Function = 2; + Event = 3; + Fallback = 4; + } + message Param { + bool indexed = 1; + string name = 2; + string type = 3; + // SolidityType type = 3; + } + enum StateMutabilityType { + UnknownMutabilityType = 0; + Pure = 1; + View = 2; + Nonpayable = 3; + Payable = 4; + } + + bool anonymous = 1; + bool constant = 2; + string name = 3; + repeated Param inputs = 4; + repeated Param outputs = 5; + EntryType type = 6; + bool payable = 7; + StateMutabilityType stateMutability = 8; + } + repeated Entry entrys = 1; + } + bytes origin_address = 1; + bytes contract_address = 2; + ABI abi = 3; + bytes bytecode = 4; + int64 call_value = 5; + int64 consume_user_resource_percent = 6; + string name = 7; + +} \ No newline at end of file diff --git a/protobuf/core/TronInventoryItems.proto b/protobuf/core/TronInventoryItems.proto new file mode 100644 index 0000000..a82d2de --- /dev/null +++ b/protobuf/core/TronInventoryItems.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package protocol; + +option java_package = "org.tron.protos"; //Specify the name of the package that generated the Java file +option java_outer_classname = "TronInventoryItems"; //Specify the class name of the generated Java file +option go_package = "github.com/tronprotocol/grpc-gateway/core"; + +message InventoryItems { + int32 type = 1; + repeated bytes items = 2; +} \ No newline at end of file diff --git a/src/protocol/core/Contract_pb.js b/src/protocol/core/Contract_pb.js index bbcd3f1..79e1586 100644 --- a/src/protocol/core/Contract_pb.js +++ b/src/protocol/core/Contract_pb.js @@ -16,14 +16,28 @@ goog.exportSymbol('proto.protocol.AccountCreateContract', null, global); goog.exportSymbol('proto.protocol.AccountUpdateContract', null, global); goog.exportSymbol('proto.protocol.AssetIssueContract', null, global); goog.exportSymbol('proto.protocol.AssetIssueContract.FrozenSupply', null, global); -goog.exportSymbol('proto.protocol.DeployContract', null, global); +goog.exportSymbol('proto.protocol.BuyStorageBytesContract', null, global); +goog.exportSymbol('proto.protocol.BuyStorageContract', null, global); +goog.exportSymbol('proto.protocol.CreateSmartContract', null, global); +goog.exportSymbol('proto.protocol.ExchangeCreateContract', null, global); +goog.exportSymbol('proto.protocol.ExchangeInjectContract', null, global); +goog.exportSymbol('proto.protocol.ExchangeTransactionContract', null, global); +goog.exportSymbol('proto.protocol.ExchangeWithdrawContract', null, global); goog.exportSymbol('proto.protocol.FreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.ParticipateAssetIssueContract', null, global); +goog.exportSymbol('proto.protocol.ProposalApproveContract', null, global); +goog.exportSymbol('proto.protocol.ProposalCreateContract', null, global); +goog.exportSymbol('proto.protocol.ProposalDeleteContract', null, global); +goog.exportSymbol('proto.protocol.ResourceCode', null, global); +goog.exportSymbol('proto.protocol.SellStorageContract', null, global); +goog.exportSymbol('proto.protocol.SetAccountIdContract', null, global); goog.exportSymbol('proto.protocol.TransferAssetContract', null, global); goog.exportSymbol('proto.protocol.TransferContract', null, global); +goog.exportSymbol('proto.protocol.TriggerSmartContract', null, global); goog.exportSymbol('proto.protocol.UnfreezeAssetContract', null, global); goog.exportSymbol('proto.protocol.UnfreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.UpdateAssetContract', null, global); +goog.exportSymbol('proto.protocol.UpdateSettingContract', null, global); goog.exportSymbol('proto.protocol.VoteAssetContract', null, global); goog.exportSymbol('proto.protocol.VoteWitnessContract', null, global); goog.exportSymbol('proto.protocol.VoteWitnessContract.Vote', null, global); @@ -77,9 +91,9 @@ proto.protocol.AccountCreateContract.prototype.toObject = function(opt_includeIn */ proto.protocol.AccountCreateContract.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - accountName: msg.getAccountName_asB64(), - ownerAddress: msg.getOwnerAddress_asB64() + ownerAddress: msg.getOwnerAddress_asB64(), + accountAddress: msg.getAccountAddress_asB64(), + type: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -117,16 +131,16 @@ proto.protocol.AccountCreateContract.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.protocol.AccountType} */ (reader.readEnum()); - msg.setType(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountName(value); + msg.setAccountAddress(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); + var value = /** @type {!proto.protocol.AccountType} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -157,23 +171,23 @@ proto.protocol.AccountCreateContract.prototype.serializeBinary = function() { */ proto.protocol.AccountCreateContract.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getAccountName_asU8(); + f = message.getAccountAddress_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 3, f ); @@ -182,95 +196,95 @@ proto.protocol.AccountCreateContract.serializeBinaryToWriter = function(message, /** - * optional AccountType type = 1; - * @return {!proto.protocol.AccountType} - */ -proto.protocol.AccountCreateContract.prototype.getType = function() { - return /** @type {!proto.protocol.AccountType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {!proto.protocol.AccountType} value */ -proto.protocol.AccountCreateContract.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional bytes account_name = 2; + * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.AccountCreateContract.prototype.getAccountName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.AccountCreateContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes account_name = 2; - * This is a type-conversion wrapper around `getAccountName()` + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` * @return {string} */ -proto.protocol.AccountCreateContract.prototype.getAccountName_asB64 = function() { +proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountName())); + this.getOwnerAddress())); }; /** - * optional bytes account_name = 2; + * optional bytes owner_address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountName()` + * This is a type-conversion wrapper around `getOwnerAddress()` * @return {!Uint8Array} */ -proto.protocol.AccountCreateContract.prototype.getAccountName_asU8 = function() { +proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountName())); + this.getOwnerAddress())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.AccountCreateContract.prototype.setAccountName = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +proto.protocol.AccountCreateContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional bytes owner_address = 3; + * optional bytes account_address = 2; * @return {!(string|Uint8Array)} */ -proto.protocol.AccountCreateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.AccountCreateContract.prototype.getAccountAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes owner_address = 3; - * This is a type-conversion wrapper around `getOwnerAddress()` + * optional bytes account_address = 2; + * This is a type-conversion wrapper around `getAccountAddress()` * @return {string} */ -proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asB64 = function() { +proto.protocol.AccountCreateContract.prototype.getAccountAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); + this.getAccountAddress())); }; /** - * optional bytes owner_address = 3; + * optional bytes account_address = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` + * This is a type-conversion wrapper around `getAccountAddress()` * @return {!Uint8Array} */ -proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asU8 = function() { +proto.protocol.AccountCreateContract.prototype.getAccountAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); + this.getAccountAddress())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.AccountCreateContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); +proto.protocol.AccountCreateContract.prototype.setAccountAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional AccountType type = 3; + * @return {!proto.protocol.AccountType} + */ +proto.protocol.AccountCreateContract.prototype.getType = function() { + return /** @type {!proto.protocol.AccountType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {!proto.protocol.AccountType} value */ +proto.protocol.AccountCreateContract.prototype.setType = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -448,7 +462,7 @@ proto.protocol.AccountUpdateContract.prototype.getAccountName_asU8 = function() /** @param {!(string|Uint8Array)} value */ proto.protocol.AccountUpdateContract.prototype.setAccountName = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -487,7 +501,224 @@ proto.protocol.AccountUpdateContract.prototype.getOwnerAddress_asU8 = function() /** @param {!(string|Uint8Array)} value */ proto.protocol.AccountUpdateContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.SetAccountIdContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.SetAccountIdContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.SetAccountIdContract.displayName = 'proto.protocol.SetAccountIdContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.SetAccountIdContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.SetAccountIdContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.SetAccountIdContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.SetAccountIdContract.toObject = function(includeInstance, msg) { + var f, obj = { + accountId: msg.getAccountId_asB64(), + ownerAddress: msg.getOwnerAddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.SetAccountIdContract} + */ +proto.protocol.SetAccountIdContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.SetAccountIdContract; + return proto.protocol.SetAccountIdContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.SetAccountIdContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.SetAccountIdContract} + */ +proto.protocol.SetAccountIdContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAccountId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.SetAccountIdContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.SetAccountIdContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.SetAccountIdContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.SetAccountIdContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccountId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes account_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.SetAccountIdContract.prototype.getAccountId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes account_id = 1; + * This is a type-conversion wrapper around `getAccountId()` + * @return {string} + */ +proto.protocol.SetAccountIdContract.prototype.getAccountId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAccountId())); +}; + + +/** + * optional bytes account_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAccountId()` + * @return {!Uint8Array} + */ +proto.protocol.SetAccountIdContract.prototype.getAccountId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAccountId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.SetAccountIdContract.prototype.setAccountId = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes owner_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.SetAccountIdContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes owner_address = 2; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.SetAccountIdContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.SetAccountIdContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.SetAccountIdContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -677,7 +908,7 @@ proto.protocol.TransferContract.prototype.getOwnerAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.TransferContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -716,7 +947,7 @@ proto.protocol.TransferContract.prototype.getToAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.TransferContract.prototype.setToAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -731,7 +962,7 @@ proto.protocol.TransferContract.prototype.getAmount = function() { /** @param {number} value */ proto.protocol.TransferContract.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -933,7 +1164,7 @@ proto.protocol.TransferAssetContract.prototype.getAssetName_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.TransferAssetContract.prototype.setAssetName = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -972,7 +1203,7 @@ proto.protocol.TransferAssetContract.prototype.getOwnerAddress_asU8 = function() /** @param {!(string|Uint8Array)} value */ proto.protocol.TransferAssetContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -1011,7 +1242,7 @@ proto.protocol.TransferAssetContract.prototype.getToAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.TransferAssetContract.prototype.setToAddress = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -1026,7 +1257,7 @@ proto.protocol.TransferAssetContract.prototype.getAmount = function() { /** @param {number} value */ proto.protocol.TransferAssetContract.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setField(this, 4, value); }; @@ -1235,7 +1466,7 @@ proto.protocol.VoteAssetContract.prototype.getOwnerAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.VoteAssetContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -1305,7 +1536,7 @@ proto.protocol.VoteAssetContract.prototype.getSupport = function() { /** @param {boolean} value */ proto.protocol.VoteAssetContract.prototype.setSupport = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -1320,7 +1551,7 @@ proto.protocol.VoteAssetContract.prototype.getCount = function() { /** @param {number} value */ proto.protocol.VoteAssetContract.prototype.setCount = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setField(this, 5, value); }; @@ -1659,7 +1890,7 @@ proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8 = function /** @param {!(string|Uint8Array)} value */ proto.protocol.VoteWitnessContract.Vote.prototype.setVoteAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -1674,7 +1905,7 @@ proto.protocol.VoteWitnessContract.Vote.prototype.getVoteCount = function() { /** @param {number} value */ proto.protocol.VoteWitnessContract.Vote.prototype.setVoteCount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -1713,7 +1944,7 @@ proto.protocol.VoteWitnessContract.prototype.getOwnerAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.VoteWitnessContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -1761,7 +1992,7 @@ proto.protocol.VoteWitnessContract.prototype.getSupport = function() { /** @param {boolean} value */ proto.protocol.VoteWitnessContract.prototype.setSupport = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -1776,7 +2007,251 @@ proto.protocol.VoteWitnessContract.prototype.setSupport = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.WitnessCreateContract = function(opt_data) { +proto.protocol.UpdateSettingContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.UpdateSettingContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.UpdateSettingContract.displayName = 'proto.protocol.UpdateSettingContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.UpdateSettingContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.UpdateSettingContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.UpdateSettingContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.UpdateSettingContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + contractAddress: msg.getContractAddress_asB64(), + consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.UpdateSettingContract} + */ +proto.protocol.UpdateSettingContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.UpdateSettingContract; + return proto.protocol.UpdateSettingContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.UpdateSettingContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.UpdateSettingContract} + */ +proto.protocol.UpdateSettingContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setConsumeUserResourcePercent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.UpdateSettingContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.UpdateSettingContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.UpdateSettingContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.UpdateSettingContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getContractAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getConsumeUserResourcePercent(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.UpdateSettingContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.UpdateSettingContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.UpdateSettingContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.UpdateSettingContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes contract_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.UpdateSettingContract.prototype.getContractAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes contract_address = 2; + * This is a type-conversion wrapper around `getContractAddress()` + * @return {string} + */ +proto.protocol.UpdateSettingContract.prototype.getContractAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractAddress())); +}; + + +/** + * optional bytes contract_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractAddress()` + * @return {!Uint8Array} + */ +proto.protocol.UpdateSettingContract.prototype.getContractAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.UpdateSettingContract.prototype.setContractAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 consume_user_resource_percent = 3; + * @return {number} + */ +proto.protocol.UpdateSettingContract.prototype.getConsumeUserResourcePercent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.UpdateSettingContract.prototype.setConsumeUserResourcePercent = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.WitnessCreateContract = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.WitnessCreateContract, jspb.Message); @@ -1939,7 +2414,7 @@ proto.protocol.WitnessCreateContract.prototype.getOwnerAddress_asU8 = function() /** @param {!(string|Uint8Array)} value */ proto.protocol.WitnessCreateContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -1978,7 +2453,7 @@ proto.protocol.WitnessCreateContract.prototype.getUrl_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.WitnessCreateContract.prototype.setUrl = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -2156,7 +2631,7 @@ proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress_asU8 = function() /** @param {!(string|Uint8Array)} value */ proto.protocol.WitnessUpdateContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -2195,7 +2670,7 @@ proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.WitnessUpdateContract.prototype.setUpdateUrl = function(value) { - jspb.Message.setProto3BytesField(this, 12, value); + jspb.Message.setField(this, 12, value); }; @@ -2263,6 +2738,7 @@ proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) { num: jspb.Message.getFieldWithDefault(msg, 8, 0), startTime: jspb.Message.getFieldWithDefault(msg, 9, 0), endTime: jspb.Message.getFieldWithDefault(msg, 10, 0), + order: jspb.Message.getFieldWithDefault(msg, 11, 0), voteScore: jspb.Message.getFieldWithDefault(msg, 16, 0), description: msg.getDescription_asB64(), url: msg.getUrl_asB64(), @@ -2343,6 +2819,10 @@ proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, re var value = /** @type {number} */ (reader.readInt64()); msg.setEndTime(value); break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOrder(value); + break; case 16: var value = /** @type {number} */ (reader.readInt32()); msg.setVoteScore(value); @@ -2464,6 +2944,13 @@ proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, wr f ); } + f = message.getOrder(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } f = message.getVoteScore(); if (f !== 0) { writer.writeInt32( @@ -2666,7 +3153,7 @@ proto.protocol.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount = funct /** @param {number} value */ proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -2681,7 +3168,7 @@ proto.protocol.AssetIssueContract.FrozenSupply.prototype.getFrozenDays = functio /** @param {number} value */ proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenDays = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -2720,7 +3207,7 @@ proto.protocol.AssetIssueContract.prototype.getOwnerAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.AssetIssueContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -2759,7 +3246,7 @@ proto.protocol.AssetIssueContract.prototype.getName_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.AssetIssueContract.prototype.setName = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -2798,7 +3285,7 @@ proto.protocol.AssetIssueContract.prototype.getAbbr_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.AssetIssueContract.prototype.setAbbr = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -2813,7 +3300,7 @@ proto.protocol.AssetIssueContract.prototype.getTotalSupply = function() { /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setTotalSupply = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setField(this, 4, value); }; @@ -2859,7 +3346,7 @@ proto.protocol.AssetIssueContract.prototype.getTrxNum = function() { /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setTrxNum = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setField(this, 6, value); }; @@ -2874,7 +3361,7 @@ proto.protocol.AssetIssueContract.prototype.getNum = function() { /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setNum = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setField(this, 8, value); }; @@ -2889,7 +3376,7 @@ proto.protocol.AssetIssueContract.prototype.getStartTime = function() { /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setStartTime = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setField(this, 9, value); }; @@ -2904,7 +3391,22 @@ proto.protocol.AssetIssueContract.prototype.getEndTime = function() { /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setEndTime = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setField(this, 10, value); +}; + + +/** + * optional int64 order = 11; + * @return {number} + */ +proto.protocol.AssetIssueContract.prototype.getOrder = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AssetIssueContract.prototype.setOrder = function(value) { + jspb.Message.setField(this, 11, value); }; @@ -2919,7 +3421,7 @@ proto.protocol.AssetIssueContract.prototype.getVoteScore = function() { /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setVoteScore = function(value) { - jspb.Message.setProto3IntField(this, 16, value); + jspb.Message.setField(this, 16, value); }; @@ -2958,7 +3460,7 @@ proto.protocol.AssetIssueContract.prototype.getDescription_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.AssetIssueContract.prototype.setDescription = function(value) { - jspb.Message.setProto3BytesField(this, 20, value); + jspb.Message.setField(this, 20, value); }; @@ -2997,7 +3499,7 @@ proto.protocol.AssetIssueContract.prototype.getUrl_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.AssetIssueContract.prototype.setUrl = function(value) { - jspb.Message.setProto3BytesField(this, 21, value); + jspb.Message.setField(this, 21, value); }; @@ -3012,7 +3514,7 @@ proto.protocol.AssetIssueContract.prototype.getFreeAssetNetLimit = function() { /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setFreeAssetNetLimit = function(value) { - jspb.Message.setProto3IntField(this, 22, value); + jspb.Message.setField(this, 22, value); }; @@ -3027,7 +3529,7 @@ proto.protocol.AssetIssueContract.prototype.getPublicFreeAssetNetLimit = functio /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setPublicFreeAssetNetLimit = function(value) { - jspb.Message.setProto3IntField(this, 23, value); + jspb.Message.setField(this, 23, value); }; @@ -3042,7 +3544,7 @@ proto.protocol.AssetIssueContract.prototype.getPublicFreeAssetNetUsage = functio /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setPublicFreeAssetNetUsage = function(value) { - jspb.Message.setProto3IntField(this, 24, value); + jspb.Message.setField(this, 24, value); }; @@ -3057,7 +3559,7 @@ proto.protocol.AssetIssueContract.prototype.getPublicLatestFreeNetTime = functio /** @param {number} value */ proto.protocol.AssetIssueContract.prototype.setPublicLatestFreeNetTime = function(value) { - jspb.Message.setProto3IntField(this, 25, value); + jspb.Message.setField(this, 25, value); }; @@ -3259,7 +3761,7 @@ proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8 = fu /** @param {!(string|Uint8Array)} value */ proto.protocol.ParticipateAssetIssueContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -3298,7 +3800,7 @@ proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress_asU8 = funct /** @param {!(string|Uint8Array)} value */ proto.protocol.ParticipateAssetIssueContract.prototype.setToAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -3337,7 +3839,7 @@ proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asU8 = funct /** @param {!(string|Uint8Array)} value */ proto.protocol.ParticipateAssetIssueContract.prototype.setAssetName = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -3352,7 +3854,7 @@ proto.protocol.ParticipateAssetIssueContract.prototype.getAmount = function() { /** @param {number} value */ proto.protocol.ParticipateAssetIssueContract.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setField(this, 4, value); }; @@ -3367,12 +3869,12 @@ proto.protocol.ParticipateAssetIssueContract.prototype.setAmount = function(valu * @extends {jspb.Message} * @constructor */ -proto.protocol.DeployContract = function(opt_data) { +proto.protocol.FreezeBalanceContract = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.DeployContract, jspb.Message); +goog.inherits(proto.protocol.FreezeBalanceContract, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.DeployContract.displayName = 'proto.protocol.DeployContract'; + proto.protocol.FreezeBalanceContract.displayName = 'proto.protocol.FreezeBalanceContract'; } @@ -3387,8 +3889,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.DeployContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DeployContract.toObject(opt_includeInstance, this); +proto.protocol.FreezeBalanceContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.FreezeBalanceContract.toObject(opt_includeInstance, this); }; @@ -3397,14 +3899,16 @@ proto.protocol.DeployContract.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.DeployContract} msg The msg instance to transform. + * @param {!proto.protocol.FreezeBalanceContract} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DeployContract.toObject = function(includeInstance, msg) { +proto.protocol.FreezeBalanceContract.toObject = function(includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), - script: msg.getScript_asB64() + frozenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), + frozenDuration: jspb.Message.getFieldWithDefault(msg, 3, 0), + resource: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -3418,23 +3922,23 @@ proto.protocol.DeployContract.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DeployContract} + * @return {!proto.protocol.FreezeBalanceContract} */ -proto.protocol.DeployContract.deserializeBinary = function(bytes) { +proto.protocol.FreezeBalanceContract.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DeployContract; - return proto.protocol.DeployContract.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.FreezeBalanceContract; + return proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.DeployContract} msg The message object to deserialize into. + * @param {!proto.protocol.FreezeBalanceContract} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DeployContract} + * @return {!proto.protocol.FreezeBalanceContract} */ -proto.protocol.DeployContract.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3446,8 +3950,16 @@ proto.protocol.DeployContract.deserializeBinaryFromReader = function(msg, reader msg.setOwnerAddress(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScript(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFrozenBalance(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFrozenDuration(value); + break; + case 10: + var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); + msg.setResource(value); break; default: reader.skipField(); @@ -3462,9 +3974,9 @@ proto.protocol.DeployContract.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.DeployContract.prototype.serializeBinary = function() { +proto.protocol.FreezeBalanceContract.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.DeployContract.serializeBinaryToWriter(this, writer); + proto.protocol.FreezeBalanceContract.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3472,11 +3984,11 @@ proto.protocol.DeployContract.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DeployContract} message + * @param {!proto.protocol.FreezeBalanceContract} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DeployContract.serializeBinaryToWriter = function(message, writer) { +proto.protocol.FreezeBalanceContract.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOwnerAddress_asU8(); if (f.length > 0) { @@ -3485,239 +3997,24 @@ proto.protocol.DeployContract.serializeBinaryToWriter = function(message, writer f ); } - f = message.getScript_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getFrozenBalance(); + if (f !== 0) { + writer.writeInt64( 2, f ); } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DeployContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.DeployContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.DeployContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.DeployContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes script = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DeployContract.prototype.getScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes script = 2; - * This is a type-conversion wrapper around `getScript()` - * @return {string} - */ -proto.protocol.DeployContract.prototype.getScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScript())); -}; - - -/** - * optional bytes script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScript()` - * @return {!Uint8Array} - */ -proto.protocol.DeployContract.prototype.getScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScript())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.DeployContract.prototype.setScript = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.FreezeBalanceContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.FreezeBalanceContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.FreezeBalanceContract.displayName = 'proto.protocol.FreezeBalanceContract'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.FreezeBalanceContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.FreezeBalanceContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.FreezeBalanceContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.FreezeBalanceContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - frozenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - frozenDuration: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.FreezeBalanceContract} - */ -proto.protocol.FreezeBalanceContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.FreezeBalanceContract; - return proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.FreezeBalanceContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.FreezeBalanceContract} - */ -proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalance(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenDuration(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.FreezeBalanceContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.FreezeBalanceContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.FreezeBalanceContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.FreezeBalanceContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFrozenBalance(); + f = message.getFrozenDuration(); if (f !== 0) { writer.writeInt64( - 2, + 3, f ); } - f = message.getFrozenDuration(); - if (f !== 0) { - writer.writeInt64( - 3, + f = message.getResource(); + if (f !== 0.0) { + writer.writeEnum( + 10, f ); } @@ -3759,7 +4056,7 @@ proto.protocol.FreezeBalanceContract.prototype.getOwnerAddress_asU8 = function() /** @param {!(string|Uint8Array)} value */ proto.protocol.FreezeBalanceContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -3774,7 +4071,7 @@ proto.protocol.FreezeBalanceContract.prototype.getFrozenBalance = function() { /** @param {number} value */ proto.protocol.FreezeBalanceContract.prototype.setFrozenBalance = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -3789,7 +4086,22 @@ proto.protocol.FreezeBalanceContract.prototype.getFrozenDuration = function() { /** @param {number} value */ proto.protocol.FreezeBalanceContract.prototype.setFrozenDuration = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional ResourceCode resource = 10; + * @return {!proto.protocol.ResourceCode} + */ +proto.protocol.FreezeBalanceContract.prototype.getResource = function() { + return /** @type {!proto.protocol.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {!proto.protocol.ResourceCode} value */ +proto.protocol.FreezeBalanceContract.prototype.setResource = function(value) { + jspb.Message.setField(this, 10, value); }; @@ -3840,7 +4152,8 @@ proto.protocol.UnfreezeBalanceContract.prototype.toObject = function(opt_include */ proto.protocol.UnfreezeBalanceContract.toObject = function(includeInstance, msg) { var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64() + ownerAddress: msg.getOwnerAddress_asB64(), + resource: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -3881,6 +4194,10 @@ proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader = function(ms var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOwnerAddress(value); break; + case 10: + var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); + msg.setResource(value); + break; default: reader.skipField(); break; @@ -3917,6 +4234,13 @@ proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter = function(messag f ); } + f = message.getResource(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } }; @@ -3955,7 +4279,22 @@ proto.protocol.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8 = function /** @param {!(string|Uint8Array)} value */ proto.protocol.UnfreezeBalanceContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional ResourceCode resource = 10; + * @return {!proto.protocol.ResourceCode} + */ +proto.protocol.UnfreezeBalanceContract.prototype.getResource = function() { + return /** @type {!proto.protocol.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {!proto.protocol.ResourceCode} value */ +proto.protocol.UnfreezeBalanceContract.prototype.setResource = function(value) { + jspb.Message.setField(this, 10, value); }; @@ -4121,7 +4460,7 @@ proto.protocol.UnfreezeAssetContract.prototype.getOwnerAddress_asU8 = function() /** @param {!(string|Uint8Array)} value */ proto.protocol.UnfreezeAssetContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -4287,7 +4626,7 @@ proto.protocol.WithdrawBalanceContract.prototype.getOwnerAddress_asU8 = function /** @param {!(string|Uint8Array)} value */ proto.protocol.WithdrawBalanceContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -4501,7 +4840,7 @@ proto.protocol.UpdateAssetContract.prototype.getOwnerAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.UpdateAssetContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -4540,7 +4879,7 @@ proto.protocol.UpdateAssetContract.prototype.getDescription_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.UpdateAssetContract.prototype.setDescription = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -4579,7 +4918,7 @@ proto.protocol.UpdateAssetContract.prototype.getUrl_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.UpdateAssetContract.prototype.setUrl = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -4594,7 +4933,7 @@ proto.protocol.UpdateAssetContract.prototype.getNewLimit = function() { /** @param {number} value */ proto.protocol.UpdateAssetContract.prototype.setNewLimit = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setField(this, 4, value); }; @@ -4609,8 +4948,2872 @@ proto.protocol.UpdateAssetContract.prototype.getNewPublicLimit = function() { /** @param {number} value */ proto.protocol.UpdateAssetContract.prototype.setNewPublicLimit = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setField(this, 5, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ProposalCreateContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.protocol.ProposalCreateContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ProposalCreateContract.displayName = 'proto.protocol.ProposalCreateContract'; +} + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ProposalCreateContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ProposalCreateContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ProposalCreateContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ProposalCreateContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ProposalCreateContract} + */ +proto.protocol.ProposalCreateContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ProposalCreateContract; + return proto.protocol.ProposalCreateContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ProposalCreateContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ProposalCreateContract} + */ +proto.protocol.ProposalCreateContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = msg.getParametersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readInt64); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ProposalCreateContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ProposalCreateContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ProposalCreateContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ProposalCreateContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getParametersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeInt64); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ProposalCreateContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.ProposalCreateContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.ProposalCreateContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ProposalCreateContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * map parameters = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.ProposalCreateContract.prototype.getParametersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + null)); +}; + + +proto.protocol.ProposalCreateContract.prototype.clearParametersMap = function() { + this.getParametersMap().clear(); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ProposalApproveContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.ProposalApproveContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ProposalApproveContract.displayName = 'proto.protocol.ProposalApproveContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ProposalApproveContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ProposalApproveContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ProposalApproveContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ProposalApproveContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + proposalId: jspb.Message.getFieldWithDefault(msg, 2, 0), + isAddApproval: jspb.Message.getFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ProposalApproveContract} + */ +proto.protocol.ProposalApproveContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ProposalApproveContract; + return proto.protocol.ProposalApproveContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ProposalApproveContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ProposalApproveContract} + */ +proto.protocol.ProposalApproveContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setProposalId(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsAddApproval(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ProposalApproveContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ProposalApproveContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ProposalApproveContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ProposalApproveContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProposalId(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getIsAddApproval(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ProposalApproveContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.ProposalApproveContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.ProposalApproveContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ProposalApproveContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 proposal_id = 2; + * @return {number} + */ +proto.protocol.ProposalApproveContract.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ProposalApproveContract.prototype.setProposalId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bool is_add_approval = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.ProposalApproveContract.prototype.getIsAddApproval = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.ProposalApproveContract.prototype.setIsAddApproval = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ProposalDeleteContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.ProposalDeleteContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ProposalDeleteContract.displayName = 'proto.protocol.ProposalDeleteContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ProposalDeleteContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ProposalDeleteContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ProposalDeleteContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ProposalDeleteContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + proposalId: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ProposalDeleteContract} + */ +proto.protocol.ProposalDeleteContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ProposalDeleteContract; + return proto.protocol.ProposalDeleteContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ProposalDeleteContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ProposalDeleteContract} + */ +proto.protocol.ProposalDeleteContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setProposalId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ProposalDeleteContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ProposalDeleteContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ProposalDeleteContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ProposalDeleteContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProposalId(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ProposalDeleteContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 proposal_id = 2; + * @return {number} + */ +proto.protocol.ProposalDeleteContract.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ProposalDeleteContract.prototype.setProposalId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.CreateSmartContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.CreateSmartContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.CreateSmartContract.displayName = 'proto.protocol.CreateSmartContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.CreateSmartContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.CreateSmartContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.CreateSmartContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.CreateSmartContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + newContract: (f = msg.getNewContract()) && core_Tron_pb.SmartContract.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.CreateSmartContract} + */ +proto.protocol.CreateSmartContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.CreateSmartContract; + return proto.protocol.CreateSmartContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.CreateSmartContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.CreateSmartContract} + */ +proto.protocol.CreateSmartContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = new core_Tron_pb.SmartContract; + reader.readMessage(value,core_Tron_pb.SmartContract.deserializeBinaryFromReader); + msg.setNewContract(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.CreateSmartContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.CreateSmartContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.CreateSmartContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.CreateSmartContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNewContract(); + if (f != null) { + writer.writeMessage( + 2, + f, + core_Tron_pb.SmartContract.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.CreateSmartContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.CreateSmartContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.CreateSmartContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.CreateSmartContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional SmartContract new_contract = 2; + * @return {?proto.protocol.SmartContract} + */ +proto.protocol.CreateSmartContract.prototype.getNewContract = function() { + return /** @type{?proto.protocol.SmartContract} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.SmartContract, 2)); +}; + + +/** @param {?proto.protocol.SmartContract|undefined} value */ +proto.protocol.CreateSmartContract.prototype.setNewContract = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.CreateSmartContract.prototype.clearNewContract = function() { + this.setNewContract(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.CreateSmartContract.prototype.hasNewContract = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TriggerSmartContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.TriggerSmartContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TriggerSmartContract.displayName = 'proto.protocol.TriggerSmartContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TriggerSmartContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TriggerSmartContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TriggerSmartContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TriggerSmartContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + contractAddress: msg.getContractAddress_asB64(), + callValue: jspb.Message.getFieldWithDefault(msg, 3, 0), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TriggerSmartContract} + */ +proto.protocol.TriggerSmartContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TriggerSmartContract; + return proto.protocol.TriggerSmartContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TriggerSmartContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TriggerSmartContract} + */ +proto.protocol.TriggerSmartContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCallValue(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TriggerSmartContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TriggerSmartContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TriggerSmartContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TriggerSmartContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getContractAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getCallValue(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TriggerSmartContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.TriggerSmartContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.TriggerSmartContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TriggerSmartContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes contract_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TriggerSmartContract.prototype.getContractAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes contract_address = 2; + * This is a type-conversion wrapper around `getContractAddress()` + * @return {string} + */ +proto.protocol.TriggerSmartContract.prototype.getContractAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractAddress())); +}; + + +/** + * optional bytes contract_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractAddress()` + * @return {!Uint8Array} + */ +proto.protocol.TriggerSmartContract.prototype.getContractAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TriggerSmartContract.prototype.setContractAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 call_value = 3; + * @return {number} + */ +proto.protocol.TriggerSmartContract.prototype.getCallValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TriggerSmartContract.prototype.setCallValue = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional bytes data = 4; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TriggerSmartContract.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes data = 4; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.protocol.TriggerSmartContract.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.protocol.TriggerSmartContract.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TriggerSmartContract.prototype.setData = function(value) { + jspb.Message.setField(this, 4, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BuyStorageContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.BuyStorageContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BuyStorageContract.displayName = 'proto.protocol.BuyStorageContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BuyStorageContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BuyStorageContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BuyStorageContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BuyStorageContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + quant: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BuyStorageContract} + */ +proto.protocol.BuyStorageContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BuyStorageContract; + return proto.protocol.BuyStorageContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BuyStorageContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BuyStorageContract} + */ +proto.protocol.BuyStorageContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setQuant(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BuyStorageContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BuyStorageContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BuyStorageContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BuyStorageContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getQuant(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.BuyStorageContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.BuyStorageContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.BuyStorageContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BuyStorageContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 quant = 2; + * @return {number} + */ +proto.protocol.BuyStorageContract.prototype.getQuant = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BuyStorageContract.prototype.setQuant = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BuyStorageBytesContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.BuyStorageBytesContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BuyStorageBytesContract.displayName = 'proto.protocol.BuyStorageBytesContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BuyStorageBytesContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BuyStorageBytesContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BuyStorageBytesContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BuyStorageBytesContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + bytes: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BuyStorageBytesContract} + */ +proto.protocol.BuyStorageBytesContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BuyStorageBytesContract; + return proto.protocol.BuyStorageBytesContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BuyStorageBytesContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BuyStorageBytesContract} + */ +proto.protocol.BuyStorageBytesContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BuyStorageBytesContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BuyStorageBytesContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BuyStorageBytesContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BuyStorageBytesContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getBytes(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BuyStorageBytesContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 bytes = 2; + * @return {number} + */ +proto.protocol.BuyStorageBytesContract.prototype.getBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BuyStorageBytesContract.prototype.setBytes = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.SellStorageContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.SellStorageContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.SellStorageContract.displayName = 'proto.protocol.SellStorageContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.SellStorageContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.SellStorageContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.SellStorageContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.SellStorageContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + storageBytes: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.SellStorageContract} + */ +proto.protocol.SellStorageContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.SellStorageContract; + return proto.protocol.SellStorageContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.SellStorageContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.SellStorageContract} + */ +proto.protocol.SellStorageContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.SellStorageContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.SellStorageContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.SellStorageContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.SellStorageContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStorageBytes(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.SellStorageContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.SellStorageContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.SellStorageContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.SellStorageContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 storage_bytes = 2; + * @return {number} + */ +proto.protocol.SellStorageContract.prototype.getStorageBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.SellStorageContract.prototype.setStorageBytes = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ExchangeCreateContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.ExchangeCreateContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ExchangeCreateContract.displayName = 'proto.protocol.ExchangeCreateContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ExchangeCreateContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ExchangeCreateContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ExchangeCreateContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeCreateContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + firstTokenId: msg.getFirstTokenId_asB64(), + firstTokenBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), + secondTokenId: msg.getSecondTokenId_asB64(), + secondTokenBalance: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ExchangeCreateContract} + */ +proto.protocol.ExchangeCreateContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ExchangeCreateContract; + return proto.protocol.ExchangeCreateContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ExchangeCreateContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ExchangeCreateContract} + */ +proto.protocol.ExchangeCreateContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFirstTokenId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFirstTokenBalance(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSecondTokenId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSecondTokenBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ExchangeCreateContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ExchangeCreateContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ExchangeCreateContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeCreateContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFirstTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getFirstTokenBalance(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getSecondTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getSecondTokenBalance(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeCreateContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes first_token_id = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes first_token_id = 2; + * This is a type-conversion wrapper around `getFirstTokenId()` + * @return {string} + */ +proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFirstTokenId())); +}; + + +/** + * optional bytes first_token_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFirstTokenId()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFirstTokenId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeCreateContract.prototype.setFirstTokenId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 first_token_balance = 3; + * @return {number} + */ +proto.protocol.ExchangeCreateContract.prototype.getFirstTokenBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeCreateContract.prototype.setFirstTokenBalance = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional bytes second_token_id = 4; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes second_token_id = 4; + * This is a type-conversion wrapper around `getSecondTokenId()` + * @return {string} + */ +proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSecondTokenId())); +}; + + +/** + * optional bytes second_token_id = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSecondTokenId()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSecondTokenId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeCreateContract.prototype.setSecondTokenId = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 second_token_balance = 5; + * @return {number} + */ +proto.protocol.ExchangeCreateContract.prototype.getSecondTokenBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeCreateContract.prototype.setSecondTokenBalance = function(value) { + jspb.Message.setField(this, 5, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ExchangeInjectContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.ExchangeInjectContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ExchangeInjectContract.displayName = 'proto.protocol.ExchangeInjectContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ExchangeInjectContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ExchangeInjectContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ExchangeInjectContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeInjectContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0), + tokenId: msg.getTokenId_asB64(), + quant: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ExchangeInjectContract} + */ +proto.protocol.ExchangeInjectContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ExchangeInjectContract; + return proto.protocol.ExchangeInjectContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ExchangeInjectContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ExchangeInjectContract} + */ +proto.protocol.ExchangeInjectContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setQuant(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ExchangeInjectContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ExchangeInjectContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ExchangeInjectContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeInjectContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getExchangeId(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getQuant(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeInjectContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 exchange_id = 2; + * @return {number} + */ +proto.protocol.ExchangeInjectContract.prototype.getExchangeId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeInjectContract.prototype.setExchangeId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes token_id = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeInjectContract.prototype.getTokenId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes token_id = 3; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.protocol.ExchangeInjectContract.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeInjectContract.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeInjectContract.prototype.setTokenId = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 quant = 4; + * @return {number} + */ +proto.protocol.ExchangeInjectContract.prototype.getQuant = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeInjectContract.prototype.setQuant = function(value) { + jspb.Message.setField(this, 4, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ExchangeWithdrawContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.ExchangeWithdrawContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ExchangeWithdrawContract.displayName = 'proto.protocol.ExchangeWithdrawContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ExchangeWithdrawContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ExchangeWithdrawContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ExchangeWithdrawContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeWithdrawContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0), + tokenId: msg.getTokenId_asB64(), + quant: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ExchangeWithdrawContract} + */ +proto.protocol.ExchangeWithdrawContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ExchangeWithdrawContract; + return proto.protocol.ExchangeWithdrawContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ExchangeWithdrawContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ExchangeWithdrawContract} + */ +proto.protocol.ExchangeWithdrawContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setQuant(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ExchangeWithdrawContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ExchangeWithdrawContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ExchangeWithdrawContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeWithdrawContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getExchangeId(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getQuant(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeWithdrawContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 exchange_id = 2; + * @return {number} + */ +proto.protocol.ExchangeWithdrawContract.prototype.getExchangeId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeWithdrawContract.prototype.setExchangeId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes token_id = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeWithdrawContract.prototype.getTokenId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes token_id = 3; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.protocol.ExchangeWithdrawContract.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeWithdrawContract.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeWithdrawContract.prototype.setTokenId = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 quant = 4; + * @return {number} + */ +proto.protocol.ExchangeWithdrawContract.prototype.getQuant = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeWithdrawContract.prototype.setQuant = function(value) { + jspb.Message.setField(this, 4, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ExchangeTransactionContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.ExchangeTransactionContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ExchangeTransactionContract.displayName = 'proto.protocol.ExchangeTransactionContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ExchangeTransactionContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ExchangeTransactionContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ExchangeTransactionContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeTransactionContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0), + tokenId: msg.getTokenId_asB64(), + quant: jspb.Message.getFieldWithDefault(msg, 4, 0), + expected: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ExchangeTransactionContract} + */ +proto.protocol.ExchangeTransactionContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ExchangeTransactionContract; + return proto.protocol.ExchangeTransactionContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ExchangeTransactionContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ExchangeTransactionContract} + */ +proto.protocol.ExchangeTransactionContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setQuant(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpected(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ExchangeTransactionContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ExchangeTransactionContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ExchangeTransactionContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeTransactionContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getExchangeId(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getQuant(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getExpected(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeTransactionContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 exchange_id = 2; + * @return {number} + */ +proto.protocol.ExchangeTransactionContract.prototype.getExchangeId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeTransactionContract.prototype.setExchangeId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes token_id = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ExchangeTransactionContract.prototype.getTokenId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes token_id = 3; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.protocol.ExchangeTransactionContract.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.protocol.ExchangeTransactionContract.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ExchangeTransactionContract.prototype.setTokenId = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 quant = 4; + * @return {number} + */ +proto.protocol.ExchangeTransactionContract.prototype.getQuant = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeTransactionContract.prototype.setQuant = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 expected = 5; + * @return {number} + */ +proto.protocol.ExchangeTransactionContract.prototype.getExpected = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ExchangeTransactionContract.prototype.setExpected = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * @enum {number} + */ +proto.protocol.ResourceCode = { + BANDWIDTH: 0, + ENERGY: 1 +}; goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/Discover_pb.js b/src/protocol/core/Discover_pb.js index 05d7584..2bec12c 100644 --- a/src/protocol/core/Discover_pb.js +++ b/src/protocol/core/Discover_pb.js @@ -11,6 +11,7 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); +goog.exportSymbol('proto.protocol.BackupMessage', null, global); goog.exportSymbol('proto.protocol.Endpoint', null, global); goog.exportSymbol('proto.protocol.FindNeighbours', null, global); goog.exportSymbol('proto.protocol.Neighbours', null, global); @@ -202,7 +203,7 @@ proto.protocol.Endpoint.prototype.getAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.Endpoint.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -217,7 +218,7 @@ proto.protocol.Endpoint.prototype.getPort = function() { /** @param {number} value */ proto.protocol.Endpoint.prototype.setPort = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -256,7 +257,7 @@ proto.protocol.Endpoint.prototype.getNodeid_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.Endpoint.prototype.setNodeid = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -498,7 +499,7 @@ proto.protocol.PingMessage.prototype.getVersion = function() { /** @param {number} value */ proto.protocol.PingMessage.prototype.setVersion = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -513,7 +514,7 @@ proto.protocol.PingMessage.prototype.getTimestamp = function() { /** @param {number} value */ proto.protocol.PingMessage.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setField(this, 4, value); }; @@ -711,7 +712,7 @@ proto.protocol.PongMessage.prototype.getEcho = function() { /** @param {number} value */ proto.protocol.PongMessage.prototype.setEcho = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -726,7 +727,7 @@ proto.protocol.PongMessage.prototype.getTimestamp = function() { /** @param {number} value */ proto.protocol.PongMessage.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -948,7 +949,7 @@ proto.protocol.FindNeighbours.prototype.getTargetid_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.FindNeighbours.prototype.setTargetid = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -963,7 +964,7 @@ proto.protocol.FindNeighbours.prototype.getTimestamp = function() { /** @param {number} value */ proto.protocol.FindNeighbours.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setField(this, 3, value); }; @@ -1202,7 +1203,178 @@ proto.protocol.Neighbours.prototype.getTimestamp = function() { /** @param {number} value */ proto.protocol.Neighbours.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BackupMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.BackupMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BackupMessage.displayName = 'proto.protocol.BackupMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BackupMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BackupMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BackupMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BackupMessage.toObject = function(includeInstance, msg) { + var f, obj = { + flag: jspb.Message.getFieldWithDefault(msg, 1, false), + priority: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BackupMessage} + */ +proto.protocol.BackupMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BackupMessage; + return proto.protocol.BackupMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BackupMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BackupMessage} + */ +proto.protocol.BackupMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFlag(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPriority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BackupMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BackupMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BackupMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BackupMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFlag(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getPriority(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional bool flag = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.BackupMessage.prototype.getFlag = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.BackupMessage.prototype.setFlag = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 priority = 2; + * @return {number} + */ +proto.protocol.BackupMessage.prototype.getPriority = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BackupMessage.prototype.setPriority = function(value) { + jspb.Message.setField(this, 2, value); }; diff --git a/src/protocol/core/TronInventoryItems_pb.js b/src/protocol/core/TronInventoryItems_pb.js index d2744d7..81dfb00 100644 --- a/src/protocol/core/TronInventoryItems_pb.js +++ b/src/protocol/core/TronInventoryItems_pb.js @@ -169,7 +169,7 @@ proto.protocol.InventoryItems.prototype.getType = function() { /** @param {number} value */ proto.protocol.InventoryItems.prototype.setType = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setField(this, 1, value); }; diff --git a/src/protocol/core/Tron_pb.js b/src/protocol/core/Tron_pb.js index 84b433f..d9f54f7 100644 --- a/src/protocol/core/Tron_pb.js +++ b/src/protocol/core/Tron_pb.js @@ -14,6 +14,7 @@ var global = Function('return this')(); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); var core_Discover_pb = require('../core/Discover_pb.js'); goog.exportSymbol('proto.protocol.Account', null, global); +goog.exportSymbol('proto.protocol.Account.AccountResource', null, global); goog.exportSymbol('proto.protocol.Account.Frozen', null, global); goog.exportSymbol('proto.protocol.AccountId', null, global); goog.exportSymbol('proto.protocol.AccountType', null, global); @@ -25,15 +26,27 @@ goog.exportSymbol('proto.protocol.BlockInventory.BlockId', null, global); goog.exportSymbol('proto.protocol.BlockInventory.Type', null, global); goog.exportSymbol('proto.protocol.ChainInventory', null, global); goog.exportSymbol('proto.protocol.ChainInventory.BlockId', null, global); +goog.exportSymbol('proto.protocol.ChainParameters', null, global); +goog.exportSymbol('proto.protocol.ChainParameters.ChainParameter', null, global); goog.exportSymbol('proto.protocol.DisconnectMessage', null, global); goog.exportSymbol('proto.protocol.DynamicProperties', null, global); +goog.exportSymbol('proto.protocol.Exchange', null, global); goog.exportSymbol('proto.protocol.HelloMessage', null, global); goog.exportSymbol('proto.protocol.HelloMessage.BlockId', null, global); goog.exportSymbol('proto.protocol.Inventory', null, global); goog.exportSymbol('proto.protocol.Inventory.InventoryType', null, global); goog.exportSymbol('proto.protocol.Items', null, global); goog.exportSymbol('proto.protocol.Items.ItemType', null, global); +goog.exportSymbol('proto.protocol.Proposal', null, global); +goog.exportSymbol('proto.protocol.Proposal.State', null, global); goog.exportSymbol('proto.protocol.ReasonCode', null, global); +goog.exportSymbol('proto.protocol.ResourceReceipt', null, global); +goog.exportSymbol('proto.protocol.SmartContract', null, global); +goog.exportSymbol('proto.protocol.SmartContract.ABI', null, global); +goog.exportSymbol('proto.protocol.SmartContract.ABI.Entry', null, global); +goog.exportSymbol('proto.protocol.SmartContract.ABI.Entry.EntryType', null, global); +goog.exportSymbol('proto.protocol.SmartContract.ABI.Entry.Param', null, global); +goog.exportSymbol('proto.protocol.SmartContract.ABI.Entry.StateMutabilityType', null, global); goog.exportSymbol('proto.protocol.TXInput', null, global); goog.exportSymbol('proto.protocol.TXInput.raw', null, global); goog.exportSymbol('proto.protocol.TXOutput', null, global); @@ -43,13 +56,18 @@ goog.exportSymbol('proto.protocol.Transaction.Contract', null, global); goog.exportSymbol('proto.protocol.Transaction.Contract.ContractType', null, global); goog.exportSymbol('proto.protocol.Transaction.Result', null, global); goog.exportSymbol('proto.protocol.Transaction.Result.code', null, global); +goog.exportSymbol('proto.protocol.Transaction.Result.contractResult', null, global); goog.exportSymbol('proto.protocol.Transaction.raw', null, global); +goog.exportSymbol('proto.protocol.TransactionInfo', null, global); +goog.exportSymbol('proto.protocol.TransactionInfo.Log', null, global); +goog.exportSymbol('proto.protocol.TransactionInfo.code', null, global); +goog.exportSymbol('proto.protocol.TransactionSign', null, global); goog.exportSymbol('proto.protocol.Transactions', null, global); goog.exportSymbol('proto.protocol.Vote', null, global); goog.exportSymbol('proto.protocol.Votes', null, global); goog.exportSymbol('proto.protocol.Witness', null, global); -goog.exportSymbol('proto.protocol.acuthrity', null, global); -goog.exportSymbol('proto.protocol.permision', null, global); +goog.exportSymbol('proto.protocol.authority', null, global); +goog.exportSymbol('proto.protocol.permission', null, global); /** * Generated by JsPbCodeGenerator. @@ -224,7 +242,7 @@ proto.protocol.AccountId.prototype.getName_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.AccountId.prototype.setName = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -263,7 +281,7 @@ proto.protocol.AccountId.prototype.getAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.AccountId.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -441,7 +459,7 @@ proto.protocol.Vote.prototype.getVoteAddress_asU8 = function() { /** @param {!(string|Uint8Array)} value */ proto.protocol.Vote.prototype.setVoteAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setField(this, 1, value); }; @@ -456,7 +474,7 @@ proto.protocol.Vote.prototype.getVoteCount = function() { /** @param {number} value */ proto.protocol.Vote.prototype.setVoteCount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setField(this, 2, value); }; @@ -471,19 +489,19 @@ proto.protocol.Vote.prototype.setVoteCount = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.Account = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Account.repeatedFields_, null); +proto.protocol.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Proposal.repeatedFields_, null); }; -goog.inherits(proto.protocol.Account, jspb.Message); +goog.inherits(proto.protocol.Proposal, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Account.displayName = 'proto.protocol.Account'; + proto.protocol.Proposal.displayName = 'proto.protocol.Proposal'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.protocol.Account.repeatedFields_ = [5,7,16]; +proto.protocol.Proposal.repeatedFields_ = [6]; @@ -498,8 +516,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Account.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Account.toObject(opt_includeInstance, this); +proto.protocol.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Proposal.toObject(opt_includeInstance, this); }; @@ -508,37 +526,19 @@ proto.protocol.Account.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Account} msg The msg instance to transform. + * @param {!proto.protocol.Proposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Account.toObject = function(includeInstance, msg) { +proto.protocol.Proposal.toObject = function(includeInstance, msg) { var f, obj = { - accountName: msg.getAccountName_asB64(), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - address: msg.getAddress_asB64(), - balance: jspb.Message.getFieldWithDefault(msg, 4, 0), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.protocol.Vote.toObject, includeInstance), - assetMap: (f = msg.getAssetMap()) ? f.toObject(includeInstance, undefined) : [], - frozenList: jspb.Message.toObjectList(msg.getFrozenList(), - proto.protocol.Account.Frozen.toObject, includeInstance), - netUsage: jspb.Message.getFieldWithDefault(msg, 8, 0), - createTime: jspb.Message.getFieldWithDefault(msg, 9, 0), - latestOprationTime: jspb.Message.getFieldWithDefault(msg, 10, 0), - allowance: jspb.Message.getFieldWithDefault(msg, 11, 0), - latestWithdrawTime: jspb.Message.getFieldWithDefault(msg, 12, 0), - code: msg.getCode_asB64(), - isWitness: jspb.Message.getFieldWithDefault(msg, 14, false), - isCommittee: jspb.Message.getFieldWithDefault(msg, 15, false), - frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), - proto.protocol.Account.Frozen.toObject, includeInstance), - assetIssuedName: msg.getAssetIssuedName_asB64(), - latestAssetOperationTimeMap: (f = msg.getLatestAssetOperationTimeMap()) ? f.toObject(includeInstance, undefined) : [], - freeNetUsage: jspb.Message.getFieldWithDefault(msg, 19, 0), - freeAssetNetUsageMap: (f = msg.getFreeAssetNetUsageMap()) ? f.toObject(includeInstance, undefined) : [], - latestConsumeTime: jspb.Message.getFieldWithDefault(msg, 21, 0), - latestConsumeFreeTime: jspb.Message.getFieldWithDefault(msg, 22, 0) + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + proposerAddress: msg.getProposerAddress_asB64(), + parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : [], + expirationTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + createTime: jspb.Message.getFieldWithDefault(msg, 5, 0), + approvalsList: msg.getApprovalsList_asB64(), + state: jspb.Message.getFieldWithDefault(msg, 7, 0) }; if (includeInstance) { @@ -552,23 +552,23 @@ proto.protocol.Account.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Account} + * @return {!proto.protocol.Proposal} */ -proto.protocol.Account.deserializeBinary = function(bytes) { +proto.protocol.Proposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Account; - return proto.protocol.Account.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Proposal; + return proto.protocol.Proposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Account} msg The message object to deserialize into. + * @param {!proto.protocol.Proposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Account} + * @return {!proto.protocol.Proposal} */ -proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Proposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -576,101 +576,34 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountName(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setProposalId(value); break; case 2: - var value = /** @type {!proto.protocol.AccountType} */ (reader.readEnum()); - msg.setType(value); - break; - case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); + msg.setProposerAddress(value); break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 5: - var value = new proto.protocol.Vote; - reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); - msg.addVotes(value); - break; - case 6: - var value = msg.getAssetMap(); + case 3: + var value = msg.getParametersMap(); reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readInt64); }); break; - case 7: - var value = new proto.protocol.Account.Frozen; - reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); - msg.addFrozen(value); - break; - case 8: + case 4: var value = /** @type {number} */ (reader.readInt64()); - msg.setNetUsage(value); + msg.setExpirationTime(value); break; - case 9: + case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setCreateTime(value); break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestOprationTime(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAllowance(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestWithdrawTime(value); - break; - case 13: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCode(value); - break; - case 14: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsWitness(value); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsCommittee(value); - break; - case 16: - var value = new proto.protocol.Account.Frozen; - reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); - msg.addFrozenSupply(value); - break; - case 17: + case 6: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAssetIssuedName(value); - break; - case 18: - var value = msg.getLatestAssetOperationTimeMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; - case 19: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFreeNetUsage(value); - break; - case 20: - var value = msg.getFreeAssetNetUsageMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestConsumeTime(value); + msg.addApprovals(value); break; - case 22: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestConsumeFreeTime(value); + case 7: + var value = /** @type {!proto.protocol.Proposal.State} */ (reader.readEnum()); + msg.setState(value); break; default: reader.skipField(); @@ -685,9 +618,9 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Account.prototype.serializeBinary = function() { +proto.protocol.Proposal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Account.serializeBinaryToWriter(this, writer); + proto.protocol.Proposal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -695,163 +628,241 @@ proto.protocol.Account.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Account} message + * @param {!proto.protocol.Proposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Proposal.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccountName_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getProposalId(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getAddress_asU8(); + f = message.getProposerAddress_asU8(); if (f.length > 0) { writer.writeBytes( - 3, - f - ); - } - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 4, + 2, f ); } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.protocol.Vote.serializeBinaryToWriter - ); - } - f = message.getAssetMap(true); + f = message.getParametersMap(true); if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getFrozenList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.protocol.Account.Frozen.serializeBinaryToWriter - ); + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeInt64); } - f = message.getNetUsage(); + f = message.getExpirationTime(); if (f !== 0) { writer.writeInt64( - 8, + 4, f ); } f = message.getCreateTime(); if (f !== 0) { writer.writeInt64( - 9, - f - ); - } - f = message.getLatestOprationTime(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getAllowance(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getLatestWithdrawTime(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getCode_asU8(); - if (f.length > 0) { - writer.writeBytes( - 13, - f - ); - } - f = message.getIsWitness(); - if (f) { - writer.writeBool( - 14, - f - ); - } - f = message.getIsCommittee(); - if (f) { - writer.writeBool( - 15, + 5, f ); } - f = message.getFrozenSupplyList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 16, - f, - proto.protocol.Account.Frozen.serializeBinaryToWriter - ); - } - f = message.getAssetIssuedName_asU8(); + f = message.getApprovalsList_asU8(); if (f.length > 0) { - writer.writeBytes( - 17, - f - ); - } - f = message.getLatestAssetOperationTimeMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(18, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getFreeNetUsage(); - if (f !== 0) { - writer.writeInt64( - 19, + writer.writeRepeatedBytes( + 6, f ); } - f = message.getFreeAssetNetUsageMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(20, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getLatestConsumeTime(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getLatestConsumeFreeTime(); - if (f !== 0) { - writer.writeInt64( - 22, + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 7, f ); } }; +/** + * @enum {number} + */ +proto.protocol.Proposal.State = { + PENDING: 0, + DISAPPROVED: 1, + APPROVED: 2, + CANCELED: 3 +}; + +/** + * optional int64 proposal_id = 1; + * @return {number} + */ +proto.protocol.Proposal.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Proposal.prototype.setProposalId = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes proposer_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Proposal.prototype.getProposerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proposer_address = 2; + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {string} + */ +proto.protocol.Proposal.prototype.getProposerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerAddress())); +}; + + +/** + * optional bytes proposer_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.Proposal.prototype.getProposerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Proposal.prototype.setProposerAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * map parameters = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Proposal.prototype.getParametersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Proposal.prototype.clearParametersMap = function() { + this.getParametersMap().clear(); +}; + + +/** + * optional int64 expiration_time = 4; + * @return {number} + */ +proto.protocol.Proposal.prototype.getExpirationTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Proposal.prototype.setExpirationTime = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 create_time = 5; + * @return {number} + */ +proto.protocol.Proposal.prototype.getCreateTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Proposal.prototype.setCreateTime = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * repeated bytes approvals = 6; + * @return {!(Array|Array)} + */ +proto.protocol.Proposal.prototype.getApprovalsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * repeated bytes approvals = 6; + * This is a type-conversion wrapper around `getApprovalsList()` + * @return {!Array.} + */ +proto.protocol.Proposal.prototype.getApprovalsList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getApprovalsList())); +}; + + +/** + * repeated bytes approvals = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getApprovalsList()` + * @return {!Array.} + */ +proto.protocol.Proposal.prototype.getApprovalsList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getApprovalsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.Proposal.prototype.setApprovalsList = function(value) { + jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.Proposal.prototype.addApprovals = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +proto.protocol.Proposal.prototype.clearApprovalsList = function() { + this.setApprovalsList([]); +}; + + +/** + * optional State state = 7; + * @return {!proto.protocol.Proposal.State} + */ +proto.protocol.Proposal.prototype.getState = function() { + return /** @type {!proto.protocol.Proposal.State} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {!proto.protocol.Proposal.State} value */ +proto.protocol.Proposal.prototype.setState = function(value) { + jspb.Message.setField(this, 7, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -863,12 +874,12 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { * @extends {jspb.Message} * @constructor */ -proto.protocol.Account.Frozen = function(opt_data) { +proto.protocol.Exchange = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Account.Frozen, jspb.Message); +goog.inherits(proto.protocol.Exchange, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Account.Frozen.displayName = 'proto.protocol.Account.Frozen'; + proto.protocol.Exchange.displayName = 'proto.protocol.Exchange'; } @@ -883,8 +894,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Account.Frozen.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Account.Frozen.toObject(opt_includeInstance, this); +proto.protocol.Exchange.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Exchange.toObject(opt_includeInstance, this); }; @@ -893,14 +904,19 @@ proto.protocol.Account.Frozen.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Account.Frozen} msg The msg instance to transform. + * @param {!proto.protocol.Exchange} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Account.Frozen.toObject = function(includeInstance, msg) { +proto.protocol.Exchange.toObject = function(includeInstance, msg) { var f, obj = { - frozenBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - expireTime: jspb.Message.getFieldWithDefault(msg, 2, 0) + exchangeId: jspb.Message.getFieldWithDefault(msg, 1, 0), + creatorAddress: msg.getCreatorAddress_asB64(), + createTime: jspb.Message.getFieldWithDefault(msg, 3, 0), + firstTokenId: msg.getFirstTokenId_asB64(), + firstTokenBalance: jspb.Message.getFieldWithDefault(msg, 7, 0), + secondTokenId: msg.getSecondTokenId_asB64(), + secondTokenBalance: jspb.Message.getFieldWithDefault(msg, 9, 0) }; if (includeInstance) { @@ -914,23 +930,23 @@ proto.protocol.Account.Frozen.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Account.Frozen} + * @return {!proto.protocol.Exchange} */ -proto.protocol.Account.Frozen.deserializeBinary = function(bytes) { +proto.protocol.Exchange.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Account.Frozen; - return proto.protocol.Account.Frozen.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Exchange; + return proto.protocol.Exchange.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Account.Frozen} msg The message object to deserialize into. + * @param {!proto.protocol.Exchange} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Account.Frozen} + * @return {!proto.protocol.Exchange} */ -proto.protocol.Account.Frozen.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Exchange.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -939,11 +955,31 @@ proto.protocol.Account.Frozen.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalance(value); + msg.setExchangeId(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCreatorAddress(value); + break; + case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setExpireTime(value); + msg.setCreateTime(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFirstTokenId(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFirstTokenBalance(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSecondTokenId(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSecondTokenBalance(value); break; default: reader.skipField(); @@ -958,9 +994,9 @@ proto.protocol.Account.Frozen.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Account.Frozen.prototype.serializeBinary = function() { +proto.protocol.Exchange.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Account.Frozen.serializeBinaryToWriter(this, writer); + proto.protocol.Exchange.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -968,23 +1004,58 @@ proto.protocol.Account.Frozen.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Account.Frozen} message + * @param {!proto.protocol.Exchange} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Account.Frozen.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Exchange.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFrozenBalance(); + f = message.getExchangeId(); if (f !== 0) { writer.writeInt64( 1, f ); } - f = message.getExpireTime(); + f = message.getCreatorAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getCreateTime(); if (f !== 0) { writer.writeInt64( - 2, + 3, + f + ); + } + f = message.getFirstTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getFirstTokenBalance(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getSecondTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getSecondTokenBalance(); + if (f !== 0) { + writer.writeInt64( + 9, f ); } @@ -992,519 +1063,516 @@ proto.protocol.Account.Frozen.serializeBinaryToWriter = function(message, writer /** - * optional int64 frozen_balance = 1; + * optional int64 exchange_id = 1; * @return {number} */ -proto.protocol.Account.Frozen.prototype.getFrozenBalance = function() { +proto.protocol.Exchange.prototype.getExchangeId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.Account.Frozen.prototype.setFrozenBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 expire_time = 2; - * @return {number} - */ -proto.protocol.Account.Frozen.prototype.getExpireTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Account.Frozen.prototype.setExpireTime = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +proto.protocol.Exchange.prototype.setExchangeId = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional bytes account_name = 1; + * optional bytes creator_address = 2; * @return {!(string|Uint8Array)} */ -proto.protocol.Account.prototype.getAccountName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.Exchange.prototype.getCreatorAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes account_name = 1; - * This is a type-conversion wrapper around `getAccountName()` + * optional bytes creator_address = 2; + * This is a type-conversion wrapper around `getCreatorAddress()` * @return {string} */ -proto.protocol.Account.prototype.getAccountName_asB64 = function() { +proto.protocol.Exchange.prototype.getCreatorAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountName())); + this.getCreatorAddress())); }; /** - * optional bytes account_name = 1; + * optional bytes creator_address = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountName()` + * This is a type-conversion wrapper around `getCreatorAddress()` * @return {!Uint8Array} */ -proto.protocol.Account.prototype.getAccountName_asU8 = function() { +proto.protocol.Exchange.prototype.getCreatorAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountName())); + this.getCreatorAddress())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Account.prototype.setAccountName = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +proto.protocol.Exchange.prototype.setCreatorAddress = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional AccountType type = 2; - * @return {!proto.protocol.AccountType} + * optional int64 create_time = 3; + * @return {number} */ -proto.protocol.Account.prototype.getType = function() { - return /** @type {!proto.protocol.AccountType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.Exchange.prototype.getCreateTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** @param {!proto.protocol.AccountType} value */ -proto.protocol.Account.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 2, value); +/** @param {number} value */ +proto.protocol.Exchange.prototype.setCreateTime = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional bytes address = 3; + * optional bytes first_token_id = 6; * @return {!(string|Uint8Array)} */ -proto.protocol.Account.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.Exchange.prototype.getFirstTokenId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * optional bytes address = 3; - * This is a type-conversion wrapper around `getAddress()` + * optional bytes first_token_id = 6; + * This is a type-conversion wrapper around `getFirstTokenId()` * @return {string} */ -proto.protocol.Account.prototype.getAddress_asB64 = function() { +proto.protocol.Exchange.prototype.getFirstTokenId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); + this.getFirstTokenId())); }; /** - * optional bytes address = 3; + * optional bytes first_token_id = 6; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` + * This is a type-conversion wrapper around `getFirstTokenId()` * @return {!Uint8Array} */ -proto.protocol.Account.prototype.getAddress_asU8 = function() { +proto.protocol.Exchange.prototype.getFirstTokenId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); + this.getFirstTokenId())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Account.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); +proto.protocol.Exchange.prototype.setFirstTokenId = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * optional int64 balance = 4; + * optional int64 first_token_balance = 7; * @return {number} */ -proto.protocol.Account.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.protocol.Exchange.prototype.getFirstTokenBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.protocol.Account.prototype.setBalance = function(value) { - jspb.Message.setProto3IntField(this, 4, value); +proto.protocol.Exchange.prototype.setFirstTokenBalance = function(value) { + jspb.Message.setField(this, 7, value); }; /** - * repeated Vote votes = 5; - * @return {!Array.} + * optional bytes second_token_id = 8; + * @return {!(string|Uint8Array)} */ -proto.protocol.Account.prototype.getVotesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 5)); +proto.protocol.Exchange.prototype.getSecondTokenId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; -/** @param {!Array.} value */ -proto.protocol.Account.prototype.setVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); +/** + * optional bytes second_token_id = 8; + * This is a type-conversion wrapper around `getSecondTokenId()` + * @return {string} + */ +proto.protocol.Exchange.prototype.getSecondTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSecondTokenId())); }; /** - * @param {!proto.protocol.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Vote} + * optional bytes second_token_id = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSecondTokenId()` + * @return {!Uint8Array} */ -proto.protocol.Account.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.Vote, opt_index); +proto.protocol.Exchange.prototype.getSecondTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSecondTokenId())); }; -proto.protocol.Account.prototype.clearVotesList = function() { - this.setVotesList([]); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Exchange.prototype.setSecondTokenId = function(value) { + jspb.Message.setField(this, 8, value); }; /** - * map asset = 6; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional int64 second_token_balance = 9; + * @return {number} */ -proto.protocol.Account.prototype.getAssetMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, - null)); +proto.protocol.Exchange.prototype.getSecondTokenBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; -proto.protocol.Account.prototype.clearAssetMap = function() { - this.getAssetMap().clear(); +/** @param {number} value */ +proto.protocol.Exchange.prototype.setSecondTokenBalance = function(value) { + jspb.Message.setField(this, 9, value); }; + /** - * repeated Frozen frozen = 7; - * @return {!Array.} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.Account.prototype.getFrozenList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Account.Frozen, 7)); +proto.protocol.ChainParameters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ChainParameters.repeatedFields_, null); }; +goog.inherits(proto.protocol.ChainParameters, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ChainParameters.displayName = 'proto.protocol.ChainParameters'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.ChainParameters.repeatedFields_ = [1]; -/** @param {!Array.} value */ -proto.protocol.Account.prototype.setFrozenList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!proto.protocol.Account.Frozen=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Account.Frozen} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.protocol.Account.prototype.addFrozen = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.protocol.Account.Frozen, opt_index); -}; - - -proto.protocol.Account.prototype.clearFrozenList = function() { - this.setFrozenList([]); +proto.protocol.ChainParameters.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ChainParameters.toObject(opt_includeInstance, this); }; /** - * optional int64 net_usage = 8; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ChainParameters} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Account.prototype.getNetUsage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - +proto.protocol.ChainParameters.toObject = function(includeInstance, msg) { + var f, obj = { + chainparameterList: jspb.Message.toObjectList(msg.getChainparameterList(), + proto.protocol.ChainParameters.ChainParameter.toObject, includeInstance) + }; -/** @param {number} value */ -proto.protocol.Account.prototype.setNetUsage = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 create_time = 9; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ChainParameters} */ -proto.protocol.Account.prototype.getCreateTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.protocol.ChainParameters.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ChainParameters; + return proto.protocol.ChainParameters.deserializeBinaryFromReader(msg, reader); }; -/** @param {number} value */ -proto.protocol.Account.prototype.setCreateTime = function(value) { - jspb.Message.setProto3IntField(this, 9, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ChainParameters} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ChainParameters} + */ +proto.protocol.ChainParameters.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.ChainParameters.ChainParameter; + reader.readMessage(value,proto.protocol.ChainParameters.ChainParameter.deserializeBinaryFromReader); + msg.addChainparameter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 latest_opration_time = 10; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.protocol.Account.prototype.getLatestOprationTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.protocol.ChainParameters.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ChainParameters.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {number} value */ -proto.protocol.Account.prototype.setLatestOprationTime = function(value) { - jspb.Message.setProto3IntField(this, 10, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ChainParameters} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ChainParameters.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainparameterList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.ChainParameters.ChainParameter.serializeBinaryToWriter + ); + } }; + /** - * optional int64 allowance = 11; - * @return {number} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.Account.prototype.getAllowance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.protocol.ChainParameters.ChainParameter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.protocol.ChainParameters.ChainParameter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ChainParameters.ChainParameter.displayName = 'proto.protocol.ChainParameters.ChainParameter'; +} -/** @param {number} value */ -proto.protocol.Account.prototype.setAllowance = function(value) { - jspb.Message.setProto3IntField(this, 11, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ChainParameters.ChainParameter.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ChainParameters.ChainParameter.toObject(opt_includeInstance, this); }; /** - * optional int64 latest_withdraw_time = 12; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ChainParameters.ChainParameter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Account.prototype.getLatestWithdrawTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - +proto.protocol.ChainParameters.ChainParameter.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; -/** @param {number} value */ -proto.protocol.Account.prototype.setLatestWithdrawTime = function(value) { - jspb.Message.setProto3IntField(this, 12, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes code = 13; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ChainParameters.ChainParameter} */ -proto.protocol.Account.prototype.getCode = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +proto.protocol.ChainParameters.ChainParameter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ChainParameters.ChainParameter; + return proto.protocol.ChainParameters.ChainParameter.deserializeBinaryFromReader(msg, reader); }; /** - * optional bytes code = 13; - * This is a type-conversion wrapper around `getCode()` - * @return {string} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ChainParameters.ChainParameter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ChainParameters.ChainParameter} */ -proto.protocol.Account.prototype.getCode_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCode())); +proto.protocol.ChainParameters.ChainParameter.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes code = 13; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCode()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Account.prototype.getCode_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCode())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.Account.prototype.setCode = function(value) { - jspb.Message.setProto3BytesField(this, 13, value); +proto.protocol.ChainParameters.ChainParameter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ChainParameters.ChainParameter.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bool is_witness = 14; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.protocol.Account.prototype.getIsWitness = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 14, false)); -}; - - -/** @param {boolean} value */ -proto.protocol.Account.prototype.setIsWitness = function(value) { - jspb.Message.setProto3BooleanField(this, 14, value); -}; - - -/** - * optional bool is_committee = 15; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.protocol.Account.prototype.getIsCommittee = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false)); -}; - - -/** @param {boolean} value */ -proto.protocol.Account.prototype.setIsCommittee = function(value) { - jspb.Message.setProto3BooleanField(this, 15, value); -}; - - -/** - * repeated Frozen frozen_supply = 16; - * @return {!Array.} - */ -proto.protocol.Account.prototype.getFrozenSupplyList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Account.Frozen, 16)); -}; - - -/** @param {!Array.} value */ -proto.protocol.Account.prototype.setFrozenSupplyList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 16, value); -}; - - -/** - * @param {!proto.protocol.Account.Frozen=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Account.Frozen} - */ -proto.protocol.Account.prototype.addFrozenSupply = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.protocol.Account.Frozen, opt_index); -}; - - -proto.protocol.Account.prototype.clearFrozenSupplyList = function() { - this.setFrozenSupplyList([]); -}; - - -/** - * optional bytes asset_issued_name = 17; - * @return {!(string|Uint8Array)} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ChainParameters.ChainParameter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Account.prototype.getAssetIssuedName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +proto.protocol.ChainParameters.ChainParameter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; /** - * optional bytes asset_issued_name = 17; - * This is a type-conversion wrapper around `getAssetIssuedName()` + * optional string key = 1; * @return {string} */ -proto.protocol.Account.prototype.getAssetIssuedName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAssetIssuedName())); -}; - - -/** - * optional bytes asset_issued_name = 17; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAssetIssuedName()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getAssetIssuedName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAssetIssuedName())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.Account.prototype.setAssetIssuedName = function(value) { - jspb.Message.setProto3BytesField(this, 17, value); -}; - - -/** - * map latest_asset_operation_time = 18; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getLatestAssetOperationTimeMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 18, opt_noLazyCreate, - null)); +proto.protocol.ChainParameters.ChainParameter.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -proto.protocol.Account.prototype.clearLatestAssetOperationTimeMap = function() { - this.getLatestAssetOperationTimeMap().clear(); +/** @param {string} value */ +proto.protocol.ChainParameters.ChainParameter.prototype.setKey = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 free_net_usage = 19; + * optional int64 value = 2; * @return {number} */ -proto.protocol.Account.prototype.getFreeNetUsage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +proto.protocol.ChainParameters.ChainParameter.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.Account.prototype.setFreeNetUsage = function(value) { - jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * map free_asset_net_usage = 20; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getFreeAssetNetUsageMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 20, opt_noLazyCreate, - null)); -}; - - -proto.protocol.Account.prototype.clearFreeAssetNetUsageMap = function() { - this.getFreeAssetNetUsageMap().clear(); +proto.protocol.ChainParameters.ChainParameter.prototype.setValue = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int64 latest_consume_time = 21; - * @return {number} + * repeated ChainParameter chainParameter = 1; + * @return {!Array.} */ -proto.protocol.Account.prototype.getLatestConsumeTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +proto.protocol.ChainParameters.prototype.getChainparameterList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.ChainParameters.ChainParameter, 1)); }; -/** @param {number} value */ -proto.protocol.Account.prototype.setLatestConsumeTime = function(value) { - jspb.Message.setProto3IntField(this, 21, value); +/** @param {!Array.} value */ +proto.protocol.ChainParameters.prototype.setChainparameterList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional int64 latest_consume_free_time = 22; - * @return {number} + * @param {!proto.protocol.ChainParameters.ChainParameter=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.ChainParameters.ChainParameter} */ -proto.protocol.Account.prototype.getLatestConsumeFreeTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +proto.protocol.ChainParameters.prototype.addChainparameter = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.ChainParameters.ChainParameter, opt_index); }; -/** @param {number} value */ -proto.protocol.Account.prototype.setLatestConsumeFreeTime = function(value) { - jspb.Message.setProto3IntField(this, 22, value); +proto.protocol.ChainParameters.prototype.clearChainparameterList = function() { + this.setChainparameterList([]); }; @@ -1519,13 +1587,20 @@ proto.protocol.Account.prototype.setLatestConsumeFreeTime = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.acuthrity = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.Account = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Account.repeatedFields_, null); }; -goog.inherits(proto.protocol.acuthrity, jspb.Message); +goog.inherits(proto.protocol.Account, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.acuthrity.displayName = 'proto.protocol.acuthrity'; + proto.protocol.Account.displayName = 'proto.protocol.Account'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.Account.repeatedFields_ = [5,7,16]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1539,8 +1614,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.acuthrity.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.acuthrity.toObject(opt_includeInstance, this); +proto.protocol.Account.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Account.toObject(opt_includeInstance, this); }; @@ -1549,14 +1624,40 @@ proto.protocol.acuthrity.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.acuthrity} msg The msg instance to transform. + * @param {!proto.protocol.Account} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.acuthrity.toObject = function(includeInstance, msg) { +proto.protocol.Account.toObject = function(includeInstance, msg) { var f, obj = { - account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), - permissionName: msg.getPermissionName_asB64() + accountName: msg.getAccountName_asB64(), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + address: msg.getAddress_asB64(), + balance: jspb.Message.getFieldWithDefault(msg, 4, 0), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.protocol.Vote.toObject, includeInstance), + assetMap: (f = msg.getAssetMap()) ? f.toObject(includeInstance, undefined) : [], + frozenList: jspb.Message.toObjectList(msg.getFrozenList(), + proto.protocol.Account.Frozen.toObject, includeInstance), + netUsage: jspb.Message.getFieldWithDefault(msg, 8, 0), + createTime: jspb.Message.getFieldWithDefault(msg, 9, 0), + latestOprationTime: jspb.Message.getFieldWithDefault(msg, 10, 0), + allowance: jspb.Message.getFieldWithDefault(msg, 11, 0), + latestWithdrawTime: jspb.Message.getFieldWithDefault(msg, 12, 0), + code: msg.getCode_asB64(), + isWitness: jspb.Message.getFieldWithDefault(msg, 14, false), + isCommittee: jspb.Message.getFieldWithDefault(msg, 15, false), + frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), + proto.protocol.Account.Frozen.toObject, includeInstance), + assetIssuedName: msg.getAssetIssuedName_asB64(), + latestAssetOperationTimeMap: (f = msg.getLatestAssetOperationTimeMap()) ? f.toObject(includeInstance, undefined) : [], + freeNetUsage: jspb.Message.getFieldWithDefault(msg, 19, 0), + freeAssetNetUsageMap: (f = msg.getFreeAssetNetUsageMap()) ? f.toObject(includeInstance, undefined) : [], + latestConsumeTime: jspb.Message.getFieldWithDefault(msg, 21, 0), + latestConsumeFreeTime: jspb.Message.getFieldWithDefault(msg, 22, 0), + accountId: msg.getAccountId_asB64(), + accountResource: (f = msg.getAccountResource()) && proto.protocol.Account.AccountResource.toObject(includeInstance, f), + codehash: msg.getCodehash_asB64() }; if (includeInstance) { @@ -1570,23 +1671,23 @@ proto.protocol.acuthrity.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.acuthrity} + * @return {!proto.protocol.Account} */ -proto.protocol.acuthrity.deserializeBinary = function(bytes) { +proto.protocol.Account.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.acuthrity; - return proto.protocol.acuthrity.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Account; + return proto.protocol.Account.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.acuthrity} msg The message object to deserialize into. + * @param {!proto.protocol.Account} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.acuthrity} + * @return {!proto.protocol.Account} */ -proto.protocol.acuthrity.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1594,55 +1695,3858 @@ proto.protocol.acuthrity.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.AccountId; - reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); - msg.setAccount(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAccountName(value); break; case 2: + var value = /** @type {!proto.protocol.AccountType} */ (reader.readEnum()); + msg.setType(value); + break; + case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPermissionName(value); + msg.setAddress(value); break; - default: - reader.skipField(); + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBalance(value); break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.acuthrity.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.acuthrity.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.acuthrity} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.acuthrity.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.AccountId.serializeBinaryToWriter - ); - } - f = message.getPermissionName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, + case 5: + var value = new proto.protocol.Vote; + reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); + msg.addVotes(value); + break; + case 6: + var value = msg.getAssetMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 7: + var value = new proto.protocol.Account.Frozen; + reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); + msg.addFrozen(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetUsage(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreateTime(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestOprationTime(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAllowance(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestWithdrawTime(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCode(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsWitness(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsCommittee(value); + break; + case 16: + var value = new proto.protocol.Account.Frozen; + reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); + msg.addFrozenSupply(value); + break; + case 17: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAssetIssuedName(value); + break; + case 18: + var value = msg.getLatestAssetOperationTimeMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 19: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFreeNetUsage(value); + break; + case 20: + var value = msg.getFreeAssetNetUsageMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestConsumeTime(value); + break; + case 22: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestConsumeFreeTime(value); + break; + case 23: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAccountId(value); + break; + case 26: + var value = new proto.protocol.Account.AccountResource; + reader.readMessage(value,proto.protocol.Account.AccountResource.deserializeBinaryFromReader); + msg.setAccountResource(value); + break; + case 30: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCodehash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Account.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Account} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccountName_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getBalance(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.protocol.Vote.serializeBinaryToWriter + ); + } + f = message.getAssetMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getFrozenList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.protocol.Account.Frozen.serializeBinaryToWriter + ); + } + f = message.getNetUsage(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getCreateTime(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getLatestOprationTime(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } + f = message.getAllowance(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } + f = message.getLatestWithdrawTime(); + if (f !== 0) { + writer.writeInt64( + 12, + f + ); + } + f = message.getCode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 13, + f + ); + } + f = message.getIsWitness(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getIsCommittee(); + if (f) { + writer.writeBool( + 15, + f + ); + } + f = message.getFrozenSupplyList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 16, + f, + proto.protocol.Account.Frozen.serializeBinaryToWriter + ); + } + f = message.getAssetIssuedName_asU8(); + if (f.length > 0) { + writer.writeBytes( + 17, + f + ); + } + f = message.getLatestAssetOperationTimeMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(18, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getFreeNetUsage(); + if (f !== 0) { + writer.writeInt64( + 19, + f + ); + } + f = message.getFreeAssetNetUsageMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(20, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getLatestConsumeTime(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } + f = message.getLatestConsumeFreeTime(); + if (f !== 0) { + writer.writeInt64( + 22, + f + ); + } + f = message.getAccountId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 23, + f + ); + } + f = message.getAccountResource(); + if (f != null) { + writer.writeMessage( + 26, + f, + proto.protocol.Account.AccountResource.serializeBinaryToWriter + ); + } + f = message.getCodehash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 30, + f + ); + } +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Account.Frozen = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Account.Frozen, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Account.Frozen.displayName = 'proto.protocol.Account.Frozen'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Account.Frozen.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Account.Frozen.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Account.Frozen} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Account.Frozen.toObject = function(includeInstance, msg) { + var f, obj = { + frozenBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + expireTime: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Account.Frozen} + */ +proto.protocol.Account.Frozen.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Account.Frozen; + return proto.protocol.Account.Frozen.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Account.Frozen} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Account.Frozen} + */ +proto.protocol.Account.Frozen.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFrozenBalance(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpireTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Account.Frozen.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Account.Frozen.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Account.Frozen} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Account.Frozen.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFrozenBalance(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getExpireTime(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 frozen_balance = 1; + * @return {number} + */ +proto.protocol.Account.Frozen.prototype.getFrozenBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.Frozen.prototype.setFrozenBalance = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 expire_time = 2; + * @return {number} + */ +proto.protocol.Account.Frozen.prototype.getExpireTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.Frozen.prototype.setExpireTime = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Account.AccountResource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Account.AccountResource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Account.AccountResource.displayName = 'proto.protocol.Account.AccountResource'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Account.AccountResource.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Account.AccountResource.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Account.AccountResource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Account.AccountResource.toObject = function(includeInstance, msg) { + var f, obj = { + energyUsage: jspb.Message.getFieldWithDefault(msg, 1, 0), + frozenBalanceForEnergy: (f = msg.getFrozenBalanceForEnergy()) && proto.protocol.Account.Frozen.toObject(includeInstance, f), + latestConsumeTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 3, 0), + storageLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), + storageUsage: jspb.Message.getFieldWithDefault(msg, 7, 0), + latestExchangeStorageTime: jspb.Message.getFieldWithDefault(msg, 8, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Account.AccountResource} + */ +proto.protocol.Account.AccountResource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Account.AccountResource; + return proto.protocol.Account.AccountResource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Account.AccountResource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Account.AccountResource} + */ +proto.protocol.Account.AccountResource.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergyUsage(value); + break; + case 2: + var value = new proto.protocol.Account.Frozen; + reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); + msg.setFrozenBalanceForEnergy(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestConsumeTimeForEnergy(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageLimit(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageUsage(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestExchangeStorageTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Account.AccountResource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Account.AccountResource.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Account.AccountResource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Account.AccountResource.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnergyUsage(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getFrozenBalanceForEnergy(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.protocol.Account.Frozen.serializeBinaryToWriter + ); + } + f = message.getLatestConsumeTimeForEnergy(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getStorageLimit(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getStorageUsage(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getLatestExchangeStorageTime(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } +}; + + +/** + * optional int64 energy_usage = 1; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getEnergyUsage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setEnergyUsage = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Frozen frozen_balance_for_energy = 2; + * @return {?proto.protocol.Account.Frozen} + */ +proto.protocol.Account.AccountResource.prototype.getFrozenBalanceForEnergy = function() { + return /** @type{?proto.protocol.Account.Frozen} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Account.Frozen, 2)); +}; + + +/** @param {?proto.protocol.Account.Frozen|undefined} value */ +proto.protocol.Account.AccountResource.prototype.setFrozenBalanceForEnergy = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.Account.AccountResource.prototype.clearFrozenBalanceForEnergy = function() { + this.setFrozenBalanceForEnergy(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.Account.AccountResource.prototype.hasFrozenBalanceForEnergy = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 latest_consume_time_for_energy = 3; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 storage_limit = 6; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getStorageLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setStorageLimit = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional int64 storage_usage = 7; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getStorageUsage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setStorageUsage = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * optional int64 latest_exchange_storage_time = 8; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getLatestExchangeStorageTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setLatestExchangeStorageTime = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * optional bytes account_name = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Account.prototype.getAccountName = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes account_name = 1; + * This is a type-conversion wrapper around `getAccountName()` + * @return {string} + */ +proto.protocol.Account.prototype.getAccountName_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAccountName())); +}; + + +/** + * optional bytes account_name = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAccountName()` + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.getAccountName_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAccountName())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Account.prototype.setAccountName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional AccountType type = 2; + * @return {!proto.protocol.AccountType} + */ +proto.protocol.Account.prototype.getType = function() { + return /** @type {!proto.protocol.AccountType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.protocol.AccountType} value */ +proto.protocol.Account.prototype.setType = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes address = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Account.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes address = 3; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.protocol.Account.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Account.prototype.setAddress = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 balance = 4; + * @return {number} + */ +proto.protocol.Account.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setBalance = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * repeated Vote votes = 5; + * @return {!Array.} + */ +proto.protocol.Account.prototype.getVotesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 5)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Account.prototype.setVotesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.protocol.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Vote} + */ +proto.protocol.Account.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.Vote, opt_index); +}; + + +proto.protocol.Account.prototype.clearVotesList = function() { + this.setVotesList([]); +}; + + +/** + * map asset = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getAssetMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearAssetMap = function() { + this.getAssetMap().clear(); +}; + + +/** + * repeated Frozen frozen = 7; + * @return {!Array.} + */ +proto.protocol.Account.prototype.getFrozenList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Account.Frozen, 7)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Account.prototype.setFrozenList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.protocol.Account.Frozen=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Account.Frozen} + */ +proto.protocol.Account.prototype.addFrozen = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.protocol.Account.Frozen, opt_index); +}; + + +proto.protocol.Account.prototype.clearFrozenList = function() { + this.setFrozenList([]); +}; + + +/** + * optional int64 net_usage = 8; + * @return {number} + */ +proto.protocol.Account.prototype.getNetUsage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setNetUsage = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * optional int64 create_time = 9; + * @return {number} + */ +proto.protocol.Account.prototype.getCreateTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setCreateTime = function(value) { + jspb.Message.setField(this, 9, value); +}; + + +/** + * optional int64 latest_opration_time = 10; + * @return {number} + */ +proto.protocol.Account.prototype.getLatestOprationTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setLatestOprationTime = function(value) { + jspb.Message.setField(this, 10, value); +}; + + +/** + * optional int64 allowance = 11; + * @return {number} + */ +proto.protocol.Account.prototype.getAllowance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setAllowance = function(value) { + jspb.Message.setField(this, 11, value); +}; + + +/** + * optional int64 latest_withdraw_time = 12; + * @return {number} + */ +proto.protocol.Account.prototype.getLatestWithdrawTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setLatestWithdrawTime = function(value) { + jspb.Message.setField(this, 12, value); +}; + + +/** + * optional bytes code = 13; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Account.prototype.getCode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes code = 13; + * This is a type-conversion wrapper around `getCode()` + * @return {string} + */ +proto.protocol.Account.prototype.getCode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCode())); +}; + + +/** + * optional bytes code = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCode()` + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.getCode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCode())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Account.prototype.setCode = function(value) { + jspb.Message.setField(this, 13, value); +}; + + +/** + * optional bool is_witness = 14; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.Account.prototype.getIsWitness = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 14, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.Account.prototype.setIsWitness = function(value) { + jspb.Message.setField(this, 14, value); +}; + + +/** + * optional bool is_committee = 15; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.Account.prototype.getIsCommittee = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.Account.prototype.setIsCommittee = function(value) { + jspb.Message.setField(this, 15, value); +}; + + +/** + * repeated Frozen frozen_supply = 16; + * @return {!Array.} + */ +proto.protocol.Account.prototype.getFrozenSupplyList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Account.Frozen, 16)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Account.prototype.setFrozenSupplyList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 16, value); +}; + + +/** + * @param {!proto.protocol.Account.Frozen=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Account.Frozen} + */ +proto.protocol.Account.prototype.addFrozenSupply = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.protocol.Account.Frozen, opt_index); +}; + + +proto.protocol.Account.prototype.clearFrozenSupplyList = function() { + this.setFrozenSupplyList([]); +}; + + +/** + * optional bytes asset_issued_name = 17; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Account.prototype.getAssetIssuedName = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * optional bytes asset_issued_name = 17; + * This is a type-conversion wrapper around `getAssetIssuedName()` + * @return {string} + */ +proto.protocol.Account.prototype.getAssetIssuedName_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAssetIssuedName())); +}; + + +/** + * optional bytes asset_issued_name = 17; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAssetIssuedName()` + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.getAssetIssuedName_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAssetIssuedName())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Account.prototype.setAssetIssuedName = function(value) { + jspb.Message.setField(this, 17, value); +}; + + +/** + * map latest_asset_operation_time = 18; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getLatestAssetOperationTimeMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 18, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearLatestAssetOperationTimeMap = function() { + this.getLatestAssetOperationTimeMap().clear(); +}; + + +/** + * optional int64 free_net_usage = 19; + * @return {number} + */ +proto.protocol.Account.prototype.getFreeNetUsage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setFreeNetUsage = function(value) { + jspb.Message.setField(this, 19, value); +}; + + +/** + * map free_asset_net_usage = 20; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getFreeAssetNetUsageMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 20, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearFreeAssetNetUsageMap = function() { + this.getFreeAssetNetUsageMap().clear(); +}; + + +/** + * optional int64 latest_consume_time = 21; + * @return {number} + */ +proto.protocol.Account.prototype.getLatestConsumeTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setLatestConsumeTime = function(value) { + jspb.Message.setField(this, 21, value); +}; + + +/** + * optional int64 latest_consume_free_time = 22; + * @return {number} + */ +proto.protocol.Account.prototype.getLatestConsumeFreeTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setLatestConsumeFreeTime = function(value) { + jspb.Message.setField(this, 22, value); +}; + + +/** + * optional bytes account_id = 23; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Account.prototype.getAccountId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 23, "")); +}; + + +/** + * optional bytes account_id = 23; + * This is a type-conversion wrapper around `getAccountId()` + * @return {string} + */ +proto.protocol.Account.prototype.getAccountId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAccountId())); +}; + + +/** + * optional bytes account_id = 23; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAccountId()` + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.getAccountId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAccountId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Account.prototype.setAccountId = function(value) { + jspb.Message.setField(this, 23, value); +}; + + +/** + * optional AccountResource account_resource = 26; + * @return {?proto.protocol.Account.AccountResource} + */ +proto.protocol.Account.prototype.getAccountResource = function() { + return /** @type{?proto.protocol.Account.AccountResource} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Account.AccountResource, 26)); +}; + + +/** @param {?proto.protocol.Account.AccountResource|undefined} value */ +proto.protocol.Account.prototype.setAccountResource = function(value) { + jspb.Message.setWrapperField(this, 26, value); +}; + + +proto.protocol.Account.prototype.clearAccountResource = function() { + this.setAccountResource(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.Account.prototype.hasAccountResource = function() { + return jspb.Message.getField(this, 26) != null; +}; + + +/** + * optional bytes codeHash = 30; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Account.prototype.getCodehash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 30, "")); +}; + + +/** + * optional bytes codeHash = 30; + * This is a type-conversion wrapper around `getCodehash()` + * @return {string} + */ +proto.protocol.Account.prototype.getCodehash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCodehash())); +}; + + +/** + * optional bytes codeHash = 30; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCodehash()` + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.getCodehash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCodehash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Account.prototype.setCodehash = function(value) { + jspb.Message.setField(this, 30, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.authority = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.authority, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.authority.displayName = 'proto.protocol.authority'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.authority.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.authority} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.authority.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), + permissionName: msg.getPermissionName_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.authority} + */ +proto.protocol.authority.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.authority; + return proto.protocol.authority.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.authority} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.authority} + */ +proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.AccountId; + reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); + msg.setAccount(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPermissionName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.authority.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.authority.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.authority} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.AccountId.serializeBinaryToWriter + ); + } + f = message.getPermissionName_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional AccountId account = 1; + * @return {?proto.protocol.AccountId} + */ +proto.protocol.authority.prototype.getAccount = function() { + return /** @type{?proto.protocol.AccountId} */ ( + jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); +}; + + +/** @param {?proto.protocol.AccountId|undefined} value */ +proto.protocol.authority.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.authority.prototype.clearAccount = function() { + this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.authority.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes permission_name = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.authority.prototype.getPermissionName = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes permission_name = 2; + * This is a type-conversion wrapper around `getPermissionName()` + * @return {string} + */ +proto.protocol.authority.prototype.getPermissionName_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPermissionName())); +}; + + +/** + * optional bytes permission_name = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPermissionName()` + * @return {!Uint8Array} + */ +proto.protocol.authority.prototype.getPermissionName_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPermissionName())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.authority.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.permission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.permission, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.permission.displayName = 'proto.protocol.permission'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.permission.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.permission.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.permission} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.permission.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.permission} + */ +proto.protocol.permission.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.permission; + return proto.protocol.permission.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.permission} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.permission} + */ +proto.protocol.permission.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.AccountId; + reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); + msg.setAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.permission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.permission.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.permission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.permission.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.AccountId.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AccountId account = 1; + * @return {?proto.protocol.AccountId} + */ +proto.protocol.permission.prototype.getAccount = function() { + return /** @type{?proto.protocol.AccountId} */ ( + jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); +}; + + +/** @param {?proto.protocol.AccountId|undefined} value */ +proto.protocol.permission.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.permission.prototype.clearAccount = function() { + this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.permission.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Witness = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Witness, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Witness.displayName = 'proto.protocol.Witness'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Witness.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Witness} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Witness.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + votecount: jspb.Message.getFieldWithDefault(msg, 2, 0), + pubkey: msg.getPubkey_asB64(), + url: jspb.Message.getFieldWithDefault(msg, 4, ""), + totalproduced: jspb.Message.getFieldWithDefault(msg, 5, 0), + totalmissed: jspb.Message.getFieldWithDefault(msg, 6, 0), + latestblocknum: jspb.Message.getFieldWithDefault(msg, 7, 0), + latestslotnum: jspb.Message.getFieldWithDefault(msg, 8, 0), + isjobs: jspb.Message.getFieldWithDefault(msg, 9, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Witness} + */ +proto.protocol.Witness.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Witness; + return proto.protocol.Witness.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Witness} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Witness} + */ +proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotecount(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubkey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalproduced(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalmissed(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestblocknum(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestslotnum(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsjobs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Witness.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Witness.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Witness} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Witness.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getVotecount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getTotalproduced(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTotalmissed(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getLatestblocknum(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getLatestslotnum(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getIsjobs(); + if (f) { + writer.writeBool( + 9, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Witness.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.protocol.Witness.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.protocol.Witness.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Witness.prototype.setAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 voteCount = 2; + * @return {number} + */ +proto.protocol.Witness.prototype.getVotecount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Witness.prototype.setVotecount = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes pubKey = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Witness.prototype.getPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes pubKey = 3; + * This is a type-conversion wrapper around `getPubkey()` + * @return {string} + */ +proto.protocol.Witness.prototype.getPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubkey())); +}; + + +/** + * optional bytes pubKey = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubkey()` + * @return {!Uint8Array} + */ +proto.protocol.Witness.prototype.getPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubkey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Witness.prototype.setPubkey = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional string url = 4; + * @return {string} + */ +proto.protocol.Witness.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.protocol.Witness.prototype.setUrl = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 totalProduced = 5; + * @return {number} + */ +proto.protocol.Witness.prototype.getTotalproduced = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Witness.prototype.setTotalproduced = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int64 totalMissed = 6; + * @return {number} + */ +proto.protocol.Witness.prototype.getTotalmissed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Witness.prototype.setTotalmissed = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional int64 latestBlockNum = 7; + * @return {number} + */ +proto.protocol.Witness.prototype.getLatestblocknum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Witness.prototype.setLatestblocknum = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * optional int64 latestSlotNum = 8; + * @return {number} + */ +proto.protocol.Witness.prototype.getLatestslotnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Witness.prototype.setLatestslotnum = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * optional bool isJobs = 9; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.Witness.prototype.getIsjobs = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.Witness.prototype.setIsjobs = function(value) { + jspb.Message.setField(this, 9, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Votes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Votes.repeatedFields_, null); +}; +goog.inherits(proto.protocol.Votes, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Votes.displayName = 'proto.protocol.Votes'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.Votes.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Votes.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Votes.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Votes} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Votes.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + oldVotesList: jspb.Message.toObjectList(msg.getOldVotesList(), + proto.protocol.Vote.toObject, includeInstance), + newVotesList: jspb.Message.toObjectList(msg.getNewVotesList(), + proto.protocol.Vote.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Votes} + */ +proto.protocol.Votes.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Votes; + return proto.protocol.Votes.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Votes} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Votes} + */ +proto.protocol.Votes.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = new proto.protocol.Vote; + reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); + msg.addOldVotes(value); + break; + case 3: + var value = new proto.protocol.Vote; + reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); + msg.addNewVotes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Votes.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Votes.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Votes} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Votes.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getOldVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.protocol.Vote.serializeBinaryToWriter + ); + } + f = message.getNewVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.protocol.Vote.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Votes.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.protocol.Votes.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.protocol.Votes.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Votes.prototype.setAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * repeated Vote old_votes = 2; + * @return {!Array.} + */ +proto.protocol.Votes.prototype.getOldVotesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 2)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Votes.prototype.setOldVotesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.protocol.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Vote} + */ +proto.protocol.Votes.prototype.addOldVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Vote, opt_index); +}; + + +proto.protocol.Votes.prototype.clearOldVotesList = function() { + this.setOldVotesList([]); +}; + + +/** + * repeated Vote new_votes = 3; + * @return {!Array.} + */ +proto.protocol.Votes.prototype.getNewVotesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 3)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Votes.prototype.setNewVotesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.protocol.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Vote} + */ +proto.protocol.Votes.prototype.addNewVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.protocol.Vote, opt_index); +}; + + +proto.protocol.Votes.prototype.clearNewVotesList = function() { + this.setNewVotesList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TXOutput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.TXOutput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TXOutput.displayName = 'proto.protocol.TXOutput'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TXOutput.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TXOutput.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TXOutput} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TXOutput.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 0), + pubkeyhash: msg.getPubkeyhash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TXOutput} + */ +proto.protocol.TXOutput.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TXOutput; + return proto.protocol.TXOutput.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TXOutput} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TXOutput} + */ +proto.protocol.TXOutput.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubkeyhash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TXOutput.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TXOutput.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TXOutput} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TXOutput.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getPubkeyhash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional int64 value = 1; + * @return {number} + */ +proto.protocol.TXOutput.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TXOutput.prototype.setValue = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes pubKeyHash = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TXOutput.prototype.getPubkeyhash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes pubKeyHash = 2; + * This is a type-conversion wrapper around `getPubkeyhash()` + * @return {string} + */ +proto.protocol.TXOutput.prototype.getPubkeyhash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubkeyhash())); +}; + + +/** + * optional bytes pubKeyHash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubkeyhash()` + * @return {!Uint8Array} + */ +proto.protocol.TXOutput.prototype.getPubkeyhash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubkeyhash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TXOutput.prototype.setPubkeyhash = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TXInput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.TXInput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TXInput.displayName = 'proto.protocol.TXInput'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TXInput.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TXInput.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TXInput} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TXInput.toObject = function(includeInstance, msg) { + var f, obj = { + rawData: (f = msg.getRawData()) && proto.protocol.TXInput.raw.toObject(includeInstance, f), + signature: msg.getSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TXInput} + */ +proto.protocol.TXInput.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TXInput; + return proto.protocol.TXInput.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TXInput} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TXInput} + */ +proto.protocol.TXInput.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.TXInput.raw; + reader.readMessage(value,proto.protocol.TXInput.raw.deserializeBinaryFromReader); + msg.setRawData(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TXInput.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TXInput.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TXInput} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TXInput.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRawData(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.TXInput.raw.serializeBinaryToWriter + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TXInput.raw = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.TXInput.raw, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TXInput.raw.displayName = 'proto.protocol.TXInput.raw'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TXInput.raw.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TXInput.raw.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TXInput.raw} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TXInput.raw.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_asB64(), + vout: jspb.Message.getFieldWithDefault(msg, 2, 0), + pubkey: msg.getPubkey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TXInput.raw} + */ +proto.protocol.TXInput.raw.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TXInput.raw; + return proto.protocol.TXInput.raw.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TXInput.raw} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TXInput.raw} + */ +proto.protocol.TXInput.raw.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVout(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubkey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TXInput.raw.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TXInput.raw.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TXInput.raw} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TXInput.raw.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getVout(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes txID = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TXInput.raw.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txID = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.protocol.TXInput.raw.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txID = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.protocol.TXInput.raw.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TXInput.raw.prototype.setTxid = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 vout = 2; + * @return {number} + */ +proto.protocol.TXInput.raw.prototype.getVout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TXInput.raw.prototype.setVout = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes pubKey = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TXInput.raw.prototype.getPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes pubKey = 3; + * This is a type-conversion wrapper around `getPubkey()` + * @return {string} + */ +proto.protocol.TXInput.raw.prototype.getPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubkey())); +}; + + +/** + * optional bytes pubKey = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubkey()` + * @return {!Uint8Array} + */ +proto.protocol.TXInput.raw.prototype.getPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubkey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TXInput.raw.prototype.setPubkey = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional raw raw_data = 1; + * @return {?proto.protocol.TXInput.raw} + */ +proto.protocol.TXInput.prototype.getRawData = function() { + return /** @type{?proto.protocol.TXInput.raw} */ ( + jspb.Message.getWrapperField(this, proto.protocol.TXInput.raw, 1)); +}; + + +/** @param {?proto.protocol.TXInput.raw|undefined} value */ +proto.protocol.TXInput.prototype.setRawData = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TXInput.prototype.clearRawData = function() { + this.setRawData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TXInput.prototype.hasRawData = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes signature = 4; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TXInput.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes signature = 4; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.protocol.TXInput.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.protocol.TXInput.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TXInput.prototype.setSignature = function(value) { + jspb.Message.setField(this, 4, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TXOutputs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TXOutputs.repeatedFields_, null); +}; +goog.inherits(proto.protocol.TXOutputs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TXOutputs.displayName = 'proto.protocol.TXOutputs'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.TXOutputs.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TXOutputs.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TXOutputs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TXOutputs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TXOutputs.toObject = function(includeInstance, msg) { + var f, obj = { + outputsList: jspb.Message.toObjectList(msg.getOutputsList(), + proto.protocol.TXOutput.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TXOutputs} + */ +proto.protocol.TXOutputs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TXOutputs; + return proto.protocol.TXOutputs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TXOutputs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TXOutputs} + */ +proto.protocol.TXOutputs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.TXOutput; + reader.readMessage(value,proto.protocol.TXOutput.deserializeBinaryFromReader); + msg.addOutputs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TXOutputs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TXOutputs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TXOutputs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TXOutputs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOutputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.TXOutput.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TXOutput outputs = 1; + * @return {!Array.} + */ +proto.protocol.TXOutputs.prototype.getOutputsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.TXOutput, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.TXOutputs.prototype.setOutputsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.TXOutput=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.TXOutput} + */ +proto.protocol.TXOutputs.prototype.addOutputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TXOutput, opt_index); +}; + + +proto.protocol.TXOutputs.prototype.clearOutputsList = function() { + this.setOutputsList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ResourceReceipt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.ResourceReceipt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ResourceReceipt.displayName = 'proto.protocol.ResourceReceipt'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ResourceReceipt.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ResourceReceipt.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ResourceReceipt} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ResourceReceipt.toObject = function(includeInstance, msg) { + var f, obj = { + energyUsage: jspb.Message.getFieldWithDefault(msg, 1, 0), + energyFee: jspb.Message.getFieldWithDefault(msg, 2, 0), + originEnergyUsage: jspb.Message.getFieldWithDefault(msg, 3, 0), + energyUsageTotal: jspb.Message.getFieldWithDefault(msg, 4, 0), + netUsage: jspb.Message.getFieldWithDefault(msg, 5, 0), + netFee: jspb.Message.getFieldWithDefault(msg, 6, 0), + result: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ResourceReceipt} + */ +proto.protocol.ResourceReceipt.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ResourceReceipt; + return proto.protocol.ResourceReceipt.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ResourceReceipt} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ResourceReceipt} + */ +proto.protocol.ResourceReceipt.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergyUsage(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergyFee(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOriginEnergyUsage(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergyUsageTotal(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetUsage(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetFee(value); + break; + case 7: + var value = /** @type {!proto.protocol.Transaction.Result.contractResult} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ResourceReceipt.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ResourceReceipt.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ResourceReceipt} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ResourceReceipt.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnergyUsage(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getEnergyFee(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getOriginEnergyUsage(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getEnergyUsageTotal(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getNetUsage(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getNetFee(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f + ); + } +}; + + +/** + * optional int64 energy_usage = 1; + * @return {number} + */ +proto.protocol.ResourceReceipt.prototype.getEnergyUsage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ResourceReceipt.prototype.setEnergyUsage = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 energy_fee = 2; + * @return {number} + */ +proto.protocol.ResourceReceipt.prototype.getEnergyFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ResourceReceipt.prototype.setEnergyFee = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 origin_energy_usage = 3; + * @return {number} + */ +proto.protocol.ResourceReceipt.prototype.getOriginEnergyUsage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ResourceReceipt.prototype.setOriginEnergyUsage = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 energy_usage_total = 4; + * @return {number} + */ +proto.protocol.ResourceReceipt.prototype.getEnergyUsageTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ResourceReceipt.prototype.setEnergyUsageTotal = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 net_usage = 5; + * @return {number} + */ +proto.protocol.ResourceReceipt.prototype.getNetUsage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ResourceReceipt.prototype.setNetUsage = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int64 net_fee = 6; + * @return {number} + */ +proto.protocol.ResourceReceipt.prototype.getNetFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ResourceReceipt.prototype.setNetFee = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional Transaction.Result.contractResult result = 7; + * @return {!proto.protocol.Transaction.Result.contractResult} + */ +proto.protocol.ResourceReceipt.prototype.getResult = function() { + return /** @type {!proto.protocol.Transaction.Result.contractResult} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {!proto.protocol.Transaction.Result.contractResult} value */ +proto.protocol.ResourceReceipt.prototype.setResult = function(value) { + jspb.Message.setField(this, 7, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Transaction = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transaction.repeatedFields_, null); +}; +goog.inherits(proto.protocol.Transaction, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Transaction.displayName = 'proto.protocol.Transaction'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.Transaction.repeatedFields_ = [2,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Transaction.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Transaction.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Transaction} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Transaction.toObject = function(includeInstance, msg) { + var f, obj = { + rawData: (f = msg.getRawData()) && proto.protocol.Transaction.raw.toObject(includeInstance, f), + signatureList: msg.getSignatureList_asB64(), + retList: jspb.Message.toObjectList(msg.getRetList(), + proto.protocol.Transaction.Result.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Transaction} + */ +proto.protocol.Transaction.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Transaction; + return proto.protocol.Transaction.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Transaction} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Transaction} + */ +proto.protocol.Transaction.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.Transaction.raw; + reader.readMessage(value,proto.protocol.Transaction.raw.deserializeBinaryFromReader); + msg.setRawData(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSignature(value); + break; + case 5: + var value = new proto.protocol.Transaction.Result; + reader.readMessage(value,proto.protocol.Transaction.Result.deserializeBinaryFromReader); + msg.addRet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Transaction.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Transaction.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Transaction} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Transaction.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRawData(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.Transaction.raw.serializeBinaryToWriter + ); + } + f = message.getSignatureList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getRetList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.protocol.Transaction.Result.serializeBinaryToWriter + ); + } +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Transaction.Contract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Transaction.Contract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Transaction.Contract.displayName = 'proto.protocol.Transaction.Contract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Transaction.Contract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Transaction.Contract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Transaction.Contract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Transaction.Contract.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + parameter: (f = msg.getParameter()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + provider: msg.getProvider_asB64(), + contractname: msg.getContractname_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Transaction.Contract} + */ +proto.protocol.Transaction.Contract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Transaction.Contract; + return proto.protocol.Transaction.Contract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Transaction.Contract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Transaction.Contract} + */ +proto.protocol.Transaction.Contract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.protocol.Transaction.Contract.ContractType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setParameter(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProvider(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Transaction.Contract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Transaction.Contract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Transaction.Contract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Transaction.Contract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getParameter(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getProvider_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getContractname_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, f ); } @@ -1650,23 +5554,72 @@ proto.protocol.acuthrity.serializeBinaryToWriter = function(message, writer) { /** - * optional AccountId account = 1; - * @return {?proto.protocol.AccountId} + * @enum {number} + */ +proto.protocol.Transaction.Contract.ContractType = { + ACCOUNTCREATECONTRACT: 0, + TRANSFERCONTRACT: 1, + TRANSFERASSETCONTRACT: 2, + VOTEASSETCONTRACT: 3, + VOTEWITNESSCONTRACT: 4, + WITNESSCREATECONTRACT: 5, + ASSETISSUECONTRACT: 6, + WITNESSUPDATECONTRACT: 8, + PARTICIPATEASSETISSUECONTRACT: 9, + ACCOUNTUPDATECONTRACT: 10, + FREEZEBALANCECONTRACT: 11, + UNFREEZEBALANCECONTRACT: 12, + WITHDRAWBALANCECONTRACT: 13, + UNFREEZEASSETCONTRACT: 14, + UPDATEASSETCONTRACT: 15, + PROPOSALCREATECONTRACT: 16, + PROPOSALAPPROVECONTRACT: 17, + PROPOSALDELETECONTRACT: 18, + SETACCOUNTIDCONTRACT: 19, + CUSTOMCONTRACT: 20, + CREATESMARTCONTRACT: 30, + TRIGGERSMARTCONTRACT: 31, + GETCONTRACT: 32, + UPDATESETTINGCONTRACT: 33, + EXCHANGECREATECONTRACT: 41, + EXCHANGEINJECTCONTRACT: 42, + EXCHANGEWITHDRAWCONTRACT: 43, + EXCHANGETRANSACTIONCONTRACT: 44 +}; + +/** + * optional ContractType type = 1; + * @return {!proto.protocol.Transaction.Contract.ContractType} + */ +proto.protocol.Transaction.Contract.prototype.getType = function() { + return /** @type {!proto.protocol.Transaction.Contract.ContractType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.protocol.Transaction.Contract.ContractType} value */ +proto.protocol.Transaction.Contract.prototype.setType = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any parameter = 2; + * @return {?proto.google.protobuf.Any} */ -proto.protocol.acuthrity.prototype.getAccount = function() { - return /** @type{?proto.protocol.AccountId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); +proto.protocol.Transaction.Contract.prototype.getParameter = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); }; -/** @param {?proto.protocol.AccountId|undefined} value */ -proto.protocol.acuthrity.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** @param {?proto.google.protobuf.Any|undefined} value */ +proto.protocol.Transaction.Contract.prototype.setParameter = function(value) { + jspb.Message.setWrapperField(this, 2, value); }; -proto.protocol.acuthrity.prototype.clearAccount = function() { - this.setAccount(undefined); +proto.protocol.Transaction.Contract.prototype.clearParameter = function() { + this.setParameter(undefined); }; @@ -1674,47 +5627,86 @@ proto.protocol.acuthrity.prototype.clearAccount = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.protocol.acuthrity.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.Transaction.Contract.prototype.hasParameter = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional bytes permission_name = 2; + * optional bytes provider = 3; * @return {!(string|Uint8Array)} */ -proto.protocol.acuthrity.prototype.getPermissionName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.Transaction.Contract.prototype.getProvider = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional bytes permission_name = 2; - * This is a type-conversion wrapper around `getPermissionName()` + * optional bytes provider = 3; + * This is a type-conversion wrapper around `getProvider()` * @return {string} */ -proto.protocol.acuthrity.prototype.getPermissionName_asB64 = function() { +proto.protocol.Transaction.Contract.prototype.getProvider_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPermissionName())); + this.getProvider())); }; /** - * optional bytes permission_name = 2; + * optional bytes provider = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPermissionName()` + * This is a type-conversion wrapper around `getProvider()` * @return {!Uint8Array} */ -proto.protocol.acuthrity.prototype.getPermissionName_asU8 = function() { +proto.protocol.Transaction.Contract.prototype.getProvider_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPermissionName())); + this.getProvider())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Transaction.Contract.prototype.setProvider = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional bytes ContractName = 4; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Transaction.Contract.prototype.getContractname = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes ContractName = 4; + * This is a type-conversion wrapper around `getContractname()` + * @return {string} + */ +proto.protocol.Transaction.Contract.prototype.getContractname_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractname())); +}; + + +/** + * optional bytes ContractName = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractname()` + * @return {!Uint8Array} + */ +proto.protocol.Transaction.Contract.prototype.getContractname_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractname())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.acuthrity.prototype.setPermissionName = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +proto.protocol.Transaction.Contract.prototype.setContractname = function(value) { + jspb.Message.setField(this, 4, value); }; @@ -1729,12 +5721,12 @@ proto.protocol.acuthrity.prototype.setPermissionName = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.permision = function(opt_data) { +proto.protocol.Transaction.Result = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.permision, jspb.Message); +goog.inherits(proto.protocol.Transaction.Result, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.permision.displayName = 'proto.protocol.permision'; + proto.protocol.Transaction.Result.displayName = 'proto.protocol.Transaction.Result'; } @@ -1749,8 +5741,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.permision.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.permision.toObject(opt_includeInstance, this); +proto.protocol.Transaction.Result.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Transaction.Result.toObject(opt_includeInstance, this); }; @@ -1759,13 +5751,17 @@ proto.protocol.permision.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.permision} msg The msg instance to transform. + * @param {!proto.protocol.Transaction.Result} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.permision.toObject = function(includeInstance, msg) { +proto.protocol.Transaction.Result.toObject = function(includeInstance, msg) { var f, obj = { - account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f) + fee: jspb.Message.getFieldWithDefault(msg, 1, 0), + ret: jspb.Message.getFieldWithDefault(msg, 2, 0), + contractret: jspb.Message.getFieldWithDefault(msg, 3, 0), + withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), + unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0) }; if (includeInstance) { @@ -1779,23 +5775,23 @@ proto.protocol.permision.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.permision} + * @return {!proto.protocol.Transaction.Result} */ -proto.protocol.permision.deserializeBinary = function(bytes) { +proto.protocol.Transaction.Result.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.permision; - return proto.protocol.permision.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Transaction.Result; + return proto.protocol.Transaction.Result.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.permision} msg The message object to deserialize into. + * @param {!proto.protocol.Transaction.Result} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.permision} + * @return {!proto.protocol.Transaction.Result} */ -proto.protocol.permision.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1803,9 +5799,24 @@ proto.protocol.permision.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.AccountId; - reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); - msg.setAccount(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + case 2: + var value = /** @type {!proto.protocol.Transaction.Result.code} */ (reader.readEnum()); + msg.setRet(value); + break; + case 3: + var value = /** @type {!proto.protocol.Transaction.Result.contractResult} */ (reader.readEnum()); + msg.setContractret(value); + break; + case 15: + var value = /** @type {number} */ (reader.readInt64()); + msg.setWithdrawAmount(value); + break; + case 16: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnfreezeAmount(value); break; default: reader.skipField(); @@ -1820,9 +5831,9 @@ proto.protocol.permision.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.permision.prototype.serializeBinary = function() { +proto.protocol.Transaction.Result.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.permision.serializeBinaryToWriter(this, writer); + proto.protocol.Transaction.Result.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1830,50 +5841,150 @@ proto.protocol.permision.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.permision} message + * @param {!proto.protocol.Transaction.Result} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.permision.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( 1, - f, - proto.protocol.AccountId.serializeBinaryToWriter + f + ); + } + f = message.getRet(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getContractret(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getWithdrawAmount(); + if (f !== 0) { + writer.writeInt64( + 15, + f + ); + } + f = message.getUnfreezeAmount(); + if (f !== 0) { + writer.writeInt64( + 16, + f ); } }; /** - * optional AccountId account = 1; - * @return {?proto.protocol.AccountId} + * @enum {number} */ -proto.protocol.permision.prototype.getAccount = function() { - return /** @type{?proto.protocol.AccountId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); +proto.protocol.Transaction.Result.code = { + SUCESS: 0, + FAILED: 1 }; +/** + * @enum {number} + */ +proto.protocol.Transaction.Result.contractResult = { + DEFAULT: 0, + SUCCESS: 1, + REVERT: 2, + BAD_JUMP_DESTINATION: 3, + OUT_OF_MEMORY: 4, + PRECOMPILED_CONTRACT: 5, + STACK_TOO_SMALL: 6, + STACK_TOO_LARGE: 7, + ILLEGAL_OPERATION: 8, + STACK_OVERFLOW: 9, + OUT_OF_ENERGY: 10, + OUT_OF_TIME: 11, + JVM_STACK_OVER_FLOW: 12, + UNKNOWN: 13 +}; -/** @param {?proto.protocol.AccountId|undefined} value */ -proto.protocol.permision.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** + * optional int64 fee = 1; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -proto.protocol.permision.prototype.clearAccount = function() { - this.setAccount(undefined); +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setFee = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * Returns whether this field is set. - * @return {!boolean} + * optional code ret = 2; + * @return {!proto.protocol.Transaction.Result.code} */ -proto.protocol.permision.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.Transaction.Result.prototype.getRet = function() { + return /** @type {!proto.protocol.Transaction.Result.code} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.protocol.Transaction.Result.code} value */ +proto.protocol.Transaction.Result.prototype.setRet = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional contractResult contractRet = 3; + * @return {!proto.protocol.Transaction.Result.contractResult} + */ +proto.protocol.Transaction.Result.prototype.getContractret = function() { + return /** @type {!proto.protocol.Transaction.Result.contractResult} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {!proto.protocol.Transaction.Result.contractResult} value */ +proto.protocol.Transaction.Result.prototype.setContractret = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 withdraw_amount = 15; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getWithdrawAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setWithdrawAmount = function(value) { + jspb.Message.setField(this, 15, value); +}; + + +/** + * optional int64 unfreeze_amount = 16; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getUnfreezeAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setUnfreezeAmount = function(value) { + jspb.Message.setField(this, 16, value); }; @@ -1888,13 +5999,20 @@ proto.protocol.permision.prototype.hasAccount = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Witness = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.Transaction.raw = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transaction.raw.repeatedFields_, null); }; -goog.inherits(proto.protocol.Witness, jspb.Message); +goog.inherits(proto.protocol.Transaction.raw, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Witness.displayName = 'proto.protocol.Witness'; + proto.protocol.Transaction.raw.displayName = 'proto.protocol.Transaction.raw'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.Transaction.raw.repeatedFields_ = [9,11]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1908,31 +6026,34 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Witness.toObject(opt_includeInstance, this); +proto.protocol.Transaction.raw.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Transaction.raw.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Witness} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Witness.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - votecount: jspb.Message.getFieldWithDefault(msg, 2, 0), - pubkey: msg.getPubkey_asB64(), - url: jspb.Message.getFieldWithDefault(msg, 4, ""), - totalproduced: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalmissed: jspb.Message.getFieldWithDefault(msg, 6, 0), - latestblocknum: jspb.Message.getFieldWithDefault(msg, 7, 0), - latestslotnum: jspb.Message.getFieldWithDefault(msg, 8, 0), - isjobs: jspb.Message.getFieldWithDefault(msg, 9, false) + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Transaction.raw} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Transaction.raw.toObject = function(includeInstance, msg) { + var f, obj = { + refBlockBytes: msg.getRefBlockBytes_asB64(), + refBlockNum: jspb.Message.getFieldWithDefault(msg, 3, 0), + refBlockHash: msg.getRefBlockHash_asB64(), + expiration: jspb.Message.getFieldWithDefault(msg, 8, 0), + authsList: jspb.Message.toObjectList(msg.getAuthsList(), + proto.protocol.authority.toObject, includeInstance), + data: msg.getData_asB64(), + contractList: jspb.Message.toObjectList(msg.getContractList(), + proto.protocol.Transaction.Contract.toObject, includeInstance), + scripts: msg.getScripts_asB64(), + timestamp: jspb.Message.getFieldWithDefault(msg, 14, 0), + feeLimit: jspb.Message.getFieldWithDefault(msg, 18, 0) }; if (includeInstance) { @@ -1946,23 +6067,23 @@ proto.protocol.Witness.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Witness} + * @return {!proto.protocol.Transaction.raw} */ -proto.protocol.Witness.deserializeBinary = function(bytes) { +proto.protocol.Transaction.raw.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Witness; - return proto.protocol.Witness.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Transaction.raw; + return proto.protocol.Transaction.raw.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Witness} msg The message object to deserialize into. + * @param {!proto.protocol.Transaction.raw} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Witness} + * @return {!proto.protocol.Transaction.raw} */ -proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Transaction.raw.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1971,39 +6092,45 @@ proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVotecount(value); + msg.setRefBlockBytes(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setRefBlockNum(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRefBlockHash(value); break; - case 5: + case 8: var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalproduced(value); + msg.setExpiration(value); break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalmissed(value); + case 9: + var value = new proto.protocol.authority; + reader.readMessage(value,proto.protocol.authority.deserializeBinaryFromReader); + msg.addAuths(value); break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestblocknum(value); + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); break; - case 8: + case 11: + var value = new proto.protocol.Transaction.Contract; + reader.readMessage(value,proto.protocol.Transaction.Contract.deserializeBinaryFromReader); + msg.addContract(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setScripts(value); + break; + case 14: var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestslotnum(value); + msg.setTimestamp(value); break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsjobs(value); + case 18: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeLimit(value); break; default: reader.skipField(); @@ -2018,9 +6145,9 @@ proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Witness.prototype.serializeBinary = function() { +proto.protocol.Transaction.raw.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Witness.serializeBinaryToWriter(this, writer); + proto.protocol.Transaction.raw.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2028,72 +6155,81 @@ proto.protocol.Witness.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Witness} message + * @param {!proto.protocol.Transaction.raw} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Witness.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Transaction.raw.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress_asU8(); + f = message.getRefBlockBytes_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getVotecount(); + f = message.getRefBlockNum(); if (f !== 0) { writer.writeInt64( - 2, - f - ); - } - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( 3, f ); } - f = message.getUrl(); + f = message.getRefBlockHash_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 4, f ); } - f = message.getTotalproduced(); + f = message.getExpiration(); if (f !== 0) { writer.writeInt64( - 5, + 8, f ); } - f = message.getTotalmissed(); - if (f !== 0) { - writer.writeInt64( - 6, + f = message.getAuthsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.protocol.authority.serializeBinaryToWriter + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, f ); } - f = message.getLatestblocknum(); - if (f !== 0) { - writer.writeInt64( - 7, + f = message.getContractList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.protocol.Transaction.Contract.serializeBinaryToWriter + ); + } + f = message.getScripts_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, f ); } - f = message.getLatestslotnum(); + f = message.getTimestamp(); if (f !== 0) { writer.writeInt64( - 8, + 14, f ); } - f = message.getIsjobs(); - if (f) { - writer.writeBool( - 9, + f = message.getFeeLimit(); + if (f !== 0) { + writer.writeInt64( + 18, f ); } @@ -2101,645 +6237,394 @@ proto.protocol.Witness.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes address = 1; + * optional bytes ref_block_bytes = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.Witness.prototype.getAddress = function() { +proto.protocol.Transaction.raw.prototype.getRefBlockBytes = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` + * optional bytes ref_block_bytes = 1; + * This is a type-conversion wrapper around `getRefBlockBytes()` * @return {string} */ -proto.protocol.Witness.prototype.getAddress_asB64 = function() { +proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); + this.getRefBlockBytes())); }; /** - * optional bytes address = 1; + * optional bytes ref_block_bytes = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` + * This is a type-conversion wrapper around `getRefBlockBytes()` * @return {!Uint8Array} */ -proto.protocol.Witness.prototype.getAddress_asU8 = function() { +proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); + this.getRefBlockBytes())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Witness.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +proto.protocol.Transaction.raw.prototype.setRefBlockBytes = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 voteCount = 2; + * optional int64 ref_block_num = 3; * @return {number} */ -proto.protocol.Witness.prototype.getVotecount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.Transaction.raw.prototype.getRefBlockNum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.Witness.prototype.setVotecount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +proto.protocol.Transaction.raw.prototype.setRefBlockNum = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional bytes pubKey = 3; + * optional bytes ref_block_hash = 4; * @return {!(string|Uint8Array)} */ -proto.protocol.Witness.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.Transaction.raw.prototype.getRefBlockHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional bytes pubKey = 3; - * This is a type-conversion wrapper around `getPubkey()` + * optional bytes ref_block_hash = 4; + * This is a type-conversion wrapper around `getRefBlockHash()` * @return {string} */ -proto.protocol.Witness.prototype.getPubkey_asB64 = function() { +proto.protocol.Transaction.raw.prototype.getRefBlockHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); + this.getRefBlockHash())); }; /** - * optional bytes pubKey = 3; + * optional bytes ref_block_hash = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` + * This is a type-conversion wrapper around `getRefBlockHash()` * @return {!Uint8Array} */ -proto.protocol.Witness.prototype.getPubkey_asU8 = function() { +proto.protocol.Transaction.raw.prototype.getRefBlockHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); + this.getRefBlockHash())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Witness.prototype.setPubkey = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional string url = 4; - * @return {string} - */ -proto.protocol.Witness.prototype.getUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.protocol.Witness.prototype.setUrl = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int64 totalProduced = 5; - * @return {number} - */ -proto.protocol.Witness.prototype.getTotalproduced = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Witness.prototype.setTotalproduced = function(value) { - jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 totalMissed = 6; - * @return {number} - */ -proto.protocol.Witness.prototype.getTotalmissed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Witness.prototype.setTotalmissed = function(value) { - jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 latestBlockNum = 7; - * @return {number} - */ -proto.protocol.Witness.prototype.getLatestblocknum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Witness.prototype.setLatestblocknum = function(value) { - jspb.Message.setProto3IntField(this, 7, value); +proto.protocol.Transaction.raw.prototype.setRefBlockHash = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * optional int64 latestSlotNum = 8; + * optional int64 expiration = 8; * @return {number} */ -proto.protocol.Witness.prototype.getLatestslotnum = function() { +proto.protocol.Transaction.raw.prototype.getExpiration = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** @param {number} value */ -proto.protocol.Witness.prototype.setLatestslotnum = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +proto.protocol.Transaction.raw.prototype.setExpiration = function(value) { + jspb.Message.setField(this, 8, value); }; /** - * optional bool isJobs = 9; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * repeated authority auths = 9; + * @return {!Array.} */ -proto.protocol.Witness.prototype.getIsjobs = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); +proto.protocol.Transaction.raw.prototype.getAuthsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.authority, 9)); }; -/** @param {boolean} value */ -proto.protocol.Witness.prototype.setIsjobs = function(value) { - jspb.Message.setProto3BooleanField(this, 9, value); +/** @param {!Array.} value */ +proto.protocol.Transaction.raw.prototype.setAuthsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 9, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * @param {!proto.protocol.authority=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.authority} */ -proto.protocol.Votes = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Votes.repeatedFields_, null); +proto.protocol.Transaction.raw.prototype.addAuths = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.protocol.authority, opt_index); }; -goog.inherits(proto.protocol.Votes, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.Votes.displayName = 'proto.protocol.Votes'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Votes.repeatedFields_ = [2,3]; +proto.protocol.Transaction.raw.prototype.clearAuthsList = function() { + this.setAuthsList([]); +}; + -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * optional bytes data = 10; + * @return {!(string|Uint8Array)} */ -proto.protocol.Votes.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Votes.toObject(opt_includeInstance, this); +proto.protocol.Transaction.raw.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Votes} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes data = 10; + * This is a type-conversion wrapper around `getData()` + * @return {string} */ -proto.protocol.Votes.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - oldVotesList: jspb.Message.toObjectList(msg.getOldVotesList(), - proto.protocol.Vote.toObject, includeInstance), - newVotesList: jspb.Message.toObjectList(msg.getNewVotesList(), - proto.protocol.Vote.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.protocol.Transaction.raw.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Votes} + * optional bytes data = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} */ -proto.protocol.Votes.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Votes; - return proto.protocol.Votes.deserializeBinaryFromReader(msg, reader); +proto.protocol.Transaction.raw.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Votes} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Votes} - */ -proto.protocol.Votes.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 2: - var value = new proto.protocol.Vote; - reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); - msg.addOldVotes(value); - break; - case 3: - var value = new proto.protocol.Vote; - reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); - msg.addNewVotes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Transaction.raw.prototype.setData = function(value) { + jspb.Message.setField(this, 10, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated Contract contract = 11; + * @return {!Array.} */ -proto.protocol.Votes.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Votes.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.Transaction.raw.prototype.getContractList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction.Contract, 11)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Transaction.raw.prototype.setContractList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 11, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Votes} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!proto.protocol.Transaction.Contract=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Transaction.Contract} */ -proto.protocol.Votes.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOldVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.protocol.Vote.serializeBinaryToWriter - ); - } - f = message.getNewVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.protocol.Vote.serializeBinaryToWriter - ); - } +proto.protocol.Transaction.raw.prototype.addContract = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.protocol.Transaction.Contract, opt_index); +}; + + +proto.protocol.Transaction.raw.prototype.clearContractList = function() { + this.setContractList([]); }; /** - * optional bytes address = 1; + * optional bytes scripts = 12; * @return {!(string|Uint8Array)} */ -proto.protocol.Votes.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.Transaction.raw.prototype.getScripts = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` + * optional bytes scripts = 12; + * This is a type-conversion wrapper around `getScripts()` * @return {string} */ -proto.protocol.Votes.prototype.getAddress_asB64 = function() { +proto.protocol.Transaction.raw.prototype.getScripts_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); + this.getScripts())); }; /** - * optional bytes address = 1; + * optional bytes scripts = 12; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` + * This is a type-conversion wrapper around `getScripts()` * @return {!Uint8Array} */ -proto.protocol.Votes.prototype.getAddress_asU8 = function() { +proto.protocol.Transaction.raw.prototype.getScripts_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); + this.getScripts())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Votes.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated Vote old_votes = 2; - * @return {!Array.} - */ -proto.protocol.Votes.prototype.getOldVotesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 2)); -}; - - -/** @param {!Array.} value */ -proto.protocol.Votes.prototype.setOldVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Vote} - */ -proto.protocol.Votes.prototype.addOldVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Vote, opt_index); -}; - - -proto.protocol.Votes.prototype.clearOldVotesList = function() { - this.setOldVotesList([]); +proto.protocol.Transaction.raw.prototype.setScripts = function(value) { + jspb.Message.setField(this, 12, value); }; /** - * repeated Vote new_votes = 3; - * @return {!Array.} + * optional int64 timestamp = 14; + * @return {number} */ -proto.protocol.Votes.prototype.getNewVotesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 3)); +proto.protocol.Transaction.raw.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; -/** @param {!Array.} value */ -proto.protocol.Votes.prototype.setNewVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); +/** @param {number} value */ +proto.protocol.Transaction.raw.prototype.setTimestamp = function(value) { + jspb.Message.setField(this, 14, value); }; /** - * @param {!proto.protocol.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Vote} + * optional int64 fee_limit = 18; + * @return {number} */ -proto.protocol.Votes.prototype.addNewVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.protocol.Vote, opt_index); +proto.protocol.Transaction.raw.prototype.getFeeLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); }; -proto.protocol.Votes.prototype.clearNewVotesList = function() { - this.setNewVotesList([]); +/** @param {number} value */ +proto.protocol.Transaction.raw.prototype.setFeeLimit = function(value) { + jspb.Message.setField(this, 18, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional raw raw_data = 1; + * @return {?proto.protocol.Transaction.raw} */ -proto.protocol.TXOutput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.Transaction.prototype.getRawData = function() { + return /** @type{?proto.protocol.Transaction.raw} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Transaction.raw, 1)); }; -goog.inherits(proto.protocol.TXOutput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.TXOutput.displayName = 'proto.protocol.TXOutput'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TXOutput.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TXOutput.toObject(opt_includeInstance, this); +/** @param {?proto.protocol.Transaction.raw|undefined} value */ +proto.protocol.Transaction.prototype.setRawData = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TXOutput} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TXOutput.toObject = function(includeInstance, msg) { - var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, 0), - pubkeyhash: msg.getPubkeyhash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.protocol.Transaction.prototype.clearRawData = function() { + this.setRawData(undefined); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TXOutput} + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.TXOutput.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TXOutput; - return proto.protocol.TXOutput.deserializeBinaryFromReader(msg, reader); +proto.protocol.Transaction.prototype.hasRawData = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TXOutput} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TXOutput} + * repeated bytes signature = 2; + * @return {!(Array|Array)} */ -proto.protocol.TXOutput.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkeyhash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.protocol.Transaction.prototype.getSignatureList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated bytes signature = 2; + * This is a type-conversion wrapper around `getSignatureList()` + * @return {!Array.} */ -proto.protocol.TXOutput.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TXOutput.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.Transaction.prototype.getSignatureList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getSignatureList())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TXOutput} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated bytes signature = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignatureList()` + * @return {!Array.} */ -proto.protocol.TXOutput.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getPubkeyhash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } +proto.protocol.Transaction.prototype.getSignatureList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getSignatureList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.Transaction.prototype.setSignatureList = function(value) { + jspb.Message.setField(this, 2, value || []); }; /** - * optional int64 value = 1; - * @return {number} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index */ -proto.protocol.TXOutput.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.Transaction.prototype.addSignature = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; -/** @param {number} value */ -proto.protocol.TXOutput.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +proto.protocol.Transaction.prototype.clearSignatureList = function() { + this.setSignatureList([]); }; /** - * optional bytes pubKeyHash = 2; - * @return {!(string|Uint8Array)} + * repeated Result ret = 5; + * @return {!Array.} */ -proto.protocol.TXOutput.prototype.getPubkeyhash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.Transaction.prototype.getRetList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction.Result, 5)); }; -/** - * optional bytes pubKeyHash = 2; - * This is a type-conversion wrapper around `getPubkeyhash()` - * @return {string} - */ -proto.protocol.TXOutput.prototype.getPubkeyhash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkeyhash())); +/** @param {!Array.} value */ +proto.protocol.Transaction.prototype.setRetList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 5, value); }; /** - * optional bytes pubKeyHash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkeyhash()` - * @return {!Uint8Array} + * @param {!proto.protocol.Transaction.Result=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Transaction.Result} */ -proto.protocol.TXOutput.prototype.getPubkeyhash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkeyhash())); +proto.protocol.Transaction.prototype.addRet = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.Transaction.Result, opt_index); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.TXOutput.prototype.setPubkeyhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +proto.protocol.Transaction.prototype.clearRetList = function() { + this.setRetList([]); }; @@ -2754,13 +6639,20 @@ proto.protocol.TXOutput.prototype.setPubkeyhash = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.TXInput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.TransactionInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionInfo.repeatedFields_, null); }; -goog.inherits(proto.protocol.TXInput, jspb.Message); +goog.inherits(proto.protocol.TransactionInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TXInput.displayName = 'proto.protocol.TXInput'; + proto.protocol.TransactionInfo.displayName = 'proto.protocol.TransactionInfo'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.TransactionInfo.repeatedFields_ = [5,8]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2774,8 +6666,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TXInput.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TXInput.toObject(opt_includeInstance, this); +proto.protocol.TransactionInfo.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionInfo.toObject(opt_includeInstance, this); }; @@ -2784,14 +6676,25 @@ proto.protocol.TXInput.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TXInput} msg The msg instance to transform. + * @param {!proto.protocol.TransactionInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TXInput.toObject = function(includeInstance, msg) { +proto.protocol.TransactionInfo.toObject = function(includeInstance, msg) { var f, obj = { - rawData: (f = msg.getRawData()) && proto.protocol.TXInput.raw.toObject(includeInstance, f), - signature: msg.getSignature_asB64() + id: msg.getId_asB64(), + fee: jspb.Message.getFieldWithDefault(msg, 2, 0), + blocknumber: jspb.Message.getFieldWithDefault(msg, 3, 0), + blocktimestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), + contractresultList: msg.getContractresultList_asB64(), + contractAddress: msg.getContractAddress_asB64(), + receipt: (f = msg.getReceipt()) && proto.protocol.ResourceReceipt.toObject(includeInstance, f), + logList: jspb.Message.toObjectList(msg.getLogList(), + proto.protocol.TransactionInfo.Log.toObject, includeInstance), + result: jspb.Message.getFieldWithDefault(msg, 9, 0), + resmessage: msg.getResmessage_asB64(), + withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), + unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0) }; if (includeInstance) { @@ -2805,23 +6708,23 @@ proto.protocol.TXInput.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TXInput} + * @return {!proto.protocol.TransactionInfo} */ -proto.protocol.TXInput.deserializeBinary = function(bytes) { +proto.protocol.TransactionInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TXInput; - return proto.protocol.TXInput.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TransactionInfo; + return proto.protocol.TransactionInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TXInput} msg The message object to deserialize into. + * @param {!proto.protocol.TransactionInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TXInput} + * @return {!proto.protocol.TransactionInfo} */ -proto.protocol.TXInput.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TransactionInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2829,13 +6732,54 @@ proto.protocol.TXInput.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.TXInput.raw; - reader.readMessage(value,proto.protocol.TXInput.raw.deserializeBinaryFromReader); - msg.setRawData(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlocknumber(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlocktimestamp(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addContractresult(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractAddress(value); + break; + case 7: + var value = new proto.protocol.ResourceReceipt; + reader.readMessage(value,proto.protocol.ResourceReceipt.deserializeBinaryFromReader); + msg.setReceipt(value); break; - case 4: + case 8: + var value = new proto.protocol.TransactionInfo.Log; + reader.readMessage(value,proto.protocol.TransactionInfo.Log.deserializeBinaryFromReader); + msg.addLog(value); + break; + case 9: + var value = /** @type {!proto.protocol.TransactionInfo.code} */ (reader.readEnum()); + msg.setResult(value); + break; + case 10: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); + msg.setResmessage(value); + break; + case 15: + var value = /** @type {number} */ (reader.readInt64()); + msg.setWithdrawAmount(value); + break; + case 16: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnfreezeAmount(value); break; default: reader.skipField(); @@ -2850,9 +6794,9 @@ proto.protocol.TXInput.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TXInput.prototype.serializeBinary = function() { +proto.protocol.TransactionInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TXInput.serializeBinaryToWriter(this, writer); + proto.protocol.TransactionInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2860,30 +6804,109 @@ proto.protocol.TXInput.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TXInput} message + * @param {!proto.protocol.TransactionInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TXInput.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRawData(); + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getBlocknumber(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getBlocktimestamp(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getContractresultList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 5, + f + ); + } + f = message.getContractAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getReceipt(); if (f != null) { writer.writeMessage( - 1, + 7, f, - proto.protocol.TXInput.raw.serializeBinaryToWriter + proto.protocol.ResourceReceipt.serializeBinaryToWriter ); } - f = message.getSignature_asU8(); + f = message.getLogList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.protocol.TransactionInfo.Log.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } + f = message.getResmessage_asU8(); if (f.length > 0) { writer.writeBytes( - 4, + 10, + f + ); + } + f = message.getWithdrawAmount(); + if (f !== 0) { + writer.writeInt64( + 15, + f + ); + } + f = message.getUnfreezeAmount(); + if (f !== 0) { + writer.writeInt64( + 16, f ); } }; +/** + * @enum {number} + */ +proto.protocol.TransactionInfo.code = { + SUCESS: 0, + FAILED: 1 +}; + /** * Generated by JsPbCodeGenerator. @@ -2895,13 +6918,20 @@ proto.protocol.TXInput.serializeBinaryToWriter = function(message, writer) { * @extends {jspb.Message} * @constructor */ -proto.protocol.TXInput.raw = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.TransactionInfo.Log = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionInfo.Log.repeatedFields_, null); }; -goog.inherits(proto.protocol.TXInput.raw, jspb.Message); +goog.inherits(proto.protocol.TransactionInfo.Log, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TXInput.raw.displayName = 'proto.protocol.TXInput.raw'; + proto.protocol.TransactionInfo.Log.displayName = 'proto.protocol.TransactionInfo.Log'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.TransactionInfo.Log.repeatedFields_ = [2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2915,8 +6945,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TXInput.raw.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TXInput.raw.toObject(opt_includeInstance, this); +proto.protocol.TransactionInfo.Log.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionInfo.Log.toObject(opt_includeInstance, this); }; @@ -2925,15 +6955,15 @@ proto.protocol.TXInput.raw.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TXInput.raw} msg The msg instance to transform. + * @param {!proto.protocol.TransactionInfo.Log} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TXInput.raw.toObject = function(includeInstance, msg) { +proto.protocol.TransactionInfo.Log.toObject = function(includeInstance, msg) { var f, obj = { - txid: msg.getTxid_asB64(), - vout: jspb.Message.getFieldWithDefault(msg, 2, 0), - pubkey: msg.getPubkey_asB64() + address: msg.getAddress_asB64(), + topicsList: msg.getTopicsList_asB64(), + data: msg.getData_asB64() }; if (includeInstance) { @@ -2947,23 +6977,23 @@ proto.protocol.TXInput.raw.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TXInput.raw} + * @return {!proto.protocol.TransactionInfo.Log} */ -proto.protocol.TXInput.raw.deserializeBinary = function(bytes) { +proto.protocol.TransactionInfo.Log.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TXInput.raw; - return proto.protocol.TXInput.raw.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TransactionInfo.Log; + return proto.protocol.TransactionInfo.Log.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TXInput.raw} msg The message object to deserialize into. + * @param {!proto.protocol.TransactionInfo.Log} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TXInput.raw} + * @return {!proto.protocol.TransactionInfo.Log} */ -proto.protocol.TXInput.raw.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TransactionInfo.Log.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2972,15 +7002,15 @@ proto.protocol.TXInput.raw.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); + msg.setAddress(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVout(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addTopics(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); + msg.setData(value); break; default: reader.skipField(); @@ -2995,9 +7025,9 @@ proto.protocol.TXInput.raw.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TXInput.raw.prototype.serializeBinary = function() { +proto.protocol.TransactionInfo.Log.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TXInput.raw.serializeBinaryToWriter(this, writer); + proto.protocol.TransactionInfo.Log.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3005,27 +7035,27 @@ proto.protocol.TXInput.raw.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TXInput.raw} message + * @param {!proto.protocol.TransactionInfo.Log} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TXInput.raw.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TransactionInfo.Log.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxid_asU8(); + f = message.getAddress_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getVout(); - if (f !== 0) { - writer.writeInt64( + f = message.getTopicsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 2, f ); } - f = message.getPubkey_asU8(); + f = message.getData_asU8(); if (f.length > 0) { writer.writeBytes( 3, @@ -3036,495 +7066,454 @@ proto.protocol.TXInput.raw.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes txID = 1; + * optional bytes address = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.TXInput.raw.prototype.getTxid = function() { +proto.protocol.TransactionInfo.Log.prototype.getAddress = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes txID = 1; - * This is a type-conversion wrapper around `getTxid()` + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` * @return {string} */ -proto.protocol.TXInput.raw.prototype.getTxid_asB64 = function() { +proto.protocol.TransactionInfo.Log.prototype.getAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); + this.getAddress())); }; /** - * optional bytes txID = 1; + * optional bytes address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` + * This is a type-conversion wrapper around `getAddress()` * @return {!Uint8Array} */ -proto.protocol.TXInput.raw.prototype.getTxid_asU8 = function() { +proto.protocol.TransactionInfo.Log.prototype.getAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); + this.getAddress())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.TXInput.raw.prototype.setTxid = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +proto.protocol.TransactionInfo.Log.prototype.setAddress = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 vout = 2; - * @return {number} + * repeated bytes topics = 2; + * @return {!(Array|Array)} */ -proto.protocol.TXInput.raw.prototype.getVout = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.TransactionInfo.Log.prototype.getTopicsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); }; -/** @param {number} value */ -proto.protocol.TXInput.raw.prototype.setVout = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** + * repeated bytes topics = 2; + * This is a type-conversion wrapper around `getTopicsList()` + * @return {!Array.} + */ +proto.protocol.TransactionInfo.Log.prototype.getTopicsList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getTopicsList())); }; /** - * optional bytes pubKey = 3; + * repeated bytes topics = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTopicsList()` + * @return {!Array.} + */ +proto.protocol.TransactionInfo.Log.prototype.getTopicsList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getTopicsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.TransactionInfo.Log.prototype.setTopicsList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.TransactionInfo.Log.prototype.addTopics = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +proto.protocol.TransactionInfo.Log.prototype.clearTopicsList = function() { + this.setTopicsList([]); +}; + + +/** + * optional bytes data = 3; * @return {!(string|Uint8Array)} */ -proto.protocol.TXInput.raw.prototype.getPubkey = function() { +proto.protocol.TransactionInfo.Log.prototype.getData = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional bytes pubKey = 3; - * This is a type-conversion wrapper around `getPubkey()` + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` * @return {string} */ -proto.protocol.TXInput.raw.prototype.getPubkey_asB64 = function() { +proto.protocol.TransactionInfo.Log.prototype.getData_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); + this.getData())); }; /** - * optional bytes pubKey = 3; + * optional bytes data = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` + * This is a type-conversion wrapper around `getData()` * @return {!Uint8Array} */ -proto.protocol.TXInput.raw.prototype.getPubkey_asU8 = function() { +proto.protocol.TransactionInfo.Log.prototype.getData_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); + this.getData())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.TXInput.raw.prototype.setPubkey = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); +proto.protocol.TransactionInfo.Log.prototype.setData = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional raw raw_data = 1; - * @return {?proto.protocol.TXInput.raw} + * optional bytes id = 1; + * @return {!(string|Uint8Array)} */ -proto.protocol.TXInput.prototype.getRawData = function() { - return /** @type{?proto.protocol.TXInput.raw} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TXInput.raw, 1)); +proto.protocol.TransactionInfo.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {?proto.protocol.TXInput.raw|undefined} value */ -proto.protocol.TXInput.prototype.setRawData = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.protocol.TransactionInfo.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); }; -proto.protocol.TXInput.prototype.clearRawData = function() { - this.setRawData(undefined); +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.protocol.TransactionInfo.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.TXInput.prototype.hasRawData = function() { - return jspb.Message.getField(this, 1) != null; +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionInfo.prototype.setId = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional bytes signature = 4; - * @return {!(string|Uint8Array)} + * optional int64 fee = 2; + * @return {number} */ -proto.protocol.TXInput.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.protocol.TransactionInfo.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setFee = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional bytes signature = 4; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} + * optional int64 blockNumber = 3; + * @return {number} */ -proto.protocol.TXInput.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); +proto.protocol.TransactionInfo.prototype.getBlocknumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setBlocknumber = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional bytes signature = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} + * optional int64 blockTimeStamp = 4; + * @return {number} */ -proto.protocol.TXInput.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); +proto.protocol.TransactionInfo.prototype.getBlocktimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.TXInput.prototype.setSignature = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setBlocktimestamp = function(value) { + jspb.Message.setField(this, 4, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * repeated bytes contractResult = 5; + * @return {!(Array|Array)} */ -proto.protocol.TXOutputs = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TXOutputs.repeatedFields_, null); +proto.protocol.TransactionInfo.prototype.getContractresultList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 5)); }; -goog.inherits(proto.protocol.TXOutputs, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.TXOutputs.displayName = 'proto.protocol.TXOutputs'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.TXOutputs.repeatedFields_ = [1]; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * repeated bytes contractResult = 5; + * This is a type-conversion wrapper around `getContractresultList()` + * @return {!Array.} */ -proto.protocol.TXOutputs.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TXOutputs.toObject(opt_includeInstance, this); +proto.protocol.TransactionInfo.prototype.getContractresultList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getContractresultList())); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TXOutputs} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated bytes contractResult = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractresultList()` + * @return {!Array.} */ -proto.protocol.TXOutputs.toObject = function(includeInstance, msg) { - var f, obj = { - outputsList: jspb.Message.toObjectList(msg.getOutputsList(), - proto.protocol.TXOutput.toObject, includeInstance) - }; +proto.protocol.TransactionInfo.prototype.getContractresultList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getContractresultList())); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {!(Array|Array)} value */ +proto.protocol.TransactionInfo.prototype.setContractresultList = function(value) { + jspb.Message.setField(this, 5, value || []); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TXOutputs} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index */ -proto.protocol.TXOutputs.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TXOutputs; - return proto.protocol.TXOutputs.deserializeBinaryFromReader(msg, reader); +proto.protocol.TransactionInfo.prototype.addContractresult = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TXOutputs} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TXOutputs} - */ -proto.protocol.TXOutputs.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.TXOutput; - reader.readMessage(value,proto.protocol.TXOutput.deserializeBinaryFromReader); - msg.addOutputs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.protocol.TransactionInfo.prototype.clearContractresultList = function() { + this.setContractresultList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bytes contract_address = 6; + * @return {!(string|Uint8Array)} */ -proto.protocol.TXOutputs.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TXOutputs.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.TransactionInfo.prototype.getContractAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TXOutputs} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes contract_address = 6; + * This is a type-conversion wrapper around `getContractAddress()` + * @return {string} */ -proto.protocol.TXOutputs.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOutputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.protocol.TXOutput.serializeBinaryToWriter - ); - } +proto.protocol.TransactionInfo.prototype.getContractAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractAddress())); }; /** - * repeated TXOutput outputs = 1; - * @return {!Array.} + * optional bytes contract_address = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractAddress()` + * @return {!Uint8Array} */ -proto.protocol.TXOutputs.prototype.getOutputsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TXOutput, 1)); +proto.protocol.TransactionInfo.prototype.getContractAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractAddress())); }; -/** @param {!Array.} value */ -proto.protocol.TXOutputs.prototype.setOutputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionInfo.prototype.setContractAddress = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * @param {!proto.protocol.TXOutput=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TXOutput} + * optional ResourceReceipt receipt = 7; + * @return {?proto.protocol.ResourceReceipt} */ -proto.protocol.TXOutputs.prototype.addOutputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TXOutput, opt_index); +proto.protocol.TransactionInfo.prototype.getReceipt = function() { + return /** @type{?proto.protocol.ResourceReceipt} */ ( + jspb.Message.getWrapperField(this, proto.protocol.ResourceReceipt, 7)); }; -proto.protocol.TXOutputs.prototype.clearOutputsList = function() { - this.setOutputsList([]); +/** @param {?proto.protocol.ResourceReceipt|undefined} value */ +proto.protocol.TransactionInfo.prototype.setReceipt = function(value) { + jspb.Message.setWrapperField(this, 7, value); }; +proto.protocol.TransactionInfo.prototype.clearReceipt = function() { + this.setReceipt(undefined); +}; + /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.Transaction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transaction.repeatedFields_, null); +proto.protocol.TransactionInfo.prototype.hasReceipt = function() { + return jspb.Message.getField(this, 7) != null; }; -goog.inherits(proto.protocol.Transaction, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.Transaction.displayName = 'proto.protocol.Transaction'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Transaction.repeatedFields_ = [2,5]; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * repeated Log log = 8; + * @return {!Array.} */ -proto.protocol.Transaction.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transaction.toObject(opt_includeInstance, this); +proto.protocol.TransactionInfo.prototype.getLogList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionInfo.Log, 8)); +}; + + +/** @param {!Array.} value */ +proto.protocol.TransactionInfo.prototype.setLogList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 8, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Transaction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!proto.protocol.TransactionInfo.Log=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.TransactionInfo.Log} */ -proto.protocol.Transaction.toObject = function(includeInstance, msg) { - var f, obj = { - rawData: (f = msg.getRawData()) && proto.protocol.Transaction.raw.toObject(includeInstance, f), - signatureList: msg.getSignatureList_asB64(), - retList: jspb.Message.toObjectList(msg.getRetList(), - proto.protocol.Transaction.Result.toObject, includeInstance) - }; +proto.protocol.TransactionInfo.prototype.addLog = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.protocol.TransactionInfo.Log, opt_index); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +proto.protocol.TransactionInfo.prototype.clearLogList = function() { + this.setLogList([]); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction} + * optional code result = 9; + * @return {!proto.protocol.TransactionInfo.code} */ -proto.protocol.Transaction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transaction; - return proto.protocol.Transaction.deserializeBinaryFromReader(msg, reader); +proto.protocol.TransactionInfo.prototype.getResult = function() { + return /** @type {!proto.protocol.TransactionInfo.code} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Transaction} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction} - */ -proto.protocol.Transaction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Transaction.raw; - reader.readMessage(value,proto.protocol.Transaction.raw.deserializeBinaryFromReader); - msg.setRawData(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addSignature(value); - break; - case 5: - var value = new proto.protocol.Transaction.Result; - reader.readMessage(value,proto.protocol.Transaction.Result.deserializeBinaryFromReader); - msg.addRet(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {!proto.protocol.TransactionInfo.code} value */ +proto.protocol.TransactionInfo.prototype.setResult = function(value) { + jspb.Message.setField(this, 9, value); +}; + + +/** + * optional bytes resMessage = 10; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TransactionInfo.prototype.getResmessage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes resMessage = 10; + * This is a type-conversion wrapper around `getResmessage()` + * @return {string} + */ +proto.protocol.TransactionInfo.prototype.getResmessage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getResmessage())); +}; + + +/** + * optional bytes resMessage = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResmessage()` * @return {!Uint8Array} */ -proto.protocol.Transaction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.TransactionInfo.prototype.getResmessage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getResmessage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionInfo.prototype.setResmessage = function(value) { + jspb.Message.setField(this, 10, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transaction} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 withdraw_amount = 15; + * @return {number} */ -proto.protocol.Transaction.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Transaction.raw.serializeBinaryToWriter - ); - } - f = message.getSignatureList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getRetList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.protocol.Transaction.Result.serializeBinaryToWriter - ); - } +proto.protocol.TransactionInfo.prototype.getWithdrawAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setWithdrawAmount = function(value) { + jspb.Message.setField(this, 15, value); +}; + + +/** + * optional int64 unfreeze_amount = 16; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getUnfreezeAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setUnfreezeAmount = function(value) { + jspb.Message.setField(this, 16, value); }; @@ -3539,13 +7528,20 @@ proto.protocol.Transaction.serializeBinaryToWriter = function(message, writer) { * @extends {jspb.Message} * @constructor */ -proto.protocol.Transaction.Contract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.Transactions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transactions.repeatedFields_, null); }; -goog.inherits(proto.protocol.Transaction.Contract, jspb.Message); +goog.inherits(proto.protocol.Transactions, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Transaction.Contract.displayName = 'proto.protocol.Transaction.Contract'; + proto.protocol.Transactions.displayName = 'proto.protocol.Transactions'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.Transactions.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3559,8 +7555,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Transaction.Contract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transaction.Contract.toObject(opt_includeInstance, this); +proto.protocol.Transactions.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Transactions.toObject(opt_includeInstance, this); }; @@ -3569,16 +7565,14 @@ proto.protocol.Transaction.Contract.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Transaction.Contract} msg The msg instance to transform. + * @param {!proto.protocol.Transactions} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.Contract.toObject = function(includeInstance, msg) { +proto.protocol.Transactions.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - parameter: (f = msg.getParameter()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), - provider: msg.getProvider_asB64(), - contractname: msg.getContractname_asB64() + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.protocol.Transaction.toObject, includeInstance) }; if (includeInstance) { @@ -3592,23 +7586,23 @@ proto.protocol.Transaction.Contract.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction.Contract} + * @return {!proto.protocol.Transactions} */ -proto.protocol.Transaction.Contract.deserializeBinary = function(bytes) { +proto.protocol.Transactions.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transaction.Contract; - return proto.protocol.Transaction.Contract.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Transactions; + return proto.protocol.Transactions.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Transaction.Contract} msg The message object to deserialize into. + * @param {!proto.protocol.Transactions} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction.Contract} + * @return {!proto.protocol.Transactions} */ -proto.protocol.Transaction.Contract.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Transactions.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3616,21 +7610,9 @@ proto.protocol.Transaction.Contract.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.protocol.Transaction.Contract.ContractType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setParameter(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProvider(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractname(value); + var value = new proto.protocol.Transaction; + reader.readMessage(value,proto.protocol.Transaction.deserializeBinaryFromReader); + msg.addTransactions(value); break; default: reader.skipField(); @@ -3645,9 +7627,9 @@ proto.protocol.Transaction.Contract.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Transaction.Contract.prototype.serializeBinary = function() { +proto.protocol.Transactions.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.Contract.serializeBinaryToWriter(this, writer); + proto.protocol.Transactions.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3655,187 +7637,261 @@ proto.protocol.Transaction.Contract.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transaction.Contract} message + * @param {!proto.protocol.Transactions} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.Contract.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Transactions.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getTransactionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getParameter(); - if (f != null) { - writer.writeMessage( - 2, f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getProvider_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getContractname_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f + proto.protocol.Transaction.serializeBinaryToWriter ); } }; /** - * @enum {number} + * repeated Transaction transactions = 1; + * @return {!Array.} */ -proto.protocol.Transaction.Contract.ContractType = { - ACCOUNTCREATECONTRACT: 0, - TRANSFERCONTRACT: 1, - TRANSFERASSETCONTRACT: 2, - VOTEASSETCONTRACT: 3, - VOTEWITNESSCONTRACT: 4, - WITNESSCREATECONTRACT: 5, - ASSETISSUECONTRACT: 6, - DEPLOYCONTRACT: 7, - WITNESSUPDATECONTRACT: 8, - PARTICIPATEASSETISSUECONTRACT: 9, - ACCOUNTUPDATECONTRACT: 10, - FREEZEBALANCECONTRACT: 11, - UNFREEZEBALANCECONTRACT: 12, - WITHDRAWBALANCECONTRACT: 13, - UNFREEZEASSETCONTRACT: 14, - UPDATEASSETCONTRACT: 15, - CUSTOMCONTRACT: 20 +proto.protocol.Transactions.prototype.getTransactionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Transactions.prototype.setTransactionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; + /** - * optional ContractType type = 1; - * @return {!proto.protocol.Transaction.Contract.ContractType} + * @param {!proto.protocol.Transaction=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Transaction} */ -proto.protocol.Transaction.Contract.prototype.getType = function() { - return /** @type {!proto.protocol.Transaction.Contract.ContractType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.Transactions.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Transaction, opt_index); }; -/** @param {!proto.protocol.Transaction.Contract.ContractType} value */ -proto.protocol.Transaction.Contract.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); +proto.protocol.Transactions.prototype.clearTransactionsList = function() { + this.setTransactionsList([]); }; + /** - * optional google.protobuf.Any parameter = 2; - * @return {?proto.google.protobuf.Any} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.Transaction.Contract.prototype.getParameter = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +proto.protocol.TransactionSign = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.protocol.TransactionSign, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TransactionSign.displayName = 'proto.protocol.TransactionSign'; +} -/** @param {?proto.google.protobuf.Any|undefined} value */ -proto.protocol.Transaction.Contract.prototype.setParameter = function(value) { - jspb.Message.setWrapperField(this, 2, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TransactionSign.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionSign.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TransactionSign} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionSign.toObject = function(includeInstance, msg) { + var f, obj = { + transaction: (f = msg.getTransaction()) && proto.protocol.Transaction.toObject(includeInstance, f), + privatekey: msg.getPrivatekey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} -proto.protocol.Transaction.Contract.prototype.clearParameter = function() { - this.setParameter(undefined); +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TransactionSign} + */ +proto.protocol.TransactionSign.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TransactionSign; + return proto.protocol.TransactionSign.deserializeBinaryFromReader(msg, reader); }; /** - * Returns whether this field is set. - * @return {!boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TransactionSign} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TransactionSign} */ -proto.protocol.Transaction.Contract.prototype.hasParameter = function() { - return jspb.Message.getField(this, 2) != null; +proto.protocol.TransactionSign.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.Transaction; + reader.readMessage(value,proto.protocol.Transaction.deserializeBinaryFromReader); + msg.setTransaction(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPrivatekey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes provider = 3; - * @return {!(string|Uint8Array)} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.protocol.Transaction.Contract.prototype.getProvider = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.TransactionSign.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TransactionSign.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes provider = 3; - * This is a type-conversion wrapper around `getProvider()` - * @return {string} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TransactionSign} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.Contract.prototype.getProvider_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProvider())); +proto.protocol.TransactionSign.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransaction(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.Transaction.serializeBinaryToWriter + ); + } + f = message.getPrivatekey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } }; /** - * optional bytes provider = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProvider()` - * @return {!Uint8Array} + * optional Transaction transaction = 1; + * @return {?proto.protocol.Transaction} */ -proto.protocol.Transaction.Contract.prototype.getProvider_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProvider())); +proto.protocol.TransactionSign.prototype.getTransaction = function() { + return /** @type{?proto.protocol.Transaction} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Transaction, 1)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.Transaction.Contract.prototype.setProvider = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); +/** @param {?proto.protocol.Transaction|undefined} value */ +proto.protocol.TransactionSign.prototype.setTransaction = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TransactionSign.prototype.clearTransaction = function() { + this.setTransaction(undefined); }; /** - * optional bytes ContractName = 4; + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TransactionSign.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes privateKey = 2; * @return {!(string|Uint8Array)} */ -proto.protocol.Transaction.Contract.prototype.getContractname = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.protocol.TransactionSign.prototype.getPrivatekey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes ContractName = 4; - * This is a type-conversion wrapper around `getContractname()` + * optional bytes privateKey = 2; + * This is a type-conversion wrapper around `getPrivatekey()` * @return {string} */ -proto.protocol.Transaction.Contract.prototype.getContractname_asB64 = function() { +proto.protocol.TransactionSign.prototype.getPrivatekey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractname())); + this.getPrivatekey())); }; /** - * optional bytes ContractName = 4; + * optional bytes privateKey = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractname()` + * This is a type-conversion wrapper around `getPrivatekey()` * @return {!Uint8Array} */ -proto.protocol.Transaction.Contract.prototype.getContractname_asU8 = function() { +proto.protocol.TransactionSign.prototype.getPrivatekey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractname())); + this.getPrivatekey())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Transaction.Contract.prototype.setContractname = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); +proto.protocol.TransactionSign.prototype.setPrivatekey = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -3850,12 +7906,12 @@ proto.protocol.Transaction.Contract.prototype.setContractname = function(value) * @extends {jspb.Message} * @constructor */ -proto.protocol.Transaction.Result = function(opt_data) { +proto.protocol.BlockHeader = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Transaction.Result, jspb.Message); +goog.inherits(proto.protocol.BlockHeader, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Transaction.Result.displayName = 'proto.protocol.Transaction.Result'; + proto.protocol.BlockHeader.displayName = 'proto.protocol.BlockHeader'; } @@ -3870,8 +7926,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Transaction.Result.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transaction.Result.toObject(opt_includeInstance, this); +proto.protocol.BlockHeader.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockHeader.toObject(opt_includeInstance, this); }; @@ -3880,14 +7936,14 @@ proto.protocol.Transaction.Result.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Transaction.Result} msg The msg instance to transform. + * @param {!proto.protocol.BlockHeader} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.Result.toObject = function(includeInstance, msg) { +proto.protocol.BlockHeader.toObject = function(includeInstance, msg) { var f, obj = { - fee: jspb.Message.getFieldWithDefault(msg, 1, 0), - ret: jspb.Message.getFieldWithDefault(msg, 2, 0) + rawData: (f = msg.getRawData()) && proto.protocol.BlockHeader.raw.toObject(includeInstance, f), + witnessSignature: msg.getWitnessSignature_asB64() }; if (includeInstance) { @@ -3901,23 +7957,23 @@ proto.protocol.Transaction.Result.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction.Result} + * @return {!proto.protocol.BlockHeader} */ -proto.protocol.Transaction.Result.deserializeBinary = function(bytes) { +proto.protocol.BlockHeader.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transaction.Result; - return proto.protocol.Transaction.Result.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockHeader; + return proto.protocol.BlockHeader.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Transaction.Result} msg The message object to deserialize into. + * @param {!proto.protocol.BlockHeader} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction.Result} + * @return {!proto.protocol.BlockHeader} */ -proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockHeader.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3925,12 +7981,13 @@ proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); + var value = new proto.protocol.BlockHeader.raw; + reader.readMessage(value,proto.protocol.BlockHeader.raw.deserializeBinaryFromReader); + msg.setRawData(value); break; case 2: - var value = /** @type {!proto.protocol.Transaction.Result.code} */ (reader.readEnum()); - msg.setRet(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWitnessSignature(value); break; default: reader.skipField(); @@ -3945,9 +8002,9 @@ proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Transaction.Result.prototype.serializeBinary = function() { +proto.protocol.BlockHeader.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.Result.serializeBinaryToWriter(this, writer); + proto.protocol.BlockHeader.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3955,22 +8012,23 @@ proto.protocol.Transaction.Result.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transaction.Result} message + * @param {!proto.protocol.BlockHeader} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockHeader.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( + f = message.getRawData(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.protocol.BlockHeader.raw.serializeBinaryToWriter ); } - f = message.getRet(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getWitnessSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); @@ -3978,44 +8036,6 @@ proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, wr }; -/** - * @enum {number} - */ -proto.protocol.Transaction.Result.code = { - SUCESS: 0, - FAILED: 1 -}; - -/** - * optional int64 fee = 1; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Transaction.Result.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional code ret = 2; - * @return {!proto.protocol.Transaction.Result.code} - */ -proto.protocol.Transaction.Result.prototype.getRet = function() { - return /** @type {!proto.protocol.Transaction.Result.code} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {!proto.protocol.Transaction.Result.code} value */ -proto.protocol.Transaction.Result.prototype.setRet = function(value) { - jspb.Message.setProto3EnumField(this, 2, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -4027,20 +8047,13 @@ proto.protocol.Transaction.Result.prototype.setRet = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.Transaction.raw = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transaction.raw.repeatedFields_, null); +proto.protocol.BlockHeader.raw = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Transaction.raw, jspb.Message); +goog.inherits(proto.protocol.BlockHeader.raw, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Transaction.raw.displayName = 'proto.protocol.Transaction.raw'; + proto.protocol.BlockHeader.raw.displayName = 'proto.protocol.BlockHeader.raw'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Transaction.raw.repeatedFields_ = [9,11]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4054,8 +8067,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Transaction.raw.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transaction.raw.toObject(opt_includeInstance, this); +proto.protocol.BlockHeader.raw.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockHeader.raw.toObject(opt_includeInstance, this); }; @@ -4064,23 +8077,19 @@ proto.protocol.Transaction.raw.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Transaction.raw} msg The msg instance to transform. + * @param {!proto.protocol.BlockHeader.raw} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.raw.toObject = function(includeInstance, msg) { +proto.protocol.BlockHeader.raw.toObject = function(includeInstance, msg) { var f, obj = { - refBlockBytes: msg.getRefBlockBytes_asB64(), - refBlockNum: jspb.Message.getFieldWithDefault(msg, 3, 0), - refBlockHash: msg.getRefBlockHash_asB64(), - expiration: jspb.Message.getFieldWithDefault(msg, 8, 0), - authsList: jspb.Message.toObjectList(msg.getAuthsList(), - proto.protocol.acuthrity.toObject, includeInstance), - data: msg.getData_asB64(), - contractList: jspb.Message.toObjectList(msg.getContractList(), - proto.protocol.Transaction.Contract.toObject, includeInstance), - scripts: msg.getScripts_asB64(), - timestamp: jspb.Message.getFieldWithDefault(msg, 14, 0) + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + txtrieroot: msg.getTxtrieroot_asB64(), + parenthash: msg.getParenthash_asB64(), + number: jspb.Message.getFieldWithDefault(msg, 7, 0), + witnessId: jspb.Message.getFieldWithDefault(msg, 8, 0), + witnessAddress: msg.getWitnessAddress_asB64(), + version: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -4094,23 +8103,23 @@ proto.protocol.Transaction.raw.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction.raw} + * @return {!proto.protocol.BlockHeader.raw} */ -proto.protocol.Transaction.raw.deserializeBinary = function(bytes) { +proto.protocol.BlockHeader.raw.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transaction.raw; - return proto.protocol.Transaction.raw.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockHeader.raw; + return proto.protocol.BlockHeader.raw.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Transaction.raw} msg The message object to deserialize into. + * @param {!proto.protocol.BlockHeader.raw} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction.raw} + * @return {!proto.protocol.BlockHeader.raw} */ -proto.protocol.Transaction.raw.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockHeader.raw.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4118,42 +8127,32 @@ proto.protocol.Transaction.raw.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimestamp(value); + break; + case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRefBlockBytes(value); + msg.setTxtrieroot(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRefBlockNum(value); - break; - case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRefBlockHash(value); + msg.setParenthash(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNumber(value); break; case 8: var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiration(value); + msg.setWitnessId(value); break; case 9: - var value = new proto.protocol.acuthrity; - reader.readMessage(value,proto.protocol.acuthrity.deserializeBinaryFromReader); - msg.addAuths(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 11: - var value = new proto.protocol.Transaction.Contract; - reader.readMessage(value,proto.protocol.Transaction.Contract.deserializeBinaryFromReader); - msg.addContract(value); - break; - case 12: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScripts(value); + msg.setWitnessAddress(value); break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); + case 10: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersion(value); break; default: reader.skipField(); @@ -4168,9 +8167,9 @@ proto.protocol.Transaction.raw.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Transaction.raw.prototype.serializeBinary = function() { +proto.protocol.BlockHeader.raw.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.raw.serializeBinaryToWriter(this, writer); + proto.protocol.BlockHeader.raw.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4178,74 +8177,58 @@ proto.protocol.Transaction.raw.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transaction.raw} message + * @param {!proto.protocol.BlockHeader.raw} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.raw.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockHeader.raw.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRefBlockBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTimestamp(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getRefBlockNum(); - if (f !== 0) { - writer.writeInt64( - 3, + f = message.getTxtrieroot_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, f ); } - f = message.getRefBlockHash_asU8(); + f = message.getParenthash_asU8(); if (f.length > 0) { writer.writeBytes( - 4, + 3, f ); } - f = message.getExpiration(); + f = message.getNumber(); if (f !== 0) { writer.writeInt64( - 8, + 7, f ); } - f = message.getAuthsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 9, - f, - proto.protocol.acuthrity.serializeBinaryToWriter - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, + f = message.getWitnessId(); + if (f !== 0) { + writer.writeInt64( + 8, f ); } - f = message.getContractList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.protocol.Transaction.Contract.serializeBinaryToWriter - ); - } - f = message.getScripts_asU8(); + f = message.getWitnessAddress_asU8(); if (f.length > 0) { writer.writeBytes( - 12, + 9, f ); } - f = message.getTimestamp(); + f = message.getVersion(); if (f !== 0) { - writer.writeInt64( - 14, + writer.writeInt32( + 10, f ); } @@ -4253,286 +8236,451 @@ proto.protocol.Transaction.raw.serializeBinaryToWriter = function(message, write /** - * optional bytes ref_block_bytes = 1; + * optional int64 timestamp = 1; + * @return {number} + */ +proto.protocol.BlockHeader.raw.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BlockHeader.raw.prototype.setTimestamp = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes txTrieRoot = 2; * @return {!(string|Uint8Array)} */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.BlockHeader.raw.prototype.getTxtrieroot = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes ref_block_bytes = 1; - * This is a type-conversion wrapper around `getRefBlockBytes()` + * optional bytes txTrieRoot = 2; + * This is a type-conversion wrapper around `getTxtrieroot()` * @return {string} */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asB64 = function() { +proto.protocol.BlockHeader.raw.prototype.getTxtrieroot_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRefBlockBytes())); + this.getTxtrieroot())); }; /** - * optional bytes ref_block_bytes = 1; + * optional bytes txTrieRoot = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRefBlockBytes()` + * This is a type-conversion wrapper around `getTxtrieroot()` * @return {!Uint8Array} */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asU8 = function() { +proto.protocol.BlockHeader.raw.prototype.getTxtrieroot_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRefBlockBytes())); + this.getTxtrieroot())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Transaction.raw.prototype.setRefBlockBytes = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +proto.protocol.BlockHeader.raw.prototype.setTxtrieroot = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int64 ref_block_num = 3; + * optional bytes parentHash = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.BlockHeader.raw.prototype.getParenthash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes parentHash = 3; + * This is a type-conversion wrapper around `getParenthash()` + * @return {string} + */ +proto.protocol.BlockHeader.raw.prototype.getParenthash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getParenthash())); +}; + + +/** + * optional bytes parentHash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getParenthash()` + * @return {!Uint8Array} + */ +proto.protocol.BlockHeader.raw.prototype.getParenthash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getParenthash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BlockHeader.raw.prototype.setParenthash = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 number = 7; * @return {number} */ -proto.protocol.Transaction.raw.prototype.getRefBlockNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.protocol.BlockHeader.raw.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.protocol.Transaction.raw.prototype.setRefBlockNum = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.protocol.BlockHeader.raw.prototype.setNumber = function(value) { + jspb.Message.setField(this, 7, value); }; /** - * optional bytes ref_block_hash = 4; + * optional int64 witness_id = 8; + * @return {number} + */ +proto.protocol.BlockHeader.raw.prototype.getWitnessId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BlockHeader.raw.prototype.setWitnessId = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * optional bytes witness_address = 9; * @return {!(string|Uint8Array)} */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.protocol.BlockHeader.raw.prototype.getWitnessAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** - * optional bytes ref_block_hash = 4; - * This is a type-conversion wrapper around `getRefBlockHash()` + * optional bytes witness_address = 9; + * This is a type-conversion wrapper around `getWitnessAddress()` * @return {string} */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash_asB64 = function() { +proto.protocol.BlockHeader.raw.prototype.getWitnessAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRefBlockHash())); + this.getWitnessAddress())); }; /** - * optional bytes ref_block_hash = 4; + * optional bytes witness_address = 9; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRefBlockHash()` + * This is a type-conversion wrapper around `getWitnessAddress()` * @return {!Uint8Array} */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash_asU8 = function() { +proto.protocol.BlockHeader.raw.prototype.getWitnessAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRefBlockHash())); + this.getWitnessAddress())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Transaction.raw.prototype.setRefBlockHash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); +proto.protocol.BlockHeader.raw.prototype.setWitnessAddress = function(value) { + jspb.Message.setField(this, 9, value); }; /** - * optional int64 expiration = 8; + * optional int32 version = 10; * @return {number} */ -proto.protocol.Transaction.raw.prototype.getExpiration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.protocol.BlockHeader.raw.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** @param {number} value */ -proto.protocol.Transaction.raw.prototype.setExpiration = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +proto.protocol.BlockHeader.raw.prototype.setVersion = function(value) { + jspb.Message.setField(this, 10, value); }; /** - * repeated acuthrity auths = 9; - * @return {!Array.} + * optional raw raw_data = 1; + * @return {?proto.protocol.BlockHeader.raw} */ -proto.protocol.Transaction.raw.prototype.getAuthsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.acuthrity, 9)); +proto.protocol.BlockHeader.prototype.getRawData = function() { + return /** @type{?proto.protocol.BlockHeader.raw} */ ( + jspb.Message.getWrapperField(this, proto.protocol.BlockHeader.raw, 1)); }; -/** @param {!Array.} value */ -proto.protocol.Transaction.raw.prototype.setAuthsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 9, value); +/** @param {?proto.protocol.BlockHeader.raw|undefined} value */ +proto.protocol.BlockHeader.prototype.setRawData = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * @param {!proto.protocol.acuthrity=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.acuthrity} - */ -proto.protocol.Transaction.raw.prototype.addAuths = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.protocol.acuthrity, opt_index); +proto.protocol.BlockHeader.prototype.clearRawData = function() { + this.setRawData(undefined); }; -proto.protocol.Transaction.raw.prototype.clearAuthsList = function() { - this.setAuthsList([]); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.BlockHeader.prototype.hasRawData = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes data = 10; + * optional bytes witness_signature = 2; * @return {!(string|Uint8Array)} */ -proto.protocol.Transaction.raw.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +proto.protocol.BlockHeader.prototype.getWitnessSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes data = 10; - * This is a type-conversion wrapper around `getData()` + * optional bytes witness_signature = 2; + * This is a type-conversion wrapper around `getWitnessSignature()` * @return {string} */ -proto.protocol.Transaction.raw.prototype.getData_asB64 = function() { +proto.protocol.BlockHeader.prototype.getWitnessSignature_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); + this.getWitnessSignature())); }; /** - * optional bytes data = 10; + * optional bytes witness_signature = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` + * This is a type-conversion wrapper around `getWitnessSignature()` * @return {!Uint8Array} */ -proto.protocol.Transaction.raw.prototype.getData_asU8 = function() { +proto.protocol.BlockHeader.prototype.getWitnessSignature_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); + this.getWitnessSignature())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Transaction.raw.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 10, value); +proto.protocol.BlockHeader.prototype.setWitnessSignature = function(value) { + jspb.Message.setField(this, 2, value); }; + /** - * repeated Contract contract = 11; - * @return {!Array.} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.Transaction.raw.prototype.getContractList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction.Contract, 11)); +proto.protocol.Block = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Block.repeatedFields_, null); }; +goog.inherits(proto.protocol.Block, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Block.displayName = 'proto.protocol.Block'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.Block.repeatedFields_ = [1]; -/** @param {!Array.} value */ -proto.protocol.Transaction.raw.prototype.setContractList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 11, value); + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Block.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Block.toObject(opt_includeInstance, this); }; /** - * @param {!proto.protocol.Transaction.Contract=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction.Contract} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Block} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.raw.prototype.addContract = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.protocol.Transaction.Contract, opt_index); +proto.protocol.Block.toObject = function(includeInstance, msg) { + var f, obj = { + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.protocol.Transaction.toObject, includeInstance), + blockHeader: (f = msg.getBlockHeader()) && proto.protocol.BlockHeader.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} -proto.protocol.Transaction.raw.prototype.clearContractList = function() { - this.setContractList([]); +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Block} + */ +proto.protocol.Block.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Block; + return proto.protocol.Block.deserializeBinaryFromReader(msg, reader); }; /** - * optional bytes scripts = 12; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Block} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Block} */ -proto.protocol.Transaction.raw.prototype.getScripts = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +proto.protocol.Block.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.Transaction; + reader.readMessage(value,proto.protocol.Transaction.deserializeBinaryFromReader); + msg.addTransactions(value); + break; + case 2: + var value = new proto.protocol.BlockHeader; + reader.readMessage(value,proto.protocol.BlockHeader.deserializeBinaryFromReader); + msg.setBlockHeader(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes scripts = 12; - * This is a type-conversion wrapper around `getScripts()` - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.protocol.Transaction.raw.prototype.getScripts_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScripts())); +proto.protocol.Block.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Block.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes scripts = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScripts()` - * @return {!Uint8Array} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Block} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.raw.prototype.getScripts_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScripts())); +proto.protocol.Block.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.Transaction.serializeBinaryToWriter + ); + } + f = message.getBlockHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.protocol.BlockHeader.serializeBinaryToWriter + ); + } }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.Transaction.raw.prototype.setScripts = function(value) { - jspb.Message.setProto3BytesField(this, 12, value); +/** + * repeated Transaction transactions = 1; + * @return {!Array.} + */ +proto.protocol.Block.prototype.getTransactionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Block.prototype.setTransactionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional int64 timestamp = 14; - * @return {number} + * @param {!proto.protocol.Transaction=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Transaction} */ -proto.protocol.Transaction.raw.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +proto.protocol.Block.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Transaction, opt_index); }; -/** @param {number} value */ -proto.protocol.Transaction.raw.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 14, value); +proto.protocol.Block.prototype.clearTransactionsList = function() { + this.setTransactionsList([]); }; /** - * optional raw raw_data = 1; - * @return {?proto.protocol.Transaction.raw} + * optional BlockHeader block_header = 2; + * @return {?proto.protocol.BlockHeader} */ -proto.protocol.Transaction.prototype.getRawData = function() { - return /** @type{?proto.protocol.Transaction.raw} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Transaction.raw, 1)); +proto.protocol.Block.prototype.getBlockHeader = function() { + return /** @type{?proto.protocol.BlockHeader} */ ( + jspb.Message.getWrapperField(this, proto.protocol.BlockHeader, 2)); }; -/** @param {?proto.protocol.Transaction.raw|undefined} value */ -proto.protocol.Transaction.prototype.setRawData = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** @param {?proto.protocol.BlockHeader|undefined} value */ +proto.protocol.Block.prototype.setBlockHeader = function(value) { + jspb.Message.setWrapperField(this, 2, value); }; -proto.protocol.Transaction.prototype.clearRawData = function() { - this.setRawData(undefined); +proto.protocol.Block.prototype.clearBlockHeader = function() { + this.setBlockHeader(undefined); }; @@ -4540,92 +8688,157 @@ proto.protocol.Transaction.prototype.clearRawData = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.protocol.Transaction.prototype.hasRawData = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.Block.prototype.hasBlockHeader = function() { + return jspb.Message.getField(this, 2) != null; }; + /** - * repeated bytes signature = 2; - * @return {!(Array|Array)} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.Transaction.prototype.getSignatureList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +proto.protocol.ChainInventory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ChainInventory.repeatedFields_, null); }; - - +goog.inherits(proto.protocol.ChainInventory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ChainInventory.displayName = 'proto.protocol.ChainInventory'; +} /** - * repeated bytes signature = 2; - * This is a type-conversion wrapper around `getSignatureList()` - * @return {!Array.} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.protocol.Transaction.prototype.getSignatureList_asB64 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( - this.getSignatureList())); -}; +proto.protocol.ChainInventory.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated bytes signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignatureList()` - * @return {!Array.} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.protocol.Transaction.prototype.getSignatureList_asU8 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( - this.getSignatureList())); -}; - - -/** @param {!(Array|Array)} value */ -proto.protocol.Transaction.prototype.setSignatureList = function(value) { - jspb.Message.setField(this, 2, value || []); +proto.protocol.ChainInventory.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ChainInventory.toObject(opt_includeInstance, this); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ChainInventory} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transaction.prototype.addSignature = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - +proto.protocol.ChainInventory.toObject = function(includeInstance, msg) { + var f, obj = { + idsList: jspb.Message.toObjectList(msg.getIdsList(), + proto.protocol.ChainInventory.BlockId.toObject, includeInstance), + remainNum: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; -proto.protocol.Transaction.prototype.clearSignatureList = function() { - this.setSignatureList([]); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated Result ret = 5; - * @return {!Array.} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ChainInventory} */ -proto.protocol.Transaction.prototype.getRetList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction.Result, 5)); +proto.protocol.ChainInventory.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ChainInventory; + return proto.protocol.ChainInventory.deserializeBinaryFromReader(msg, reader); }; -/** @param {!Array.} value */ -proto.protocol.Transaction.prototype.setRetList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ChainInventory} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ChainInventory} + */ +proto.protocol.ChainInventory.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.ChainInventory.BlockId; + reader.readMessage(value,proto.protocol.ChainInventory.BlockId.deserializeBinaryFromReader); + msg.addIds(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemainNum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!proto.protocol.Transaction.Result=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction.Result} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.protocol.Transaction.prototype.addRet = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.Transaction.Result, opt_index); +proto.protocol.ChainInventory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ChainInventory.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -proto.protocol.Transaction.prototype.clearRetList = function() { - this.setRetList([]); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ChainInventory} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ChainInventory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.ChainInventory.BlockId.serializeBinaryToWriter + ); + } + f = message.getRemainNum(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; @@ -4640,20 +8853,13 @@ proto.protocol.Transaction.prototype.clearRetList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Transactions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transactions.repeatedFields_, null); +proto.protocol.ChainInventory.BlockId = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Transactions, jspb.Message); +goog.inherits(proto.protocol.ChainInventory.BlockId, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Transactions.displayName = 'proto.protocol.Transactions'; + proto.protocol.ChainInventory.BlockId.displayName = 'proto.protocol.ChainInventory.BlockId'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Transactions.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4667,8 +8873,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Transactions.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transactions.toObject(opt_includeInstance, this); +proto.protocol.ChainInventory.BlockId.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ChainInventory.BlockId.toObject(opt_includeInstance, this); }; @@ -4677,14 +8883,14 @@ proto.protocol.Transactions.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Transactions} msg The msg instance to transform. + * @param {!proto.protocol.ChainInventory.BlockId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Transactions.toObject = function(includeInstance, msg) { +proto.protocol.ChainInventory.BlockId.toObject = function(includeInstance, msg) { var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.protocol.Transaction.toObject, includeInstance) + hash: msg.getHash_asB64(), + number: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -4698,23 +8904,23 @@ proto.protocol.Transactions.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transactions} + * @return {!proto.protocol.ChainInventory.BlockId} */ -proto.protocol.Transactions.deserializeBinary = function(bytes) { +proto.protocol.ChainInventory.BlockId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transactions; - return proto.protocol.Transactions.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.ChainInventory.BlockId; + return proto.protocol.ChainInventory.BlockId.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Transactions} msg The message object to deserialize into. + * @param {!proto.protocol.ChainInventory.BlockId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transactions} + * @return {!proto.protocol.ChainInventory.BlockId} */ -proto.protocol.Transactions.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.ChainInventory.BlockId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4722,9 +8928,12 @@ proto.protocol.Transactions.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.Transaction; - reader.readMessage(value,proto.protocol.Transaction.deserializeBinaryFromReader); - msg.addTransactions(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNumber(value); break; default: reader.skipField(); @@ -4736,64 +8945,139 @@ proto.protocol.Transactions.deserializeBinaryFromReader = function(msg, reader) /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ChainInventory.BlockId.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ChainInventory.BlockId.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ChainInventory.BlockId} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ChainInventory.BlockId.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNumber(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.ChainInventory.BlockId.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.protocol.ChainInventory.BlockId.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.protocol.ChainInventory.BlockId.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.ChainInventory.BlockId.prototype.setHash = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 number = 2; + * @return {number} */ -proto.protocol.Transactions.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transactions.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.ChainInventory.BlockId.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transactions} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transactions.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.protocol.Transaction.serializeBinaryToWriter - ); - } +/** @param {number} value */ +proto.protocol.ChainInventory.BlockId.prototype.setNumber = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * repeated Transaction transactions = 1; - * @return {!Array.} + * repeated BlockId ids = 1; + * @return {!Array.} */ -proto.protocol.Transactions.prototype.getTransactionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction, 1)); +proto.protocol.ChainInventory.prototype.getIdsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.ChainInventory.BlockId, 1)); }; -/** @param {!Array.} value */ -proto.protocol.Transactions.prototype.setTransactionsList = function(value) { +/** @param {!Array.} value */ +proto.protocol.ChainInventory.prototype.setIdsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.protocol.Transaction=} opt_value + * @param {!proto.protocol.ChainInventory.BlockId=} opt_value * @param {number=} opt_index - * @return {!proto.protocol.Transaction} + * @return {!proto.protocol.ChainInventory.BlockId} */ -proto.protocol.Transactions.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Transaction, opt_index); +proto.protocol.ChainInventory.prototype.addIds = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.ChainInventory.BlockId, opt_index); }; -proto.protocol.Transactions.prototype.clearTransactionsList = function() { - this.setTransactionsList([]); +proto.protocol.ChainInventory.prototype.clearIdsList = function() { + this.setIdsList([]); +}; + + +/** + * optional int64 remain_num = 2; + * @return {number} + */ +proto.protocol.ChainInventory.prototype.getRemainNum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.ChainInventory.prototype.setRemainNum = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -4808,13 +9092,20 @@ proto.protocol.Transactions.prototype.clearTransactionsList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockHeader = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.BlockInventory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockInventory.repeatedFields_, null); }; -goog.inherits(proto.protocol.BlockHeader, jspb.Message); +goog.inherits(proto.protocol.BlockInventory, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockHeader.displayName = 'proto.protocol.BlockHeader'; + proto.protocol.BlockInventory.displayName = 'proto.protocol.BlockInventory'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.BlockInventory.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4828,8 +9119,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockHeader.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockHeader.toObject(opt_includeInstance, this); +proto.protocol.BlockInventory.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockInventory.toObject(opt_includeInstance, this); }; @@ -4838,14 +9129,15 @@ proto.protocol.BlockHeader.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockHeader} msg The msg instance to transform. + * @param {!proto.protocol.BlockInventory} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockHeader.toObject = function(includeInstance, msg) { +proto.protocol.BlockInventory.toObject = function(includeInstance, msg) { var f, obj = { - rawData: (f = msg.getRawData()) && proto.protocol.BlockHeader.raw.toObject(includeInstance, f), - witnessSignature: msg.getWitnessSignature_asB64() + idsList: jspb.Message.toObjectList(msg.getIdsList(), + proto.protocol.BlockInventory.BlockId.toObject, includeInstance), + type: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -4859,23 +9151,23 @@ proto.protocol.BlockHeader.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockHeader} + * @return {!proto.protocol.BlockInventory} */ -proto.protocol.BlockHeader.deserializeBinary = function(bytes) { +proto.protocol.BlockInventory.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockHeader; - return proto.protocol.BlockHeader.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockInventory; + return proto.protocol.BlockInventory.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockHeader} msg The message object to deserialize into. + * @param {!proto.protocol.BlockInventory} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockHeader} + * @return {!proto.protocol.BlockInventory} */ -proto.protocol.BlockHeader.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockInventory.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4883,13 +9175,13 @@ proto.protocol.BlockHeader.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.BlockHeader.raw; - reader.readMessage(value,proto.protocol.BlockHeader.raw.deserializeBinaryFromReader); - msg.setRawData(value); + var value = new proto.protocol.BlockInventory.BlockId; + reader.readMessage(value,proto.protocol.BlockInventory.BlockId.deserializeBinaryFromReader); + msg.addIds(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWitnessSignature(value); + var value = /** @type {!proto.protocol.BlockInventory.Type} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -4904,9 +9196,9 @@ proto.protocol.BlockHeader.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockHeader.prototype.serializeBinary = function() { +proto.protocol.BlockInventory.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockHeader.serializeBinaryToWriter(this, writer); + proto.protocol.BlockInventory.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4914,23 +9206,23 @@ proto.protocol.BlockHeader.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockHeader} message + * @param {!proto.protocol.BlockInventory} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockHeader.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockInventory.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRawData(); - if (f != null) { - writer.writeMessage( + f = message.getIdsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.protocol.BlockHeader.raw.serializeBinaryToWriter + proto.protocol.BlockInventory.BlockId.serializeBinaryToWriter ); } - f = message.getWitnessSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 2, f ); @@ -4938,6 +9230,15 @@ proto.protocol.BlockHeader.serializeBinaryToWriter = function(message, writer) { }; +/** + * @enum {number} + */ +proto.protocol.BlockInventory.Type = { + SYNC: 0, + ADVTISE: 1, + FETCH: 2 +}; + /** * Generated by JsPbCodeGenerator. @@ -4949,12 +9250,12 @@ proto.protocol.BlockHeader.serializeBinaryToWriter = function(message, writer) { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockHeader.raw = function(opt_data) { +proto.protocol.BlockInventory.BlockId = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BlockHeader.raw, jspb.Message); +goog.inherits(proto.protocol.BlockInventory.BlockId, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockHeader.raw.displayName = 'proto.protocol.BlockHeader.raw'; + proto.protocol.BlockInventory.BlockId.displayName = 'proto.protocol.BlockInventory.BlockId'; } @@ -4969,8 +9270,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockHeader.raw.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockHeader.raw.toObject(opt_includeInstance, this); +proto.protocol.BlockInventory.BlockId.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockInventory.BlockId.toObject(opt_includeInstance, this); }; @@ -4979,18 +9280,14 @@ proto.protocol.BlockHeader.raw.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockHeader.raw} msg The msg instance to transform. + * @param {!proto.protocol.BlockInventory.BlockId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockHeader.raw.toObject = function(includeInstance, msg) { +proto.protocol.BlockInventory.BlockId.toObject = function(includeInstance, msg) { var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - txtrieroot: msg.getTxtrieroot_asB64(), - parenthash: msg.getParenthash_asB64(), - number: jspb.Message.getFieldWithDefault(msg, 7, 0), - witnessId: jspb.Message.getFieldWithDefault(msg, 8, 0), - witnessAddress: msg.getWitnessAddress_asB64() + hash: msg.getHash_asB64(), + number: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -5004,23 +9301,23 @@ proto.protocol.BlockHeader.raw.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockHeader.raw} + * @return {!proto.protocol.BlockInventory.BlockId} */ -proto.protocol.BlockHeader.raw.deserializeBinary = function(bytes) { +proto.protocol.BlockInventory.BlockId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockHeader.raw; - return proto.protocol.BlockHeader.raw.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockInventory.BlockId; + return proto.protocol.BlockInventory.BlockId.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockHeader.raw} msg The message object to deserialize into. + * @param {!proto.protocol.BlockInventory.BlockId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockHeader.raw} + * @return {!proto.protocol.BlockInventory.BlockId} */ -proto.protocol.BlockHeader.raw.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockInventory.BlockId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5028,29 +9325,13 @@ proto.protocol.BlockHeader.raw.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxtrieroot(value); - break; - case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setParenthash(value); + msg.setHash(value); break; - case 7: + case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setNumber(value); break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setWitnessId(value); - break; - case 9: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWitnessAddress(value); - break; default: reader.skipField(); break; @@ -5064,9 +9345,9 @@ proto.protocol.BlockHeader.raw.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockHeader.raw.prototype.serializeBinary = function() { +proto.protocol.BlockInventory.BlockId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockHeader.raw.serializeBinaryToWriter(this, writer); + proto.protocol.BlockInventory.BlockId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5074,51 +9355,23 @@ proto.protocol.BlockHeader.raw.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockHeader.raw} message + * @param {!proto.protocol.BlockInventory.BlockId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockHeader.raw.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockInventory.BlockId.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getTxtrieroot_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getParenthash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getNumber(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getWitnessId(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getWitnessAddress_asU8(); + f = message.getHash_asU8(); if (f.length > 0) { writer.writeBytes( - 9, + 1, + f + ); + } + f = message.getNumber(); + if (f !== 0) { + writer.writeInt64( + 2, f ); } @@ -5126,233 +9379,324 @@ proto.protocol.BlockHeader.raw.serializeBinaryToWriter = function(message, write /** - * optional int64 timestamp = 1; - * @return {number} - */ -proto.protocol.BlockHeader.raw.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.protocol.BlockHeader.raw.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes txTrieRoot = 2; + * optional bytes hash = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.BlockHeader.raw.prototype.getTxtrieroot = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.BlockInventory.BlockId.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes txTrieRoot = 2; - * This is a type-conversion wrapper around `getTxtrieroot()` + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` * @return {string} */ -proto.protocol.BlockHeader.raw.prototype.getTxtrieroot_asB64 = function() { +proto.protocol.BlockInventory.BlockId.prototype.getHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxtrieroot())); + this.getHash())); }; /** - * optional bytes txTrieRoot = 2; + * optional bytes hash = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxtrieroot()` + * This is a type-conversion wrapper around `getHash()` * @return {!Uint8Array} */ -proto.protocol.BlockHeader.raw.prototype.getTxtrieroot_asU8 = function() { +proto.protocol.BlockInventory.BlockId.prototype.getHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxtrieroot())); + this.getHash())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.BlockHeader.raw.prototype.setTxtrieroot = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +proto.protocol.BlockInventory.BlockId.prototype.setHash = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional bytes parentHash = 3; - * @return {!(string|Uint8Array)} + * optional int64 number = 2; + * @return {number} */ -proto.protocol.BlockHeader.raw.prototype.getParenthash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.BlockInventory.BlockId.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BlockInventory.BlockId.prototype.setNumber = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional bytes parentHash = 3; - * This is a type-conversion wrapper around `getParenthash()` - * @return {string} + * repeated BlockId ids = 1; + * @return {!Array.} */ -proto.protocol.BlockHeader.raw.prototype.getParenthash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getParenthash())); +proto.protocol.BlockInventory.prototype.getIdsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockInventory.BlockId, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.BlockInventory.prototype.setIdsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional bytes parentHash = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getParenthash()` - * @return {!Uint8Array} + * @param {!proto.protocol.BlockInventory.BlockId=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.BlockInventory.BlockId} */ -proto.protocol.BlockHeader.raw.prototype.getParenthash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getParenthash())); +proto.protocol.BlockInventory.prototype.addIds = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.BlockInventory.BlockId, opt_index); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.BlockHeader.raw.prototype.setParenthash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); +proto.protocol.BlockInventory.prototype.clearIdsList = function() { + this.setIdsList([]); }; /** - * optional int64 number = 7; - * @return {number} + * optional Type type = 2; + * @return {!proto.protocol.BlockInventory.Type} */ -proto.protocol.BlockHeader.raw.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.protocol.BlockInventory.prototype.getType = function() { + return /** @type {!proto.protocol.BlockInventory.Type} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {number} value */ -proto.protocol.BlockHeader.raw.prototype.setNumber = function(value) { - jspb.Message.setProto3IntField(this, 7, value); +/** @param {!proto.protocol.BlockInventory.Type} value */ +proto.protocol.BlockInventory.prototype.setType = function(value) { + jspb.Message.setField(this, 2, value); }; + /** - * optional int64 witness_id = 8; - * @return {number} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.BlockHeader.raw.prototype.getWitnessId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.protocol.Inventory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Inventory.repeatedFields_, null); +}; +goog.inherits(proto.protocol.Inventory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Inventory.displayName = 'proto.protocol.Inventory'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.Inventory.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Inventory.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Inventory.toObject(opt_includeInstance, this); }; -/** @param {number} value */ -proto.protocol.BlockHeader.raw.prototype.setWitnessId = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Inventory} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Inventory.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + idsList: msg.getIdsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes witness_address = 9; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Inventory} */ -proto.protocol.BlockHeader.raw.prototype.getWitnessAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.protocol.Inventory.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Inventory; + return proto.protocol.Inventory.deserializeBinaryFromReader(msg, reader); }; /** - * optional bytes witness_address = 9; - * This is a type-conversion wrapper around `getWitnessAddress()` - * @return {string} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Inventory} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Inventory} */ -proto.protocol.BlockHeader.raw.prototype.getWitnessAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWitnessAddress())); +proto.protocol.Inventory.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.protocol.Inventory.InventoryType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes witness_address = 9; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWitnessAddress()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockHeader.raw.prototype.getWitnessAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWitnessAddress())); +proto.protocol.Inventory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Inventory.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.BlockHeader.raw.prototype.setWitnessAddress = function(value) { - jspb.Message.setProto3BytesField(this, 9, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Inventory} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Inventory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } }; /** - * optional raw raw_data = 1; - * @return {?proto.protocol.BlockHeader.raw} + * @enum {number} */ -proto.protocol.BlockHeader.prototype.getRawData = function() { - return /** @type{?proto.protocol.BlockHeader.raw} */ ( - jspb.Message.getWrapperField(this, proto.protocol.BlockHeader.raw, 1)); +proto.protocol.Inventory.InventoryType = { + TRX: 0, + BLOCK: 1 }; - -/** @param {?proto.protocol.BlockHeader.raw|undefined} value */ -proto.protocol.BlockHeader.prototype.setRawData = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** + * optional InventoryType type = 1; + * @return {!proto.protocol.Inventory.InventoryType} + */ +proto.protocol.Inventory.prototype.getType = function() { + return /** @type {!proto.protocol.Inventory.InventoryType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -proto.protocol.BlockHeader.prototype.clearRawData = function() { - this.setRawData(undefined); +/** @param {!proto.protocol.Inventory.InventoryType} value */ +proto.protocol.Inventory.prototype.setType = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * Returns whether this field is set. - * @return {!boolean} + * repeated bytes ids = 2; + * @return {!(Array|Array)} */ -proto.protocol.BlockHeader.prototype.hasRawData = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.Inventory.prototype.getIdsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * optional bytes witness_signature = 2; - * @return {!(string|Uint8Array)} + * repeated bytes ids = 2; + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array.} */ -proto.protocol.BlockHeader.prototype.getWitnessSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.Inventory.prototype.getIdsList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getIdsList())); }; /** - * optional bytes witness_signature = 2; - * This is a type-conversion wrapper around `getWitnessSignature()` - * @return {string} + * repeated bytes ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array.} */ -proto.protocol.BlockHeader.prototype.getWitnessSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWitnessSignature())); +proto.protocol.Inventory.prototype.getIdsList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.Inventory.prototype.setIdsList = function(value) { + jspb.Message.setField(this, 2, value || []); }; /** - * optional bytes witness_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWitnessSignature()` - * @return {!Uint8Array} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index */ -proto.protocol.BlockHeader.prototype.getWitnessSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWitnessSignature())); +proto.protocol.Inventory.prototype.addIds = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.BlockHeader.prototype.setWitnessSignature = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +proto.protocol.Inventory.prototype.clearIdsList = function() { + this.setIdsList([]); }; @@ -5367,19 +9711,19 @@ proto.protocol.BlockHeader.prototype.setWitnessSignature = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.Block = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Block.repeatedFields_, null); +proto.protocol.Items = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Items.repeatedFields_, null); }; -goog.inherits(proto.protocol.Block, jspb.Message); +goog.inherits(proto.protocol.Items, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Block.displayName = 'proto.protocol.Block'; + proto.protocol.Items.displayName = 'proto.protocol.Items'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.protocol.Block.repeatedFields_ = [1]; +proto.protocol.Items.repeatedFields_ = [2,3,4]; @@ -5394,8 +9738,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Block.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Block.toObject(opt_includeInstance, this); +proto.protocol.Items.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Items.toObject(opt_includeInstance, this); }; @@ -5404,15 +9748,19 @@ proto.protocol.Block.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Block} msg The msg instance to transform. + * @param {!proto.protocol.Items} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Block.toObject = function(includeInstance, msg) { +proto.protocol.Items.toObject = function(includeInstance, msg) { var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + blocksList: jspb.Message.toObjectList(msg.getBlocksList(), + proto.protocol.Block.toObject, includeInstance), + blockHeadersList: jspb.Message.toObjectList(msg.getBlockHeadersList(), + proto.protocol.BlockHeader.toObject, includeInstance), transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.protocol.Transaction.toObject, includeInstance), - blockHeader: (f = msg.getBlockHeader()) && proto.protocol.BlockHeader.toObject(includeInstance, f) + proto.protocol.Transaction.toObject, includeInstance) }; if (includeInstance) { @@ -5426,23 +9774,23 @@ proto.protocol.Block.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Block} + * @return {!proto.protocol.Items} */ -proto.protocol.Block.deserializeBinary = function(bytes) { +proto.protocol.Items.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Block; - return proto.protocol.Block.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Items; + return proto.protocol.Items.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Block} msg The message object to deserialize into. + * @param {!proto.protocol.Items} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Block} + * @return {!proto.protocol.Items} */ -proto.protocol.Block.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Items.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5450,14 +9798,23 @@ proto.protocol.Block.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.Transaction; - reader.readMessage(value,proto.protocol.Transaction.deserializeBinaryFromReader); - msg.addTransactions(value); + var value = /** @type {!proto.protocol.Items.ItemType} */ (reader.readEnum()); + msg.setType(value); break; case 2: + var value = new proto.protocol.Block; + reader.readMessage(value,proto.protocol.Block.deserializeBinaryFromReader); + msg.addBlocks(value); + break; + case 3: var value = new proto.protocol.BlockHeader; reader.readMessage(value,proto.protocol.BlockHeader.deserializeBinaryFromReader); - msg.setBlockHeader(value); + msg.addBlockHeaders(value); + break; + case 4: + var value = new proto.protocol.Transaction; + reader.readMessage(value,proto.protocol.Transaction.deserializeBinaryFromReader); + msg.addTransactions(value); break; default: reader.skipField(); @@ -5472,9 +9829,9 @@ proto.protocol.Block.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Block.prototype.serializeBinary = function() { +proto.protocol.Items.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Block.serializeBinaryToWriter(this, writer); + proto.protocol.Items.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5482,89 +9839,161 @@ proto.protocol.Block.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Block} message + * @param {!proto.protocol.Items} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Block.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Items.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransactionsList(); + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getBlocksList(); if (f.length > 0) { writer.writeRepeatedMessage( - 1, + 2, f, - proto.protocol.Transaction.serializeBinaryToWriter + proto.protocol.Block.serializeBinaryToWriter ); } - f = message.getBlockHeader(); - if (f != null) { - writer.writeMessage( - 2, + f = message.getBlockHeadersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, f, proto.protocol.BlockHeader.serializeBinaryToWriter ); } + f = message.getTransactionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.protocol.Transaction.serializeBinaryToWriter + ); + } }; /** - * repeated Transaction transactions = 1; - * @return {!Array.} + * @enum {number} */ -proto.protocol.Block.prototype.getTransactionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction, 1)); +proto.protocol.Items.ItemType = { + ERR: 0, + TRX: 1, + BLOCK: 2, + BLOCKHEADER: 3 +}; + +/** + * optional ItemType type = 1; + * @return {!proto.protocol.Items.ItemType} + */ +proto.protocol.Items.prototype.getType = function() { + return /** @type {!proto.protocol.Items.ItemType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!Array.} value */ -proto.protocol.Block.prototype.setTransactionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {!proto.protocol.Items.ItemType} value */ +proto.protocol.Items.prototype.setType = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * @param {!proto.protocol.Transaction=} opt_value + * repeated Block blocks = 2; + * @return {!Array.} + */ +proto.protocol.Items.prototype.getBlocksList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Block, 2)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Items.prototype.setBlocksList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.protocol.Block=} opt_value * @param {number=} opt_index - * @return {!proto.protocol.Transaction} + * @return {!proto.protocol.Block} */ -proto.protocol.Block.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Transaction, opt_index); +proto.protocol.Items.prototype.addBlocks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Block, opt_index); }; -proto.protocol.Block.prototype.clearTransactionsList = function() { - this.setTransactionsList([]); +proto.protocol.Items.prototype.clearBlocksList = function() { + this.setBlocksList([]); }; /** - * optional BlockHeader block_header = 2; - * @return {?proto.protocol.BlockHeader} + * repeated BlockHeader block_headers = 3; + * @return {!Array.} */ -proto.protocol.Block.prototype.getBlockHeader = function() { - return /** @type{?proto.protocol.BlockHeader} */ ( - jspb.Message.getWrapperField(this, proto.protocol.BlockHeader, 2)); +proto.protocol.Items.prototype.getBlockHeadersList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockHeader, 3)); }; -/** @param {?proto.protocol.BlockHeader|undefined} value */ -proto.protocol.Block.prototype.setBlockHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); +/** @param {!Array.} value */ +proto.protocol.Items.prototype.setBlockHeadersList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.protocol.BlockHeader=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.BlockHeader} + */ +proto.protocol.Items.prototype.addBlockHeaders = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.protocol.BlockHeader, opt_index); +}; + + +proto.protocol.Items.prototype.clearBlockHeadersList = function() { + this.setBlockHeadersList([]); +}; + + +/** + * repeated Transaction transactions = 4; + * @return {!Array.} + */ +proto.protocol.Items.prototype.getTransactionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction, 4)); }; -proto.protocol.Block.prototype.clearBlockHeader = function() { - this.setBlockHeader(undefined); +/** @param {!Array.} value */ +proto.protocol.Items.prototype.setTransactionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * Returns whether this field is set. - * @return {!boolean} + * @param {!proto.protocol.Transaction=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Transaction} */ -proto.protocol.Block.prototype.hasBlockHeader = function() { - return jspb.Message.getField(this, 2) != null; +proto.protocol.Items.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.protocol.Transaction, opt_index); +}; + + +proto.protocol.Items.prototype.clearTransactionsList = function() { + this.setTransactionsList([]); }; @@ -5579,20 +10008,13 @@ proto.protocol.Block.prototype.hasBlockHeader = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.ChainInventory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ChainInventory.repeatedFields_, null); +proto.protocol.DynamicProperties = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.ChainInventory, jspb.Message); +goog.inherits(proto.protocol.DynamicProperties, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.ChainInventory.displayName = 'proto.protocol.ChainInventory'; + proto.protocol.DynamicProperties.displayName = 'proto.protocol.DynamicProperties'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.ChainInventory.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5606,8 +10028,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.ChainInventory.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ChainInventory.toObject(opt_includeInstance, this); +proto.protocol.DynamicProperties.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DynamicProperties.toObject(opt_includeInstance, this); }; @@ -5616,15 +10038,13 @@ proto.protocol.ChainInventory.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.ChainInventory} msg The msg instance to transform. + * @param {!proto.protocol.DynamicProperties} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.ChainInventory.toObject = function(includeInstance, msg) { +proto.protocol.DynamicProperties.toObject = function(includeInstance, msg) { var f, obj = { - idsList: jspb.Message.toObjectList(msg.getIdsList(), - proto.protocol.ChainInventory.BlockId.toObject, includeInstance), - remainNum: jspb.Message.getFieldWithDefault(msg, 2, 0) + lastSolidityBlockNum: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -5638,23 +10058,23 @@ proto.protocol.ChainInventory.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ChainInventory} + * @return {!proto.protocol.DynamicProperties} */ -proto.protocol.ChainInventory.deserializeBinary = function(bytes) { +proto.protocol.DynamicProperties.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ChainInventory; - return proto.protocol.ChainInventory.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.DynamicProperties; + return proto.protocol.DynamicProperties.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.ChainInventory} msg The message object to deserialize into. + * @param {!proto.protocol.DynamicProperties} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ChainInventory} + * @return {!proto.protocol.DynamicProperties} */ -proto.protocol.ChainInventory.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.DynamicProperties.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5662,13 +10082,8 @@ proto.protocol.ChainInventory.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.ChainInventory.BlockId; - reader.readMessage(value,proto.protocol.ChainInventory.BlockId.deserializeBinaryFromReader); - msg.addIds(value); - break; - case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setRemainNum(value); + msg.setLastSolidityBlockNum(value); break; default: reader.skipField(); @@ -5683,9 +10098,9 @@ proto.protocol.ChainInventory.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.ChainInventory.prototype.serializeBinary = function() { +proto.protocol.DynamicProperties.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.ChainInventory.serializeBinaryToWriter(this, writer); + proto.protocol.DynamicProperties.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5693,30 +10108,37 @@ proto.protocol.ChainInventory.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ChainInventory} message + * @param {!proto.protocol.DynamicProperties} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.ChainInventory.serializeBinaryToWriter = function(message, writer) { +proto.protocol.DynamicProperties.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.protocol.ChainInventory.BlockId.serializeBinaryToWriter - ); - } - f = message.getRemainNum(); + f = message.getLastSolidityBlockNum(); if (f !== 0) { writer.writeInt64( - 2, + 1, f ); } }; +/** + * optional int64 last_solidity_block_num = 1; + * @return {number} + */ +proto.protocol.DynamicProperties.prototype.getLastSolidityBlockNum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.DynamicProperties.prototype.setLastSolidityBlockNum = function(value) { + jspb.Message.setField(this, 1, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -5728,12 +10150,12 @@ proto.protocol.ChainInventory.serializeBinaryToWriter = function(message, writer * @extends {jspb.Message} * @constructor */ -proto.protocol.ChainInventory.BlockId = function(opt_data) { +proto.protocol.DisconnectMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.ChainInventory.BlockId, jspb.Message); +goog.inherits(proto.protocol.DisconnectMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.ChainInventory.BlockId.displayName = 'proto.protocol.ChainInventory.BlockId'; + proto.protocol.DisconnectMessage.displayName = 'proto.protocol.DisconnectMessage'; } @@ -5748,8 +10170,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.ChainInventory.BlockId.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ChainInventory.BlockId.toObject(opt_includeInstance, this); +proto.protocol.DisconnectMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DisconnectMessage.toObject(opt_includeInstance, this); }; @@ -5758,14 +10180,13 @@ proto.protocol.ChainInventory.BlockId.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.ChainInventory.BlockId} msg The msg instance to transform. + * @param {!proto.protocol.DisconnectMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.ChainInventory.BlockId.toObject = function(includeInstance, msg) { +proto.protocol.DisconnectMessage.toObject = function(includeInstance, msg) { var f, obj = { - hash: msg.getHash_asB64(), - number: jspb.Message.getFieldWithDefault(msg, 2, 0) + reason: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -5779,23 +10200,23 @@ proto.protocol.ChainInventory.BlockId.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ChainInventory.BlockId} + * @return {!proto.protocol.DisconnectMessage} */ -proto.protocol.ChainInventory.BlockId.deserializeBinary = function(bytes) { +proto.protocol.DisconnectMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ChainInventory.BlockId; - return proto.protocol.ChainInventory.BlockId.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.DisconnectMessage; + return proto.protocol.DisconnectMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.ChainInventory.BlockId} msg The message object to deserialize into. + * @param {!proto.protocol.DisconnectMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ChainInventory.BlockId} + * @return {!proto.protocol.DisconnectMessage} */ -proto.protocol.ChainInventory.BlockId.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.DisconnectMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5803,12 +10224,8 @@ proto.protocol.ChainInventory.BlockId.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumber(value); + var value = /** @type {!proto.protocol.ReasonCode} */ (reader.readEnum()); + msg.setReason(value); break; default: reader.skipField(); @@ -5823,9 +10240,9 @@ proto.protocol.ChainInventory.BlockId.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.ChainInventory.BlockId.prototype.serializeBinary = function() { +proto.protocol.DisconnectMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.ChainInventory.BlockId.serializeBinaryToWriter(this, writer); + proto.protocol.DisconnectMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5833,126 +10250,34 @@ proto.protocol.ChainInventory.BlockId.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ChainInventory.BlockId} message + * @param {!proto.protocol.DisconnectMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.ChainInventory.BlockId.serializeBinaryToWriter = function(message, writer) { +proto.protocol.DisconnectMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getReason(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getNumber(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ChainInventory.BlockId.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes hash = 1; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.protocol.ChainInventory.BlockId.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.protocol.ChainInventory.BlockId.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.ChainInventory.BlockId.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 number = 2; - * @return {number} - */ -proto.protocol.ChainInventory.BlockId.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.protocol.ChainInventory.BlockId.prototype.setNumber = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated BlockId ids = 1; - * @return {!Array.} - */ -proto.protocol.ChainInventory.prototype.getIdsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.ChainInventory.BlockId, 1)); -}; - - -/** @param {!Array.} value */ -proto.protocol.ChainInventory.prototype.setIdsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.protocol.ChainInventory.BlockId=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.ChainInventory.BlockId} - */ -proto.protocol.ChainInventory.prototype.addIds = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.ChainInventory.BlockId, opt_index); -}; - - -proto.protocol.ChainInventory.prototype.clearIdsList = function() { - this.setIdsList([]); }; /** - * optional int64 remain_num = 2; - * @return {number} + * optional ReasonCode reason = 1; + * @return {!proto.protocol.ReasonCode} */ -proto.protocol.ChainInventory.prototype.getRemainNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.DisconnectMessage.prototype.getReason = function() { + return /** @type {!proto.protocol.ReasonCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {number} value */ -proto.protocol.ChainInventory.prototype.setRemainNum = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** @param {!proto.protocol.ReasonCode} value */ +proto.protocol.DisconnectMessage.prototype.setReason = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -5967,20 +10292,13 @@ proto.protocol.ChainInventory.prototype.setRemainNum = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockInventory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockInventory.repeatedFields_, null); +proto.protocol.HelloMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BlockInventory, jspb.Message); +goog.inherits(proto.protocol.HelloMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockInventory.displayName = 'proto.protocol.BlockInventory'; + proto.protocol.HelloMessage.displayName = 'proto.protocol.HelloMessage'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.BlockInventory.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5994,8 +10312,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockInventory.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockInventory.toObject(opt_includeInstance, this); +proto.protocol.HelloMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.HelloMessage.toObject(opt_includeInstance, this); }; @@ -6004,15 +10322,18 @@ proto.protocol.BlockInventory.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockInventory} msg The msg instance to transform. + * @param {!proto.protocol.HelloMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockInventory.toObject = function(includeInstance, msg) { +proto.protocol.HelloMessage.toObject = function(includeInstance, msg) { var f, obj = { - idsList: jspb.Message.toObjectList(msg.getIdsList(), - proto.protocol.BlockInventory.BlockId.toObject, includeInstance), - type: jspb.Message.getFieldWithDefault(msg, 2, 0) + from: (f = msg.getFrom()) && core_Discover_pb.Endpoint.toObject(includeInstance, f), + version: jspb.Message.getFieldWithDefault(msg, 2, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0), + genesisblockid: (f = msg.getGenesisblockid()) && proto.protocol.HelloMessage.BlockId.toObject(includeInstance, f), + solidblockid: (f = msg.getSolidblockid()) && proto.protocol.HelloMessage.BlockId.toObject(includeInstance, f), + headblockid: (f = msg.getHeadblockid()) && proto.protocol.HelloMessage.BlockId.toObject(includeInstance, f) }; if (includeInstance) { @@ -6026,23 +10347,23 @@ proto.protocol.BlockInventory.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockInventory} + * @return {!proto.protocol.HelloMessage} */ -proto.protocol.BlockInventory.deserializeBinary = function(bytes) { +proto.protocol.HelloMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockInventory; - return proto.protocol.BlockInventory.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.HelloMessage; + return proto.protocol.HelloMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockInventory} msg The message object to deserialize into. + * @param {!proto.protocol.HelloMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockInventory} + * @return {!proto.protocol.HelloMessage} */ -proto.protocol.BlockInventory.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.HelloMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6050,13 +10371,32 @@ proto.protocol.BlockInventory.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.BlockInventory.BlockId; - reader.readMessage(value,proto.protocol.BlockInventory.BlockId.deserializeBinaryFromReader); - msg.addIds(value); + var value = new core_Discover_pb.Endpoint; + reader.readMessage(value,core_Discover_pb.Endpoint.deserializeBinaryFromReader); + msg.setFrom(value); break; case 2: - var value = /** @type {!proto.protocol.BlockInventory.Type} */ (reader.readEnum()); - msg.setType(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimestamp(value); + break; + case 4: + var value = new proto.protocol.HelloMessage.BlockId; + reader.readMessage(value,proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader); + msg.setGenesisblockid(value); + break; + case 5: + var value = new proto.protocol.HelloMessage.BlockId; + reader.readMessage(value,proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader); + msg.setSolidblockid(value); + break; + case 6: + var value = new proto.protocol.HelloMessage.BlockId; + reader.readMessage(value,proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader); + msg.setHeadblockid(value); break; default: reader.skipField(); @@ -6071,9 +10411,9 @@ proto.protocol.BlockInventory.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockInventory.prototype.serializeBinary = function() { +proto.protocol.HelloMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockInventory.serializeBinaryToWriter(this, writer); + proto.protocol.HelloMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6081,39 +10421,61 @@ proto.protocol.BlockInventory.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockInventory} message + * @param {!proto.protocol.HelloMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockInventory.serializeBinaryToWriter = function(message, writer) { +proto.protocol.HelloMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getFrom(); + if (f != null) { + writer.writeMessage( 1, f, - proto.protocol.BlockInventory.BlockId.serializeBinaryToWriter + core_Discover_pb.Endpoint.serializeBinaryToWriter ); } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getVersion(); + if (f !== 0) { + writer.writeInt32( 2, f ); } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getGenesisblockid(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter + ); + } + f = message.getSolidblockid(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter + ); + } + f = message.getHeadblockid(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter + ); + } }; -/** - * @enum {number} - */ -proto.protocol.BlockInventory.Type = { - SYNC: 0, - ADVTISE: 1, - FETCH: 2 -}; - /** * Generated by JsPbCodeGenerator. @@ -6125,12 +10487,12 @@ proto.protocol.BlockInventory.Type = { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockInventory.BlockId = function(opt_data) { +proto.protocol.HelloMessage.BlockId = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BlockInventory.BlockId, jspb.Message); +goog.inherits(proto.protocol.HelloMessage.BlockId, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockInventory.BlockId.displayName = 'proto.protocol.BlockInventory.BlockId'; + proto.protocol.HelloMessage.BlockId.displayName = 'proto.protocol.HelloMessage.BlockId'; } @@ -6145,8 +10507,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockInventory.BlockId.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockInventory.BlockId.toObject(opt_includeInstance, this); +proto.protocol.HelloMessage.BlockId.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.HelloMessage.BlockId.toObject(opt_includeInstance, this); }; @@ -6155,11 +10517,11 @@ proto.protocol.BlockInventory.BlockId.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockInventory.BlockId} msg The msg instance to transform. + * @param {!proto.protocol.HelloMessage.BlockId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockInventory.BlockId.toObject = function(includeInstance, msg) { +proto.protocol.HelloMessage.BlockId.toObject = function(includeInstance, msg) { var f, obj = { hash: msg.getHash_asB64(), number: jspb.Message.getFieldWithDefault(msg, 2, 0) @@ -6176,23 +10538,23 @@ proto.protocol.BlockInventory.BlockId.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockInventory.BlockId} + * @return {!proto.protocol.HelloMessage.BlockId} */ -proto.protocol.BlockInventory.BlockId.deserializeBinary = function(bytes) { +proto.protocol.HelloMessage.BlockId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockInventory.BlockId; - return proto.protocol.BlockInventory.BlockId.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.HelloMessage.BlockId; + return proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockInventory.BlockId} msg The message object to deserialize into. + * @param {!proto.protocol.HelloMessage.BlockId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockInventory.BlockId} + * @return {!proto.protocol.HelloMessage.BlockId} */ -proto.protocol.BlockInventory.BlockId.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6220,9 +10582,9 @@ proto.protocol.BlockInventory.BlockId.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockInventory.BlockId.prototype.serializeBinary = function() { +proto.protocol.HelloMessage.BlockId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockInventory.BlockId.serializeBinaryToWriter(this, writer); + proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6230,11 +10592,11 @@ proto.protocol.BlockInventory.BlockId.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockInventory.BlockId} message + * @param {!proto.protocol.HelloMessage.BlockId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockInventory.BlockId.serializeBinaryToWriter = function(message, writer) { +proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHash_asU8(); if (f.length > 0) { @@ -6257,7 +10619,7 @@ proto.protocol.BlockInventory.BlockId.serializeBinaryToWriter = function(message * optional bytes hash = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.BlockInventory.BlockId.prototype.getHash = function() { +proto.protocol.HelloMessage.BlockId.prototype.getHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -6267,7 +10629,7 @@ proto.protocol.BlockInventory.BlockId.prototype.getHash = function() { * This is a type-conversion wrapper around `getHash()` * @return {string} */ -proto.protocol.BlockInventory.BlockId.prototype.getHash_asB64 = function() { +proto.protocol.HelloMessage.BlockId.prototype.getHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getHash())); }; @@ -6280,15 +10642,15 @@ proto.protocol.BlockInventory.BlockId.prototype.getHash_asB64 = function() { * This is a type-conversion wrapper around `getHash()` * @return {!Uint8Array} */ -proto.protocol.BlockInventory.BlockId.prototype.getHash_asU8 = function() { +proto.protocol.HelloMessage.BlockId.prototype.getHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getHash())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.BlockInventory.BlockId.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +proto.protocol.HelloMessage.BlockId.prototype.setHash = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -6296,282 +10658,164 @@ proto.protocol.BlockInventory.BlockId.prototype.setHash = function(value) { * optional int64 number = 2; * @return {number} */ -proto.protocol.BlockInventory.BlockId.prototype.getNumber = function() { +proto.protocol.HelloMessage.BlockId.prototype.getNumber = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.BlockInventory.BlockId.prototype.setNumber = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated BlockId ids = 1; - * @return {!Array.} - */ -proto.protocol.BlockInventory.prototype.getIdsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockInventory.BlockId, 1)); -}; - - -/** @param {!Array.} value */ -proto.protocol.BlockInventory.prototype.setIdsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.protocol.BlockInventory.BlockId=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.BlockInventory.BlockId} - */ -proto.protocol.BlockInventory.prototype.addIds = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.BlockInventory.BlockId, opt_index); -}; - - -proto.protocol.BlockInventory.prototype.clearIdsList = function() { - this.setIdsList([]); -}; - - -/** - * optional Type type = 2; - * @return {!proto.protocol.BlockInventory.Type} - */ -proto.protocol.BlockInventory.prototype.getType = function() { - return /** @type {!proto.protocol.BlockInventory.Type} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {!proto.protocol.BlockInventory.Type} value */ -proto.protocol.BlockInventory.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 2, value); +proto.protocol.HelloMessage.BlockId.prototype.setNumber = function(value) { + jspb.Message.setField(this, 2, value); }; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Inventory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Inventory.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Inventory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.Inventory.displayName = 'proto.protocol.Inventory'; -} /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional Endpoint from = 1; + * @return {?proto.protocol.Endpoint} */ -proto.protocol.Inventory.repeatedFields_ = [2]; +proto.protocol.HelloMessage.prototype.getFrom = function() { + return /** @type{?proto.protocol.Endpoint} */ ( + jspb.Message.getWrapperField(this, core_Discover_pb.Endpoint, 1)); +}; +/** @param {?proto.protocol.Endpoint|undefined} value */ +proto.protocol.HelloMessage.prototype.setFrom = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.HelloMessage.prototype.clearFrom = function() { + this.setFrom(undefined); +}; + -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.Inventory.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Inventory.toObject(opt_includeInstance, this); +proto.protocol.HelloMessage.prototype.hasFrom = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Inventory} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int32 version = 2; + * @return {number} */ -proto.protocol.Inventory.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - idsList: msg.getIdsList_asB64() - }; +proto.protocol.HelloMessage.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {number} value */ +proto.protocol.HelloMessage.prototype.setVersion = function(value) { + jspb.Message.setField(this, 2, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Inventory} + * optional int64 timestamp = 3; + * @return {number} */ -proto.protocol.Inventory.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Inventory; - return proto.protocol.Inventory.deserializeBinaryFromReader(msg, reader); +proto.protocol.HelloMessage.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Inventory} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Inventory} - */ -proto.protocol.Inventory.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.protocol.Inventory.InventoryType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIds(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {number} value */ +proto.protocol.HelloMessage.prototype.setTimestamp = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional BlockId genesisBlockId = 4; + * @return {?proto.protocol.HelloMessage.BlockId} */ -proto.protocol.Inventory.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Inventory.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.HelloMessage.prototype.getGenesisblockid = function() { + return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( + jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 4)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Inventory} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Inventory.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getIdsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } +/** @param {?proto.protocol.HelloMessage.BlockId|undefined} value */ +proto.protocol.HelloMessage.prototype.setGenesisblockid = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +proto.protocol.HelloMessage.prototype.clearGenesisblockid = function() { + this.setGenesisblockid(undefined); }; /** - * @enum {number} + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.Inventory.InventoryType = { - TRX: 0, - BLOCK: 1 +proto.protocol.HelloMessage.prototype.hasGenesisblockid = function() { + return jspb.Message.getField(this, 4) != null; }; + /** - * optional InventoryType type = 1; - * @return {!proto.protocol.Inventory.InventoryType} + * optional BlockId solidBlockId = 5; + * @return {?proto.protocol.HelloMessage.BlockId} */ -proto.protocol.Inventory.prototype.getType = function() { - return /** @type {!proto.protocol.Inventory.InventoryType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.HelloMessage.prototype.getSolidblockid = function() { + return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( + jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 5)); }; -/** @param {!proto.protocol.Inventory.InventoryType} value */ -proto.protocol.Inventory.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); +/** @param {?proto.protocol.HelloMessage.BlockId|undefined} value */ +proto.protocol.HelloMessage.prototype.setSolidblockid = function(value) { + jspb.Message.setWrapperField(this, 5, value); }; -/** - * repeated bytes ids = 2; - * @return {!(Array|Array)} - */ -proto.protocol.Inventory.prototype.getIdsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +proto.protocol.HelloMessage.prototype.clearSolidblockid = function() { + this.setSolidblockid(undefined); }; /** - * repeated bytes ids = 2; - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array.} + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.Inventory.prototype.getIdsList_asB64 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( - this.getIdsList())); +proto.protocol.HelloMessage.prototype.hasSolidblockid = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * repeated bytes ids = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array.} + * optional BlockId headBlockId = 6; + * @return {?proto.protocol.HelloMessage.BlockId} */ -proto.protocol.Inventory.prototype.getIdsList_asU8 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( - this.getIdsList())); +proto.protocol.HelloMessage.prototype.getHeadblockid = function() { + return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( + jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 6)); }; -/** @param {!(Array|Array)} value */ -proto.protocol.Inventory.prototype.setIdsList = function(value) { - jspb.Message.setField(this, 2, value || []); +/** @param {?proto.protocol.HelloMessage.BlockId|undefined} value */ +proto.protocol.HelloMessage.prototype.setHeadblockid = function(value) { + jspb.Message.setWrapperField(this, 6, value); }; -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - */ -proto.protocol.Inventory.prototype.addIds = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.protocol.HelloMessage.prototype.clearHeadblockid = function() { + this.setHeadblockid(undefined); }; -proto.protocol.Inventory.prototype.clearIdsList = function() { - this.setIdsList([]); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.HelloMessage.prototype.hasHeadblockid = function() { + return jspb.Message.getField(this, 6) != null; }; @@ -6586,20 +10830,13 @@ proto.protocol.Inventory.prototype.clearIdsList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Items = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Items.repeatedFields_, null); +proto.protocol.SmartContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Items, jspb.Message); +goog.inherits(proto.protocol.SmartContract, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Items.displayName = 'proto.protocol.Items'; + proto.protocol.SmartContract.displayName = 'proto.protocol.SmartContract'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Items.repeatedFields_ = [2,3,4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -6613,8 +10850,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Items.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Items.toObject(opt_includeInstance, this); +proto.protocol.SmartContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.SmartContract.toObject(opt_includeInstance, this); }; @@ -6623,19 +10860,19 @@ proto.protocol.Items.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Items} msg The msg instance to transform. + * @param {!proto.protocol.SmartContract} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Items.toObject = function(includeInstance, msg) { +proto.protocol.SmartContract.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - blocksList: jspb.Message.toObjectList(msg.getBlocksList(), - proto.protocol.Block.toObject, includeInstance), - blockHeadersList: jspb.Message.toObjectList(msg.getBlockHeadersList(), - proto.protocol.BlockHeader.toObject, includeInstance), - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.protocol.Transaction.toObject, includeInstance) + originAddress: msg.getOriginAddress_asB64(), + contractAddress: msg.getContractAddress_asB64(), + abi: (f = msg.getAbi()) && proto.protocol.SmartContract.ABI.toObject(includeInstance, f), + bytecode: msg.getBytecode_asB64(), + callValue: jspb.Message.getFieldWithDefault(msg, 5, 0), + consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 6, 0), + name: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -6649,23 +10886,23 @@ proto.protocol.Items.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Items} + * @return {!proto.protocol.SmartContract} */ -proto.protocol.Items.deserializeBinary = function(bytes) { +proto.protocol.SmartContract.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Items; - return proto.protocol.Items.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.SmartContract; + return proto.protocol.SmartContract.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Items} msg The message object to deserialize into. + * @param {!proto.protocol.SmartContract} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Items} + * @return {!proto.protocol.SmartContract} */ -proto.protocol.Items.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.SmartContract.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6673,23 +10910,33 @@ proto.protocol.Items.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.protocol.Items.ItemType} */ (reader.readEnum()); - msg.setType(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOriginAddress(value); break; case 2: - var value = new proto.protocol.Block; - reader.readMessage(value,proto.protocol.Block.deserializeBinaryFromReader); - msg.addBlocks(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractAddress(value); + break; + case 3: + var value = new proto.protocol.SmartContract.ABI; + reader.readMessage(value,proto.protocol.SmartContract.ABI.deserializeBinaryFromReader); + msg.setAbi(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBytecode(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCallValue(value); break; - case 3: - var value = new proto.protocol.BlockHeader; - reader.readMessage(value,proto.protocol.BlockHeader.deserializeBinaryFromReader); - msg.addBlockHeaders(value); + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setConsumeUserResourcePercent(value); break; - case 4: - var value = new proto.protocol.Transaction; - reader.readMessage(value,proto.protocol.Transaction.deserializeBinaryFromReader); - msg.addTransactions(value); + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); break; default: reader.skipField(); @@ -6704,9 +10951,9 @@ proto.protocol.Items.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Items.prototype.serializeBinary = function() { +proto.protocol.SmartContract.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Items.serializeBinaryToWriter(this, writer); + proto.protocol.SmartContract.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6714,161 +10961,62 @@ proto.protocol.Items.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Items} message + * @param {!proto.protocol.SmartContract} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Items.serializeBinaryToWriter = function(message, writer) { +proto.protocol.SmartContract.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getOriginAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getBlocksList(); + f = message.getContractAddress_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 2, - f, - proto.protocol.Block.serializeBinaryToWriter + f ); } - f = message.getBlockHeadersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getAbi(); + if (f != null) { + writer.writeMessage( 3, f, - proto.protocol.BlockHeader.serializeBinaryToWriter + proto.protocol.SmartContract.ABI.serializeBinaryToWriter ); } - f = message.getTransactionsList(); + f = message.getBytecode_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 4, - f, - proto.protocol.Transaction.serializeBinaryToWriter + f + ); + } + f = message.getCallValue(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getConsumeUserResourcePercent(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 7, + f ); } -}; - - -/** - * @enum {number} - */ -proto.protocol.Items.ItemType = { - ERR: 0, - TRX: 1, - BLOCK: 2, - BLOCKHEADER: 3 -}; - -/** - * optional ItemType type = 1; - * @return {!proto.protocol.Items.ItemType} - */ -proto.protocol.Items.prototype.getType = function() { - return /** @type {!proto.protocol.Items.ItemType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {!proto.protocol.Items.ItemType} value */ -proto.protocol.Items.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * repeated Block blocks = 2; - * @return {!Array.} - */ -proto.protocol.Items.prototype.getBlocksList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Block, 2)); -}; - - -/** @param {!Array.} value */ -proto.protocol.Items.prototype.setBlocksList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.Block=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Block} - */ -proto.protocol.Items.prototype.addBlocks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Block, opt_index); -}; - - -proto.protocol.Items.prototype.clearBlocksList = function() { - this.setBlocksList([]); -}; - - -/** - * repeated BlockHeader block_headers = 3; - * @return {!Array.} - */ -proto.protocol.Items.prototype.getBlockHeadersList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockHeader, 3)); -}; - - -/** @param {!Array.} value */ -proto.protocol.Items.prototype.setBlockHeadersList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.protocol.BlockHeader=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.BlockHeader} - */ -proto.protocol.Items.prototype.addBlockHeaders = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.protocol.BlockHeader, opt_index); -}; - - -proto.protocol.Items.prototype.clearBlockHeadersList = function() { - this.setBlockHeadersList([]); -}; - - -/** - * repeated Transaction transactions = 4; - * @return {!Array.} - */ -proto.protocol.Items.prototype.getTransactionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction, 4)); -}; - - -/** @param {!Array.} value */ -proto.protocol.Items.prototype.setTransactionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.protocol.Transaction=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction} - */ -proto.protocol.Items.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.protocol.Transaction, opt_index); -}; - - -proto.protocol.Items.prototype.clearTransactionsList = function() { - this.setTransactionsList([]); }; @@ -6883,13 +11031,20 @@ proto.protocol.Items.prototype.clearTransactionsList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.DynamicProperties = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.SmartContract.ABI = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.SmartContract.ABI.repeatedFields_, null); }; -goog.inherits(proto.protocol.DynamicProperties, jspb.Message); +goog.inherits(proto.protocol.SmartContract.ABI, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.DynamicProperties.displayName = 'proto.protocol.DynamicProperties'; + proto.protocol.SmartContract.ABI.displayName = 'proto.protocol.SmartContract.ABI'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.SmartContract.ABI.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -6903,8 +11058,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.DynamicProperties.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DynamicProperties.toObject(opt_includeInstance, this); +proto.protocol.SmartContract.ABI.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.SmartContract.ABI.toObject(opt_includeInstance, this); }; @@ -6913,13 +11068,14 @@ proto.protocol.DynamicProperties.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.DynamicProperties} msg The msg instance to transform. + * @param {!proto.protocol.SmartContract.ABI} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DynamicProperties.toObject = function(includeInstance, msg) { +proto.protocol.SmartContract.ABI.toObject = function(includeInstance, msg) { var f, obj = { - lastSolidityBlockNum: jspb.Message.getFieldWithDefault(msg, 1, 0) + entrysList: jspb.Message.toObjectList(msg.getEntrysList(), + proto.protocol.SmartContract.ABI.Entry.toObject, includeInstance) }; if (includeInstance) { @@ -6933,23 +11089,23 @@ proto.protocol.DynamicProperties.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DynamicProperties} + * @return {!proto.protocol.SmartContract.ABI} */ -proto.protocol.DynamicProperties.deserializeBinary = function(bytes) { +proto.protocol.SmartContract.ABI.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DynamicProperties; - return proto.protocol.DynamicProperties.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.SmartContract.ABI; + return proto.protocol.SmartContract.ABI.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.DynamicProperties} msg The message object to deserialize into. + * @param {!proto.protocol.SmartContract.ABI} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DynamicProperties} + * @return {!proto.protocol.SmartContract.ABI} */ -proto.protocol.DynamicProperties.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.SmartContract.ABI.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6957,8 +11113,9 @@ proto.protocol.DynamicProperties.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLastSolidityBlockNum(value); + var value = new proto.protocol.SmartContract.ABI.Entry; + reader.readMessage(value,proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader); + msg.addEntrys(value); break; default: reader.skipField(); @@ -6973,9 +11130,9 @@ proto.protocol.DynamicProperties.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.DynamicProperties.prototype.serializeBinary = function() { +proto.protocol.SmartContract.ABI.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.DynamicProperties.serializeBinaryToWriter(this, writer); + proto.protocol.SmartContract.ABI.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6983,37 +11140,23 @@ proto.protocol.DynamicProperties.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DynamicProperties} message + * @param {!proto.protocol.SmartContract.ABI} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DynamicProperties.serializeBinaryToWriter = function(message, writer) { +proto.protocol.SmartContract.ABI.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLastSolidityBlockNum(); - if (f !== 0) { - writer.writeInt64( + f = message.getEntrysList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f + f, + proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter ); } }; -/** - * optional int64 last_solidity_block_num = 1; - * @return {number} - */ -proto.protocol.DynamicProperties.prototype.getLastSolidityBlockNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.protocol.DynamicProperties.prototype.setLastSolidityBlockNum = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -7025,13 +11168,20 @@ proto.protocol.DynamicProperties.prototype.setLastSolidityBlockNum = function(va * @extends {jspb.Message} * @constructor */ -proto.protocol.DisconnectMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.SmartContract.ABI.Entry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.SmartContract.ABI.Entry.repeatedFields_, null); }; -goog.inherits(proto.protocol.DisconnectMessage, jspb.Message); +goog.inherits(proto.protocol.SmartContract.ABI.Entry, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.DisconnectMessage.displayName = 'proto.protocol.DisconnectMessage'; + proto.protocol.SmartContract.ABI.Entry.displayName = 'proto.protocol.SmartContract.ABI.Entry'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.SmartContract.ABI.Entry.repeatedFields_ = [4,5]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -7045,8 +11195,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.DisconnectMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DisconnectMessage.toObject(opt_includeInstance, this); +proto.protocol.SmartContract.ABI.Entry.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.SmartContract.ABI.Entry.toObject(opt_includeInstance, this); }; @@ -7055,13 +11205,22 @@ proto.protocol.DisconnectMessage.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.DisconnectMessage} msg The msg instance to transform. + * @param {!proto.protocol.SmartContract.ABI.Entry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DisconnectMessage.toObject = function(includeInstance, msg) { +proto.protocol.SmartContract.ABI.Entry.toObject = function(includeInstance, msg) { var f, obj = { - reason: jspb.Message.getFieldWithDefault(msg, 1, 0) + anonymous: jspb.Message.getFieldWithDefault(msg, 1, false), + constant: jspb.Message.getFieldWithDefault(msg, 2, false), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + inputsList: jspb.Message.toObjectList(msg.getInputsList(), + proto.protocol.SmartContract.ABI.Entry.Param.toObject, includeInstance), + outputsList: jspb.Message.toObjectList(msg.getOutputsList(), + proto.protocol.SmartContract.ABI.Entry.Param.toObject, includeInstance), + type: jspb.Message.getFieldWithDefault(msg, 6, 0), + payable: jspb.Message.getFieldWithDefault(msg, 7, false), + statemutability: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -7075,32 +11234,62 @@ proto.protocol.DisconnectMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DisconnectMessage} + * @return {!proto.protocol.SmartContract.ABI.Entry} */ -proto.protocol.DisconnectMessage.deserializeBinary = function(bytes) { +proto.protocol.SmartContract.ABI.Entry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DisconnectMessage; - return proto.protocol.DisconnectMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.SmartContract.ABI.Entry; + return proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.DisconnectMessage} msg The message object to deserialize into. + * @param {!proto.protocol.SmartContract.ABI.Entry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DisconnectMessage} + * @return {!proto.protocol.SmartContract.ABI.Entry} */ -proto.protocol.DisconnectMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.protocol.ReasonCode} */ (reader.readEnum()); - msg.setReason(value); + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAnonymous(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setConstant(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = new proto.protocol.SmartContract.ABI.Entry.Param; + reader.readMessage(value,proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader); + msg.addInputs(value); + break; + case 5: + var value = new proto.protocol.SmartContract.ABI.Entry.Param; + reader.readMessage(value,proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader); + msg.addOutputs(value); + break; + case 6: + var value = /** @type {!proto.protocol.SmartContract.ABI.Entry.EntryType} */ (reader.readEnum()); + msg.setType(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPayable(value); + break; + case 8: + var value = /** @type {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} */ (reader.readEnum()); + msg.setStatemutability(value); break; default: reader.skipField(); @@ -7115,9 +11304,9 @@ proto.protocol.DisconnectMessage.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.DisconnectMessage.prototype.serializeBinary = function() { +proto.protocol.SmartContract.ABI.Entry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.DisconnectMessage.serializeBinaryToWriter(this, writer); + proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7125,16 +11314,67 @@ proto.protocol.DisconnectMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DisconnectMessage} message + * @param {!proto.protocol.SmartContract.ABI.Entry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DisconnectMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getReason(); + f = message.getAnonymous(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getConstant(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter + ); + } + f = message.getOutputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter + ); + } + f = message.getType(); if (f !== 0.0) { writer.writeEnum( - 1, + 6, + f + ); + } + f = message.getPayable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getStatemutability(); + if (f !== 0.0) { + writer.writeEnum( + 8, f ); } @@ -7142,21 +11382,28 @@ proto.protocol.DisconnectMessage.serializeBinaryToWriter = function(message, wri /** - * optional ReasonCode reason = 1; - * @return {!proto.protocol.ReasonCode} + * @enum {number} */ -proto.protocol.DisconnectMessage.prototype.getReason = function() { - return /** @type {!proto.protocol.ReasonCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.SmartContract.ABI.Entry.EntryType = { + UNKNOWNENTRYTYPE: 0, + CONSTRUCTOR: 1, + FUNCTION: 2, + EVENT: 3, + FALLBACK: 4 }; - -/** @param {!proto.protocol.ReasonCode} value */ -proto.protocol.DisconnectMessage.prototype.setReason = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); +/** + * @enum {number} + */ +proto.protocol.SmartContract.ABI.Entry.StateMutabilityType = { + UNKNOWNMUTABILITYTYPE: 0, + PURE: 1, + VIEW: 2, + NONPAYABLE: 3, + PAYABLE: 4 }; - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -7167,12 +11414,12 @@ proto.protocol.DisconnectMessage.prototype.setReason = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.HelloMessage = function(opt_data) { +proto.protocol.SmartContract.ABI.Entry.Param = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.HelloMessage, jspb.Message); +goog.inherits(proto.protocol.SmartContract.ABI.Entry.Param, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.HelloMessage.displayName = 'proto.protocol.HelloMessage'; + proto.protocol.SmartContract.ABI.Entry.Param.displayName = 'proto.protocol.SmartContract.ABI.Entry.Param'; } @@ -7187,8 +11434,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.HelloMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.HelloMessage.toObject(opt_includeInstance, this); +proto.protocol.SmartContract.ABI.Entry.Param.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.SmartContract.ABI.Entry.Param.toObject(opt_includeInstance, this); }; @@ -7197,18 +11444,15 @@ proto.protocol.HelloMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.HelloMessage} msg The msg instance to transform. + * @param {!proto.protocol.SmartContract.ABI.Entry.Param} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.HelloMessage.toObject = function(includeInstance, msg) { +proto.protocol.SmartContract.ABI.Entry.Param.toObject = function(includeInstance, msg) { var f, obj = { - from: (f = msg.getFrom()) && core_Discover_pb.Endpoint.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 2, 0), - timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0), - genesisblockid: (f = msg.getGenesisblockid()) && proto.protocol.HelloMessage.BlockId.toObject(includeInstance, f), - solidblockid: (f = msg.getSolidblockid()) && proto.protocol.HelloMessage.BlockId.toObject(includeInstance, f), - headblockid: (f = msg.getHeadblockid()) && proto.protocol.HelloMessage.BlockId.toObject(includeInstance, f) + indexed: jspb.Message.getFieldWithDefault(msg, 1, false), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + type: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -7222,23 +11466,23 @@ proto.protocol.HelloMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.HelloMessage} + * @return {!proto.protocol.SmartContract.ABI.Entry.Param} */ -proto.protocol.HelloMessage.deserializeBinary = function(bytes) { +proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.HelloMessage; - return proto.protocol.HelloMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.SmartContract.ABI.Entry.Param; + return proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.HelloMessage} msg The message object to deserialize into. + * @param {!proto.protocol.SmartContract.ABI.Entry.Param} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.HelloMessage} + * @return {!proto.protocol.SmartContract.ABI.Entry.Param} */ -proto.protocol.HelloMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7246,32 +11490,16 @@ proto.protocol.HelloMessage.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new core_Discover_pb.Endpoint; - reader.readMessage(value,core_Discover_pb.Endpoint.deserializeBinaryFromReader); - msg.setFrom(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIndexed(value); break; case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setVersion(value); + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 4: - var value = new proto.protocol.HelloMessage.BlockId; - reader.readMessage(value,proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader); - msg.setGenesisblockid(value); - break; - case 5: - var value = new proto.protocol.HelloMessage.BlockId; - reader.readMessage(value,proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader); - msg.setSolidblockid(value); - break; - case 6: - var value = new proto.protocol.HelloMessage.BlockId; - reader.readMessage(value,proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader); - msg.setHeadblockid(value); + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); break; default: reader.skipField(); @@ -7286,9 +11514,9 @@ proto.protocol.HelloMessage.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.HelloMessage.prototype.serializeBinary = function() { +proto.protocol.SmartContract.ABI.Entry.Param.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.HelloMessage.serializeBinaryToWriter(this, writer); + proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7296,332 +11524,368 @@ proto.protocol.HelloMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.HelloMessage} message + * @param {!proto.protocol.SmartContract.ABI.Entry.Param} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.HelloMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFrom(); - if (f != null) { - writer.writeMessage( + f = message.getIndexed(); + if (f) { + writer.writeBool( 1, - f, - core_Discover_pb.Endpoint.serializeBinaryToWriter + f ); } - f = message.getVersion(); - if (f !== 0) { - writer.writeInt32( + f = message.getName(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( + f = message.getType(); + if (f.length > 0) { + writer.writeString( 3, f ); } - f = message.getGenesisblockid(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter - ); - } - f = message.getSolidblockid(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter - ); - } - f = message.getHeadblockid(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter - ); - } }; +/** + * optional bool indexed = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.SmartContract.ABI.Entry.Param.prototype.getIndexed = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.SmartContract.ABI.Entry.Param.prototype.setIndexed = function(value) { + jspb.Message.setField(this, 1, value); +}; + /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional string name = 2; + * @return {string} */ -proto.protocol.HelloMessage.BlockId = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.SmartContract.ABI.Entry.Param.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.protocol.SmartContract.ABI.Entry.Param.prototype.setName = function(value) { + jspb.Message.setField(this, 2, value); }; -goog.inherits(proto.protocol.HelloMessage.BlockId, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.HelloMessage.BlockId.displayName = 'proto.protocol.HelloMessage.BlockId'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * optional string type = 3; + * @return {string} */ -proto.protocol.HelloMessage.BlockId.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.HelloMessage.BlockId.toObject(opt_includeInstance, this); +proto.protocol.SmartContract.ABI.Entry.Param.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.protocol.SmartContract.ABI.Entry.Param.prototype.setType = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.HelloMessage.BlockId} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bool anonymous = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.SmartContract.ABI.Entry.prototype.getAnonymous = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.SmartContract.ABI.Entry.prototype.setAnonymous = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bool constant = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.SmartContract.ABI.Entry.prototype.getConstant = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.SmartContract.ABI.Entry.prototype.setConstant = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} */ -proto.protocol.HelloMessage.BlockId.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - number: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; +proto.protocol.SmartContract.ABI.Entry.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {string} value */ +proto.protocol.SmartContract.ABI.Entry.prototype.setName = function(value) { + jspb.Message.setField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.HelloMessage.BlockId} + * repeated Param inputs = 4; + * @return {!Array.} */ -proto.protocol.HelloMessage.BlockId.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.HelloMessage.BlockId; - return proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader(msg, reader); +proto.protocol.SmartContract.ABI.Entry.prototype.getInputsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.SmartContract.ABI.Entry.Param, 4)); +}; + + +/** @param {!Array.} value */ +proto.protocol.SmartContract.ABI.Entry.prototype.setInputsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.HelloMessage.BlockId} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.HelloMessage.BlockId} + * @param {!proto.protocol.SmartContract.ABI.Entry.Param=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.SmartContract.ABI.Entry.Param} */ -proto.protocol.HelloMessage.BlockId.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumber(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.protocol.SmartContract.ABI.Entry.prototype.addInputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.protocol.SmartContract.ABI.Entry.Param, opt_index); +}; + + +proto.protocol.SmartContract.ABI.Entry.prototype.clearInputsList = function() { + this.setInputsList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated Param outputs = 5; + * @return {!Array.} */ -proto.protocol.HelloMessage.BlockId.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.SmartContract.ABI.Entry.prototype.getOutputsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.SmartContract.ABI.Entry.Param, 5)); +}; + + +/** @param {!Array.} value */ +proto.protocol.SmartContract.ABI.Entry.prototype.setOutputsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 5, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.HelloMessage.BlockId} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!proto.protocol.SmartContract.ABI.Entry.Param=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.SmartContract.ABI.Entry.Param} */ -proto.protocol.HelloMessage.BlockId.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNumber(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } +proto.protocol.SmartContract.ABI.Entry.prototype.addOutputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.SmartContract.ABI.Entry.Param, opt_index); +}; + + +proto.protocol.SmartContract.ABI.Entry.prototype.clearOutputsList = function() { + this.setOutputsList([]); }; /** - * optional bytes hash = 1; - * @return {!(string|Uint8Array)} + * optional EntryType type = 6; + * @return {!proto.protocol.SmartContract.ABI.Entry.EntryType} */ -proto.protocol.HelloMessage.BlockId.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.SmartContract.ABI.Entry.prototype.getType = function() { + return /** @type {!proto.protocol.SmartContract.ABI.Entry.EntryType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {!proto.protocol.SmartContract.ABI.Entry.EntryType} value */ +proto.protocol.SmartContract.ABI.Entry.prototype.setType = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * optional bytes hash = 1; - * This is a type-conversion wrapper around `getHash()` - * @return {string} + * optional bool payable = 7; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.protocol.HelloMessage.BlockId.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); +proto.protocol.SmartContract.ABI.Entry.prototype.getPayable = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 7, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.SmartContract.ABI.Entry.prototype.setPayable = function(value) { + jspb.Message.setField(this, 7, value); }; /** - * optional bytes hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} + * optional StateMutabilityType stateMutability = 8; + * @return {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} */ -proto.protocol.HelloMessage.BlockId.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); +proto.protocol.SmartContract.ABI.Entry.prototype.getStatemutability = function() { + return /** @type {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.HelloMessage.BlockId.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +/** @param {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} value */ +proto.protocol.SmartContract.ABI.Entry.prototype.setStatemutability = function(value) { + jspb.Message.setField(this, 8, value); }; /** - * optional int64 number = 2; - * @return {number} + * repeated Entry entrys = 1; + * @return {!Array.} */ -proto.protocol.HelloMessage.BlockId.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.SmartContract.ABI.prototype.getEntrysList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.SmartContract.ABI.Entry, 1)); }; -/** @param {number} value */ -proto.protocol.HelloMessage.BlockId.prototype.setNumber = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** @param {!Array.} value */ +proto.protocol.SmartContract.ABI.prototype.setEntrysList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional Endpoint from = 1; - * @return {?proto.protocol.Endpoint} + * @param {!proto.protocol.SmartContract.ABI.Entry=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.SmartContract.ABI.Entry} */ -proto.protocol.HelloMessage.prototype.getFrom = function() { - return /** @type{?proto.protocol.Endpoint} */ ( - jspb.Message.getWrapperField(this, core_Discover_pb.Endpoint, 1)); +proto.protocol.SmartContract.ABI.prototype.addEntrys = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.SmartContract.ABI.Entry, opt_index); }; -/** @param {?proto.protocol.Endpoint|undefined} value */ -proto.protocol.HelloMessage.prototype.setFrom = function(value) { - jspb.Message.setWrapperField(this, 1, value); +proto.protocol.SmartContract.ABI.prototype.clearEntrysList = function() { + this.setEntrysList([]); }; -proto.protocol.HelloMessage.prototype.clearFrom = function() { - this.setFrom(undefined); +/** + * optional bytes origin_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.SmartContract.prototype.getOriginAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {!boolean} + * optional bytes origin_address = 1; + * This is a type-conversion wrapper around `getOriginAddress()` + * @return {string} */ -proto.protocol.HelloMessage.prototype.hasFrom = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.SmartContract.prototype.getOriginAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOriginAddress())); }; /** - * optional int32 version = 2; - * @return {number} + * optional bytes origin_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOriginAddress()` + * @return {!Uint8Array} */ -proto.protocol.HelloMessage.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.SmartContract.prototype.getOriginAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOriginAddress())); }; -/** @param {number} value */ -proto.protocol.HelloMessage.prototype.setVersion = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.SmartContract.prototype.setOriginAddress = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 timestamp = 3; - * @return {number} + * optional bytes contract_address = 2; + * @return {!(string|Uint8Array)} */ -proto.protocol.HelloMessage.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.protocol.SmartContract.prototype.getContractAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.protocol.HelloMessage.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +/** + * optional bytes contract_address = 2; + * This is a type-conversion wrapper around `getContractAddress()` + * @return {string} + */ +proto.protocol.SmartContract.prototype.getContractAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractAddress())); }; /** - * optional BlockId genesisBlockId = 4; - * @return {?proto.protocol.HelloMessage.BlockId} + * optional bytes contract_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractAddress()` + * @return {!Uint8Array} */ -proto.protocol.HelloMessage.prototype.getGenesisblockid = function() { - return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 4)); +proto.protocol.SmartContract.prototype.getContractAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractAddress())); }; -/** @param {?proto.protocol.HelloMessage.BlockId|undefined} value */ -proto.protocol.HelloMessage.prototype.setGenesisblockid = function(value) { - jspb.Message.setWrapperField(this, 4, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.SmartContract.prototype.setContractAddress = function(value) { + jspb.Message.setField(this, 2, value); }; -proto.protocol.HelloMessage.prototype.clearGenesisblockid = function() { - this.setGenesisblockid(undefined); +/** + * optional ABI abi = 3; + * @return {?proto.protocol.SmartContract.ABI} + */ +proto.protocol.SmartContract.prototype.getAbi = function() { + return /** @type{?proto.protocol.SmartContract.ABI} */ ( + jspb.Message.getWrapperField(this, proto.protocol.SmartContract.ABI, 3)); +}; + + +/** @param {?proto.protocol.SmartContract.ABI|undefined} value */ +proto.protocol.SmartContract.prototype.setAbi = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.protocol.SmartContract.prototype.clearAbi = function() { + this.setAbi(undefined); }; @@ -7629,68 +11893,92 @@ proto.protocol.HelloMessage.prototype.clearGenesisblockid = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.protocol.HelloMessage.prototype.hasGenesisblockid = function() { - return jspb.Message.getField(this, 4) != null; +proto.protocol.SmartContract.prototype.hasAbi = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional BlockId solidBlockId = 5; - * @return {?proto.protocol.HelloMessage.BlockId} + * optional bytes bytecode = 4; + * @return {!(string|Uint8Array)} */ -proto.protocol.HelloMessage.prototype.getSolidblockid = function() { - return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 5)); +proto.protocol.SmartContract.prototype.getBytecode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; -/** @param {?proto.protocol.HelloMessage.BlockId|undefined} value */ -proto.protocol.HelloMessage.prototype.setSolidblockid = function(value) { - jspb.Message.setWrapperField(this, 5, value); +/** + * optional bytes bytecode = 4; + * This is a type-conversion wrapper around `getBytecode()` + * @return {string} + */ +proto.protocol.SmartContract.prototype.getBytecode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytecode())); }; -proto.protocol.HelloMessage.prototype.clearSolidblockid = function() { - this.setSolidblockid(undefined); +/** + * optional bytes bytecode = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytecode()` + * @return {!Uint8Array} + */ +proto.protocol.SmartContract.prototype.getBytecode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytecode())); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.HelloMessage.prototype.hasSolidblockid = function() { - return jspb.Message.getField(this, 5) != null; +/** @param {!(string|Uint8Array)} value */ +proto.protocol.SmartContract.prototype.setBytecode = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * optional BlockId headBlockId = 6; - * @return {?proto.protocol.HelloMessage.BlockId} + * optional int64 call_value = 5; + * @return {number} */ -proto.protocol.HelloMessage.prototype.getHeadblockid = function() { - return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 6)); +proto.protocol.SmartContract.prototype.getCallValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {?proto.protocol.HelloMessage.BlockId|undefined} value */ -proto.protocol.HelloMessage.prototype.setHeadblockid = function(value) { - jspb.Message.setWrapperField(this, 6, value); +/** @param {number} value */ +proto.protocol.SmartContract.prototype.setCallValue = function(value) { + jspb.Message.setField(this, 5, value); }; -proto.protocol.HelloMessage.prototype.clearHeadblockid = function() { - this.setHeadblockid(undefined); +/** + * optional int64 consume_user_resource_percent = 6; + * @return {number} + */ +proto.protocol.SmartContract.prototype.getConsumeUserResourcePercent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.protocol.SmartContract.prototype.setConsumeUserResourcePercent = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * Returns whether this field is set. - * @return {!boolean} + * optional string name = 7; + * @return {string} */ -proto.protocol.HelloMessage.prototype.hasHeadblockid = function() { - return jspb.Message.getField(this, 6) != null; +proto.protocol.SmartContract.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.protocol.SmartContract.prototype.setName = function(value) { + jspb.Message.setField(this, 7, value); }; @@ -7729,6 +12017,7 @@ proto.protocol.ReasonCode = { INCOMPATIBLE_CHAIN: 25, TIME_OUT: 32, CONNECT_FAIL: 33, + TOO_MANY_PEERS_WITH_SAME_IP: 34, UNKNOWN: 255 }; From f0eccb4e5c1345122bb62b5e167402d49117098a Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Thu, 20 Sep 2018 23:48:38 +0200 Subject: [PATCH 02/15] v0.3.0-tvm --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 17a1b3f..bcec8e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tronscan/client", - "version": "0.2.12", + "version": "0.3.0-tvm", "description": "Tronscan API Client", "main": "src/index.js", "homepage": "https://api.tronscan.org/", From f57022b759b40a978f9d2c411330e426ccb60999 Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Thu, 20 Sep 2018 23:50:39 +0200 Subject: [PATCH 03/15] v0.3.1-tvm --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bcec8e3..8ce4cf7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tronscan/client", - "version": "0.3.0-tvm", + "version": "0.3.1-tvm", "description": "Tronscan API Client", "main": "src/index.js", "homepage": "https://api.tronscan.org/", From 3e7f07ab562351ebf2eecaf533289a859cf1a8c7 Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Sat, 1 Dec 2018 17:00:34 +0800 Subject: [PATCH 04/15] update protobufs --- protobuf/api/api.proto | 91 ++- protobuf/core/Contract.proto | 23 + protobuf/core/Tron.proto | 46 +- src/protocol/core/Contract_pb.js | 941 ++++++++++++++++++++++ src/protocol/core/Tron_pb.js | 1262 ++++++++++++++++++++++++++---- 5 files changed, 2213 insertions(+), 150 deletions(-) diff --git a/protobuf/api/api.proto b/protobuf/api/api.proto index a84e460..2373631 100644 --- a/protobuf/api/api.proto +++ b/protobuf/api/api.proto @@ -415,7 +415,15 @@ service Wallet { } }; }; - + rpc GetPaginatedProposalList (PaginatedMessage) returns (ProposalList) { + option (google.api.http) = { + post: "/wallet/getpaginatedproposallist" + body: "*" + additional_bindings { + get: "/wallet/getpaginatedproposallist" + } + }; + } rpc GetProposalById (BytesMessage) returns (Proposal) { option (google.api.http) = { post: "/wallet/getproposalbyid" @@ -435,7 +443,15 @@ service Wallet { } }; }; - + rpc GetPaginatedExchangeList (PaginatedMessage) returns (ExchangeList) { + option (google.api.http) = { + post: "/wallet/getpaginatedexchangelist" + body: "*" + additional_bindings { + get: "/wallet/getpaginatedexchangelist" + } + }; + } rpc GetExchangeById (BytesMessage) returns (Exchange) { option (google.api.http) = { post: "/wallet/getexchangebyid" @@ -474,6 +490,8 @@ service Wallet { } }; } + + rpc TotalTransaction (EmptyMessage) returns (NumberMessage) { option (google.api.http) = { post: "/wallet/totaltransaction" @@ -558,6 +576,54 @@ service Wallet { } }; } + + rpc AccountPermissionUpdate (AccountPermissionUpdateContract) returns (TransactionExtention) { + option (google.api.http) = { + post: "/wallet/accountpermissionupdate" + body: "*" + additional_bindings { + get: "/wallet/accountpermissionupdate" + } + }; + } + + rpc PermissionAddKey (PermissionAddKeyContract) returns (TransactionExtention) { + option (google.api.http) = { + post: "/wallet/permissionaddkey" + body: "*" + additional_bindings { + get: "/wallet/permissionaddkey" + } + }; + } + + rpc PermissionUpdateKey (PermissionUpdateKeyContract) returns (TransactionExtention) { + option (google.api.http) = { + post: "/wallet/permissionupdatekey" + body: "*" + additional_bindings { + get: "/wallet/permissionupdatekey" + } + }; + } + + rpc PermissionDeleteKey (PermissionDeleteKeyContract) returns (TransactionExtention) { + option (google.api.http) = { + post: "/wallet/permissiondeletekey" + body: "*" + additional_bindings { + get: "/wallet/permissiondeletekey" + } + }; + } + + rpc AddSign (TransactionSign) returns (TransactionExtention) { + + } + + rpc GetTransactionSignWeight (Transaction) returns (TransactionSignWeight) { + + } }; @@ -887,4 +953,25 @@ message BlockListExtention { message TransactionListExtention { repeated TransactionExtention transaction = 1; +} + +message TransactionSignWeight { + message Result { + enum response_code { + ENOUGH_PERMISSION = 0; + NOT_ENOUGH_PERMISSION = 1; // error in + SIGNATURE_FORMAT_ERROR = 2; + COMPUTE_ADDRESS_ERROR = 3; + PERMISSION_ERROR = 4; //The key is not in permission + OTHER_ERROR = 20; + } + response_code code = 1; + string message = 2; + } + + Permission permission = 1; + repeated bytes approved_list = 2; + int64 current_weight = 3; + Result result = 4; + TransactionExtention transaction = 5; } \ No newline at end of file diff --git a/protobuf/core/Contract.proto b/protobuf/core/Contract.proto index 18eafde..6704bbf 100644 --- a/protobuf/core/Contract.proto +++ b/protobuf/core/Contract.proto @@ -226,4 +226,27 @@ message ExchangeTransactionContract { bytes token_id = 3; int64 quant = 4; int64 expected = 5; +} + +message AccountPermissionUpdateContract { + bytes owner_address = 1; + repeated Permission permissions = 2; +} + +message PermissionAddKeyContract { + bytes owner_address = 1; + Key key = 2; + string permission_name = 3; +} + +message PermissionUpdateKeyContract { + bytes owner_address = 1; + Key key = 2; + string permission_name = 3; +} + +message PermissionDeleteKeyContract { + bytes owner_address = 1; + bytes key_address = 2; + string permission_name = 3; } \ No newline at end of file diff --git a/protobuf/core/Tron.proto b/protobuf/core/Tron.proto index 38c4f3a..a9543cf 100644 --- a/protobuf/core/Tron.proto +++ b/protobuf/core/Tron.proto @@ -129,18 +129,30 @@ message Account { int64 latest_exchange_storage_time = 8; } AccountResource account_resource = 26; - bytes codeHash = 30; + repeated Permission permissions = 31; } -message authority { - AccountId account = 1; - bytes permission_name = 2; +message Key { + bytes address = 1; + int64 weight = 2; +} + +message Permission { + string name = 1; + int64 threshold = 2; + string parent = 3; + repeated Key keys = 4; } -message permission { +message authority { AccountId account = 1; + bytes permission_name = 2; } +// +//message permission { +// AccountId account = 1; +//} // Witness message Witness { @@ -227,6 +239,10 @@ message Transaction { ExchangeInjectContract = 42; ExchangeWithdrawContract = 43; ExchangeTransactionContract = 44; + AccountPermissionUpdateContract = 45; + PermissionAddKeyContract = 46; + PermissionUpdateKeyContract = 47; + PermissionDeleteKeyContract = 48; } ContractType type = 1; google.protobuf.Any parameter = 2; @@ -308,6 +324,7 @@ message TransactionInfo { int64 withdraw_amount = 15; int64 unfreeze_amount = 16; + repeated InternalTransaction internal_transactions = 17; } message Transactions { @@ -482,4 +499,23 @@ message SmartContract { int64 consume_user_resource_percent = 6; string name = 7; +} + +message InternalTransaction { + // internalTransaction identity, the root InternalTransaction hash + // should equals to root transaction id. + bytes hash = 1; + // the one send trx (TBD: or token) via function + bytes caller_address = 2; + // the one recieve trx (TBD: or token) via function + bytes transferTo_address = 3; + message CallValueInfo{ + // trx (TBD: or token) value + int64 callValue = 1; + // TBD: tokenName, trx should be empty + bytes tokenName = 2; + } + repeated CallValueInfo callValueInfo = 4; + bytes note = 5; + bool rejected = 6; } \ No newline at end of file diff --git a/src/protocol/core/Contract_pb.js b/src/protocol/core/Contract_pb.js index 79e1586..11d6be9 100644 --- a/src/protocol/core/Contract_pb.js +++ b/src/protocol/core/Contract_pb.js @@ -13,6 +13,7 @@ var global = Function('return this')(); var core_Tron_pb = require('../core/Tron_pb.js'); goog.exportSymbol('proto.protocol.AccountCreateContract', null, global); +goog.exportSymbol('proto.protocol.AccountPermissionUpdateContract', null, global); goog.exportSymbol('proto.protocol.AccountUpdateContract', null, global); goog.exportSymbol('proto.protocol.AssetIssueContract', null, global); goog.exportSymbol('proto.protocol.AssetIssueContract.FrozenSupply', null, global); @@ -25,6 +26,9 @@ goog.exportSymbol('proto.protocol.ExchangeTransactionContract', null, global); goog.exportSymbol('proto.protocol.ExchangeWithdrawContract', null, global); goog.exportSymbol('proto.protocol.FreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.ParticipateAssetIssueContract', null, global); +goog.exportSymbol('proto.protocol.PermissionAddKeyContract', null, global); +goog.exportSymbol('proto.protocol.PermissionDeleteKeyContract', null, global); +goog.exportSymbol('proto.protocol.PermissionUpdateKeyContract', null, global); goog.exportSymbol('proto.protocol.ProposalApproveContract', null, global); goog.exportSymbol('proto.protocol.ProposalCreateContract', null, global); goog.exportSymbol('proto.protocol.ProposalDeleteContract', null, global); @@ -7808,6 +7812,943 @@ proto.protocol.ExchangeTransactionContract.prototype.setExpected = function(valu }; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.AccountPermissionUpdateContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AccountPermissionUpdateContract.repeatedFields_, null); +}; +goog.inherits(proto.protocol.AccountPermissionUpdateContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.AccountPermissionUpdateContract.displayName = 'proto.protocol.AccountPermissionUpdateContract'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.AccountPermissionUpdateContract.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountPermissionUpdateContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.AccountPermissionUpdateContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountPermissionUpdateContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + core_Tron_pb.Permission.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.AccountPermissionUpdateContract} + */ +proto.protocol.AccountPermissionUpdateContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.AccountPermissionUpdateContract; + return proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.AccountPermissionUpdateContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.AccountPermissionUpdateContract} + */ +proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = new core_Tron_pb.Permission; + reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); + msg.addPermissions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.AccountPermissionUpdateContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + core_Tron_pb.Permission.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.AccountPermissionUpdateContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * repeated Permission permissions = 2; + * @return {!Array.} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.getPermissionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Permission, 2)); +}; + + +/** @param {!Array.} value */ +proto.protocol.AccountPermissionUpdateContract.prototype.setPermissionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.protocol.Permission=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Permission} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Permission, opt_index); +}; + + +proto.protocol.AccountPermissionUpdateContract.prototype.clearPermissionsList = function() { + this.setPermissionsList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.PermissionAddKeyContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.PermissionAddKeyContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.PermissionAddKeyContract.displayName = 'proto.protocol.PermissionAddKeyContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.PermissionAddKeyContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PermissionAddKeyContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.PermissionAddKeyContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionAddKeyContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + key: (f = msg.getKey()) && core_Tron_pb.Key.toObject(includeInstance, f), + permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.PermissionAddKeyContract} + */ +proto.protocol.PermissionAddKeyContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.PermissionAddKeyContract; + return proto.protocol.PermissionAddKeyContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.PermissionAddKeyContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.PermissionAddKeyContract} + */ +proto.protocol.PermissionAddKeyContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = new core_Tron_pb.Key; + reader.readMessage(value,core_Tron_pb.Key.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPermissionName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.PermissionAddKeyContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.PermissionAddKeyContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.PermissionAddKeyContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionAddKeyContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + core_Tron_pb.Key.serializeBinaryToWriter + ); + } + f = message.getPermissionName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.PermissionAddKeyContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Key key = 2; + * @return {?proto.protocol.Key} + */ +proto.protocol.PermissionAddKeyContract.prototype.getKey = function() { + return /** @type{?proto.protocol.Key} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Key, 2)); +}; + + +/** @param {?proto.protocol.Key|undefined} value */ +proto.protocol.PermissionAddKeyContract.prototype.setKey = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.PermissionAddKeyContract.prototype.clearKey = function() { + this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.PermissionAddKeyContract.prototype.hasKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string permission_name = 3; + * @return {string} + */ +proto.protocol.PermissionAddKeyContract.prototype.getPermissionName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.protocol.PermissionAddKeyContract.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.PermissionUpdateKeyContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.PermissionUpdateKeyContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.PermissionUpdateKeyContract.displayName = 'proto.protocol.PermissionUpdateKeyContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PermissionUpdateKeyContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.PermissionUpdateKeyContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionUpdateKeyContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + key: (f = msg.getKey()) && core_Tron_pb.Key.toObject(includeInstance, f), + permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.PermissionUpdateKeyContract} + */ +proto.protocol.PermissionUpdateKeyContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.PermissionUpdateKeyContract; + return proto.protocol.PermissionUpdateKeyContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.PermissionUpdateKeyContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.PermissionUpdateKeyContract} + */ +proto.protocol.PermissionUpdateKeyContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = new core_Tron_pb.Key; + reader.readMessage(value,core_Tron_pb.Key.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPermissionName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.PermissionUpdateKeyContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.PermissionUpdateKeyContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionUpdateKeyContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + core_Tron_pb.Key.serializeBinaryToWriter + ); + } + f = message.getPermissionName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.PermissionUpdateKeyContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Key key = 2; + * @return {?proto.protocol.Key} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getKey = function() { + return /** @type{?proto.protocol.Key} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Key, 2)); +}; + + +/** @param {?proto.protocol.Key|undefined} value */ +proto.protocol.PermissionUpdateKeyContract.prototype.setKey = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.PermissionUpdateKeyContract.prototype.clearKey = function() { + this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.hasKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string permission_name = 3; + * @return {string} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getPermissionName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.protocol.PermissionUpdateKeyContract.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.PermissionDeleteKeyContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.PermissionDeleteKeyContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.PermissionDeleteKeyContract.displayName = 'proto.protocol.PermissionDeleteKeyContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PermissionDeleteKeyContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.PermissionDeleteKeyContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionDeleteKeyContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + keyAddress: msg.getKeyAddress_asB64(), + permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.PermissionDeleteKeyContract} + */ +proto.protocol.PermissionDeleteKeyContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.PermissionDeleteKeyContract; + return proto.protocol.PermissionDeleteKeyContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.PermissionDeleteKeyContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.PermissionDeleteKeyContract} + */ +proto.protocol.PermissionDeleteKeyContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKeyAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPermissionName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.PermissionDeleteKeyContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.PermissionDeleteKeyContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionDeleteKeyContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKeyAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPermissionName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.PermissionDeleteKeyContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes key_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes key_address = 2; + * This is a type-conversion wrapper around `getKeyAddress()` + * @return {string} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKeyAddress())); +}; + + +/** + * optional bytes key_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeyAddress()` + * @return {!Uint8Array} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKeyAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.PermissionDeleteKeyContract.prototype.setKeyAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string permission_name = 3; + * @return {string} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getPermissionName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.protocol.PermissionDeleteKeyContract.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 3, value); +}; + + /** * @enum {number} */ diff --git a/src/protocol/core/Tron_pb.js b/src/protocol/core/Tron_pb.js index d9f54f7..6425585 100644 --- a/src/protocol/core/Tron_pb.js +++ b/src/protocol/core/Tron_pb.js @@ -33,10 +33,14 @@ goog.exportSymbol('proto.protocol.DynamicProperties', null, global); goog.exportSymbol('proto.protocol.Exchange', null, global); goog.exportSymbol('proto.protocol.HelloMessage', null, global); goog.exportSymbol('proto.protocol.HelloMessage.BlockId', null, global); +goog.exportSymbol('proto.protocol.InternalTransaction', null, global); +goog.exportSymbol('proto.protocol.InternalTransaction.CallValueInfo', null, global); goog.exportSymbol('proto.protocol.Inventory', null, global); goog.exportSymbol('proto.protocol.Inventory.InventoryType', null, global); goog.exportSymbol('proto.protocol.Items', null, global); goog.exportSymbol('proto.protocol.Items.ItemType', null, global); +goog.exportSymbol('proto.protocol.Key', null, global); +goog.exportSymbol('proto.protocol.Permission', null, global); goog.exportSymbol('proto.protocol.Proposal', null, global); goog.exportSymbol('proto.protocol.Proposal.State', null, global); goog.exportSymbol('proto.protocol.ReasonCode', null, global); @@ -67,7 +71,6 @@ goog.exportSymbol('proto.protocol.Vote', null, global); goog.exportSymbol('proto.protocol.Votes', null, global); goog.exportSymbol('proto.protocol.Witness', null, global); goog.exportSymbol('proto.protocol.authority', null, global); -goog.exportSymbol('proto.protocol.permission', null, global); /** * Generated by JsPbCodeGenerator. @@ -1599,7 +1602,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.protocol.Account.repeatedFields_ = [5,7,16]; +proto.protocol.Account.repeatedFields_ = [5,7,16,31]; @@ -1657,7 +1660,9 @@ proto.protocol.Account.toObject = function(includeInstance, msg) { latestConsumeFreeTime: jspb.Message.getFieldWithDefault(msg, 22, 0), accountId: msg.getAccountId_asB64(), accountResource: (f = msg.getAccountResource()) && proto.protocol.Account.AccountResource.toObject(includeInstance, f), - codehash: msg.getCodehash_asB64() + codehash: msg.getCodehash_asB64(), + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + proto.protocol.Permission.toObject, includeInstance) }; if (includeInstance) { @@ -1804,6 +1809,11 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setCodehash(value); break; + case 31: + var value = new proto.protocol.Permission; + reader.readMessage(value,proto.protocol.Permission.deserializeBinaryFromReader); + msg.addPermissions(value); + break; default: reader.skipField(); break; @@ -2003,6 +2013,14 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 31, + f, + proto.protocol.Permission.serializeBinaryToWriter + ); + } }; @@ -3064,6 +3082,37 @@ proto.protocol.Account.prototype.setCodehash = function(value) { }; +/** + * repeated Permission permissions = 31; + * @return {!Array.} + */ +proto.protocol.Account.prototype.getPermissionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Permission, 31)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Account.prototype.setPermissionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 31, value); +}; + + +/** + * @param {!proto.protocol.Permission=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Permission} + */ +proto.protocol.Account.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 31, opt_value, proto.protocol.Permission, opt_index); +}; + + +proto.protocol.Account.prototype.clearPermissionsList = function() { + this.setPermissionsList([]); +}; + + /** * Generated by JsPbCodeGenerator. @@ -3075,12 +3124,12 @@ proto.protocol.Account.prototype.setCodehash = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.authority = function(opt_data) { +proto.protocol.Key = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.authority, jspb.Message); +goog.inherits(proto.protocol.Key, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.authority.displayName = 'proto.protocol.authority'; + proto.protocol.Key.displayName = 'proto.protocol.Key'; } @@ -3095,8 +3144,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.authority.toObject(opt_includeInstance, this); +proto.protocol.Key.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Key.toObject(opt_includeInstance, this); }; @@ -3105,14 +3154,14 @@ proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.authority} msg The msg instance to transform. + * @param {!proto.protocol.Key} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.authority.toObject = function(includeInstance, msg) { +proto.protocol.Key.toObject = function(includeInstance, msg) { var f, obj = { - account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), - permissionName: msg.getPermissionName_asB64() + address: msg.getAddress_asB64(), + weight: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -3126,23 +3175,23 @@ proto.protocol.authority.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.authority} + * @return {!proto.protocol.Key} */ -proto.protocol.authority.deserializeBinary = function(bytes) { +proto.protocol.Key.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.authority; - return proto.protocol.authority.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Key; + return proto.protocol.Key.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.authority} msg The message object to deserialize into. + * @param {!proto.protocol.Key} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.authority} + * @return {!proto.protocol.Key} */ -proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3150,13 +3199,12 @@ proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.AccountId; - reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); - msg.setAccount(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPermissionName(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setWeight(value); break; default: reader.skipField(); @@ -3171,9 +3219,9 @@ proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.authority.prototype.serializeBinary = function() { +proto.protocol.Key.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.authority.serializeBinaryToWriter(this, writer); + proto.protocol.Key.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3181,23 +3229,22 @@ proto.protocol.authority.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.authority} message + * @param {!proto.protocol.Key} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Key.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.protocol.AccountId.serializeBinaryToWriter + f ); } - f = message.getPermissionName_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getWeight(); + if (f !== 0) { + writer.writeInt64( 2, f ); @@ -3206,70 +3253,55 @@ proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { /** - * optional AccountId account = 1; - * @return {?proto.protocol.AccountId} - */ -proto.protocol.authority.prototype.getAccount = function() { - return /** @type{?proto.protocol.AccountId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); -}; - - -/** @param {?proto.protocol.AccountId|undefined} value */ -proto.protocol.authority.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.authority.prototype.clearAccount = function() { - this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.authority.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes permission_name = 2; + * optional bytes address = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.authority.prototype.getPermissionName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.Key.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes permission_name = 2; - * This is a type-conversion wrapper around `getPermissionName()` + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` * @return {string} */ -proto.protocol.authority.prototype.getPermissionName_asB64 = function() { +proto.protocol.Key.prototype.getAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPermissionName())); + this.getAddress())); }; /** - * optional bytes permission_name = 2; + * optional bytes address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPermissionName()` + * This is a type-conversion wrapper around `getAddress()` * @return {!Uint8Array} */ -proto.protocol.authority.prototype.getPermissionName_asU8 = function() { +proto.protocol.Key.prototype.getAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPermissionName())); + this.getAddress())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.authority.prototype.setPermissionName = function(value) { +proto.protocol.Key.prototype.setAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 weight = 2; + * @return {number} + */ +proto.protocol.Key.prototype.getWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Key.prototype.setWeight = function(value) { jspb.Message.setField(this, 2, value); }; @@ -3285,13 +3317,20 @@ proto.protocol.authority.prototype.setPermissionName = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.permission = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.Permission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Permission.repeatedFields_, null); }; -goog.inherits(proto.protocol.permission, jspb.Message); +goog.inherits(proto.protocol.Permission, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.permission.displayName = 'proto.protocol.permission'; + proto.protocol.Permission.displayName = 'proto.protocol.Permission'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.Permission.repeatedFields_ = [4]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3305,8 +3344,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.permission.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.permission.toObject(opt_includeInstance, this); +proto.protocol.Permission.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Permission.toObject(opt_includeInstance, this); }; @@ -3315,13 +3354,17 @@ proto.protocol.permission.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.permission} msg The msg instance to transform. + * @param {!proto.protocol.Permission} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.permission.toObject = function(includeInstance, msg) { +proto.protocol.Permission.toObject = function(includeInstance, msg) { var f, obj = { - account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f) + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + threshold: jspb.Message.getFieldWithDefault(msg, 2, 0), + parent: jspb.Message.getFieldWithDefault(msg, 3, ""), + keysList: jspb.Message.toObjectList(msg.getKeysList(), + proto.protocol.Key.toObject, includeInstance) }; if (includeInstance) { @@ -3335,23 +3378,23 @@ proto.protocol.permission.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.permission} + * @return {!proto.protocol.Permission} */ -proto.protocol.permission.deserializeBinary = function(bytes) { +proto.protocol.Permission.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.permission; - return proto.protocol.permission.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Permission; + return proto.protocol.Permission.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.permission} msg The message object to deserialize into. + * @param {!proto.protocol.Permission} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.permission} + * @return {!proto.protocol.Permission} */ -proto.protocol.permission.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Permission.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3359,9 +3402,21 @@ proto.protocol.permission.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.AccountId; - reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); - msg.setAccount(value); + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setThreshold(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setParent(value); + break; + case 4: + var value = new proto.protocol.Key; + reader.readMessage(value,proto.protocol.Key.deserializeBinaryFromReader); + msg.addKeys(value); break; default: reader.skipField(); @@ -3376,9 +3431,9 @@ proto.protocol.permission.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.permission.prototype.serializeBinary = function() { +proto.protocol.Permission.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.permission.serializeBinaryToWriter(this, writer); + proto.protocol.Permission.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3386,50 +3441,117 @@ proto.protocol.permission.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.permission} message + * @param {!proto.protocol.Permission} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.permission.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Permission.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( + f = message.getName(); + if (f.length > 0) { + writer.writeString( 1, + f + ); + } + f = message.getThreshold(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getParent(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getKeysList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, f, - proto.protocol.AccountId.serializeBinaryToWriter + proto.protocol.Key.serializeBinaryToWriter ); } }; /** - * optional AccountId account = 1; - * @return {?proto.protocol.AccountId} + * optional string name = 1; + * @return {string} */ -proto.protocol.permission.prototype.getAccount = function() { - return /** @type{?proto.protocol.AccountId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); +proto.protocol.Permission.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {?proto.protocol.AccountId|undefined} value */ -proto.protocol.permission.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** @param {string} value */ +proto.protocol.Permission.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); }; -proto.protocol.permission.prototype.clearAccount = function() { - this.setAccount(undefined); +/** + * optional int64 threshold = 2; + * @return {number} + */ +proto.protocol.Permission.prototype.getThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Permission.prototype.setThreshold = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * Returns whether this field is set. - * @return {!boolean} + * optional string parent = 3; + * @return {string} */ -proto.protocol.permission.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.Permission.prototype.getParent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.protocol.Permission.prototype.setParent = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * repeated Key keys = 4; + * @return {!Array.} + */ +proto.protocol.Permission.prototype.getKeysList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Key, 4)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Permission.prototype.setKeysList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.protocol.Key=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Key} + */ +proto.protocol.Permission.prototype.addKeys = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.protocol.Key, opt_index); +}; + + +proto.protocol.Permission.prototype.clearKeysList = function() { + this.setKeysList([]); }; @@ -3444,12 +3566,12 @@ proto.protocol.permission.prototype.hasAccount = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Witness = function(opt_data) { +proto.protocol.authority = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Witness, jspb.Message); +goog.inherits(proto.protocol.authority, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Witness.displayName = 'proto.protocol.Witness'; + proto.protocol.authority.displayName = 'proto.protocol.authority'; } @@ -3464,8 +3586,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Witness.toObject(opt_includeInstance, this); +proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.authority.toObject(opt_includeInstance, this); }; @@ -3474,21 +3596,14 @@ proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Witness} msg The msg instance to transform. + * @param {!proto.protocol.authority} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Witness.toObject = function(includeInstance, msg) { +proto.protocol.authority.toObject = function(includeInstance, msg) { var f, obj = { - address: msg.getAddress_asB64(), - votecount: jspb.Message.getFieldWithDefault(msg, 2, 0), - pubkey: msg.getPubkey_asB64(), - url: jspb.Message.getFieldWithDefault(msg, 4, ""), - totalproduced: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalmissed: jspb.Message.getFieldWithDefault(msg, 6, 0), - latestblocknum: jspb.Message.getFieldWithDefault(msg, 7, 0), - latestslotnum: jspb.Message.getFieldWithDefault(msg, 8, 0), - isjobs: jspb.Message.getFieldWithDefault(msg, 9, false) + account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), + permissionName: msg.getPermissionName_asB64() }; if (includeInstance) { @@ -3502,19 +3617,236 @@ proto.protocol.Witness.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Witness} + * @return {!proto.protocol.authority} */ -proto.protocol.Witness.deserializeBinary = function(bytes) { +proto.protocol.authority.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Witness; - return proto.protocol.Witness.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.authority; + return proto.protocol.authority.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Witness} msg The message object to deserialize into. + * @param {!proto.protocol.authority} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.authority} + */ +proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.AccountId; + reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); + msg.setAccount(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPermissionName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.authority.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.authority.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.authority} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.AccountId.serializeBinaryToWriter + ); + } + f = message.getPermissionName_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional AccountId account = 1; + * @return {?proto.protocol.AccountId} + */ +proto.protocol.authority.prototype.getAccount = function() { + return /** @type{?proto.protocol.AccountId} */ ( + jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); +}; + + +/** @param {?proto.protocol.AccountId|undefined} value */ +proto.protocol.authority.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.authority.prototype.clearAccount = function() { + this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.authority.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes permission_name = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.authority.prototype.getPermissionName = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes permission_name = 2; + * This is a type-conversion wrapper around `getPermissionName()` + * @return {string} + */ +proto.protocol.authority.prototype.getPermissionName_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPermissionName())); +}; + + +/** + * optional bytes permission_name = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPermissionName()` + * @return {!Uint8Array} + */ +proto.protocol.authority.prototype.getPermissionName_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPermissionName())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.authority.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Witness = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Witness, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Witness.displayName = 'proto.protocol.Witness'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Witness.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Witness} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Witness.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + votecount: jspb.Message.getFieldWithDefault(msg, 2, 0), + pubkey: msg.getPubkey_asB64(), + url: jspb.Message.getFieldWithDefault(msg, 4, ""), + totalproduced: jspb.Message.getFieldWithDefault(msg, 5, 0), + totalmissed: jspb.Message.getFieldWithDefault(msg, 6, 0), + latestblocknum: jspb.Message.getFieldWithDefault(msg, 7, 0), + latestslotnum: jspb.Message.getFieldWithDefault(msg, 8, 0), + isjobs: jspb.Message.getFieldWithDefault(msg, 9, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Witness} + */ +proto.protocol.Witness.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Witness; + return proto.protocol.Witness.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Witness} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.Witness} */ @@ -5584,7 +5916,11 @@ proto.protocol.Transaction.Contract.ContractType = { EXCHANGECREATECONTRACT: 41, EXCHANGEINJECTCONTRACT: 42, EXCHANGEWITHDRAWCONTRACT: 43, - EXCHANGETRANSACTIONCONTRACT: 44 + EXCHANGETRANSACTIONCONTRACT: 44, + ACCOUNTPERMISSIONUPDATECONTRACT: 45, + PERMISSIONADDKEYCONTRACT: 46, + PERMISSIONUPDATEKEYCONTRACT: 47, + PERMISSIONDELETEKEYCONTRACT: 48 }; /** @@ -6651,7 +6987,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.protocol.TransactionInfo.repeatedFields_ = [5,8]; +proto.protocol.TransactionInfo.repeatedFields_ = [5,8,17]; @@ -6694,7 +7030,9 @@ proto.protocol.TransactionInfo.toObject = function(includeInstance, msg) { result: jspb.Message.getFieldWithDefault(msg, 9, 0), resmessage: msg.getResmessage_asB64(), withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), - unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0) + unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0), + internalTransactionsList: jspb.Message.toObjectList(msg.getInternalTransactionsList(), + proto.protocol.InternalTransaction.toObject, includeInstance) }; if (includeInstance) { @@ -6781,6 +7119,11 @@ proto.protocol.TransactionInfo.deserializeBinaryFromReader = function(msg, reade var value = /** @type {number} */ (reader.readInt64()); msg.setUnfreezeAmount(value); break; + case 17: + var value = new proto.protocol.InternalTransaction; + reader.readMessage(value,proto.protocol.InternalTransaction.deserializeBinaryFromReader); + msg.addInternalTransactions(value); + break; default: reader.skipField(); break; @@ -6896,6 +7239,14 @@ proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, write f ); } + f = message.getInternalTransactionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 17, + f, + proto.protocol.InternalTransaction.serializeBinaryToWriter + ); + } }; @@ -7517,6 +7868,37 @@ proto.protocol.TransactionInfo.prototype.setUnfreezeAmount = function(value) { }; +/** + * repeated InternalTransaction internal_transactions = 17; + * @return {!Array.} + */ +proto.protocol.TransactionInfo.prototype.getInternalTransactionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.InternalTransaction, 17)); +}; + + +/** @param {!Array.} value */ +proto.protocol.TransactionInfo.prototype.setInternalTransactionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 17, value); +}; + + +/** + * @param {!proto.protocol.InternalTransaction=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.InternalTransaction} + */ +proto.protocol.TransactionInfo.prototype.addInternalTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 17, opt_value, proto.protocol.InternalTransaction, opt_index); +}; + + +proto.protocol.TransactionInfo.prototype.clearInternalTransactionsList = function() { + this.setInternalTransactionsList([]); +}; + + /** * Generated by JsPbCodeGenerator. @@ -11982,6 +12364,600 @@ proto.protocol.SmartContract.prototype.setName = function(value) { }; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.InternalTransaction = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.InternalTransaction.repeatedFields_, null); +}; +goog.inherits(proto.protocol.InternalTransaction, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.InternalTransaction.displayName = 'proto.protocol.InternalTransaction'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.InternalTransaction.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.InternalTransaction.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.InternalTransaction.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.InternalTransaction} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.InternalTransaction.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + callerAddress: msg.getCallerAddress_asB64(), + transfertoAddress: msg.getTransfertoAddress_asB64(), + callvalueinfoList: jspb.Message.toObjectList(msg.getCallvalueinfoList(), + proto.protocol.InternalTransaction.CallValueInfo.toObject, includeInstance), + note: msg.getNote_asB64(), + rejected: jspb.Message.getFieldWithDefault(msg, 6, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.InternalTransaction} + */ +proto.protocol.InternalTransaction.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.InternalTransaction; + return proto.protocol.InternalTransaction.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.InternalTransaction} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.InternalTransaction} + */ +proto.protocol.InternalTransaction.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCallerAddress(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTransfertoAddress(value); + break; + case 4: + var value = new proto.protocol.InternalTransaction.CallValueInfo; + reader.readMessage(value,proto.protocol.InternalTransaction.CallValueInfo.deserializeBinaryFromReader); + msg.addCallvalueinfo(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNote(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRejected(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.InternalTransaction.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.InternalTransaction.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.InternalTransaction} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.InternalTransaction.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCallerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getTransfertoAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getCallvalueinfoList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.protocol.InternalTransaction.CallValueInfo.serializeBinaryToWriter + ); + } + f = message.getNote_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getRejected(); + if (f) { + writer.writeBool( + 6, + f + ); + } +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.InternalTransaction.CallValueInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.InternalTransaction.CallValueInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.InternalTransaction.CallValueInfo.displayName = 'proto.protocol.InternalTransaction.CallValueInfo'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.InternalTransaction.CallValueInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.InternalTransaction.CallValueInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.InternalTransaction.CallValueInfo.toObject = function(includeInstance, msg) { + var f, obj = { + callvalue: jspb.Message.getFieldWithDefault(msg, 1, 0), + tokenname: msg.getTokenname_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.InternalTransaction.CallValueInfo} + */ +proto.protocol.InternalTransaction.CallValueInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.InternalTransaction.CallValueInfo; + return proto.protocol.InternalTransaction.CallValueInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.InternalTransaction.CallValueInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.InternalTransaction.CallValueInfo} + */ +proto.protocol.InternalTransaction.CallValueInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCallvalue(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.InternalTransaction.CallValueInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.InternalTransaction.CallValueInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.InternalTransaction.CallValueInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCallvalue(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getTokenname_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional int64 callValue = 1; + * @return {number} + */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.getCallvalue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.setCallvalue = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes tokenName = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes tokenName = 2; + * This is a type-conversion wrapper around `getTokenname()` + * @return {string} + */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenname())); +}; + + +/** + * optional bytes tokenName = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenname()` + * @return {!Uint8Array} + */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenname())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.setTokenname = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.InternalTransaction.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.protocol.InternalTransaction.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.protocol.InternalTransaction.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.InternalTransaction.prototype.setHash = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes caller_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.InternalTransaction.prototype.getCallerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes caller_address = 2; + * This is a type-conversion wrapper around `getCallerAddress()` + * @return {string} + */ +proto.protocol.InternalTransaction.prototype.getCallerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCallerAddress())); +}; + + +/** + * optional bytes caller_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCallerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.InternalTransaction.prototype.getCallerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCallerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.InternalTransaction.prototype.setCallerAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes transferTo_address = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.InternalTransaction.prototype.getTransfertoAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes transferTo_address = 3; + * This is a type-conversion wrapper around `getTransfertoAddress()` + * @return {string} + */ +proto.protocol.InternalTransaction.prototype.getTransfertoAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTransfertoAddress())); +}; + + +/** + * optional bytes transferTo_address = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTransfertoAddress()` + * @return {!Uint8Array} + */ +proto.protocol.InternalTransaction.prototype.getTransfertoAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTransfertoAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.InternalTransaction.prototype.setTransfertoAddress = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * repeated CallValueInfo callValueInfo = 4; + * @return {!Array.} + */ +proto.protocol.InternalTransaction.prototype.getCallvalueinfoList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.InternalTransaction.CallValueInfo, 4)); +}; + + +/** @param {!Array.} value */ +proto.protocol.InternalTransaction.prototype.setCallvalueinfoList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.protocol.InternalTransaction.CallValueInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.InternalTransaction.CallValueInfo} + */ +proto.protocol.InternalTransaction.prototype.addCallvalueinfo = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.protocol.InternalTransaction.CallValueInfo, opt_index); +}; + + +proto.protocol.InternalTransaction.prototype.clearCallvalueinfoList = function() { + this.setCallvalueinfoList([]); +}; + + +/** + * optional bytes note = 5; + * @return {!(string|Uint8Array)} + */ +proto.protocol.InternalTransaction.prototype.getNote = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes note = 5; + * This is a type-conversion wrapper around `getNote()` + * @return {string} + */ +proto.protocol.InternalTransaction.prototype.getNote_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNote())); +}; + + +/** + * optional bytes note = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNote()` + * @return {!Uint8Array} + */ +proto.protocol.InternalTransaction.prototype.getNote_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNote())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.InternalTransaction.prototype.setNote = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional bool rejected = 6; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.InternalTransaction.prototype.getRejected = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.InternalTransaction.prototype.setRejected = function(value) { + jspb.Message.setField(this, 6, value); +}; + + /** * @enum {number} */ From fefbce7c8726efec611dc1a014fc9ae4cb8ff5a1 Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Tue, 4 Dec 2018 10:34:47 +0800 Subject: [PATCH 05/15] add tronweb -> protobuf conversion --- src/utils/transactionBuilder.js | 1 + src/utils/tronWeb.js | 202 ++++++++++++++++++++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 src/utils/tronWeb.js diff --git a/src/utils/transactionBuilder.js b/src/utils/transactionBuilder.js index 30ad7e2..882b162 100644 --- a/src/utils/transactionBuilder.js +++ b/src/utils/transactionBuilder.js @@ -228,6 +228,7 @@ function buildUnfreezeAsset(address) { } module.exports = { + buildTransferContract, buildTransferTransaction, buildAccountUpdate, buildAssetParticipate, diff --git a/src/utils/tronWeb.js b/src/utils/tronWeb.js new file mode 100644 index 0000000..dea4576 --- /dev/null +++ b/src/utils/tronWeb.js @@ -0,0 +1,202 @@ +const { buildTransferContract } = require("./transactionBuilder"); +const {Block, Transaction, Account} = require("../protocol/core/Tron_pb"); + +const { + TransferContract, + TransferAssetContract, + AccountUpdateContract, + VoteWitnessContract, + ParticipateAssetIssueContract, + AssetIssueContract, + FreezeBalanceContract, + UnfreezeBalanceContract, + WitnessUpdateContract, + WithdrawBalanceContract, + WitnessCreateContract, + UnfreezeAssetContract, +} = require("../protocol/core/Contract_pb"); + +const fromHexString = hexString => + new Uint8Array(hexString.match(/.{1,2}/g).map(byte => parseInt(byte, 16))); + +export function transactionJsonToProtoBuf(transaction) { + + const rawData = transaction.raw_data; + const contractJson = rawData.contract[0]; + const transactionObj = contractJsonToProtobuf(contractJson); + + const rawDataObj = transactionObj.getRawData(); + + rawDataObj.setRefBlockBytes(fromHexString(rawData.ref_block_bytes)); + rawDataObj.setRefBlockHash(fromHexString(rawData.ref_block_hash)); + if (rawData.expiration) { + rawDataObj.setExpiration(rawData.expiration); + } + + if (rawData.timestamp) { + rawDataObj.setTimestamp(rawData.timestamp); + } + + transactionObj.setRawData(rawDataObj); + + return transactionObj; +} + +export function contractJsonToProtobuf(contract) { + + const value = contract.parameter.value; + + switch (contract.type) { + + case "TransferContract": { + const {to_address, owner_address, amount} = value; + let transferContract = new TransferContract(); + transferContract.setToAddress(fromHexString(to_address)); + transferContract.setOwnerAddress(fromHexString(owner_address)); + transferContract.setAmount(amount); + + return buildTransferContract( + transferContract, + Transaction.Contract.ContractType.TRANSFERCONTRACT, + contract.type); + } + + case "TransferAssetContract": { + const {to_address, owner_address, amount, asset_name} = value; + let transferContract = new TransferAssetContract(); + transferContract.setToAddress(fromHexString(to_address)); + transferContract.setOwnerAddress(fromHexString(owner_address)); + transferContract.setAssetName(asset_name); + transferContract.setAmount(amount); + + return buildTransferContract( + transferContract, + Transaction.Contract.ContractType.TRANSFERASSETCONTRACT, + contract.type); + } + + case "AccountUpdateContract": { + + let contract = new AccountUpdateContract(); + contract.setOwnerAddress(Uint8Array.from(fromHexString(value.owner_address))); + contract.setAccountName(value.account_name); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.ACCOUNTUPDATECONTRACT, + "AccountUpdateContract"); + } + + case "WitnessCreateContract": { + + let contract = new WitnessCreateContract(); + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setUrl(value.url); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.WITNESSCREATECONTRACT, + "WitnessCreateContract"); + } + + + case "WitnessUpdateContract": { + + let contract = new WitnessUpdateContract(); + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setUpdateUrl(value.url); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.WITNESSUPDATECONTRACT, + "WitnessUpdateContract"); + } + + case "WithdrawBalanceContract": { + + let contract = new WithdrawBalanceContract(); + contract.setOwnerAddress(fromHexString(value.owner_address)); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.WITHDRAWBALANCECONTRACT, + "WithdrawBalanceContract"); + } + + case "FreezeBalanceContract": { + + // TODO ADD ENERGY SWITCH + + let contract = new FreezeBalanceContract(); + + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setFrozenBalance(value.frozen_balance); + contract.setFrozenDuration(value.frozen_duration); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.FREEZEBALANCECONTRACT, + "FreezeBalanceContract"); + } + + + case "VoteWitnessContract": { + + let contract = new VoteWitnessContract(); + contract.setOwnerAddress(fromHexString(value.owner_address)); + + for (let address of Object.keys(value.votes)) { + let vote = new VoteWitnessContract.Vote(); + vote.setVoteAddress(fromHexString(address.vote_address)); + vote.setVoteCount(address.vote_count); + contract.addVotes(vote); + } + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.VOTEWITNESSCONTRACT, + "VoteWitnessContract"); + } + + case "ParticipateAssetIssueContract": { + + let contract = new ParticipateAssetIssueContract(); + contract.setToAddress(fromHexString(value.to_address)); + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setAssetName(value.asset_name); + contract.setAmount(value.amount); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT, + "ParticipateAssetIssueContract"); + } + + case "UnfreezeBalanceContract": { + + // TODO ADD ENERGY SWITCH + + let contract = new UnfreezeBalanceContract(); + + contract.setOwnerAddress(fromHexString(value.owner_address)); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.UNFREEZEBALANCECONTRACT, + "UnfreezeBalanceContract"); + } + + case "UnfreezeAssetContract": { + + let contract = new UnfreezeAssetContract(); + + contract.setOwnerAddress(fromHexString(value.owner_address)); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.UNFREEZEASSETCONTRACT, + "UnfreezeAssetContract"); + } + + } +} From 68ed2c56cbc9e4b8832567da33347fc21fe877e5 Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Tue, 4 Dec 2018 14:57:13 +0800 Subject: [PATCH 06/15] v0.2.27 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8e9407..01411d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tronscan/client", - "version": "0.2.26", + "version": "0.2.27", "description": "Tronscan API Client", "main": "src/index.js", "homepage": "https://api.tronscan.org/", From a5f73a2db56f952430455668c867f8bd689dd883 Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Tue, 4 Dec 2018 16:25:26 +0800 Subject: [PATCH 07/15] v0.2.28 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 01411d3..63cd5b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tronscan/client", - "version": "0.2.27", + "version": "0.2.28", "description": "Tronscan API Client", "main": "src/index.js", "homepage": "https://api.tronscan.org/", From 1952a4c00b486ad9c48a183dbbc1b3117ca13854 Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Tue, 4 Dec 2018 16:25:32 +0800 Subject: [PATCH 08/15] fix vote value --- src/utils/tronWeb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/tronWeb.js b/src/utils/tronWeb.js index dea4576..bd7d12b 100644 --- a/src/utils/tronWeb.js +++ b/src/utils/tronWeb.js @@ -145,7 +145,7 @@ export function contractJsonToProtobuf(contract) { let contract = new VoteWitnessContract(); contract.setOwnerAddress(fromHexString(value.owner_address)); - for (let address of Object.keys(value.votes)) { + for (let address of value.votes) { let vote = new VoteWitnessContract.Vote(); vote.setVoteAddress(fromHexString(address.vote_address)); vote.setVoteCount(address.vote_count); From f2aea08dc704542d7b221a29a7be7db3a680794f Mon Sep 17 00:00:00 2001 From: Roy van Kaathoven Date: Tue, 4 Dec 2018 22:15:05 +0800 Subject: [PATCH 09/15] v0.2.29 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 63cd5b7..92dcb81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tronscan/client", - "version": "0.2.28", + "version": "0.2.29", "description": "Tronscan API Client", "main": "src/index.js", "homepage": "https://api.tronscan.org/", From aed184c2a8d6c5f57e436235e7f2a5fdd636d72c Mon Sep 17 00:00:00 2001 From: Fernando Sobreira Date: Mon, 14 Jan 2019 08:54:05 -0300 Subject: [PATCH 10/15] Ledger tronweb raw update --- src/utils/transactionBuilder.js | 5 +++-- src/utils/tronWeb.js | 37 +++++++++++++++++++++++++++------ 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/utils/transactionBuilder.js b/src/utils/transactionBuilder.js index ee8115e..81b622d 100644 --- a/src/utils/transactionBuilder.js +++ b/src/utils/transactionBuilder.js @@ -19,7 +19,8 @@ const { ExchangeCreateContract, ExchangeInjectContract, ExchangeWithdrawContract, - ExchangeTransactionContract + ExchangeTransactionContract, + TriggerSmartContract, } = require("../protocol/core/Contract_pb"); function buildTransferContract(message, contractType, typeName) { @@ -185,7 +186,7 @@ function buildAssetIssue(options) { * @param address From which address to freze * @param amount The amount of TRX to freeze * @param duration Duration in days - * @param andwith or energy Bandwidth Point = 0,Energy = 1 + * @param resource bandwith or energy Bandwidth Point = 0,Energy = 1 */ function buildFreezeBalance(address, amount, duration, resource) { let contract = new FreezeBalanceContract(); diff --git a/src/utils/tronWeb.js b/src/utils/tronWeb.js index bd7d12b..89f14cf 100644 --- a/src/utils/tronWeb.js +++ b/src/utils/tronWeb.js @@ -14,6 +14,7 @@ const { WithdrawBalanceContract, WitnessCreateContract, UnfreezeAssetContract, + TriggerSmartContract, } = require("../protocol/core/Contract_pb"); const fromHexString = hexString => @@ -37,6 +38,10 @@ export function transactionJsonToProtoBuf(transaction) { rawDataObj.setTimestamp(rawData.timestamp); } + if (rawData.fee_limit) { + rawDataObj.setFeeLimit(rawData.fee_limit); + } + transactionObj.setRawData(rawDataObj); return transactionObj; @@ -66,7 +71,7 @@ export function contractJsonToProtobuf(contract) { let transferContract = new TransferAssetContract(); transferContract.setToAddress(fromHexString(to_address)); transferContract.setOwnerAddress(fromHexString(owner_address)); - transferContract.setAssetName(asset_name); + transferContract.setAssetName(fromHexString(asset_name)); transferContract.setAmount(amount); return buildTransferContract( @@ -125,13 +130,16 @@ export function contractJsonToProtobuf(contract) { case "FreezeBalanceContract": { - // TODO ADD ENERGY SWITCH - let contract = new FreezeBalanceContract(); contract.setOwnerAddress(fromHexString(value.owner_address)); contract.setFrozenBalance(value.frozen_balance); contract.setFrozenDuration(value.frozen_duration); + if (value.resource === "BANDWIDTH") + contract.setResource(0); + else + contract.setResource(1); + return buildTransferContract( contract, @@ -174,11 +182,13 @@ export function contractJsonToProtobuf(contract) { case "UnfreezeBalanceContract": { - // TODO ADD ENERGY SWITCH - let contract = new UnfreezeBalanceContract(); contract.setOwnerAddress(fromHexString(value.owner_address)); + if (value.resource === "BANDWIDTH") + contract.setResource(0); + else + contract.setResource(1); return buildTransferContract( contract, @@ -198,5 +208,20 @@ export function contractJsonToProtobuf(contract) { "UnfreezeAssetContract"); } + case "TriggerSmartContract": { + + let contract = new TriggerSmartContract(); + + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setContractAddress(fromHexString(value.contract_address)); + contract.setCallValue(value.call_value); + contract.setData(fromHexString(value.data)); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.TRIGGERSMARTCONTRACT, + "TriggerSmartContract"); + } + } -} +} \ No newline at end of file From b2103756204e5b373b8c58ca45b7b654ee927478 Mon Sep 17 00:00:00 2001 From: Fernando Sobreira Date: Mon, 28 Jan 2019 15:37:50 -0300 Subject: [PATCH 11/15] Add exchange contracts --- build-protobufs.sh | 1 + src/protocol/api/api_pb.js | 6613 ++++++++++++++++++++++++++++++ src/protocol/core/Contract_pb.js | 1470 +++---- src/protocol/core/Discover_pb.js | 171 - src/protocol/core/Tron_pb.js | 1462 ++++++- src/utils/tronWeb.js | 79 +- 6 files changed, 8465 insertions(+), 1331 deletions(-) create mode 100644 src/protocol/api/api_pb.js diff --git a/build-protobufs.sh b/build-protobufs.sh index 4e0b43b..edd6f88 100755 --- a/build-protobufs.sh +++ b/build-protobufs.sh @@ -4,3 +4,4 @@ docker run --rm -v $(pwd):$(pwd) -w $(pwd) znly/protoc \ --proto_path=protobuf \ --js_out=import_style=commonjs,binary:src/protocol \ protobuf/core/*.proto protobuf/api/*.proto + diff --git a/src/protocol/api/api_pb.js b/src/protocol/api/api_pb.js new file mode 100644 index 0000000..26baf5b --- /dev/null +++ b/src/protocol/api/api_pb.js @@ -0,0 +1,6613 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var core_Tron_pb = require('../core/Tron_pb.js'); +var core_Contract_pb = require('../core/Contract_pb.js'); +var google_api_annotations_pb = require('../google/api/annotations_pb.js'); +goog.exportSymbol('proto.protocol.AccountNetMessage', null, global); +goog.exportSymbol('proto.protocol.AccountPaginated', null, global); +goog.exportSymbol('proto.protocol.AccountResourceMessage', null, global); +goog.exportSymbol('proto.protocol.Address', null, global); +goog.exportSymbol('proto.protocol.AddressPrKeyPairMessage', null, global); +goog.exportSymbol('proto.protocol.AssetIssueList', null, global); +goog.exportSymbol('proto.protocol.BlockExtention', null, global); +goog.exportSymbol('proto.protocol.BlockLimit', null, global); +goog.exportSymbol('proto.protocol.BlockList', null, global); +goog.exportSymbol('proto.protocol.BlockListExtention', null, global); +goog.exportSymbol('proto.protocol.BlockReference', null, global); +goog.exportSymbol('proto.protocol.BytesMessage', null, global); +goog.exportSymbol('proto.protocol.DelegatedResourceList', null, global); +goog.exportSymbol('proto.protocol.DelegatedResourceMessage', null, global); +goog.exportSymbol('proto.protocol.EasyTransferByPrivateMessage', null, global); +goog.exportSymbol('proto.protocol.EasyTransferMessage', null, global); +goog.exportSymbol('proto.protocol.EasyTransferResponse', null, global); +goog.exportSymbol('proto.protocol.EmptyMessage', null, global); +goog.exportSymbol('proto.protocol.ExchangeList', null, global); +goog.exportSymbol('proto.protocol.Node', null, global); +goog.exportSymbol('proto.protocol.NodeList', null, global); +goog.exportSymbol('proto.protocol.NumberMessage', null, global); +goog.exportSymbol('proto.protocol.PaginatedMessage', null, global); +goog.exportSymbol('proto.protocol.ProposalList', null, global); +goog.exportSymbol('proto.protocol.Return', null, global); +goog.exportSymbol('proto.protocol.Return.response_code', null, global); +goog.exportSymbol('proto.protocol.TimeMessage', null, global); +goog.exportSymbol('proto.protocol.TimePaginatedMessage', null, global); +goog.exportSymbol('proto.protocol.TransactionExtention', null, global); +goog.exportSymbol('proto.protocol.TransactionLimit', null, global); +goog.exportSymbol('proto.protocol.TransactionList', null, global); +goog.exportSymbol('proto.protocol.TransactionListExtention', null, global); +goog.exportSymbol('proto.protocol.WitnessList', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Return = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Return, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Return.displayName = 'proto.protocol.Return'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Return.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Return.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Return} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Return.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, false), + code: jspb.Message.getFieldWithDefault(msg, 2, 0), + message: msg.getMessage_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Return} + */ +proto.protocol.Return.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Return; + return proto.protocol.Return.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Return} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Return} + */ +proto.protocol.Return.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setResult(value); + break; + case 2: + var value = /** @type {!proto.protocol.Return.response_code} */ (reader.readEnum()); + msg.setCode(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Return.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Return.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Return} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Return.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getMessage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.protocol.Return.response_code = { + SUCCESS: 0, + SIGERROR: 1, + CONTRACT_VALIDATE_ERROR: 2, + CONTRACT_EXE_ERROR: 3, + BANDWITH_ERROR: 4, + DUP_TRANSACTION_ERROR: 5, + TAPOS_ERROR: 6, + TOO_BIG_TRANSACTION_ERROR: 7, + TRANSACTION_EXPIRATION_ERROR: 8, + SERVER_BUSY: 9, + OTHER_ERROR: 20 +}; + +/** + * optional bool result = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.protocol.Return.prototype.getResult = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.protocol.Return.prototype.setResult = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional response_code code = 2; + * @return {!proto.protocol.Return.response_code} + */ +proto.protocol.Return.prototype.getCode = function() { + return /** @type {!proto.protocol.Return.response_code} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.protocol.Return.response_code} value */ +proto.protocol.Return.prototype.setCode = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes message = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Return.prototype.getMessage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes message = 3; + * This is a type-conversion wrapper around `getMessage()` + * @return {string} + */ +proto.protocol.Return.prototype.getMessage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMessage())); +}; + + +/** + * optional bytes message = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMessage()` + * @return {!Uint8Array} + */ +proto.protocol.Return.prototype.getMessage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMessage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Return.prototype.setMessage = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BlockReference = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.BlockReference, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BlockReference.displayName = 'proto.protocol.BlockReference'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BlockReference.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockReference.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BlockReference} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockReference.toObject = function(includeInstance, msg) { + var f, obj = { + blockNum: jspb.Message.getFieldWithDefault(msg, 1, 0), + blockHash: msg.getBlockHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BlockReference} + */ +proto.protocol.BlockReference.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BlockReference; + return proto.protocol.BlockReference.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BlockReference} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BlockReference} + */ +proto.protocol.BlockReference.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockNum(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BlockReference.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BlockReference.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BlockReference} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockReference.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockNum(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getBlockHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional int64 block_num = 1; + * @return {number} + */ +proto.protocol.BlockReference.prototype.getBlockNum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BlockReference.prototype.setBlockNum = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes block_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.BlockReference.prototype.getBlockHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes block_hash = 2; + * This is a type-conversion wrapper around `getBlockHash()` + * @return {string} + */ +proto.protocol.BlockReference.prototype.getBlockHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockHash())); +}; + + +/** + * optional bytes block_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockHash()` + * @return {!Uint8Array} + */ +proto.protocol.BlockReference.prototype.getBlockHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BlockReference.prototype.setBlockHash = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.WitnessList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.WitnessList.repeatedFields_, null); +}; +goog.inherits(proto.protocol.WitnessList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.WitnessList.displayName = 'proto.protocol.WitnessList'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.WitnessList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.WitnessList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.WitnessList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.WitnessList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.WitnessList.toObject = function(includeInstance, msg) { + var f, obj = { + witnessesList: jspb.Message.toObjectList(msg.getWitnessesList(), + core_Tron_pb.Witness.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.WitnessList} + */ +proto.protocol.WitnessList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.WitnessList; + return proto.protocol.WitnessList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.WitnessList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.WitnessList} + */ +proto.protocol.WitnessList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Witness; + reader.readMessage(value,core_Tron_pb.Witness.deserializeBinaryFromReader); + msg.addWitnesses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.WitnessList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.WitnessList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.WitnessList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.WitnessList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWitnessesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + core_Tron_pb.Witness.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Witness witnesses = 1; + * @return {!Array.} + */ +proto.protocol.WitnessList.prototype.getWitnessesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Witness, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.WitnessList.prototype.setWitnessesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.Witness=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Witness} + */ +proto.protocol.WitnessList.prototype.addWitnesses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Witness, opt_index); +}; + + +proto.protocol.WitnessList.prototype.clearWitnessesList = function() { + this.setWitnessesList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ProposalList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ProposalList.repeatedFields_, null); +}; +goog.inherits(proto.protocol.ProposalList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ProposalList.displayName = 'proto.protocol.ProposalList'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.ProposalList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ProposalList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ProposalList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ProposalList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ProposalList.toObject = function(includeInstance, msg) { + var f, obj = { + proposalsList: jspb.Message.toObjectList(msg.getProposalsList(), + core_Tron_pb.Proposal.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ProposalList} + */ +proto.protocol.ProposalList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ProposalList; + return proto.protocol.ProposalList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ProposalList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ProposalList} + */ +proto.protocol.ProposalList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Proposal; + reader.readMessage(value,core_Tron_pb.Proposal.deserializeBinaryFromReader); + msg.addProposals(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ProposalList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ProposalList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ProposalList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ProposalList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + core_Tron_pb.Proposal.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Proposal proposals = 1; + * @return {!Array.} + */ +proto.protocol.ProposalList.prototype.getProposalsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Proposal, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.ProposalList.prototype.setProposalsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.Proposal=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Proposal} + */ +proto.protocol.ProposalList.prototype.addProposals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Proposal, opt_index); +}; + + +proto.protocol.ProposalList.prototype.clearProposalsList = function() { + this.setProposalsList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.ExchangeList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ExchangeList.repeatedFields_, null); +}; +goog.inherits(proto.protocol.ExchangeList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.ExchangeList.displayName = 'proto.protocol.ExchangeList'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.ExchangeList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.ExchangeList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.ExchangeList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.ExchangeList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeList.toObject = function(includeInstance, msg) { + var f, obj = { + exchangesList: jspb.Message.toObjectList(msg.getExchangesList(), + core_Tron_pb.Exchange.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.ExchangeList} + */ +proto.protocol.ExchangeList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.ExchangeList; + return proto.protocol.ExchangeList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.ExchangeList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.ExchangeList} + */ +proto.protocol.ExchangeList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Exchange; + reader.readMessage(value,core_Tron_pb.Exchange.deserializeBinaryFromReader); + msg.addExchanges(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.ExchangeList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.ExchangeList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.ExchangeList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.ExchangeList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExchangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + core_Tron_pb.Exchange.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Exchange exchanges = 1; + * @return {!Array.} + */ +proto.protocol.ExchangeList.prototype.getExchangesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Exchange, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.ExchangeList.prototype.setExchangesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.Exchange=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Exchange} + */ +proto.protocol.ExchangeList.prototype.addExchanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Exchange, opt_index); +}; + + +proto.protocol.ExchangeList.prototype.clearExchangesList = function() { + this.setExchangesList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.AssetIssueList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AssetIssueList.repeatedFields_, null); +}; +goog.inherits(proto.protocol.AssetIssueList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.AssetIssueList.displayName = 'proto.protocol.AssetIssueList'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.AssetIssueList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.AssetIssueList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AssetIssueList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.AssetIssueList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AssetIssueList.toObject = function(includeInstance, msg) { + var f, obj = { + assetissueList: jspb.Message.toObjectList(msg.getAssetissueList(), + core_Contract_pb.AssetIssueContract.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.AssetIssueList} + */ +proto.protocol.AssetIssueList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.AssetIssueList; + return proto.protocol.AssetIssueList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.AssetIssueList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.AssetIssueList} + */ +proto.protocol.AssetIssueList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Contract_pb.AssetIssueContract; + reader.readMessage(value,core_Contract_pb.AssetIssueContract.deserializeBinaryFromReader); + msg.addAssetissue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.AssetIssueList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.AssetIssueList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.AssetIssueList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AssetIssueList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAssetissueList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + core_Contract_pb.AssetIssueContract.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated AssetIssueContract assetIssue = 1; + * @return {!Array.} + */ +proto.protocol.AssetIssueList.prototype.getAssetissueList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Contract_pb.AssetIssueContract, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.AssetIssueList.prototype.setAssetissueList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.AssetIssueContract=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.AssetIssueContract} + */ +proto.protocol.AssetIssueList.prototype.addAssetissue = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.AssetIssueContract, opt_index); +}; + + +proto.protocol.AssetIssueList.prototype.clearAssetissueList = function() { + this.setAssetissueList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BlockList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockList.repeatedFields_, null); +}; +goog.inherits(proto.protocol.BlockList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BlockList.displayName = 'proto.protocol.BlockList'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.BlockList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BlockList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BlockList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockList.toObject = function(includeInstance, msg) { + var f, obj = { + blockList: jspb.Message.toObjectList(msg.getBlockList(), + core_Tron_pb.Block.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BlockList} + */ +proto.protocol.BlockList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BlockList; + return proto.protocol.BlockList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BlockList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BlockList} + */ +proto.protocol.BlockList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Block; + reader.readMessage(value,core_Tron_pb.Block.deserializeBinaryFromReader); + msg.addBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BlockList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BlockList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BlockList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + core_Tron_pb.Block.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Block block = 1; + * @return {!Array.} + */ +proto.protocol.BlockList.prototype.getBlockList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Block, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.BlockList.prototype.setBlockList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.Block=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Block} + */ +proto.protocol.BlockList.prototype.addBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Block, opt_index); +}; + + +proto.protocol.BlockList.prototype.clearBlockList = function() { + this.setBlockList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TransactionList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionList.repeatedFields_, null); +}; +goog.inherits(proto.protocol.TransactionList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TransactionList.displayName = 'proto.protocol.TransactionList'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.TransactionList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TransactionList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TransactionList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionList.toObject = function(includeInstance, msg) { + var f, obj = { + transactionList: jspb.Message.toObjectList(msg.getTransactionList(), + core_Tron_pb.Transaction.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TransactionList} + */ +proto.protocol.TransactionList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TransactionList; + return proto.protocol.TransactionList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TransactionList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TransactionList} + */ +proto.protocol.TransactionList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Transaction; + reader.readMessage(value,core_Tron_pb.Transaction.deserializeBinaryFromReader); + msg.addTransaction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TransactionList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TransactionList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TransactionList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + core_Tron_pb.Transaction.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Transaction transaction = 1; + * @return {!Array.} + */ +proto.protocol.TransactionList.prototype.getTransactionList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Transaction, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.TransactionList.prototype.setTransactionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.Transaction=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Transaction} + */ +proto.protocol.TransactionList.prototype.addTransaction = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Transaction, opt_index); +}; + + +proto.protocol.TransactionList.prototype.clearTransactionList = function() { + this.setTransactionList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.DelegatedResourceMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.DelegatedResourceMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.DelegatedResourceMessage.displayName = 'proto.protocol.DelegatedResourceMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.DelegatedResourceMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DelegatedResourceMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.DelegatedResourceMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.DelegatedResourceMessage.toObject = function(includeInstance, msg) { + var f, obj = { + fromaddress: msg.getFromaddress_asB64(), + toaddress: msg.getToaddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.DelegatedResourceMessage} + */ +proto.protocol.DelegatedResourceMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.DelegatedResourceMessage; + return proto.protocol.DelegatedResourceMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.DelegatedResourceMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.DelegatedResourceMessage} + */ +proto.protocol.DelegatedResourceMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFromaddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToaddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.DelegatedResourceMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.DelegatedResourceMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.DelegatedResourceMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFromaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getToaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes fromAddress = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.DelegatedResourceMessage.prototype.getFromaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes fromAddress = 1; + * This is a type-conversion wrapper around `getFromaddress()` + * @return {string} + */ +proto.protocol.DelegatedResourceMessage.prototype.getFromaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFromaddress())); +}; + + +/** + * optional bytes fromAddress = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFromaddress()` + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceMessage.prototype.getFromaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFromaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.DelegatedResourceMessage.prototype.setFromaddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes toAddress = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.DelegatedResourceMessage.prototype.getToaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes toAddress = 2; + * This is a type-conversion wrapper around `getToaddress()` + * @return {string} + */ +proto.protocol.DelegatedResourceMessage.prototype.getToaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getToaddress())); +}; + + +/** + * optional bytes toAddress = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaddress()` + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceMessage.prototype.getToaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getToaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.DelegatedResourceMessage.prototype.setToaddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.DelegatedResourceList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.DelegatedResourceList.repeatedFields_, null); +}; +goog.inherits(proto.protocol.DelegatedResourceList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.DelegatedResourceList.displayName = 'proto.protocol.DelegatedResourceList'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.DelegatedResourceList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.DelegatedResourceList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DelegatedResourceList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.DelegatedResourceList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.DelegatedResourceList.toObject = function(includeInstance, msg) { + var f, obj = { + delegatedresourceList: jspb.Message.toObjectList(msg.getDelegatedresourceList(), + core_Tron_pb.DelegatedResource.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.DelegatedResourceList} + */ +proto.protocol.DelegatedResourceList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.DelegatedResourceList; + return proto.protocol.DelegatedResourceList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.DelegatedResourceList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.DelegatedResourceList} + */ +proto.protocol.DelegatedResourceList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.DelegatedResource; + reader.readMessage(value,core_Tron_pb.DelegatedResource.deserializeBinaryFromReader); + msg.addDelegatedresource(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.DelegatedResourceList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.DelegatedResourceList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.DelegatedResourceList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatedresourceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + core_Tron_pb.DelegatedResource.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DelegatedResource delegatedResource = 1; + * @return {!Array.} + */ +proto.protocol.DelegatedResourceList.prototype.getDelegatedresourceList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.DelegatedResource, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.DelegatedResourceList.prototype.setDelegatedresourceList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.DelegatedResource=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.DelegatedResource} + */ +proto.protocol.DelegatedResourceList.prototype.addDelegatedresource = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.DelegatedResource, opt_index); +}; + + +proto.protocol.DelegatedResourceList.prototype.clearDelegatedresourceList = function() { + this.setDelegatedresourceList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.NodeList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.NodeList.repeatedFields_, null); +}; +goog.inherits(proto.protocol.NodeList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.NodeList.displayName = 'proto.protocol.NodeList'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.NodeList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.NodeList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.NodeList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.NodeList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.NodeList.toObject = function(includeInstance, msg) { + var f, obj = { + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.protocol.Node.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.NodeList} + */ +proto.protocol.NodeList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.NodeList; + return proto.protocol.NodeList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.NodeList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.NodeList} + */ +proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.Node; + reader.readMessage(value,proto.protocol.Node.deserializeBinaryFromReader); + msg.addNodes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.NodeList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.NodeList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.NodeList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.NodeList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.Node.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Node nodes = 1; + * @return {!Array.} + */ +proto.protocol.NodeList.prototype.getNodesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Node, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.NodeList.prototype.setNodesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.Node=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Node} + */ +proto.protocol.NodeList.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Node, opt_index); +}; + + +proto.protocol.NodeList.prototype.clearNodesList = function() { + this.setNodesList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Node = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Node, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Node.displayName = 'proto.protocol.Node'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Node.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Node.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Node} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Node.toObject = function(includeInstance, msg) { + var f, obj = { + address: (f = msg.getAddress()) && proto.protocol.Address.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Node} + */ +proto.protocol.Node.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Node; + return proto.protocol.Node.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Node} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Node} + */ +proto.protocol.Node.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.Address; + reader.readMessage(value,proto.protocol.Address.deserializeBinaryFromReader); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Node.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Node.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Node} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Node.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.Address.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Address address = 1; + * @return {?proto.protocol.Address} + */ +proto.protocol.Node.prototype.getAddress = function() { + return /** @type{?proto.protocol.Address} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Address, 1)); +}; + + +/** @param {?proto.protocol.Address|undefined} value */ +proto.protocol.Node.prototype.setAddress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.Node.prototype.clearAddress = function() { + this.setAddress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.Node.prototype.hasAddress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Address = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Address, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Address.displayName = 'proto.protocol.Address'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Address.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Address.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Address} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Address.toObject = function(includeInstance, msg) { + var f, obj = { + host: msg.getHost_asB64(), + port: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Address} + */ +proto.protocol.Address.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Address; + return proto.protocol.Address.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Address} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Address} + */ +proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHost(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPort(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Address.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Address.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Address} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Address.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHost_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional bytes host = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Address.prototype.getHost = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes host = 1; + * This is a type-conversion wrapper around `getHost()` + * @return {string} + */ +proto.protocol.Address.prototype.getHost_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHost())); +}; + + +/** + * optional bytes host = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHost()` + * @return {!Uint8Array} + */ +proto.protocol.Address.prototype.getHost_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHost())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Address.prototype.setHost = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 port = 2; + * @return {number} + */ +proto.protocol.Address.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Address.prototype.setPort = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.EmptyMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.EmptyMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.EmptyMessage.displayName = 'proto.protocol.EmptyMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.EmptyMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EmptyMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.EmptyMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EmptyMessage.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.EmptyMessage} + */ +proto.protocol.EmptyMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.EmptyMessage; + return proto.protocol.EmptyMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.EmptyMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.EmptyMessage} + */ +proto.protocol.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.EmptyMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.EmptyMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.EmptyMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EmptyMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.NumberMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.NumberMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.NumberMessage.displayName = 'proto.protocol.NumberMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.NumberMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.NumberMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.NumberMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.NumberMessage.toObject = function(includeInstance, msg) { + var f, obj = { + num: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.NumberMessage} + */ +proto.protocol.NumberMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.NumberMessage; + return proto.protocol.NumberMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.NumberMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.NumberMessage} + */ +proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.NumberMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.NumberMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.NumberMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.NumberMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNum(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 num = 1; + * @return {number} + */ +proto.protocol.NumberMessage.prototype.getNum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.NumberMessage.prototype.setNum = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BytesMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.BytesMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BytesMessage.displayName = 'proto.protocol.BytesMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BytesMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BytesMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BytesMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BytesMessage.toObject = function(includeInstance, msg) { + var f, obj = { + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BytesMessage} + */ +proto.protocol.BytesMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BytesMessage; + return proto.protocol.BytesMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BytesMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BytesMessage} + */ +proto.protocol.BytesMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BytesMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BytesMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BytesMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BytesMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes value = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.BytesMessage.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes value = 1; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.protocol.BytesMessage.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.protocol.BytesMessage.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BytesMessage.prototype.setValue = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TimeMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.TimeMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TimeMessage.displayName = 'proto.protocol.TimeMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TimeMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TimeMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TimeMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TimeMessage.toObject = function(includeInstance, msg) { + var f, obj = { + begininmilliseconds: jspb.Message.getFieldWithDefault(msg, 1, 0), + endinmilliseconds: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TimeMessage} + */ +proto.protocol.TimeMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TimeMessage; + return proto.protocol.TimeMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TimeMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TimeMessage} + */ +proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBegininmilliseconds(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndinmilliseconds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TimeMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TimeMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TimeMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TimeMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBegininmilliseconds(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getEndinmilliseconds(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 beginInMilliseconds = 1; + * @return {number} + */ +proto.protocol.TimeMessage.prototype.getBegininmilliseconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TimeMessage.prototype.setBegininmilliseconds = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 endInMilliseconds = 2; + * @return {number} + */ +proto.protocol.TimeMessage.prototype.getEndinmilliseconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TimeMessage.prototype.setEndinmilliseconds = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BlockLimit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.BlockLimit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BlockLimit.displayName = 'proto.protocol.BlockLimit'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BlockLimit.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockLimit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BlockLimit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockLimit.toObject = function(includeInstance, msg) { + var f, obj = { + startnum: jspb.Message.getFieldWithDefault(msg, 1, 0), + endnum: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BlockLimit} + */ +proto.protocol.BlockLimit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BlockLimit; + return proto.protocol.BlockLimit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BlockLimit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BlockLimit} + */ +proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartnum(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndnum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BlockLimit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BlockLimit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BlockLimit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockLimit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartnum(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getEndnum(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 startNum = 1; + * @return {number} + */ +proto.protocol.BlockLimit.prototype.getStartnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BlockLimit.prototype.setStartnum = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 endNum = 2; + * @return {number} + */ +proto.protocol.BlockLimit.prototype.getEndnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.BlockLimit.prototype.setEndnum = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TransactionLimit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.TransactionLimit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TransactionLimit.displayName = 'proto.protocol.TransactionLimit'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TransactionLimit.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionLimit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TransactionLimit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionLimit.toObject = function(includeInstance, msg) { + var f, obj = { + transactionid: msg.getTransactionid_asB64(), + limitnum: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TransactionLimit} + */ +proto.protocol.TransactionLimit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TransactionLimit; + return proto.protocol.TransactionLimit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TransactionLimit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TransactionLimit} + */ +proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTransactionid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimitnum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TransactionLimit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TransactionLimit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TransactionLimit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionLimit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLimitnum(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes transactionId = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TransactionLimit.prototype.getTransactionid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes transactionId = 1; + * This is a type-conversion wrapper around `getTransactionid()` + * @return {string} + */ +proto.protocol.TransactionLimit.prototype.getTransactionid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTransactionid())); +}; + + +/** + * optional bytes transactionId = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTransactionid()` + * @return {!Uint8Array} + */ +proto.protocol.TransactionLimit.prototype.getTransactionid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTransactionid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionLimit.prototype.setTransactionid = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 limitNum = 2; + * @return {number} + */ +proto.protocol.TransactionLimit.prototype.getLimitnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionLimit.prototype.setLimitnum = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.AccountPaginated = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.AccountPaginated, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.AccountPaginated.displayName = 'proto.protocol.AccountPaginated'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.AccountPaginated.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountPaginated.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.AccountPaginated} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountPaginated.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && core_Tron_pb.Account.toObject(includeInstance, f), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.AccountPaginated} + */ +proto.protocol.AccountPaginated.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.AccountPaginated; + return proto.protocol.AccountPaginated.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.AccountPaginated} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.AccountPaginated} + */ +proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Account; + reader.readMessage(value,core_Tron_pb.Account.deserializeBinaryFromReader); + msg.setAccount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.AccountPaginated.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.AccountPaginated.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.AccountPaginated} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountPaginated.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + core_Tron_pb.Account.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional Account account = 1; + * @return {?proto.protocol.Account} + */ +proto.protocol.AccountPaginated.prototype.getAccount = function() { + return /** @type{?proto.protocol.Account} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Account, 1)); +}; + + +/** @param {?proto.protocol.Account|undefined} value */ +proto.protocol.AccountPaginated.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.AccountPaginated.prototype.clearAccount = function() { + this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.AccountPaginated.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 offset = 2; + * @return {number} + */ +proto.protocol.AccountPaginated.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountPaginated.prototype.setOffset = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 limit = 3; + * @return {number} + */ +proto.protocol.AccountPaginated.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountPaginated.prototype.setLimit = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TimePaginatedMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.TimePaginatedMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TimePaginatedMessage.displayName = 'proto.protocol.TimePaginatedMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TimePaginatedMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TimePaginatedMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TimePaginatedMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TimePaginatedMessage.toObject = function(includeInstance, msg) { + var f, obj = { + timemessage: (f = msg.getTimemessage()) && proto.protocol.TimeMessage.toObject(includeInstance, f), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TimePaginatedMessage} + */ +proto.protocol.TimePaginatedMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TimePaginatedMessage; + return proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TimePaginatedMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TimePaginatedMessage} + */ +proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.TimeMessage; + reader.readMessage(value,proto.protocol.TimeMessage.deserializeBinaryFromReader); + msg.setTimemessage(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TimePaginatedMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TimePaginatedMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TimePaginatedMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TimePaginatedMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimemessage(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.TimeMessage.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional TimeMessage timeMessage = 1; + * @return {?proto.protocol.TimeMessage} + */ +proto.protocol.TimePaginatedMessage.prototype.getTimemessage = function() { + return /** @type{?proto.protocol.TimeMessage} */ ( + jspb.Message.getWrapperField(this, proto.protocol.TimeMessage, 1)); +}; + + +/** @param {?proto.protocol.TimeMessage|undefined} value */ +proto.protocol.TimePaginatedMessage.prototype.setTimemessage = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TimePaginatedMessage.prototype.clearTimemessage = function() { + this.setTimemessage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TimePaginatedMessage.prototype.hasTimemessage = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 offset = 2; + * @return {number} + */ +proto.protocol.TimePaginatedMessage.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TimePaginatedMessage.prototype.setOffset = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 limit = 3; + * @return {number} + */ +proto.protocol.TimePaginatedMessage.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TimePaginatedMessage.prototype.setLimit = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.AccountNetMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.AccountNetMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.AccountNetMessage.displayName = 'proto.protocol.AccountNetMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.AccountNetMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountNetMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.AccountNetMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountNetMessage.toObject = function(includeInstance, msg) { + var f, obj = { + freenetused: jspb.Message.getFieldWithDefault(msg, 1, 0), + freenetlimit: jspb.Message.getFieldWithDefault(msg, 2, 0), + netused: jspb.Message.getFieldWithDefault(msg, 3, 0), + netlimit: jspb.Message.getFieldWithDefault(msg, 4, 0), + assetnetusedMap: (f = msg.getAssetnetusedMap()) ? f.toObject(includeInstance, undefined) : [], + assetnetlimitMap: (f = msg.getAssetnetlimitMap()) ? f.toObject(includeInstance, undefined) : [], + totalnetlimit: jspb.Message.getFieldWithDefault(msg, 7, 0), + totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.AccountNetMessage} + */ +proto.protocol.AccountNetMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.AccountNetMessage; + return proto.protocol.AccountNetMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.AccountNetMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.AccountNetMessage} + */ +proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFreenetused(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFreenetlimit(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetused(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetlimit(value); + break; + case 5: + var value = msg.getAssetnetusedMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 6: + var value = msg.getAssetnetlimitMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalnetlimit(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalnetweight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.AccountNetMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.AccountNetMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.AccountNetMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountNetMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFreenetused(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getFreenetlimit(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getNetused(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getNetlimit(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getAssetnetusedMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getAssetnetlimitMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getTotalnetlimit(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getTotalnetweight(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } +}; + + +/** + * optional int64 freeNetUsed = 1; + * @return {number} + */ +proto.protocol.AccountNetMessage.prototype.getFreenetused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountNetMessage.prototype.setFreenetused = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 freeNetLimit = 2; + * @return {number} + */ +proto.protocol.AccountNetMessage.prototype.getFreenetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountNetMessage.prototype.setFreenetlimit = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 NetUsed = 3; + * @return {number} + */ +proto.protocol.AccountNetMessage.prototype.getNetused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountNetMessage.prototype.setNetused = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 NetLimit = 4; + * @return {number} + */ +proto.protocol.AccountNetMessage.prototype.getNetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountNetMessage.prototype.setNetlimit = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * map assetNetUsed = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.AccountNetMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +proto.protocol.AccountNetMessage.prototype.clearAssetnetusedMap = function() { + this.getAssetnetusedMap().clear(); +}; + + +/** + * map assetNetLimit = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.AccountNetMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +proto.protocol.AccountNetMessage.prototype.clearAssetnetlimitMap = function() { + this.getAssetnetlimitMap().clear(); +}; + + +/** + * optional int64 TotalNetLimit = 7; + * @return {number} + */ +proto.protocol.AccountNetMessage.prototype.getTotalnetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountNetMessage.prototype.setTotalnetlimit = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * optional int64 TotalNetWeight = 8; + * @return {number} + */ +proto.protocol.AccountNetMessage.prototype.getTotalnetweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountNetMessage.prototype.setTotalnetweight = function(value) { + jspb.Message.setField(this, 8, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.AccountResourceMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.AccountResourceMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.AccountResourceMessage.displayName = 'proto.protocol.AccountResourceMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.AccountResourceMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountResourceMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.AccountResourceMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountResourceMessage.toObject = function(includeInstance, msg) { + var f, obj = { + freenetused: jspb.Message.getFieldWithDefault(msg, 1, 0), + freenetlimit: jspb.Message.getFieldWithDefault(msg, 2, 0), + netused: jspb.Message.getFieldWithDefault(msg, 3, 0), + netlimit: jspb.Message.getFieldWithDefault(msg, 4, 0), + assetnetusedMap: (f = msg.getAssetnetusedMap()) ? f.toObject(includeInstance, undefined) : [], + assetnetlimitMap: (f = msg.getAssetnetlimitMap()) ? f.toObject(includeInstance, undefined) : [], + totalnetlimit: jspb.Message.getFieldWithDefault(msg, 7, 0), + totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0), + energyused: jspb.Message.getFieldWithDefault(msg, 13, 0), + energylimit: jspb.Message.getFieldWithDefault(msg, 14, 0), + totalenergylimit: jspb.Message.getFieldWithDefault(msg, 15, 0), + totalenergyweight: jspb.Message.getFieldWithDefault(msg, 16, 0), + storageused: jspb.Message.getFieldWithDefault(msg, 21, 0), + storagelimit: jspb.Message.getFieldWithDefault(msg, 22, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.AccountResourceMessage} + */ +proto.protocol.AccountResourceMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.AccountResourceMessage; + return proto.protocol.AccountResourceMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.AccountResourceMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.AccountResourceMessage} + */ +proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFreenetused(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFreenetlimit(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetused(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetlimit(value); + break; + case 5: + var value = msg.getAssetnetusedMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 6: + var value = msg.getAssetnetlimitMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalnetlimit(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalnetweight(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergyused(value); + break; + case 14: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergylimit(value); + break; + case 15: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalenergylimit(value); + break; + case 16: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalenergyweight(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageused(value); + break; + case 22: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStoragelimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.AccountResourceMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.AccountResourceMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.AccountResourceMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountResourceMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFreenetused(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getFreenetlimit(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getNetused(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getNetlimit(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getAssetnetusedMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getAssetnetlimitMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getTotalnetlimit(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getTotalnetweight(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getEnergyused(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getEnergylimit(); + if (f !== 0) { + writer.writeInt64( + 14, + f + ); + } + f = message.getTotalenergylimit(); + if (f !== 0) { + writer.writeInt64( + 15, + f + ); + } + f = message.getTotalenergyweight(); + if (f !== 0) { + writer.writeInt64( + 16, + f + ); + } + f = message.getStorageused(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } + f = message.getStoragelimit(); + if (f !== 0) { + writer.writeInt64( + 22, + f + ); + } +}; + + +/** + * optional int64 freeNetUsed = 1; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getFreenetused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setFreenetused = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 freeNetLimit = 2; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getFreenetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setFreenetlimit = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 NetUsed = 3; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getNetused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setNetused = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 NetLimit = 4; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getNetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setNetlimit = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * map assetNetUsed = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.AccountResourceMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +proto.protocol.AccountResourceMessage.prototype.clearAssetnetusedMap = function() { + this.getAssetnetusedMap().clear(); +}; + + +/** + * map assetNetLimit = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.AccountResourceMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +proto.protocol.AccountResourceMessage.prototype.clearAssetnetlimitMap = function() { + this.getAssetnetlimitMap().clear(); +}; + + +/** + * optional int64 TotalNetLimit = 7; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getTotalnetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalnetlimit = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * optional int64 TotalNetWeight = 8; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getTotalnetweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalnetweight = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * optional int64 EnergyUsed = 13; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getEnergyused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setEnergyused = function(value) { + jspb.Message.setField(this, 13, value); +}; + + +/** + * optional int64 EnergyLimit = 14; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getEnergylimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setEnergylimit = function(value) { + jspb.Message.setField(this, 14, value); +}; + + +/** + * optional int64 TotalEnergyLimit = 15; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getTotalenergylimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalenergylimit = function(value) { + jspb.Message.setField(this, 15, value); +}; + + +/** + * optional int64 TotalEnergyWeight = 16; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getTotalenergyweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalenergyweight = function(value) { + jspb.Message.setField(this, 16, value); +}; + + +/** + * optional int64 storageUsed = 21; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getStorageused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setStorageused = function(value) { + jspb.Message.setField(this, 21, value); +}; + + +/** + * optional int64 storageLimit = 22; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getStoragelimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setStoragelimit = function(value) { + jspb.Message.setField(this, 22, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.PaginatedMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.PaginatedMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.PaginatedMessage.displayName = 'proto.protocol.PaginatedMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.PaginatedMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PaginatedMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.PaginatedMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PaginatedMessage.toObject = function(includeInstance, msg) { + var f, obj = { + offset: jspb.Message.getFieldWithDefault(msg, 1, 0), + limit: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.PaginatedMessage} + */ +proto.protocol.PaginatedMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.PaginatedMessage; + return proto.protocol.PaginatedMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.PaginatedMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.PaginatedMessage} + */ +proto.protocol.PaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOffset(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.PaginatedMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.PaginatedMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.PaginatedMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PaginatedMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOffset(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 offset = 1; + * @return {number} + */ +proto.protocol.PaginatedMessage.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.protocol.PaginatedMessage.prototype.setOffset = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 limit = 2; + * @return {number} + */ +proto.protocol.PaginatedMessage.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.PaginatedMessage.prototype.setLimit = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.EasyTransferMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.EasyTransferMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.EasyTransferMessage.displayName = 'proto.protocol.EasyTransferMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.EasyTransferMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.EasyTransferMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EasyTransferMessage.toObject = function(includeInstance, msg) { + var f, obj = { + passphrase: msg.getPassphrase_asB64(), + toaddress: msg.getToaddress_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.EasyTransferMessage} + */ +proto.protocol.EasyTransferMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.EasyTransferMessage; + return proto.protocol.EasyTransferMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.EasyTransferMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.EasyTransferMessage} + */ +proto.protocol.EasyTransferMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPassphrase(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToaddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.EasyTransferMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.EasyTransferMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EasyTransferMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPassphrase_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getToaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes passPhrase = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferMessage.prototype.getPassphrase = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes passPhrase = 1; + * This is a type-conversion wrapper around `getPassphrase()` + * @return {string} + */ +proto.protocol.EasyTransferMessage.prototype.getPassphrase_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPassphrase())); +}; + + +/** + * optional bytes passPhrase = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPassphrase()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferMessage.prototype.getPassphrase_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPassphrase())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferMessage.prototype.setPassphrase = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes toAddress = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferMessage.prototype.getToaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes toAddress = 2; + * This is a type-conversion wrapper around `getToaddress()` + * @return {string} + */ +proto.protocol.EasyTransferMessage.prototype.getToaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getToaddress())); +}; + + +/** + * optional bytes toAddress = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaddress()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferMessage.prototype.getToaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getToaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferMessage.prototype.setToaddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.protocol.EasyTransferMessage.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.EasyTransferMessage.prototype.setAmount = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.EasyTransferByPrivateMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.EasyTransferByPrivateMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.EasyTransferByPrivateMessage.displayName = 'proto.protocol.EasyTransferByPrivateMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferByPrivateMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EasyTransferByPrivateMessage.toObject = function(includeInstance, msg) { + var f, obj = { + privatekey: msg.getPrivatekey_asB64(), + toaddress: msg.getToaddress_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.EasyTransferByPrivateMessage} + */ +proto.protocol.EasyTransferByPrivateMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.EasyTransferByPrivateMessage; + return proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.EasyTransferByPrivateMessage} + */ +proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPrivatekey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToaddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.EasyTransferByPrivateMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPrivatekey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getToaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes privateKey = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes privateKey = 1; + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {string} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPrivatekey())); +}; + + +/** + * optional bytes privateKey = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPrivatekey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferByPrivateMessage.prototype.setPrivatekey = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes toAddress = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes toAddress = 2; + * This is a type-conversion wrapper around `getToaddress()` + * @return {string} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getToaddress())); +}; + + +/** + * optional bytes toAddress = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaddress()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getToaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferByPrivateMessage.prototype.setToaddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.EasyTransferByPrivateMessage.prototype.setAmount = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.EasyTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.EasyTransferResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.EasyTransferResponse.displayName = 'proto.protocol.EasyTransferResponse'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.EasyTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.EasyTransferResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EasyTransferResponse.toObject = function(includeInstance, msg) { + var f, obj = { + transaction: (f = msg.getTransaction()) && core_Tron_pb.Transaction.toObject(includeInstance, f), + result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f), + txid: msg.getTxid_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.EasyTransferResponse} + */ +proto.protocol.EasyTransferResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.EasyTransferResponse; + return proto.protocol.EasyTransferResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.EasyTransferResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.EasyTransferResponse} + */ +proto.protocol.EasyTransferResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Transaction; + reader.readMessage(value,core_Tron_pb.Transaction.deserializeBinaryFromReader); + msg.setTransaction(value); + break; + case 2: + var value = new proto.protocol.Return; + reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); + msg.setResult(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.EasyTransferResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.EasyTransferResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EasyTransferResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransaction(); + if (f != null) { + writer.writeMessage( + 1, + f, + core_Tron_pb.Transaction.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.protocol.Return.serializeBinaryToWriter + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional Transaction transaction = 1; + * @return {?proto.protocol.Transaction} + */ +proto.protocol.EasyTransferResponse.prototype.getTransaction = function() { + return /** @type{?proto.protocol.Transaction} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); +}; + + +/** @param {?proto.protocol.Transaction|undefined} value */ +proto.protocol.EasyTransferResponse.prototype.setTransaction = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.EasyTransferResponse.prototype.clearTransaction = function() { + this.setTransaction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.EasyTransferResponse.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Return result = 2; + * @return {?proto.protocol.Return} + */ +proto.protocol.EasyTransferResponse.prototype.getResult = function() { + return /** @type{?proto.protocol.Return} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Return, 2)); +}; + + +/** @param {?proto.protocol.Return|undefined} value */ +proto.protocol.EasyTransferResponse.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.EasyTransferResponse.prototype.clearResult = function() { + this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.EasyTransferResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes txid = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes txid = 3; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.protocol.EasyTransferResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferResponse.prototype.setTxid = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.AddressPrKeyPairMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.AddressPrKeyPairMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.AddressPrKeyPairMessage.displayName = 'proto.protocol.AddressPrKeyPairMessage'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.AddressPrKeyPairMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AddressPrKeyPairMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.AddressPrKeyPairMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AddressPrKeyPairMessage.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + privatekey: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.AddressPrKeyPairMessage} + */ +proto.protocol.AddressPrKeyPairMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.AddressPrKeyPairMessage; + return proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.AddressPrKeyPairMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.AddressPrKeyPairMessage} + */ +proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPrivatekey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.AddressPrKeyPairMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.AddressPrKeyPairMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPrivatekey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.protocol.AddressPrKeyPairMessage.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.protocol.AddressPrKeyPairMessage.prototype.setAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string privateKey = 2; + * @return {string} + */ +proto.protocol.AddressPrKeyPairMessage.prototype.getPrivatekey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.protocol.AddressPrKeyPairMessage.prototype.setPrivatekey = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TransactionExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionExtention.repeatedFields_, null); +}; +goog.inherits(proto.protocol.TransactionExtention, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TransactionExtention.displayName = 'proto.protocol.TransactionExtention'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.TransactionExtention.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TransactionExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionExtention.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TransactionExtention} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionExtention.toObject = function(includeInstance, msg) { + var f, obj = { + transaction: (f = msg.getTransaction()) && core_Tron_pb.Transaction.toObject(includeInstance, f), + txid: msg.getTxid_asB64(), + constantResultList: msg.getConstantResultList_asB64(), + result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TransactionExtention} + */ +proto.protocol.TransactionExtention.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TransactionExtention; + return proto.protocol.TransactionExtention.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TransactionExtention} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TransactionExtention} + */ +proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Transaction; + reader.readMessage(value,core_Tron_pb.Transaction.deserializeBinaryFromReader); + msg.setTransaction(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addConstantResult(value); + break; + case 4: + var value = new proto.protocol.Return; + reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TransactionExtention.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TransactionExtention.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TransactionExtention} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionExtention.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransaction(); + if (f != null) { + writer.writeMessage( + 1, + f, + core_Tron_pb.Transaction.serializeBinaryToWriter + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getConstantResultList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.protocol.Return.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Transaction transaction = 1; + * @return {?proto.protocol.Transaction} + */ +proto.protocol.TransactionExtention.prototype.getTransaction = function() { + return /** @type{?proto.protocol.Transaction} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); +}; + + +/** @param {?proto.protocol.Transaction|undefined} value */ +proto.protocol.TransactionExtention.prototype.setTransaction = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TransactionExtention.prototype.clearTransaction = function() { + this.setTransaction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TransactionExtention.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes txid = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TransactionExtention.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes txid = 2; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.protocol.TransactionExtention.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.protocol.TransactionExtention.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionExtention.prototype.setTxid = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * repeated bytes constant_result = 3; + * @return {!(Array|Array)} + */ +proto.protocol.TransactionExtention.prototype.getConstantResultList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes constant_result = 3; + * This is a type-conversion wrapper around `getConstantResultList()` + * @return {!Array.} + */ +proto.protocol.TransactionExtention.prototype.getConstantResultList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getConstantResultList())); +}; + + +/** + * repeated bytes constant_result = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConstantResultList()` + * @return {!Array.} + */ +proto.protocol.TransactionExtention.prototype.getConstantResultList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getConstantResultList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.TransactionExtention.prototype.setConstantResultList = function(value) { + jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.TransactionExtention.prototype.addConstantResult = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +proto.protocol.TransactionExtention.prototype.clearConstantResultList = function() { + this.setConstantResultList([]); +}; + + +/** + * optional Return result = 4; + * @return {?proto.protocol.Return} + */ +proto.protocol.TransactionExtention.prototype.getResult = function() { + return /** @type{?proto.protocol.Return} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Return, 4)); +}; + + +/** @param {?proto.protocol.Return|undefined} value */ +proto.protocol.TransactionExtention.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +proto.protocol.TransactionExtention.prototype.clearResult = function() { + this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TransactionExtention.prototype.hasResult = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BlockExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockExtention.repeatedFields_, null); +}; +goog.inherits(proto.protocol.BlockExtention, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BlockExtention.displayName = 'proto.protocol.BlockExtention'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.BlockExtention.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BlockExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockExtention.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BlockExtention} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockExtention.toObject = function(includeInstance, msg) { + var f, obj = { + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.protocol.TransactionExtention.toObject, includeInstance), + blockHeader: (f = msg.getBlockHeader()) && core_Tron_pb.BlockHeader.toObject(includeInstance, f), + blockid: msg.getBlockid_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BlockExtention} + */ +proto.protocol.BlockExtention.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BlockExtention; + return proto.protocol.BlockExtention.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BlockExtention} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BlockExtention} + */ +proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.TransactionExtention; + reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); + msg.addTransactions(value); + break; + case 2: + var value = new core_Tron_pb.BlockHeader; + reader.readMessage(value,core_Tron_pb.BlockHeader.deserializeBinaryFromReader); + msg.setBlockHeader(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BlockExtention.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BlockExtention.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BlockExtention} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockExtention.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.TransactionExtention.serializeBinaryToWriter + ); + } + f = message.getBlockHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + core_Tron_pb.BlockHeader.serializeBinaryToWriter + ); + } + f = message.getBlockid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * repeated TransactionExtention transactions = 1; + * @return {!Array.} + */ +proto.protocol.BlockExtention.prototype.getTransactionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionExtention, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.BlockExtention.prototype.setTransactionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.TransactionExtention=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.TransactionExtention} + */ +proto.protocol.BlockExtention.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TransactionExtention, opt_index); +}; + + +proto.protocol.BlockExtention.prototype.clearTransactionsList = function() { + this.setTransactionsList([]); +}; + + +/** + * optional BlockHeader block_header = 2; + * @return {?proto.protocol.BlockHeader} + */ +proto.protocol.BlockExtention.prototype.getBlockHeader = function() { + return /** @type{?proto.protocol.BlockHeader} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.BlockHeader, 2)); +}; + + +/** @param {?proto.protocol.BlockHeader|undefined} value */ +proto.protocol.BlockExtention.prototype.setBlockHeader = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.BlockExtention.prototype.clearBlockHeader = function() { + this.setBlockHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.BlockExtention.prototype.hasBlockHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes blockid = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.BlockExtention.prototype.getBlockid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes blockid = 3; + * This is a type-conversion wrapper around `getBlockid()` + * @return {string} + */ +proto.protocol.BlockExtention.prototype.getBlockid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockid())); +}; + + +/** + * optional bytes blockid = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockid()` + * @return {!Uint8Array} + */ +proto.protocol.BlockExtention.prototype.getBlockid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BlockExtention.prototype.setBlockid = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.BlockListExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockListExtention.repeatedFields_, null); +}; +goog.inherits(proto.protocol.BlockListExtention, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.BlockListExtention.displayName = 'proto.protocol.BlockListExtention'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.BlockListExtention.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.BlockListExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockListExtention.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.BlockListExtention} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockListExtention.toObject = function(includeInstance, msg) { + var f, obj = { + blockList: jspb.Message.toObjectList(msg.getBlockList(), + proto.protocol.BlockExtention.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.BlockListExtention} + */ +proto.protocol.BlockListExtention.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.BlockListExtention; + return proto.protocol.BlockListExtention.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.BlockListExtention} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.BlockListExtention} + */ +proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.BlockExtention; + reader.readMessage(value,proto.protocol.BlockExtention.deserializeBinaryFromReader); + msg.addBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.BlockListExtention.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.BlockListExtention.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.BlockListExtention} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.BlockListExtention.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.BlockExtention.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated BlockExtention block = 1; + * @return {!Array.} + */ +proto.protocol.BlockListExtention.prototype.getBlockList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockExtention, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.BlockListExtention.prototype.setBlockList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.BlockExtention=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.BlockExtention} + */ +proto.protocol.BlockListExtention.prototype.addBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.BlockExtention, opt_index); +}; + + +proto.protocol.BlockListExtention.prototype.clearBlockList = function() { + this.setBlockList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.TransactionListExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionListExtention.repeatedFields_, null); +}; +goog.inherits(proto.protocol.TransactionListExtention, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TransactionListExtention.displayName = 'proto.protocol.TransactionListExtention'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.TransactionListExtention.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TransactionListExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionListExtention.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TransactionListExtention} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionListExtention.toObject = function(includeInstance, msg) { + var f, obj = { + transactionList: jspb.Message.toObjectList(msg.getTransactionList(), + proto.protocol.TransactionExtention.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TransactionListExtention} + */ +proto.protocol.TransactionListExtention.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TransactionListExtention; + return proto.protocol.TransactionListExtention.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TransactionListExtention} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TransactionListExtention} + */ +proto.protocol.TransactionListExtention.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.TransactionExtention; + reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); + msg.addTransaction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TransactionListExtention.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TransactionListExtention.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TransactionListExtention} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionListExtention.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.TransactionExtention.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TransactionExtention transaction = 1; + * @return {!Array.} + */ +proto.protocol.TransactionListExtention.prototype.getTransactionList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionExtention, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.TransactionListExtention.prototype.setTransactionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.TransactionExtention=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.TransactionExtention} + */ +proto.protocol.TransactionListExtention.prototype.addTransaction = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TransactionExtention, opt_index); +}; + + +proto.protocol.TransactionListExtention.prototype.clearTransactionList = function() { + this.setTransactionList([]); +}; + + +goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/Contract_pb.js b/src/protocol/core/Contract_pb.js index 11d6be9..f92c970 100644 --- a/src/protocol/core/Contract_pb.js +++ b/src/protocol/core/Contract_pb.js @@ -26,9 +26,6 @@ goog.exportSymbol('proto.protocol.ExchangeTransactionContract', null, global); goog.exportSymbol('proto.protocol.ExchangeWithdrawContract', null, global); goog.exportSymbol('proto.protocol.FreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.ParticipateAssetIssueContract', null, global); -goog.exportSymbol('proto.protocol.PermissionAddKeyContract', null, global); -goog.exportSymbol('proto.protocol.PermissionDeleteKeyContract', null, global); -goog.exportSymbol('proto.protocol.PermissionUpdateKeyContract', null, global); goog.exportSymbol('proto.protocol.ProposalApproveContract', null, global); goog.exportSymbol('proto.protocol.ProposalCreateContract', null, global); goog.exportSymbol('proto.protocol.ProposalDeleteContract', null, global); @@ -41,6 +38,7 @@ goog.exportSymbol('proto.protocol.TriggerSmartContract', null, global); goog.exportSymbol('proto.protocol.UnfreezeAssetContract', null, global); goog.exportSymbol('proto.protocol.UnfreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.UpdateAssetContract', null, global); +goog.exportSymbol('proto.protocol.UpdateEnergyLimitContract', null, global); goog.exportSymbol('proto.protocol.UpdateSettingContract', null, global); goog.exportSymbol('proto.protocol.VoteAssetContract', null, global); goog.exportSymbol('proto.protocol.VoteWitnessContract', null, global); @@ -2245,6 +2243,250 @@ proto.protocol.UpdateSettingContract.prototype.setConsumeUserResourcePercent = f +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.UpdateEnergyLimitContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.UpdateEnergyLimitContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.UpdateEnergyLimitContract.displayName = 'proto.protocol.UpdateEnergyLimitContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.UpdateEnergyLimitContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.UpdateEnergyLimitContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.UpdateEnergyLimitContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + contractAddress: msg.getContractAddress_asB64(), + originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.UpdateEnergyLimitContract} + */ +proto.protocol.UpdateEnergyLimitContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.UpdateEnergyLimitContract; + return proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.UpdateEnergyLimitContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.UpdateEnergyLimitContract} + */ +proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOriginEnergyLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.UpdateEnergyLimitContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getContractAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getOriginEnergyLimit(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.UpdateEnergyLimitContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes contract_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes contract_address = 2; + * This is a type-conversion wrapper around `getContractAddress()` + * @return {string} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractAddress())); +}; + + +/** + * optional bytes contract_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractAddress()` + * @return {!Uint8Array} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.UpdateEnergyLimitContract.prototype.setContractAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 origin_energy_limit = 3; + * @return {number} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2732,6 +2974,7 @@ proto.protocol.AssetIssueContract.prototype.toObject = function(opt_includeInsta */ proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) { var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 41, ""), ownerAddress: msg.getOwnerAddress_asB64(), name: msg.getName_asB64(), abbr: msg.getAbbr_asB64(), @@ -2739,6 +2982,7 @@ proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) { frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), proto.protocol.AssetIssueContract.FrozenSupply.toObject, includeInstance), trxNum: jspb.Message.getFieldWithDefault(msg, 6, 0), + precision: jspb.Message.getFieldWithDefault(msg, 7, 0), num: jspb.Message.getFieldWithDefault(msg, 8, 0), startTime: jspb.Message.getFieldWithDefault(msg, 9, 0), endTime: jspb.Message.getFieldWithDefault(msg, 10, 0), @@ -2786,6 +3030,10 @@ proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, re } var field = reader.getFieldNumber(); switch (field) { + case 41: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOwnerAddress(value); @@ -2811,6 +3059,10 @@ proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, re var value = /** @type {number} */ (reader.readInt32()); msg.setTrxNum(value); break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPrecision(value); + break; case 8: var value = /** @type {number} */ (reader.readInt32()); msg.setNum(value); @@ -2884,6 +3136,13 @@ proto.protocol.AssetIssueContract.prototype.serializeBinary = function() { */ proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 41, + f + ); + } f = message.getOwnerAddress_asU8(); if (f.length > 0) { writer.writeBytes( @@ -2927,6 +3186,13 @@ proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, wr f ); } + f = message.getPrecision(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } f = message.getNum(); if (f !== 0) { writer.writeInt32( @@ -3176,6 +3442,21 @@ proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenDays = functio }; +/** + * optional string id = 41; + * @return {string} + */ +proto.protocol.AssetIssueContract.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, "")); +}; + + +/** @param {string} value */ +proto.protocol.AssetIssueContract.prototype.setId = function(value) { + jspb.Message.setField(this, 41, value); +}; + + /** * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} @@ -3354,6 +3635,21 @@ proto.protocol.AssetIssueContract.prototype.setTrxNum = function(value) { }; +/** + * optional int32 precision = 7; + * @return {number} + */ +proto.protocol.AssetIssueContract.prototype.getPrecision = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AssetIssueContract.prototype.setPrecision = function(value) { + jspb.Message.setField(this, 7, value); +}; + + /** * optional int32 num = 8; * @return {number} @@ -3912,7 +4208,8 @@ proto.protocol.FreezeBalanceContract.toObject = function(includeInstance, msg) { ownerAddress: msg.getOwnerAddress_asB64(), frozenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), frozenDuration: jspb.Message.getFieldWithDefault(msg, 3, 0), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0) + resource: jspb.Message.getFieldWithDefault(msg, 10, 0), + receiverAddress: msg.getReceiverAddress_asB64() }; if (includeInstance) { @@ -3965,6 +4262,14 @@ proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader = function(msg, var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); msg.setResource(value); break; + case 15: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReceiverAddress(value); + break; + case 10: + var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); + msg.setResource(value); + break; default: reader.skipField(); break; @@ -4022,10 +4327,17 @@ proto.protocol.FreezeBalanceContract.serializeBinaryToWriter = function(message, f ); } -}; - - -/** + f = message.getReceiverAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 15, + f + ); + } +}; + + +/** * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} */ @@ -4109,6 +4421,45 @@ proto.protocol.FreezeBalanceContract.prototype.setResource = function(value) { }; +/** + * optional bytes receiver_address = 15; + * @return {!(string|Uint8Array)} + */ +proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * optional bytes receiver_address = 15; + * This is a type-conversion wrapper around `getReceiverAddress()` + * @return {string} + */ +proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReceiverAddress())); +}; + + +/** + * optional bytes receiver_address = 15; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReceiverAddress()` + * @return {!Uint8Array} + */ +proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReceiverAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.FreezeBalanceContract.prototype.setReceiverAddress = function(value) { + jspb.Message.setField(this, 15, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -4157,7 +4508,8 @@ proto.protocol.UnfreezeBalanceContract.prototype.toObject = function(opt_include proto.protocol.UnfreezeBalanceContract.toObject = function(includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0) + resource: jspb.Message.getFieldWithDefault(msg, 10, 0), + receiverAddress: msg.getReceiverAddress_asB64() }; if (includeInstance) { @@ -4202,6 +4554,10 @@ proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader = function(ms var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); msg.setResource(value); break; + case 15: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReceiverAddress(value); + break; default: reader.skipField(); break; @@ -4245,6 +4601,13 @@ proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter = function(messag f ); } + f = message.getReceiverAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 15, + f + ); + } }; @@ -4302,6 +4665,45 @@ proto.protocol.UnfreezeBalanceContract.prototype.setResource = function(value) { }; +/** + * optional bytes receiver_address = 15; + * @return {!(string|Uint8Array)} + */ +proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * optional bytes receiver_address = 15; + * This is a type-conversion wrapper around `getReceiverAddress()` + * @return {string} + */ +proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReceiverAddress())); +}; + + +/** + * optional bytes receiver_address = 15; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReceiverAddress()` + * @return {!Uint8Array} + */ +proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReceiverAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.UnfreezeBalanceContract.prototype.setReceiverAddress = function(value) { + jspb.Message.setField(this, 15, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -5614,7 +6016,9 @@ proto.protocol.CreateSmartContract.prototype.toObject = function(opt_includeInst proto.protocol.CreateSmartContract.toObject = function(includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), - newContract: (f = msg.getNewContract()) && core_Tron_pb.SmartContract.toObject(includeInstance, f) + newContract: (f = msg.getNewContract()) && core_Tron_pb.SmartContract.toObject(includeInstance, f), + callTokenValue: jspb.Message.getFieldWithDefault(msg, 3, 0), + tokenId: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -5660,6 +6064,14 @@ proto.protocol.CreateSmartContract.deserializeBinaryFromReader = function(msg, r reader.readMessage(value,core_Tron_pb.SmartContract.deserializeBinaryFromReader); msg.setNewContract(value); break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCallTokenValue(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTokenId(value); + break; default: reader.skipField(); break; @@ -5704,6 +6116,20 @@ proto.protocol.CreateSmartContract.serializeBinaryToWriter = function(message, w core_Tron_pb.SmartContract.serializeBinaryToWriter ); } + f = message.getCallTokenValue(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTokenId(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } }; @@ -5776,6 +6202,37 @@ proto.protocol.CreateSmartContract.prototype.hasNewContract = function() { }; +/** + * optional int64 call_token_value = 3; + * @return {number} + */ +proto.protocol.CreateSmartContract.prototype.getCallTokenValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.CreateSmartContract.prototype.setCallTokenValue = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * optional int64 token_id = 4; + * @return {number} + */ +proto.protocol.CreateSmartContract.prototype.getTokenId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.CreateSmartContract.prototype.setTokenId = function(value) { + jspb.Message.setField(this, 4, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -5826,7 +6283,9 @@ proto.protocol.TriggerSmartContract.toObject = function(includeInstance, msg) { ownerAddress: msg.getOwnerAddress_asB64(), contractAddress: msg.getContractAddress_asB64(), callValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - data: msg.getData_asB64() + data: msg.getData_asB64(), + callTokenValue: jspb.Message.getFieldWithDefault(msg, 5, 0), + tokenId: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -5879,6 +6338,14 @@ proto.protocol.TriggerSmartContract.deserializeBinaryFromReader = function(msg, var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setData(value); break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCallTokenValue(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTokenId(value); + break; default: reader.skipField(); break; @@ -5936,6 +6403,20 @@ proto.protocol.TriggerSmartContract.serializeBinaryToWriter = function(message, f ); } + f = message.getCallTokenValue(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTokenId(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } }; @@ -6071,6 +6552,36 @@ proto.protocol.TriggerSmartContract.prototype.setData = function(value) { }; +/** + * optional int64 call_token_value = 5; + * @return {number} + */ +proto.protocol.TriggerSmartContract.prototype.getCallTokenValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TriggerSmartContract.prototype.setCallTokenValue = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int64 token_id = 6; + * @return {number} + */ +proto.protocol.TriggerSmartContract.prototype.getTokenId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TriggerSmartContract.prototype.setTokenId = function(value) { + jspb.Message.setField(this, 6, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -7812,943 +8323,6 @@ proto.protocol.ExchangeTransactionContract.prototype.setExpected = function(valu }; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountPermissionUpdateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AccountPermissionUpdateContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.AccountPermissionUpdateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.AccountPermissionUpdateContract.displayName = 'proto.protocol.AccountPermissionUpdateContract'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.AccountPermissionUpdateContract.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountPermissionUpdateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountPermissionUpdateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountPermissionUpdateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - core_Tron_pb.Permission.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountPermissionUpdateContract} - */ -proto.protocol.AccountPermissionUpdateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountPermissionUpdateContract; - return proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountPermissionUpdateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountPermissionUpdateContract} - */ -proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new core_Tron_pb.Permission; - reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); - msg.addPermissions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountPermissionUpdateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPermissionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - core_Tron_pb.Permission.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.AccountPermissionUpdateContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * repeated Permission permissions = 2; - * @return {!Array.} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getPermissionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Permission, 2)); -}; - - -/** @param {!Array.} value */ -proto.protocol.AccountPermissionUpdateContract.prototype.setPermissionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.Permission=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Permission} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Permission, opt_index); -}; - - -proto.protocol.AccountPermissionUpdateContract.prototype.clearPermissionsList = function() { - this.setPermissionsList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.PermissionAddKeyContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PermissionAddKeyContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.PermissionAddKeyContract.displayName = 'proto.protocol.PermissionAddKeyContract'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PermissionAddKeyContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PermissionAddKeyContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PermissionAddKeyContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionAddKeyContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - key: (f = msg.getKey()) && core_Tron_pb.Key.toObject(includeInstance, f), - permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.PermissionAddKeyContract} - */ -proto.protocol.PermissionAddKeyContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PermissionAddKeyContract; - return proto.protocol.PermissionAddKeyContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PermissionAddKeyContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PermissionAddKeyContract} - */ -proto.protocol.PermissionAddKeyContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new core_Tron_pb.Key; - reader.readMessage(value,core_Tron_pb.Key.deserializeBinaryFromReader); - msg.setKey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPermissionName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PermissionAddKeyContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PermissionAddKeyContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.PermissionAddKeyContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionAddKeyContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKey(); - if (f != null) { - writer.writeMessage( - 2, - f, - core_Tron_pb.Key.serializeBinaryToWriter - ); - } - f = message.getPermissionName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.PermissionAddKeyContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional Key key = 2; - * @return {?proto.protocol.Key} - */ -proto.protocol.PermissionAddKeyContract.prototype.getKey = function() { - return /** @type{?proto.protocol.Key} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Key, 2)); -}; - - -/** @param {?proto.protocol.Key|undefined} value */ -proto.protocol.PermissionAddKeyContract.prototype.setKey = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.protocol.PermissionAddKeyContract.prototype.clearKey = function() { - this.setKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.PermissionAddKeyContract.prototype.hasKey = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string permission_name = 3; - * @return {string} - */ -proto.protocol.PermissionAddKeyContract.prototype.getPermissionName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.protocol.PermissionAddKeyContract.prototype.setPermissionName = function(value) { - jspb.Message.setField(this, 3, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.PermissionUpdateKeyContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PermissionUpdateKeyContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.PermissionUpdateKeyContract.displayName = 'proto.protocol.PermissionUpdateKeyContract'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PermissionUpdateKeyContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PermissionUpdateKeyContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionUpdateKeyContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - key: (f = msg.getKey()) && core_Tron_pb.Key.toObject(includeInstance, f), - permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.PermissionUpdateKeyContract} - */ -proto.protocol.PermissionUpdateKeyContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PermissionUpdateKeyContract; - return proto.protocol.PermissionUpdateKeyContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PermissionUpdateKeyContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PermissionUpdateKeyContract} - */ -proto.protocol.PermissionUpdateKeyContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new core_Tron_pb.Key; - reader.readMessage(value,core_Tron_pb.Key.deserializeBinaryFromReader); - msg.setKey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPermissionName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PermissionUpdateKeyContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.PermissionUpdateKeyContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionUpdateKeyContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKey(); - if (f != null) { - writer.writeMessage( - 2, - f, - core_Tron_pb.Key.serializeBinaryToWriter - ); - } - f = message.getPermissionName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.PermissionUpdateKeyContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional Key key = 2; - * @return {?proto.protocol.Key} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getKey = function() { - return /** @type{?proto.protocol.Key} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Key, 2)); -}; - - -/** @param {?proto.protocol.Key|undefined} value */ -proto.protocol.PermissionUpdateKeyContract.prototype.setKey = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.protocol.PermissionUpdateKeyContract.prototype.clearKey = function() { - this.setKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.hasKey = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string permission_name = 3; - * @return {string} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getPermissionName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.protocol.PermissionUpdateKeyContract.prototype.setPermissionName = function(value) { - jspb.Message.setField(this, 3, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.PermissionDeleteKeyContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PermissionDeleteKeyContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.PermissionDeleteKeyContract.displayName = 'proto.protocol.PermissionDeleteKeyContract'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PermissionDeleteKeyContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PermissionDeleteKeyContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionDeleteKeyContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - keyAddress: msg.getKeyAddress_asB64(), - permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.PermissionDeleteKeyContract} - */ -proto.protocol.PermissionDeleteKeyContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PermissionDeleteKeyContract; - return proto.protocol.PermissionDeleteKeyContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PermissionDeleteKeyContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PermissionDeleteKeyContract} - */ -proto.protocol.PermissionDeleteKeyContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKeyAddress(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPermissionName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PermissionDeleteKeyContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.PermissionDeleteKeyContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionDeleteKeyContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKeyAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPermissionName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.PermissionDeleteKeyContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional bytes key_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes key_address = 2; - * This is a type-conversion wrapper around `getKeyAddress()` - * @return {string} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKeyAddress())); -}; - - -/** - * optional bytes key_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeyAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKeyAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.PermissionDeleteKeyContract.prototype.setKeyAddress = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional string permission_name = 3; - * @return {string} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getPermissionName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.protocol.PermissionDeleteKeyContract.prototype.setPermissionName = function(value) { - jspb.Message.setField(this, 3, value); -}; - - /** * @enum {number} */ diff --git a/src/protocol/core/Discover_pb.js b/src/protocol/core/Discover_pb.js index 2cb157a..2bec12c 100644 --- a/src/protocol/core/Discover_pb.js +++ b/src/protocol/core/Discover_pb.js @@ -1378,175 +1378,4 @@ proto.protocol.BackupMessage.prototype.setPriority = function(value) { }; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.BackupMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.BackupMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.BackupMessage.displayName = 'proto.protocol.BackupMessage'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.BackupMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BackupMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.BackupMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BackupMessage.toObject = function(includeInstance, msg) { - var f, obj = { - flag: jspb.Message.getFieldWithDefault(msg, 1, false), - priority: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BackupMessage} - */ -proto.protocol.BackupMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BackupMessage; - return proto.protocol.BackupMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.BackupMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BackupMessage} - */ -proto.protocol.BackupMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFlag(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPriority(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BackupMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BackupMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BackupMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BackupMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFlag(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getPriority(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional bool flag = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.protocol.BackupMessage.prototype.getFlag = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); -}; - - -/** @param {boolean} value */ -proto.protocol.BackupMessage.prototype.setFlag = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional int32 priority = 2; - * @return {number} - */ -proto.protocol.BackupMessage.prototype.getPriority = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.protocol.BackupMessage.prototype.setPriority = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/Tron_pb.js b/src/protocol/core/Tron_pb.js index 6425585..571b3fe 100644 --- a/src/protocol/core/Tron_pb.js +++ b/src/protocol/core/Tron_pb.js @@ -28,6 +28,8 @@ goog.exportSymbol('proto.protocol.ChainInventory', null, global); goog.exportSymbol('proto.protocol.ChainInventory.BlockId', null, global); goog.exportSymbol('proto.protocol.ChainParameters', null, global); goog.exportSymbol('proto.protocol.ChainParameters.ChainParameter', null, global); +goog.exportSymbol('proto.protocol.DelegatedResource', null, global); +goog.exportSymbol('proto.protocol.DelegatedResourceAccountIndex', null, global); goog.exportSymbol('proto.protocol.DisconnectMessage', null, global); goog.exportSymbol('proto.protocol.DynamicProperties', null, global); goog.exportSymbol('proto.protocol.Exchange', null, global); @@ -39,8 +41,6 @@ goog.exportSymbol('proto.protocol.Inventory', null, global); goog.exportSymbol('proto.protocol.Inventory.InventoryType', null, global); goog.exportSymbol('proto.protocol.Items', null, global); goog.exportSymbol('proto.protocol.Items.ItemType', null, global); -goog.exportSymbol('proto.protocol.Key', null, global); -goog.exportSymbol('proto.protocol.Permission', null, global); goog.exportSymbol('proto.protocol.Proposal', null, global); goog.exportSymbol('proto.protocol.Proposal.State', null, global); goog.exportSymbol('proto.protocol.ReasonCode', null, global); @@ -71,6 +71,7 @@ goog.exportSymbol('proto.protocol.Vote', null, global); goog.exportSymbol('proto.protocol.Votes', null, global); goog.exportSymbol('proto.protocol.Witness', null, global); goog.exportSymbol('proto.protocol.authority', null, global); +goog.exportSymbol('proto.protocol.permission', null, global); /** * Generated by JsPbCodeGenerator. @@ -1640,9 +1641,12 @@ proto.protocol.Account.toObject = function(includeInstance, msg) { votesList: jspb.Message.toObjectList(msg.getVotesList(), proto.protocol.Vote.toObject, includeInstance), assetMap: (f = msg.getAssetMap()) ? f.toObject(includeInstance, undefined) : [], + assetv2Map: (f = msg.getAssetv2Map()) ? f.toObject(includeInstance, undefined) : [], frozenList: jspb.Message.toObjectList(msg.getFrozenList(), proto.protocol.Account.Frozen.toObject, includeInstance), netUsage: jspb.Message.getFieldWithDefault(msg, 8, 0), + acquiredDelegatedFrozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 41, 0), + delegatedFrozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 42, 0), createTime: jspb.Message.getFieldWithDefault(msg, 9, 0), latestOprationTime: jspb.Message.getFieldWithDefault(msg, 10, 0), allowance: jspb.Message.getFieldWithDefault(msg, 11, 0), @@ -1653,16 +1657,17 @@ proto.protocol.Account.toObject = function(includeInstance, msg) { frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), proto.protocol.Account.Frozen.toObject, includeInstance), assetIssuedName: msg.getAssetIssuedName_asB64(), + assetIssuedId: msg.getAssetIssuedId_asB64(), latestAssetOperationTimeMap: (f = msg.getLatestAssetOperationTimeMap()) ? f.toObject(includeInstance, undefined) : [], + latestAssetOperationTimev2Map: (f = msg.getLatestAssetOperationTimev2Map()) ? f.toObject(includeInstance, undefined) : [], freeNetUsage: jspb.Message.getFieldWithDefault(msg, 19, 0), freeAssetNetUsageMap: (f = msg.getFreeAssetNetUsageMap()) ? f.toObject(includeInstance, undefined) : [], + freeAssetNetUsagev2Map: (f = msg.getFreeAssetNetUsagev2Map()) ? f.toObject(includeInstance, undefined) : [], latestConsumeTime: jspb.Message.getFieldWithDefault(msg, 21, 0), latestConsumeFreeTime: jspb.Message.getFieldWithDefault(msg, 22, 0), accountId: msg.getAccountId_asB64(), accountResource: (f = msg.getAccountResource()) && proto.protocol.Account.AccountResource.toObject(includeInstance, f), - codehash: msg.getCodehash_asB64(), - permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - proto.protocol.Permission.toObject, includeInstance) + codehash: msg.getCodehash_asB64() }; if (includeInstance) { @@ -1726,6 +1731,12 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; + case 56: + var value = msg.getAssetv2Map(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; case 7: var value = new proto.protocol.Account.Frozen; reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); @@ -1735,6 +1746,14 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readInt64()); msg.setNetUsage(value); break; + case 41: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAcquiredDelegatedFrozenBalanceForBandwidth(value); + break; + case 42: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDelegatedFrozenBalanceForBandwidth(value); + break; case 9: var value = /** @type {number} */ (reader.readInt64()); msg.setCreateTime(value); @@ -1772,12 +1791,22 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAssetIssuedName(value); break; + case 57: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAssetIssuedId(value); + break; case 18: var value = msg.getLatestAssetOperationTimeMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; + case 58: + var value = msg.getLatestAssetOperationTimev2Map(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; case 19: var value = /** @type {number} */ (reader.readInt64()); msg.setFreeNetUsage(value); @@ -1788,6 +1817,12 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; + case 59: + var value = msg.getFreeAssetNetUsagev2Map(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; case 21: var value = /** @type {number} */ (reader.readInt64()); msg.setLatestConsumeTime(value); @@ -1809,11 +1844,6 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setCodehash(value); break; - case 31: - var value = new proto.protocol.Permission; - reader.readMessage(value,proto.protocol.Permission.deserializeBinaryFromReader); - msg.addPermissions(value); - break; default: reader.skipField(); break; @@ -1883,6 +1913,10 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { if (f && f.getLength() > 0) { f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } + f = message.getAssetv2Map(true); + if (f && f.getLength() > 0) { + f.serializeBinary(56, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } f = message.getFrozenList(); if (f.length > 0) { writer.writeRepeatedMessage( @@ -1898,6 +1932,20 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getAcquiredDelegatedFrozenBalanceForBandwidth(); + if (f !== 0) { + writer.writeInt64( + 41, + f + ); + } + f = message.getDelegatedFrozenBalanceForBandwidth(); + if (f !== 0) { + writer.writeInt64( + 42, + f + ); + } f = message.getCreateTime(); if (f !== 0) { writer.writeInt64( @@ -1962,10 +2010,21 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getAssetIssuedId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 57, + f + ); + } f = message.getLatestAssetOperationTimeMap(true); if (f && f.getLength() > 0) { f.serializeBinary(18, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } + f = message.getLatestAssetOperationTimev2Map(true); + if (f && f.getLength() > 0) { + f.serializeBinary(58, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } f = message.getFreeNetUsage(); if (f !== 0) { writer.writeInt64( @@ -1977,6 +2036,10 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { if (f && f.getLength() > 0) { f.serializeBinary(20, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } + f = message.getFreeAssetNetUsagev2Map(true); + if (f && f.getLength() > 0) { + f.serializeBinary(59, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } f = message.getLatestConsumeTime(); if (f !== 0) { writer.writeInt64( @@ -2013,14 +2076,6 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getPermissionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 31, - f, - proto.protocol.Permission.serializeBinaryToWriter - ); - } }; @@ -2243,6 +2298,8 @@ proto.protocol.Account.AccountResource.toObject = function(includeInstance, msg) energyUsage: jspb.Message.getFieldWithDefault(msg, 1, 0), frozenBalanceForEnergy: (f = msg.getFrozenBalanceForEnergy()) && proto.protocol.Account.Frozen.toObject(includeInstance, f), latestConsumeTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 3, 0), + acquiredDelegatedFrozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 4, 0), + delegatedFrozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 5, 0), storageLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), storageUsage: jspb.Message.getFieldWithDefault(msg, 7, 0), latestExchangeStorageTime: jspb.Message.getFieldWithDefault(msg, 8, 0) @@ -2295,6 +2352,14 @@ proto.protocol.Account.AccountResource.deserializeBinaryFromReader = function(ms var value = /** @type {number} */ (reader.readInt64()); msg.setLatestConsumeTimeForEnergy(value); break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAcquiredDelegatedFrozenBalanceForEnergy(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDelegatedFrozenBalanceForEnergy(value); + break; case 6: var value = /** @type {number} */ (reader.readInt64()); msg.setStorageLimit(value); @@ -2358,6 +2423,20 @@ proto.protocol.Account.AccountResource.serializeBinaryToWriter = function(messag f ); } + f = message.getAcquiredDelegatedFrozenBalanceForEnergy(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getDelegatedFrozenBalanceForEnergy(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } f = message.getStorageLimit(); if (f !== 0) { writer.writeInt64( @@ -2442,6 +2521,36 @@ proto.protocol.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy = }; +/** + * optional int64 acquired_delegated_frozen_balance_for_energy = 4; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 delegated_frozen_balance_for_energy = 5; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy = function(value) { + jspb.Message.setField(this, 5, value); +}; + + /** * optional int64 storage_limit = 6; * @return {number} @@ -2644,6 +2753,24 @@ proto.protocol.Account.prototype.clearAssetMap = function() { }; +/** + * map assetV2 = 56; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getAssetv2Map = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 56, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearAssetv2Map = function() { + this.getAssetv2Map().clear(); +}; + + /** * repeated Frozen frozen = 7; * @return {!Array.} @@ -2690,6 +2817,36 @@ proto.protocol.Account.prototype.setNetUsage = function(value) { }; +/** + * optional int64 acquired_delegated_frozen_balance_for_bandwidth = 41; + * @return {number} + */ +proto.protocol.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 41, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth = function(value) { + jspb.Message.setField(this, 41, value); +}; + + +/** + * optional int64 delegated_frozen_balance_for_bandwidth = 42; + * @return {number} + */ +proto.protocol.Account.prototype.getDelegatedFrozenBalanceForBandwidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 42, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setDelegatedFrozenBalanceForBandwidth = function(value) { + jspb.Message.setField(this, 42, value); +}; + + /** * optional int64 create_time = 9; * @return {number} @@ -2893,6 +3050,45 @@ proto.protocol.Account.prototype.setAssetIssuedName = function(value) { }; +/** + * optional bytes asset_issued_ID = 57; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Account.prototype.getAssetIssuedId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 57, "")); +}; + + +/** + * optional bytes asset_issued_ID = 57; + * This is a type-conversion wrapper around `getAssetIssuedId()` + * @return {string} + */ +proto.protocol.Account.prototype.getAssetIssuedId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAssetIssuedId())); +}; + + +/** + * optional bytes asset_issued_ID = 57; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAssetIssuedId()` + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.getAssetIssuedId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAssetIssuedId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Account.prototype.setAssetIssuedId = function(value) { + jspb.Message.setField(this, 57, value); +}; + + /** * map latest_asset_operation_time = 18; * @param {boolean=} opt_noLazyCreate Do not create the map if @@ -2911,6 +3107,24 @@ proto.protocol.Account.prototype.clearLatestAssetOperationTimeMap = function() { }; +/** + * map latest_asset_operation_timeV2 = 58; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getLatestAssetOperationTimev2Map = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 58, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearLatestAssetOperationTimev2Map = function() { + this.getLatestAssetOperationTimev2Map().clear(); +}; + + /** * optional int64 free_net_usage = 19; * @return {number} @@ -2944,6 +3158,24 @@ proto.protocol.Account.prototype.clearFreeAssetNetUsageMap = function() { }; +/** + * map free_asset_net_usageV2 = 59; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getFreeAssetNetUsagev2Map = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 59, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearFreeAssetNetUsagev2Map = function() { + this.getFreeAssetNetUsagev2Map().clear(); +}; + + /** * optional int64 latest_consume_time = 21; * @return {number} @@ -3082,37 +3314,6 @@ proto.protocol.Account.prototype.setCodehash = function(value) { }; -/** - * repeated Permission permissions = 31; - * @return {!Array.} - */ -proto.protocol.Account.prototype.getPermissionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Permission, 31)); -}; - - -/** @param {!Array.} value */ -proto.protocol.Account.prototype.setPermissionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 31, value); -}; - - -/** - * @param {!proto.protocol.Permission=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Permission} - */ -proto.protocol.Account.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 31, opt_value, proto.protocol.Permission, opt_index); -}; - - -proto.protocol.Account.prototype.clearPermissionsList = function() { - this.setPermissionsList([]); -}; - - /** * Generated by JsPbCodeGenerator. @@ -3124,12 +3325,12 @@ proto.protocol.Account.prototype.clearPermissionsList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Key = function(opt_data) { +proto.protocol.DelegatedResource = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Key, jspb.Message); +goog.inherits(proto.protocol.DelegatedResource, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Key.displayName = 'proto.protocol.Key'; + proto.protocol.DelegatedResource.displayName = 'proto.protocol.DelegatedResource'; } @@ -3144,8 +3345,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Key.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Key.toObject(opt_includeInstance, this); +proto.protocol.DelegatedResource.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DelegatedResource.toObject(opt_includeInstance, this); }; @@ -3154,14 +3355,18 @@ proto.protocol.Key.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Key} msg The msg instance to transform. + * @param {!proto.protocol.DelegatedResource} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Key.toObject = function(includeInstance, msg) { +proto.protocol.DelegatedResource.toObject = function(includeInstance, msg) { var f, obj = { - address: msg.getAddress_asB64(), - weight: jspb.Message.getFieldWithDefault(msg, 2, 0) + from: msg.getFrom_asB64(), + to: msg.getTo_asB64(), + frozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 3, 0), + frozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 4, 0), + expireTimeForBandwidth: jspb.Message.getFieldWithDefault(msg, 5, 0), + expireTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -3175,23 +3380,23 @@ proto.protocol.Key.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Key} + * @return {!proto.protocol.DelegatedResource} */ -proto.protocol.Key.deserializeBinary = function(bytes) { +proto.protocol.DelegatedResource.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Key; - return proto.protocol.Key.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.DelegatedResource; + return proto.protocol.DelegatedResource.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Key} msg The message object to deserialize into. + * @param {!proto.protocol.DelegatedResource} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Key} + * @return {!proto.protocol.DelegatedResource} */ -proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.DelegatedResource.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3200,11 +3405,27 @@ proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); + msg.setFrom(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTo(value); + break; + case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setWeight(value); + msg.setFrozenBalanceForBandwidth(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFrozenBalanceForEnergy(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpireTimeForBandwidth(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpireTimeForEnergy(value); break; default: reader.skipField(); @@ -3219,9 +3440,9 @@ proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Key.prototype.serializeBinary = function() { +proto.protocol.DelegatedResource.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Key.serializeBinaryToWriter(this, writer); + proto.protocol.DelegatedResource.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3229,23 +3450,51 @@ proto.protocol.Key.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Key} message + * @param {!proto.protocol.DelegatedResource} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Key.serializeBinaryToWriter = function(message, writer) { +proto.protocol.DelegatedResource.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress_asU8(); + f = message.getFrom_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getWeight(); + f = message.getTo_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getFrozenBalanceForBandwidth(); if (f !== 0) { writer.writeInt64( - 2, + 3, + f + ); + } + f = message.getFrozenBalanceForEnergy(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getExpireTimeForBandwidth(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getExpireTimeForEnergy(); + if (f !== 0) { + writer.writeInt64( + 6, f ); } @@ -3253,58 +3502,142 @@ proto.protocol.Key.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes address = 1; + * optional bytes from = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.Key.prototype.getAddress = function() { +proto.protocol.DelegatedResource.prototype.getFrom = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` + * optional bytes from = 1; + * This is a type-conversion wrapper around `getFrom()` * @return {string} */ -proto.protocol.Key.prototype.getAddress_asB64 = function() { +proto.protocol.DelegatedResource.prototype.getFrom_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); + this.getFrom())); }; /** - * optional bytes address = 1; + * optional bytes from = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` + * This is a type-conversion wrapper around `getFrom()` * @return {!Uint8Array} */ -proto.protocol.Key.prototype.getAddress_asU8 = function() { +proto.protocol.DelegatedResource.prototype.getFrom_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); + this.getFrom())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Key.prototype.setAddress = function(value) { +proto.protocol.DelegatedResource.prototype.setFrom = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 weight = 2; - * @return {number} + * optional bytes to = 2; + * @return {!(string|Uint8Array)} */ -proto.protocol.Key.prototype.getWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.DelegatedResource.prototype.getTo = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.protocol.Key.prototype.setWeight = function(value) { - jspb.Message.setField(this, 2, value); -}; - +/** + * optional bytes to = 2; + * This is a type-conversion wrapper around `getTo()` + * @return {string} + */ +proto.protocol.DelegatedResource.prototype.getTo_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTo())); +}; + + +/** + * optional bytes to = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTo()` + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResource.prototype.getTo_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTo())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.DelegatedResource.prototype.setTo = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 frozen_balance_for_bandwidth = 3; + * @return {number} + */ +proto.protocol.DelegatedResource.prototype.getFrozenBalanceForBandwidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.DelegatedResource.prototype.setFrozenBalanceForBandwidth = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 frozen_balance_for_energy = 4; + * @return {number} + */ +proto.protocol.DelegatedResource.prototype.getFrozenBalanceForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.DelegatedResource.prototype.setFrozenBalanceForEnergy = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 expire_time_for_bandwidth = 5; + * @return {number} + */ +proto.protocol.DelegatedResource.prototype.getExpireTimeForBandwidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.DelegatedResource.prototype.setExpireTimeForBandwidth = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int64 expire_time_for_energy = 6; + * @return {number} + */ +proto.protocol.DelegatedResource.prototype.getExpireTimeForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.protocol.DelegatedResource.prototype.setExpireTimeForEnergy = function(value) { + jspb.Message.setField(this, 6, value); +}; + /** @@ -3317,8 +3650,189 @@ proto.protocol.Key.prototype.setWeight = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.Permission = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Permission.repeatedFields_, null); +proto.protocol.authority = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.authority, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.authority.displayName = 'proto.protocol.authority'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.authority.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.authority} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.authority.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), + permissionName: msg.getPermissionName_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.authority} + */ +proto.protocol.authority.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.authority; + return proto.protocol.authority.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.authority} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.authority} + */ +proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setWeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.authority.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.authority.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.authority} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getWeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.authority.prototype.getAccount = function() { + return /** @type{?proto.protocol.AccountId} */ ( + jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); +}; + + +/** @param {?proto.protocol.AccountId|undefined} value */ +proto.protocol.authority.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.authority.prototype.clearAccount = function() { + this.setAccount(undefined); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Key.prototype.setAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 weight = 2; + * @return {number} + */ +proto.protocol.authority.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** @param {number} value */ +proto.protocol.Key.prototype.setWeight = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.authority.prototype.getPermissionName = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; goog.inherits(proto.protocol.Permission, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -3344,8 +3858,9 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Permission.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Permission.toObject(opt_includeInstance, this); +proto.protocol.authority.prototype.getPermissionName_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPermissionName())); }; @@ -3431,51 +3946,15 @@ proto.protocol.Permission.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Permission.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Permission.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.authority.prototype.getPermissionName_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPermissionName())); }; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Permission} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Permission.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getThreshold(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getParent(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getKeysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.protocol.Key.serializeBinaryToWriter - ); - } + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.authority.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -3566,12 +4045,12 @@ proto.protocol.Permission.prototype.clearKeysList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.authority = function(opt_data) { +proto.protocol.permission = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.authority, jspb.Message); +goog.inherits(proto.protocol.permission, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.authority.displayName = 'proto.protocol.authority'; + proto.protocol.permission.displayName = 'proto.protocol.permission'; } @@ -3586,8 +4065,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.authority.toObject(opt_includeInstance, this); +proto.protocol.permission.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.permission.toObject(opt_includeInstance, this); }; @@ -3596,11 +4075,11 @@ proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.authority} msg The msg instance to transform. + * @param {!proto.protocol.permission} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.authority.toObject = function(includeInstance, msg) { +proto.protocol.permission.toObject = function(includeInstance, msg) { var f, obj = { account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), permissionName: msg.getPermissionName_asB64() @@ -3617,23 +4096,23 @@ proto.protocol.authority.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.authority} + * @return {!proto.protocol.permission} */ -proto.protocol.authority.deserializeBinary = function(bytes) { +proto.protocol.permission.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.authority; - return proto.protocol.authority.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.permission; + return proto.protocol.permission.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.authority} msg The message object to deserialize into. + * @param {!proto.protocol.permission} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.authority} + * @return {!proto.protocol.permission} */ -proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.permission.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3662,9 +4141,9 @@ proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.authority.prototype.serializeBinary = function() { +proto.protocol.permission.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.authority.serializeBinaryToWriter(this, writer); + proto.protocol.permission.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3672,11 +4151,11 @@ proto.protocol.authority.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.authority} message + * @param {!proto.protocol.permission} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { +proto.protocol.permission.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAccount(); if (f != null) { @@ -3700,19 +4179,19 @@ proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { * optional AccountId account = 1; * @return {?proto.protocol.AccountId} */ -proto.protocol.authority.prototype.getAccount = function() { +proto.protocol.permission.prototype.getAccount = function() { return /** @type{?proto.protocol.AccountId} */ ( jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); }; /** @param {?proto.protocol.AccountId|undefined} value */ -proto.protocol.authority.prototype.setAccount = function(value) { +proto.protocol.permission.prototype.setAccount = function(value) { jspb.Message.setWrapperField(this, 1, value); }; -proto.protocol.authority.prototype.clearAccount = function() { +proto.protocol.permission.prototype.clearAccount = function() { this.setAccount(undefined); }; @@ -3721,7 +4200,7 @@ proto.protocol.authority.prototype.clearAccount = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.protocol.authority.prototype.hasAccount = function() { +proto.protocol.permission.prototype.hasAccount = function() { return jspb.Message.getField(this, 1) != null; }; @@ -5917,10 +6396,7 @@ proto.protocol.Transaction.Contract.ContractType = { EXCHANGEINJECTCONTRACT: 42, EXCHANGEWITHDRAWCONTRACT: 43, EXCHANGETRANSACTIONCONTRACT: 44, - ACCOUNTPERMISSIONUPDATECONTRACT: 45, - PERMISSIONADDKEYCONTRACT: 46, - PERMISSIONUPDATEKEYCONTRACT: 47, - PERMISSIONDELETEKEYCONTRACT: 48 + UPDATEENERGYLIMITCONTRACT: 45 }; /** @@ -6096,8 +6572,13 @@ proto.protocol.Transaction.Result.toObject = function(includeInstance, msg) { fee: jspb.Message.getFieldWithDefault(msg, 1, 0), ret: jspb.Message.getFieldWithDefault(msg, 2, 0), contractret: jspb.Message.getFieldWithDefault(msg, 3, 0), + assetissueid: jspb.Message.getFieldWithDefault(msg, 14, ""), withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), - unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0) + unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0), + exchangeReceivedAmount: jspb.Message.getFieldWithDefault(msg, 18, 0), + exchangeInjectAnotherAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), + exchangeWithdrawAnotherAmount: jspb.Message.getFieldWithDefault(msg, 20, 0), + exchangeId: jspb.Message.getFieldWithDefault(msg, 21, 0) }; if (includeInstance) { @@ -6146,6 +6627,10 @@ proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, re var value = /** @type {!proto.protocol.Transaction.Result.contractResult} */ (reader.readEnum()); msg.setContractret(value); break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setAssetissueid(value); + break; case 15: var value = /** @type {number} */ (reader.readInt64()); msg.setWithdrawAmount(value); @@ -6154,6 +6639,22 @@ proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, re var value = /** @type {number} */ (reader.readInt64()); msg.setUnfreezeAmount(value); break; + case 18: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeReceivedAmount(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeInjectAnotherAmount(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeWithdrawAnotherAmount(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeId(value); + break; default: reader.skipField(); break; @@ -6204,6 +6705,13 @@ proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, wr f ); } + f = message.getAssetissueid(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } f = message.getWithdrawAmount(); if (f !== 0) { writer.writeInt64( @@ -6218,6 +6726,34 @@ proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, wr f ); } + f = message.getExchangeReceivedAmount(); + if (f !== 0) { + writer.writeInt64( + 18, + f + ); + } + f = message.getExchangeInjectAnotherAmount(); + if (f !== 0) { + writer.writeInt64( + 19, + f + ); + } + f = message.getExchangeWithdrawAnotherAmount(); + if (f !== 0) { + writer.writeInt64( + 20, + f + ); + } + f = message.getExchangeId(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } }; @@ -6294,6 +6830,21 @@ proto.protocol.Transaction.Result.prototype.setContractret = function(value) { }; +/** + * optional string assetIssueID = 14; + * @return {string} + */ +proto.protocol.Transaction.Result.prototype.getAssetissueid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** @param {string} value */ +proto.protocol.Transaction.Result.prototype.setAssetissueid = function(value) { + jspb.Message.setField(this, 14, value); +}; + + /** * optional int64 withdraw_amount = 15; * @return {number} @@ -6324,6 +6875,66 @@ proto.protocol.Transaction.Result.prototype.setUnfreezeAmount = function(value) }; +/** + * optional int64 exchange_received_amount = 18; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getExchangeReceivedAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setExchangeReceivedAmount = function(value) { + jspb.Message.setField(this, 18, value); +}; + + +/** + * optional int64 exchange_inject_another_amount = 19; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getExchangeInjectAnotherAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setExchangeInjectAnotherAmount = function(value) { + jspb.Message.setField(this, 19, value); +}; + + +/** + * optional int64 exchange_withdraw_another_amount = 20; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount = function(value) { + jspb.Message.setField(this, 20, value); +}; + + +/** + * optional int64 exchange_id = 21; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getExchangeId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setExchangeId = function(value) { + jspb.Message.setField(this, 21, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -7029,10 +7640,15 @@ proto.protocol.TransactionInfo.toObject = function(includeInstance, msg) { proto.protocol.TransactionInfo.Log.toObject, includeInstance), result: jspb.Message.getFieldWithDefault(msg, 9, 0), resmessage: msg.getResmessage_asB64(), + assetissueid: jspb.Message.getFieldWithDefault(msg, 14, ""), withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0), internalTransactionsList: jspb.Message.toObjectList(msg.getInternalTransactionsList(), - proto.protocol.InternalTransaction.toObject, includeInstance) + proto.protocol.InternalTransaction.toObject, includeInstance), + exchangeReceivedAmount: jspb.Message.getFieldWithDefault(msg, 18, 0), + exchangeInjectAnotherAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), + exchangeWithdrawAnotherAmount: jspb.Message.getFieldWithDefault(msg, 20, 0), + exchangeId: jspb.Message.getFieldWithDefault(msg, 21, 0) }; if (includeInstance) { @@ -7111,6 +7727,10 @@ proto.protocol.TransactionInfo.deserializeBinaryFromReader = function(msg, reade var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setResmessage(value); break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setAssetissueid(value); + break; case 15: var value = /** @type {number} */ (reader.readInt64()); msg.setWithdrawAmount(value); @@ -7124,6 +7744,22 @@ proto.protocol.TransactionInfo.deserializeBinaryFromReader = function(msg, reade reader.readMessage(value,proto.protocol.InternalTransaction.deserializeBinaryFromReader); msg.addInternalTransactions(value); break; + case 18: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeReceivedAmount(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeInjectAnotherAmount(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeWithdrawAnotherAmount(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeId(value); + break; default: reader.skipField(); break; @@ -7225,6 +7861,13 @@ proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, write f ); } + f = message.getAssetissueid(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } f = message.getWithdrawAmount(); if (f !== 0) { writer.writeInt64( @@ -7247,6 +7890,34 @@ proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, write proto.protocol.InternalTransaction.serializeBinaryToWriter ); } + f = message.getExchangeReceivedAmount(); + if (f !== 0) { + writer.writeInt64( + 18, + f + ); + } + f = message.getExchangeInjectAnotherAmount(); + if (f !== 0) { + writer.writeInt64( + 19, + f + ); + } + f = message.getExchangeWithdrawAnotherAmount(); + if (f !== 0) { + writer.writeInt64( + 20, + f + ); + } + f = message.getExchangeId(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } }; @@ -7838,6 +8509,21 @@ proto.protocol.TransactionInfo.prototype.setResmessage = function(value) { }; +/** + * optional string assetIssueID = 14; + * @return {string} + */ +proto.protocol.TransactionInfo.prototype.getAssetissueid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** @param {string} value */ +proto.protocol.TransactionInfo.prototype.setAssetissueid = function(value) { + jspb.Message.setField(this, 14, value); +}; + + /** * optional int64 withdraw_amount = 15; * @return {number} @@ -7899,6 +8585,66 @@ proto.protocol.TransactionInfo.prototype.clearInternalTransactionsList = functio }; +/** + * optional int64 exchange_received_amount = 18; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getExchangeReceivedAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setExchangeReceivedAmount = function(value) { + jspb.Message.setField(this, 18, value); +}; + + +/** + * optional int64 exchange_inject_another_amount = 19; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getExchangeInjectAnotherAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setExchangeInjectAnotherAmount = function(value) { + jspb.Message.setField(this, 19, value); +}; + + +/** + * optional int64 exchange_withdraw_another_amount = 20; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getExchangeWithdrawAnotherAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setExchangeWithdrawAnotherAmount = function(value) { + jspb.Message.setField(this, 20, value); +}; + + +/** + * optional int64 exchange_id = 21; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getExchangeId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setExchangeId = function(value) { + jspb.Message.setField(this, 21, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -11254,7 +12000,8 @@ proto.protocol.SmartContract.toObject = function(includeInstance, msg) { bytecode: msg.getBytecode_asB64(), callValue: jspb.Message.getFieldWithDefault(msg, 5, 0), consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 6, 0), - name: jspb.Message.getFieldWithDefault(msg, 7, "") + name: jspb.Message.getFieldWithDefault(msg, 7, ""), + originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -11320,6 +12067,10 @@ proto.protocol.SmartContract.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOriginEnergyLimit(value); + break; default: reader.skipField(); break; @@ -11399,6 +12150,13 @@ proto.protocol.SmartContract.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getOriginEnergyLimit(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } }; @@ -12364,6 +13122,21 @@ proto.protocol.SmartContract.prototype.setName = function(value) { }; +/** + * optional int64 origin_energy_limit = 8; + * @return {number} + */ +proto.protocol.SmartContract.prototype.getOriginEnergyLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.SmartContract.prototype.setOriginEnergyLimit = function(value) { + jspb.Message.setField(this, 8, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -12609,7 +13382,7 @@ proto.protocol.InternalTransaction.CallValueInfo.prototype.toObject = function(o proto.protocol.InternalTransaction.CallValueInfo.toObject = function(includeInstance, msg) { var f, obj = { callvalue: jspb.Message.getFieldWithDefault(msg, 1, 0), - tokenname: msg.getTokenname_asB64() + tokenid: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -12651,8 +13424,8 @@ proto.protocol.InternalTransaction.CallValueInfo.deserializeBinaryFromReader = f msg.setCallvalue(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTokenname(value); + var value = /** @type {string} */ (reader.readString()); + msg.setTokenid(value); break; default: reader.skipField(); @@ -12690,9 +13463,9 @@ proto.protocol.InternalTransaction.CallValueInfo.serializeBinaryToWriter = funct f ); } - f = message.getTokenname_asU8(); + f = message.getTokenid(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); @@ -12716,40 +13489,16 @@ proto.protocol.InternalTransaction.CallValueInfo.prototype.setCallvalue = functi /** - * optional bytes tokenName = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes tokenName = 2; - * This is a type-conversion wrapper around `getTokenname()` + * optional string tokenId = 2; * @return {string} */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTokenname())); -}; - - -/** - * optional bytes tokenName = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTokenname()` - * @return {!Uint8Array} - */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTokenname())); +proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.setTokenname = function(value) { +/** @param {string} value */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.setTokenid = function(value) { jspb.Message.setField(this, 2, value); }; @@ -12958,6 +13707,309 @@ proto.protocol.InternalTransaction.prototype.setRejected = function(value) { }; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.DelegatedResourceAccountIndex = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.DelegatedResourceAccountIndex.repeatedFields_, null); +}; +goog.inherits(proto.protocol.DelegatedResourceAccountIndex, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.DelegatedResourceAccountIndex.displayName = 'proto.protocol.DelegatedResourceAccountIndex'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.DelegatedResourceAccountIndex.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DelegatedResourceAccountIndex.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.DelegatedResourceAccountIndex} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.DelegatedResourceAccountIndex.toObject = function(includeInstance, msg) { + var f, obj = { + account: msg.getAccount_asB64(), + fromaccountsList: msg.getFromaccountsList_asB64(), + toaccountsList: msg.getToaccountsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.DelegatedResourceAccountIndex} + */ +proto.protocol.DelegatedResourceAccountIndex.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.DelegatedResourceAccountIndex; + return proto.protocol.DelegatedResourceAccountIndex.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.DelegatedResourceAccountIndex} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.DelegatedResourceAccountIndex} + */ +proto.protocol.DelegatedResourceAccountIndex.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAccount(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addFromaccounts(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addToaccounts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.DelegatedResourceAccountIndex.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.DelegatedResourceAccountIndex} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.DelegatedResourceAccountIndex.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFromaccountsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getToaccountsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes account = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes account = 1; + * This is a type-conversion wrapper around `getAccount()` + * @return {string} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAccount())); +}; + + +/** + * optional bytes account = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAccount()` + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAccount())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.DelegatedResourceAccountIndex.prototype.setAccount = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * repeated bytes fromAccounts = 2; + * @return {!(Array|Array)} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes fromAccounts = 2; + * This is a type-conversion wrapper around `getFromaccountsList()` + * @return {!Array.} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getFromaccountsList())); +}; + + +/** + * repeated bytes fromAccounts = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFromaccountsList()` + * @return {!Array.} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getFromaccountsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.DelegatedResourceAccountIndex.prototype.setFromaccountsList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.addFromaccounts = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +proto.protocol.DelegatedResourceAccountIndex.prototype.clearFromaccountsList = function() { + this.setFromaccountsList([]); +}; + + +/** + * repeated bytes toAccounts = 3; + * @return {!(Array|Array)} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes toAccounts = 3; + * This is a type-conversion wrapper around `getToaccountsList()` + * @return {!Array.} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getToaccountsList())); +}; + + +/** + * repeated bytes toAccounts = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaccountsList()` + * @return {!Array.} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getToaccountsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.DelegatedResourceAccountIndex.prototype.setToaccountsList = function(value) { + jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.addToaccounts = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +proto.protocol.DelegatedResourceAccountIndex.prototype.clearToaccountsList = function() { + this.setToaccountsList([]); +}; + + /** * @enum {number} */ diff --git a/src/utils/tronWeb.js b/src/utils/tronWeb.js index 89f14cf..6e4acf7 100644 --- a/src/utils/tronWeb.js +++ b/src/utils/tronWeb.js @@ -15,6 +15,10 @@ const { WitnessCreateContract, UnfreezeAssetContract, TriggerSmartContract, + ExchangeTransactionContract, + ExchangeCreateContract, + ExchangeWithdrawContract, + ExchangeInjectContract, } = require("../protocol/core/Contract_pb"); const fromHexString = hexString => @@ -135,11 +139,10 @@ export function contractJsonToProtobuf(contract) { contract.setOwnerAddress(fromHexString(value.owner_address)); contract.setFrozenBalance(value.frozen_balance); contract.setFrozenDuration(value.frozen_duration); - if (value.resource === "BANDWIDTH") - contract.setResource(0); - else + if (value.resource === "ENERGY") contract.setResource(1); - + else + contract.setResource(0); return buildTransferContract( contract, @@ -185,10 +188,10 @@ export function contractJsonToProtobuf(contract) { let contract = new UnfreezeBalanceContract(); contract.setOwnerAddress(fromHexString(value.owner_address)); - if (value.resource === "BANDWIDTH") - contract.setResource(0); - else + if (value.resource === "ENERGY") contract.setResource(1); + else + contract.setResource(0); return buildTransferContract( contract, @@ -223,5 +226,67 @@ export function contractJsonToProtobuf(contract) { "TriggerSmartContract"); } + case "ExchangeTransactionContract": { + + let contract = new ExchangeTransactionContract(); + + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setExchangeId(value.exchange_id); + contract.setTokenId(fromHexString(value.token_id)); + contract.setQuant(value.quant); + contract.setExpected(value.expected); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT, + "ExchangeTransactionContract"); + } + + case "ExchangeCreateContract": { + + let contract = new ExchangeCreateContract(); + + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setFirstTokenId(fromHexString(value.first_token_id)); + contract.setFirstTokenBalance(value.first_token_balance); + contract.setSecondTokenId(fromHexString(value.second_token_id)); + contract.setSecondTokenBalance(value.second_token_balance); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.EXCHANGECREATECONTRACT, + "ExchangeCreateContract"); + } + + case "ExchangeInjectContract": { + + let contract = new ExchangeInjectContract(); + + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setExchangeId(value.exchange_id); + contract.setTokenId(fromHexString(value.token_id)); + contract.setQuant(value.quant); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.EXCHANGEINJECTCONTRACT, + "ExchangeInjectContract"); + } + + case "ExchangeWithdrawContract": { + + let contract = new ExchangeWithdrawContract(); + + contract.setOwnerAddress(fromHexString(value.owner_address)); + contract.setExchangeId(value.exchange_id); + contract.setTokenId(fromHexString(value.token_id)); + contract.setQuant(value.quant); + + return buildTransferContract( + contract, + Transaction.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT, + "ExchangeWithdrawContract"); + } + } } \ No newline at end of file From 62a13a6ebe89f6ba1413da9ebbe217c9ceffa43d Mon Sep 17 00:00:00 2001 From: Fernando Sobreira Date: Mon, 11 Feb 2019 15:49:00 -0300 Subject: [PATCH 12/15] Update version from NPM pack --- src/client/http.js | 131 +- src/protocol/api/api_pb.js | 4037 ++++++++++++++++-------------- src/protocol/core/Contract_pb.js | 1462 +++++++---- src/protocol/core/Tron_pb.js | 1448 ++--------- 4 files changed, 3317 insertions(+), 3761 deletions(-) diff --git a/src/client/http.js b/src/client/http.js index 4ed28d1..681fe86 100644 --- a/src/client/http.js +++ b/src/client/http.js @@ -2,7 +2,7 @@ const xhr = require("axios"); const { buildTransferTransaction, buildVote, buildAssetParticipate, buildFreezeBalance, buildAssetIssue, buildUnfreezeBalance, buildAccountUpdate, buildWitnessUpdate, buildWithdrawBalance, buildWitnessCreate, - buildUnfreezeAsset,buildExchangeCreate,buildExchangeInject,buildExchangeWithdraw,buildTransactionExchange + buildUnfreezeAsset, buildExchangeCreate, buildExchangeInject, buildExchangeWithdraw, buildTransactionExchange } = require("../utils/transactionBuilder"); const {hexStr2byteArray} = require("../lib/code"); const PrivateKeySigner = require("../signer/privateKeySigner"); @@ -13,10 +13,10 @@ function longToByteArray(/*long*/long) { // we want to represent the input as a 8-bytes array var byteArray = [0, 0, 0, 0, 0, 0, 0, 0]; - for ( var index = 0; index < byteArray.length; index ++ ) { + for (var index = 0; index < byteArray.length; index++) { var byte = long & 0xff; - byteArray [ index ] = byte; - long = (long - byte) / 256 ; + byteArray [index] = byte; + long = (long - byte) / 256; } return byteArray; @@ -24,7 +24,7 @@ function longToByteArray(/*long*/long) { function byteArrayToLong(/*byte[]*/byteArray) { var value = 0; - for ( var i = byteArray.length - 1; i >= 0; i--) { + for (var i = byteArray.length - 1; i >= 0; i--) { value = (value * 256) + byteArray[i]; } @@ -88,7 +88,7 @@ class ApiClient { transaction = await this.addRef(transaction); let privateKeySigner = this.getSigner(pk); let {hex} = await privateKeySigner.signTransaction(transaction); - let {data} = await xhr.post(`${this.apiUrl}/api/transaction`, { + let {data} = await xhr.post(`${this.apiUrl}/api/broadcast`, { transaction: hex, }); @@ -96,7 +96,7 @@ class ApiClient { } async sendTransactionRaw(transactionHex) { - let {data} = await xhr.post(`${this.apiUrl}/api/transaction`, { + let {data} = await xhr.post(`${this.apiUrl}/api/broadcast`, { transaction: transactionHex, }); @@ -177,24 +177,24 @@ class ApiClient { return (pk) => this.sendTransaction(pk, transaction); } - createExchange(address,firstTokenID,secondTokenId,firstTokenBalance,secondTokenBalance){ - let transaction = buildExchangeCreate(address,firstTokenID,secondTokenId,firstTokenBalance,secondTokenBalance); + createExchange(address, firstTokenID, secondTokenId, firstTokenBalance, secondTokenBalance) { + let transaction = buildExchangeCreate(address, firstTokenID, secondTokenId, firstTokenBalance, secondTokenBalance); return (pk) => this.sendTransaction(pk, transaction); } - injectExchange(address,exchangeId, tokenId, quant){ - let transaction = buildExchangeInject(address,exchangeId, tokenId, quant); - return (pk) => this.sendTransaction(pk, transaction); + injectExchange(address, exchangeId, tokenId, quant) { + let transaction = buildExchangeInject(address, exchangeId, tokenId, quant); + return (pk) => this.sendTransaction(pk, transaction); } - withdrawExchange(address,exchangeId, tokenId, quant){ - let transaction = buildExchangeWithdraw(address,exchangeId, tokenId, quant); + withdrawExchange(address, exchangeId, tokenId, quant) { + let transaction = buildExchangeWithdraw(address, exchangeId, tokenId, quant); return (pk) => this.sendTransaction(pk, transaction); } - transactionExchange(address,exchange_id,token_id,quant,expected){ - let transaction = buildTransactionExchange(address,exchange_id, token_id, quant,expected); - return (pk) => this.sendTransaction(pk, transaction); + transactionExchange(address, exchange_id, token_id, quant, expected) { + let transaction = buildTransactionExchange(address, exchange_id, token_id, quant, expected); + return (pk) => this.sendTransaction(pk, transaction); } async getBlocks(options = {}) { @@ -211,6 +211,7 @@ class ApiClient { total: data.total, }; } + async getLatestBlock() { let {data} = await xhr.get(`${this.apiUrl}/api/block/latest`); return data; @@ -265,14 +266,16 @@ class ApiClient { } async getTransactionByHash(hash) { - let {data} = await xhr.get(`${this.apiUrl}/api/transaction/${hash}`); + let {data} = await xhr.get(`${this.apiUrl}/api/transaction-info?hash=${hash}`); return data; } + async getIssuedAsset(owner) { let {data} = await xhr.get(`${this.apiUrl}/api/token`, { params: { - owner, + showAll: 1, + owner: owner, }, }); return { @@ -282,7 +285,7 @@ class ApiClient { } async getAccounts(options = {}) { - let {data} = await xhr.get(`${this.apiUrl}/api/account`, { + let {data} = await xhr.get(`${this.apiUrl}/api/account/list`, { params: Object.assign({ sort: '-balance', limit: 50, @@ -343,8 +346,7 @@ class ApiClient { async getTransferStats(options = {}) { let {data} = await xhr.get(`${this.apiUrl}/api/transfer/stats`, { - params: Object.assign({ - }, options) + params: Object.assign({}, options) }); return { @@ -354,9 +356,7 @@ class ApiClient { async getBlockStats(options = {}) { let {data} = await xhr.get(`${this.apiUrl}/api/block/stats`, { - params: Object.assign({ - - }, options) + params: Object.assign({}, options) }); return { @@ -365,7 +365,7 @@ class ApiClient { } async getAddress(address) { - let {data} = await xhr.get(`${this.apiUrl}/api/account/${address}`); + let {data} = await xhr.get(`${this.apiUrl}/api/account?address=${address}`); return data; } @@ -375,14 +375,14 @@ class ApiClient { } async getAddressStats(address) { - let {data} = await xhr.get(`${this.apiUrl}/api/account/${address}/stats`); + let {data} = await xhr.get(`${this.apiUrl}/api/account/stats?address=${address}`); return data; } async getTokens(options = {}) { let {data} = await xhr.get(`${this.apiUrl}/api/token`, { params: Object.assign({ - sort: '-name', + sort: 'rank', limit: 50, }, options) }); @@ -394,7 +394,7 @@ class ApiClient { } async getAccountVotes(address) { - let {data} = await xhr.get(`${this.apiUrl}/api/account/${address}/votes`); + let {data} = await xhr.get(`${this.apiUrl}/api/account/votes?address=${address}`); return data; } @@ -404,7 +404,7 @@ class ApiClient { } async getTokenHolders(name, options = {}) { - let {data} = await xhr.get(`${this.apiUrl}/api/token/${name}/address`, { + let {data} = await xhr.get(`${this.apiUrl}/api/tokenholders`, { params: Object.assign({ sort: '-balance', limit: 50, @@ -494,7 +494,7 @@ class ApiClient { } async getVoteWitness(address) { - let {data} = await xhr.get(`${this.apiUrl}/api/vote/witness/${address}`); + let {data} = await xhr.get(`${this.apiUrl}/api/vote/witness?address=${address}`); return data } @@ -506,7 +506,6 @@ class ApiClient { async getContracts(options = {}) { let {data} = await xhr.get(`${this.apiUrl}/api/contracts`, { params: Object.assign({ - sort: '-timestamp', count: true, limit: 40, }, options) @@ -528,7 +527,7 @@ class ApiClient { } async getContractOverview(address) { - let {data} = await xhr.get(`${this.apiUrl}/api/contract/${address}`); + let {data} = await xhr.get(`${this.apiUrl}/api/contract?contract=${address}`); return data; } @@ -550,7 +549,7 @@ class ApiClient { let {data} = await xhr.get(`${this.apiUrl}/api/contracts/trigger`, { params: Object.assign({ sort: '-timestamp', - confirm:0, + confirm: 0, count: true, limit: 50, }, options) @@ -563,7 +562,7 @@ class ApiClient { } async getAccountByAddressNew(address) { - let {data} = await xhr.get(`${this.apiUrl}/api/v2/account/${address}`); + let {data} = await xhr.get(`${this.apiUrl}/api/account?address=${address}`); return data; } @@ -577,7 +576,7 @@ class ApiClient { } - async exchange (options = {}) { + async exchange(options = {}) { let {data} = await xhr.post(`${this.apiUrl}/api/exchange/transaction`, options); return data; } @@ -595,21 +594,21 @@ class ApiClient { let {data} = await xhr.get(`${this.apiUrl}/api/exchange/transaction`, { params: Object.assign({ sort: '-timestamp', - start:0, + start: 0, limit: 50, }, options) }); return data } - async getChainparameters(){ + async getChainparameters() { let {data} = await xhr.get(`${this.apiUrl}/api/chainparameters`); return { tronParameters: data.tronParameters, } } - async getProposalList(options = {}){ + async getProposalList(options = {}) { let {data} = await xhr.get(`${this.apiUrl}/api/proposal`, { params: Object.assign({ sort: '-timestamp', @@ -618,26 +617,66 @@ class ApiClient { }); return { proposal: data.data, - total:data.total + total: data.total } } - async getProposalById(id){ - let {data} = await xhr.get(`${this.apiUrl}/api/proposal/${id}`); + async getProposalById(id) { + let {data} = await xhr.get(`${this.apiUrl}/api/proposal?id=${id}`); return { data:data } } - async getHolderBalance(options = {}){ + async getHolderBalance(options = {}) { let {data} = await xhr.get(`${this.apiUrl}/api/token_trc20/holder_balance`, { params: options }); return data } - - - + + async getexchangesAllList(options = {}) { + let {data} = await xhr.get(`${this.apiUrl}/api/exchanges/listall`, { + params: options + }); + return { + exchangesAllList: data + } + } + + async getFundsSupply(options = {}) { + let {data} = await xhr.get(`${this.apiUrl}/api/funds`, { + params: options + }); + return { + funds: data + } + } + + async getBttFundsSupply(options = {}) { + let {data} = await xhr.get(`${this.apiUrl}/api/bittorrent/fund`, { + params: options + }); + return { + funds: data + } + } + + async getlistdonators(options = {}) { + let {data} = await xhr.get(`${this.apiUrl}/api/listdonators`, { + params: options + }); + return { + list: data + } + } + + async getNotices(options = {}) { + let {data} = await xhr.get(`${this.apiUrl}/api/announcement`, { + params: Object.assign({type: 1, start: 0, limit: 10, status: 0}, options) + }); + return data + } } diff --git a/src/protocol/api/api_pb.js b/src/protocol/api/api_pb.js index 26baf5b..80ebffe 100644 --- a/src/protocol/api/api_pb.js +++ b/src/protocol/api/api_pb.js @@ -26,8 +26,6 @@ goog.exportSymbol('proto.protocol.BlockList', null, global); goog.exportSymbol('proto.protocol.BlockListExtention', null, global); goog.exportSymbol('proto.protocol.BlockReference', null, global); goog.exportSymbol('proto.protocol.BytesMessage', null, global); -goog.exportSymbol('proto.protocol.DelegatedResourceList', null, global); -goog.exportSymbol('proto.protocol.DelegatedResourceMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferByPrivateMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferResponse', null, global); @@ -46,6 +44,9 @@ goog.exportSymbol('proto.protocol.TransactionExtention', null, global); goog.exportSymbol('proto.protocol.TransactionLimit', null, global); goog.exportSymbol('proto.protocol.TransactionList', null, global); goog.exportSymbol('proto.protocol.TransactionListExtention', null, global); +goog.exportSymbol('proto.protocol.TransactionSignWeight', null, global); +goog.exportSymbol('proto.protocol.TransactionSignWeight.Result', null, global); +goog.exportSymbol('proto.protocol.TransactionSignWeight.Result.response_code', null, global); goog.exportSymbol('proto.protocol.WitnessList', null, global); /** @@ -1498,13 +1499,20 @@ proto.protocol.TransactionList.prototype.clearTransactionList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.DelegatedResourceMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.NodeList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.NodeList.repeatedFields_, null); }; -goog.inherits(proto.protocol.DelegatedResourceMessage, jspb.Message); +goog.inherits(proto.protocol.NodeList, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.DelegatedResourceMessage.displayName = 'proto.protocol.DelegatedResourceMessage'; + proto.protocol.NodeList.displayName = 'proto.protocol.NodeList'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.NodeList.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1518,8 +1526,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.DelegatedResourceMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DelegatedResourceMessage.toObject(opt_includeInstance, this); +proto.protocol.NodeList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.NodeList.toObject(opt_includeInstance, this); }; @@ -1528,14 +1536,14 @@ proto.protocol.DelegatedResourceMessage.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.DelegatedResourceMessage} msg The msg instance to transform. + * @param {!proto.protocol.NodeList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DelegatedResourceMessage.toObject = function(includeInstance, msg) { +proto.protocol.NodeList.toObject = function(includeInstance, msg) { var f, obj = { - fromaddress: msg.getFromaddress_asB64(), - toaddress: msg.getToaddress_asB64() + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.protocol.Node.toObject, includeInstance) }; if (includeInstance) { @@ -1549,23 +1557,23 @@ proto.protocol.DelegatedResourceMessage.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DelegatedResourceMessage} + * @return {!proto.protocol.NodeList} */ -proto.protocol.DelegatedResourceMessage.deserializeBinary = function(bytes) { +proto.protocol.NodeList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DelegatedResourceMessage; - return proto.protocol.DelegatedResourceMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.NodeList; + return proto.protocol.NodeList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.DelegatedResourceMessage} msg The message object to deserialize into. + * @param {!proto.protocol.NodeList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DelegatedResourceMessage} + * @return {!proto.protocol.NodeList} */ -proto.protocol.DelegatedResourceMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1573,12 +1581,9 @@ proto.protocol.DelegatedResourceMessage.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFromaddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToaddress(value); + var value = new proto.protocol.Node; + reader.readMessage(value,proto.protocol.Node.deserializeBinaryFromReader); + msg.addNodes(value); break; default: reader.skipField(); @@ -1593,9 +1598,9 @@ proto.protocol.DelegatedResourceMessage.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.DelegatedResourceMessage.prototype.serializeBinary = function() { +proto.protocol.NodeList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.DelegatedResourceMessage.serializeBinaryToWriter(this, writer); + proto.protocol.NodeList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1603,104 +1608,51 @@ proto.protocol.DelegatedResourceMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DelegatedResourceMessage} message + * @param {!proto.protocol.NodeList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DelegatedResourceMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.NodeList.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFromaddress_asU8(); + f = message.getNodesList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getToaddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f + f, + proto.protocol.Node.serializeBinaryToWriter ); } }; /** - * optional bytes fromAddress = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DelegatedResourceMessage.prototype.getFromaddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes fromAddress = 1; - * This is a type-conversion wrapper around `getFromaddress()` - * @return {string} - */ -proto.protocol.DelegatedResourceMessage.prototype.getFromaddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFromaddress())); -}; - - -/** - * optional bytes fromAddress = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFromaddress()` - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResourceMessage.prototype.getFromaddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFromaddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.DelegatedResourceMessage.prototype.setFromaddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional bytes toAddress = 2; - * @return {!(string|Uint8Array)} + * repeated Node nodes = 1; + * @return {!Array.} */ -proto.protocol.DelegatedResourceMessage.prototype.getToaddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.NodeList.prototype.getNodesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Node, 1)); }; -/** - * optional bytes toAddress = 2; - * This is a type-conversion wrapper around `getToaddress()` - * @return {string} - */ -proto.protocol.DelegatedResourceMessage.prototype.getToaddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToaddress())); +/** @param {!Array.} value */ +proto.protocol.NodeList.prototype.setNodesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional bytes toAddress = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToaddress()` - * @return {!Uint8Array} + * @param {!proto.protocol.Node=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Node} */ -proto.protocol.DelegatedResourceMessage.prototype.getToaddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToaddress())); +proto.protocol.NodeList.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Node, opt_index); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.DelegatedResourceMessage.prototype.setToaddress = function(value) { - jspb.Message.setField(this, 2, value); +proto.protocol.NodeList.prototype.clearNodesList = function() { + this.setNodesList([]); }; @@ -1715,20 +1667,13 @@ proto.protocol.DelegatedResourceMessage.prototype.setToaddress = function(value) * @extends {jspb.Message} * @constructor */ -proto.protocol.DelegatedResourceList = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.DelegatedResourceList.repeatedFields_, null); +proto.protocol.Node = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.DelegatedResourceList, jspb.Message); +goog.inherits(proto.protocol.Node, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.DelegatedResourceList.displayName = 'proto.protocol.DelegatedResourceList'; + proto.protocol.Node.displayName = 'proto.protocol.Node'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.DelegatedResourceList.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1742,8 +1687,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.DelegatedResourceList.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DelegatedResourceList.toObject(opt_includeInstance, this); +proto.protocol.Node.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Node.toObject(opt_includeInstance, this); }; @@ -1752,14 +1697,13 @@ proto.protocol.DelegatedResourceList.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.DelegatedResourceList} msg The msg instance to transform. + * @param {!proto.protocol.Node} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DelegatedResourceList.toObject = function(includeInstance, msg) { +proto.protocol.Node.toObject = function(includeInstance, msg) { var f, obj = { - delegatedresourceList: jspb.Message.toObjectList(msg.getDelegatedresourceList(), - core_Tron_pb.DelegatedResource.toObject, includeInstance) + address: (f = msg.getAddress()) && proto.protocol.Address.toObject(includeInstance, f) }; if (includeInstance) { @@ -1773,23 +1717,23 @@ proto.protocol.DelegatedResourceList.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DelegatedResourceList} + * @return {!proto.protocol.Node} */ -proto.protocol.DelegatedResourceList.deserializeBinary = function(bytes) { +proto.protocol.Node.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DelegatedResourceList; - return proto.protocol.DelegatedResourceList.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Node; + return proto.protocol.Node.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.DelegatedResourceList} msg The message object to deserialize into. + * @param {!proto.protocol.Node} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DelegatedResourceList} + * @return {!proto.protocol.Node} */ -proto.protocol.DelegatedResourceList.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Node.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1797,9 +1741,9 @@ proto.protocol.DelegatedResourceList.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new core_Tron_pb.DelegatedResource; - reader.readMessage(value,core_Tron_pb.DelegatedResource.deserializeBinaryFromReader); - msg.addDelegatedresource(value); + var value = new proto.protocol.Address; + reader.readMessage(value,proto.protocol.Address.deserializeBinaryFromReader); + msg.setAddress(value); break; default: reader.skipField(); @@ -1814,9 +1758,9 @@ proto.protocol.DelegatedResourceList.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.DelegatedResourceList.prototype.serializeBinary = function() { +proto.protocol.Node.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.DelegatedResourceList.serializeBinaryToWriter(this, writer); + proto.protocol.Node.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1824,51 +1768,50 @@ proto.protocol.DelegatedResourceList.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DelegatedResourceList} message + * @param {!proto.protocol.Node} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DelegatedResourceList.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Node.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDelegatedresourceList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getAddress(); + if (f != null) { + writer.writeMessage( 1, f, - core_Tron_pb.DelegatedResource.serializeBinaryToWriter + proto.protocol.Address.serializeBinaryToWriter ); } }; /** - * repeated DelegatedResource delegatedResource = 1; - * @return {!Array.} + * optional Address address = 1; + * @return {?proto.protocol.Address} */ -proto.protocol.DelegatedResourceList.prototype.getDelegatedresourceList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.DelegatedResource, 1)); +proto.protocol.Node.prototype.getAddress = function() { + return /** @type{?proto.protocol.Address} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Address, 1)); }; -/** @param {!Array.} value */ -proto.protocol.DelegatedResourceList.prototype.setDelegatedresourceList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {?proto.protocol.Address|undefined} value */ +proto.protocol.Node.prototype.setAddress = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * @param {!proto.protocol.DelegatedResource=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.DelegatedResource} - */ -proto.protocol.DelegatedResourceList.prototype.addDelegatedresource = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.DelegatedResource, opt_index); +proto.protocol.Node.prototype.clearAddress = function() { + this.setAddress(undefined); }; -proto.protocol.DelegatedResourceList.prototype.clearDelegatedresourceList = function() { - this.setDelegatedresourceList([]); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.Node.prototype.hasAddress = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -1883,20 +1826,13 @@ proto.protocol.DelegatedResourceList.prototype.clearDelegatedresourceList = func * @extends {jspb.Message} * @constructor */ -proto.protocol.NodeList = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.NodeList.repeatedFields_, null); +proto.protocol.Address = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.NodeList, jspb.Message); +goog.inherits(proto.protocol.Address, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.NodeList.displayName = 'proto.protocol.NodeList'; + proto.protocol.Address.displayName = 'proto.protocol.Address'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.NodeList.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1910,8 +1846,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.NodeList.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.NodeList.toObject(opt_includeInstance, this); +proto.protocol.Address.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Address.toObject(opt_includeInstance, this); }; @@ -1920,14 +1856,14 @@ proto.protocol.NodeList.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.NodeList} msg The msg instance to transform. + * @param {!proto.protocol.Address} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.NodeList.toObject = function(includeInstance, msg) { +proto.protocol.Address.toObject = function(includeInstance, msg) { var f, obj = { - nodesList: jspb.Message.toObjectList(msg.getNodesList(), - proto.protocol.Node.toObject, includeInstance) + host: msg.getHost_asB64(), + port: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -1941,23 +1877,23 @@ proto.protocol.NodeList.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.NodeList} + * @return {!proto.protocol.Address} */ -proto.protocol.NodeList.deserializeBinary = function(bytes) { +proto.protocol.Address.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.NodeList; - return proto.protocol.NodeList.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Address; + return proto.protocol.Address.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.NodeList} msg The message object to deserialize into. + * @param {!proto.protocol.Address} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.NodeList} + * @return {!proto.protocol.Address} */ -proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1965,9 +1901,12 @@ proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.Node; - reader.readMessage(value,proto.protocol.Node.deserializeBinaryFromReader); - msg.addNodes(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHost(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPort(value); break; default: reader.skipField(); @@ -1982,9 +1921,9 @@ proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.NodeList.prototype.serializeBinary = function() { +proto.protocol.Address.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.NodeList.serializeBinaryToWriter(this, writer); + proto.protocol.Address.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1992,51 +1931,80 @@ proto.protocol.NodeList.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.NodeList} message + * @param {!proto.protocol.Address} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.NodeList.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Address.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodesList(); + f = message.getHost_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 1, - f, - proto.protocol.Node.serializeBinaryToWriter + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeInt32( + 2, + f ); } }; /** - * repeated Node nodes = 1; - * @return {!Array.} + * optional bytes host = 1; + * @return {!(string|Uint8Array)} */ -proto.protocol.NodeList.prototype.getNodesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Node, 1)); -}; - - -/** @param {!Array.} value */ -proto.protocol.NodeList.prototype.setNodesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.protocol.Address.prototype.getHost = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!proto.protocol.Node=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Node} + * optional bytes host = 1; + * This is a type-conversion wrapper around `getHost()` + * @return {string} */ -proto.protocol.NodeList.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Node, opt_index); +proto.protocol.Address.prototype.getHost_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHost())); }; -proto.protocol.NodeList.prototype.clearNodesList = function() { - this.setNodesList([]); +/** + * optional bytes host = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHost()` + * @return {!Uint8Array} + */ +proto.protocol.Address.prototype.getHost_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHost())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Address.prototype.setHost = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 port = 2; + * @return {number} + */ +proto.protocol.Address.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Address.prototype.setPort = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -2051,12 +2019,12 @@ proto.protocol.NodeList.prototype.clearNodesList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Node = function(opt_data) { +proto.protocol.EmptyMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Node, jspb.Message); +goog.inherits(proto.protocol.EmptyMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Node.displayName = 'proto.protocol.Node'; + proto.protocol.EmptyMessage.displayName = 'proto.protocol.EmptyMessage'; } @@ -2071,8 +2039,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Node.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Node.toObject(opt_includeInstance, this); +proto.protocol.EmptyMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EmptyMessage.toObject(opt_includeInstance, this); }; @@ -2081,13 +2049,13 @@ proto.protocol.Node.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Node} msg The msg instance to transform. + * @param {!proto.protocol.EmptyMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Node.toObject = function(includeInstance, msg) { +proto.protocol.EmptyMessage.toObject = function(includeInstance, msg) { var f, obj = { - address: (f = msg.getAddress()) && proto.protocol.Address.toObject(includeInstance, f) + }; if (includeInstance) { @@ -2101,34 +2069,29 @@ proto.protocol.Node.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Node} + * @return {!proto.protocol.EmptyMessage} */ -proto.protocol.Node.deserializeBinary = function(bytes) { +proto.protocol.EmptyMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Node; - return proto.protocol.Node.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.EmptyMessage; + return proto.protocol.EmptyMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Node} msg The message object to deserialize into. + * @param {!proto.protocol.EmptyMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Node} + * @return {!proto.protocol.EmptyMessage} */ -proto.protocol.Node.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.protocol.Address; - reader.readMessage(value,proto.protocol.Address.deserializeBinaryFromReader); - msg.setAddress(value); - break; default: reader.skipField(); break; @@ -2142,9 +2105,9 @@ proto.protocol.Node.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Node.prototype.serializeBinary = function() { +proto.protocol.EmptyMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Node.serializeBinaryToWriter(this, writer); + proto.protocol.EmptyMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2152,50 +2115,12 @@ proto.protocol.Node.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Node} message + * @param {!proto.protocol.EmptyMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Node.serializeBinaryToWriter = function(message, writer) { +proto.protocol.EmptyMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Address.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Address address = 1; - * @return {?proto.protocol.Address} - */ -proto.protocol.Node.prototype.getAddress = function() { - return /** @type{?proto.protocol.Address} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Address, 1)); -}; - - -/** @param {?proto.protocol.Address|undefined} value */ -proto.protocol.Node.prototype.setAddress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.Node.prototype.clearAddress = function() { - this.setAddress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.Node.prototype.hasAddress = function() { - return jspb.Message.getField(this, 1) != null; }; @@ -2210,12 +2135,12 @@ proto.protocol.Node.prototype.hasAddress = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Address = function(opt_data) { +proto.protocol.NumberMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Address, jspb.Message); +goog.inherits(proto.protocol.NumberMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Address.displayName = 'proto.protocol.Address'; + proto.protocol.NumberMessage.displayName = 'proto.protocol.NumberMessage'; } @@ -2230,8 +2155,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Address.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Address.toObject(opt_includeInstance, this); +proto.protocol.NumberMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.NumberMessage.toObject(opt_includeInstance, this); }; @@ -2240,14 +2165,13 @@ proto.protocol.Address.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Address} msg The msg instance to transform. + * @param {!proto.protocol.NumberMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Address.toObject = function(includeInstance, msg) { +proto.protocol.NumberMessage.toObject = function(includeInstance, msg) { var f, obj = { - host: msg.getHost_asB64(), - port: jspb.Message.getFieldWithDefault(msg, 2, 0) + num: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -2261,23 +2185,23 @@ proto.protocol.Address.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Address} + * @return {!proto.protocol.NumberMessage} */ -proto.protocol.Address.deserializeBinary = function(bytes) { +proto.protocol.NumberMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Address; - return proto.protocol.Address.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.NumberMessage; + return proto.protocol.NumberMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Address} msg The message object to deserialize into. + * @param {!proto.protocol.NumberMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Address} + * @return {!proto.protocol.NumberMessage} */ -proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2285,12 +2209,8 @@ proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHost(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPort(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setNum(value); break; default: reader.skipField(); @@ -2305,9 +2225,9 @@ proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Address.prototype.serializeBinary = function() { +proto.protocol.NumberMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Address.serializeBinaryToWriter(this, writer); + proto.protocol.NumberMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2315,23 +2235,16 @@ proto.protocol.Address.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Address} message + * @param {!proto.protocol.NumberMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Address.serializeBinaryToWriter = function(message, writer) { +proto.protocol.NumberMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHost_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPort(); + f = message.getNum(); if (f !== 0) { - writer.writeInt32( - 2, + writer.writeInt64( + 1, f ); } @@ -2339,56 +2252,17 @@ proto.protocol.Address.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes host = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Address.prototype.getHost = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes host = 1; - * This is a type-conversion wrapper around `getHost()` - * @return {string} - */ -proto.protocol.Address.prototype.getHost_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHost())); -}; - - -/** - * optional bytes host = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHost()` - * @return {!Uint8Array} - */ -proto.protocol.Address.prototype.getHost_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHost())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.Address.prototype.setHost = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional int32 port = 2; + * optional int64 num = 1; * @return {number} */ -proto.protocol.Address.prototype.getPort = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.NumberMessage.prototype.getNum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.Address.prototype.setPort = function(value) { - jspb.Message.setField(this, 2, value); +proto.protocol.NumberMessage.prototype.setNum = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -2403,12 +2277,12 @@ proto.protocol.Address.prototype.setPort = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.EmptyMessage = function(opt_data) { +proto.protocol.BytesMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.EmptyMessage, jspb.Message); +goog.inherits(proto.protocol.BytesMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.EmptyMessage.displayName = 'proto.protocol.EmptyMessage'; + proto.protocol.BytesMessage.displayName = 'proto.protocol.BytesMessage'; } @@ -2423,8 +2297,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.EmptyMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.EmptyMessage.toObject(opt_includeInstance, this); +proto.protocol.BytesMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BytesMessage.toObject(opt_includeInstance, this); }; @@ -2433,13 +2307,13 @@ proto.protocol.EmptyMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.EmptyMessage} msg The msg instance to transform. + * @param {!proto.protocol.BytesMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EmptyMessage.toObject = function(includeInstance, msg) { +proto.protocol.BytesMessage.toObject = function(includeInstance, msg) { var f, obj = { - + value: msg.getValue_asB64() }; if (includeInstance) { @@ -2453,29 +2327,33 @@ proto.protocol.EmptyMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.EmptyMessage} + * @return {!proto.protocol.BytesMessage} */ -proto.protocol.EmptyMessage.deserializeBinary = function(bytes) { +proto.protocol.BytesMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.EmptyMessage; - return proto.protocol.EmptyMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BytesMessage; + return proto.protocol.BytesMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.EmptyMessage} msg The message object to deserialize into. + * @param {!proto.protocol.BytesMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.EmptyMessage} + * @return {!proto.protocol.BytesMessage} */ -proto.protocol.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BytesMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; default: reader.skipField(); break; @@ -2489,9 +2367,9 @@ proto.protocol.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.EmptyMessage.prototype.serializeBinary = function() { +proto.protocol.BytesMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.EmptyMessage.serializeBinaryToWriter(this, writer); + proto.protocol.BytesMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2499,12 +2377,58 @@ proto.protocol.EmptyMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.EmptyMessage} message + * @param {!proto.protocol.BytesMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EmptyMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BytesMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes value = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.BytesMessage.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes value = 1; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.protocol.BytesMessage.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.protocol.BytesMessage.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BytesMessage.prototype.setValue = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -2519,12 +2443,12 @@ proto.protocol.EmptyMessage.serializeBinaryToWriter = function(message, writer) * @extends {jspb.Message} * @constructor */ -proto.protocol.NumberMessage = function(opt_data) { +proto.protocol.TimeMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.NumberMessage, jspb.Message); +goog.inherits(proto.protocol.TimeMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.NumberMessage.displayName = 'proto.protocol.NumberMessage'; + proto.protocol.TimeMessage.displayName = 'proto.protocol.TimeMessage'; } @@ -2539,8 +2463,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.NumberMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.NumberMessage.toObject(opt_includeInstance, this); +proto.protocol.TimeMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TimeMessage.toObject(opt_includeInstance, this); }; @@ -2549,13 +2473,14 @@ proto.protocol.NumberMessage.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.NumberMessage} msg The msg instance to transform. + * @param {!proto.protocol.TimeMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.NumberMessage.toObject = function(includeInstance, msg) { +proto.protocol.TimeMessage.toObject = function(includeInstance, msg) { var f, obj = { - num: jspb.Message.getFieldWithDefault(msg, 1, 0) + begininmilliseconds: jspb.Message.getFieldWithDefault(msg, 1, 0), + endinmilliseconds: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -2569,23 +2494,23 @@ proto.protocol.NumberMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.NumberMessage} + * @return {!proto.protocol.TimeMessage} */ -proto.protocol.NumberMessage.deserializeBinary = function(bytes) { +proto.protocol.TimeMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.NumberMessage; - return proto.protocol.NumberMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TimeMessage; + return proto.protocol.TimeMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.NumberMessage} msg The message object to deserialize into. + * @param {!proto.protocol.TimeMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.NumberMessage} + * @return {!proto.protocol.TimeMessage} */ -proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2594,7 +2519,11 @@ proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); - msg.setNum(value); + msg.setBegininmilliseconds(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndinmilliseconds(value); break; default: reader.skipField(); @@ -2609,9 +2538,9 @@ proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.NumberMessage.prototype.serializeBinary = function() { +proto.protocol.TimeMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.NumberMessage.serializeBinaryToWriter(this, writer); + proto.protocol.TimeMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2619,37 +2548,59 @@ proto.protocol.NumberMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.NumberMessage} message + * @param {!proto.protocol.TimeMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.NumberMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TimeMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNum(); + f = message.getBegininmilliseconds(); if (f !== 0) { writer.writeInt64( 1, f ); } + f = message.getEndinmilliseconds(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; /** - * optional int64 num = 1; + * optional int64 beginInMilliseconds = 1; * @return {number} */ -proto.protocol.NumberMessage.prototype.getNum = function() { +proto.protocol.TimeMessage.prototype.getBegininmilliseconds = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.NumberMessage.prototype.setNum = function(value) { +proto.protocol.TimeMessage.prototype.setBegininmilliseconds = function(value) { jspb.Message.setField(this, 1, value); }; +/** + * optional int64 endInMilliseconds = 2; + * @return {number} + */ +proto.protocol.TimeMessage.prototype.getEndinmilliseconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TimeMessage.prototype.setEndinmilliseconds = function(value) { + jspb.Message.setField(this, 2, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -2661,12 +2612,12 @@ proto.protocol.NumberMessage.prototype.setNum = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.BytesMessage = function(opt_data) { +proto.protocol.BlockLimit = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BytesMessage, jspb.Message); +goog.inherits(proto.protocol.BlockLimit, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BytesMessage.displayName = 'proto.protocol.BytesMessage'; + proto.protocol.BlockLimit.displayName = 'proto.protocol.BlockLimit'; } @@ -2681,8 +2632,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BytesMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BytesMessage.toObject(opt_includeInstance, this); +proto.protocol.BlockLimit.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockLimit.toObject(opt_includeInstance, this); }; @@ -2691,13 +2642,14 @@ proto.protocol.BytesMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BytesMessage} msg The msg instance to transform. + * @param {!proto.protocol.BlockLimit} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BytesMessage.toObject = function(includeInstance, msg) { +proto.protocol.BlockLimit.toObject = function(includeInstance, msg) { var f, obj = { - value: msg.getValue_asB64() + startnum: jspb.Message.getFieldWithDefault(msg, 1, 0), + endnum: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -2711,23 +2663,23 @@ proto.protocol.BytesMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BytesMessage} + * @return {!proto.protocol.BlockLimit} */ -proto.protocol.BytesMessage.deserializeBinary = function(bytes) { +proto.protocol.BlockLimit.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BytesMessage; - return proto.protocol.BytesMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockLimit; + return proto.protocol.BlockLimit.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BytesMessage} msg The message object to deserialize into. + * @param {!proto.protocol.BlockLimit} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BytesMessage} + * @return {!proto.protocol.BlockLimit} */ -proto.protocol.BytesMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2735,8 +2687,12 @@ proto.protocol.BytesMessage.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartnum(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndnum(value); break; default: reader.skipField(); @@ -2751,9 +2707,9 @@ proto.protocol.BytesMessage.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BytesMessage.prototype.serializeBinary = function() { +proto.protocol.BlockLimit.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BytesMessage.serializeBinaryToWriter(this, writer); + proto.protocol.BlockLimit.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2761,58 +2717,56 @@ proto.protocol.BytesMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BytesMessage} message + * @param {!proto.protocol.BlockLimit} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BytesMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockLimit.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getStartnum(); + if (f !== 0) { + writer.writeInt64( 1, f ); } + f = message.getEndnum(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; /** - * optional bytes value = 1; - * @return {!(string|Uint8Array)} + * optional int64 startNum = 1; + * @return {number} */ -proto.protocol.BytesMessage.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.BlockLimit.prototype.getStartnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** - * optional bytes value = 1; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.protocol.BytesMessage.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); +/** @param {number} value */ +proto.protocol.BlockLimit.prototype.setStartnum = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional bytes value = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} + * optional int64 endNum = 2; + * @return {number} */ -proto.protocol.BytesMessage.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); +proto.protocol.BlockLimit.prototype.getEndnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.BytesMessage.prototype.setValue = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {number} value */ +proto.protocol.BlockLimit.prototype.setEndnum = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -2827,12 +2781,12 @@ proto.protocol.BytesMessage.prototype.setValue = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.TimeMessage = function(opt_data) { +proto.protocol.TransactionLimit = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.TimeMessage, jspb.Message); +goog.inherits(proto.protocol.TransactionLimit, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TimeMessage.displayName = 'proto.protocol.TimeMessage'; + proto.protocol.TransactionLimit.displayName = 'proto.protocol.TransactionLimit'; } @@ -2847,8 +2801,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TimeMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TimeMessage.toObject(opt_includeInstance, this); +proto.protocol.TransactionLimit.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionLimit.toObject(opt_includeInstance, this); }; @@ -2857,14 +2811,14 @@ proto.protocol.TimeMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TimeMessage} msg The msg instance to transform. + * @param {!proto.protocol.TransactionLimit} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TimeMessage.toObject = function(includeInstance, msg) { +proto.protocol.TransactionLimit.toObject = function(includeInstance, msg) { var f, obj = { - begininmilliseconds: jspb.Message.getFieldWithDefault(msg, 1, 0), - endinmilliseconds: jspb.Message.getFieldWithDefault(msg, 2, 0) + transactionid: msg.getTransactionid_asB64(), + limitnum: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -2878,23 +2832,23 @@ proto.protocol.TimeMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TimeMessage} + * @return {!proto.protocol.TransactionLimit} */ -proto.protocol.TimeMessage.deserializeBinary = function(bytes) { +proto.protocol.TransactionLimit.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TimeMessage; - return proto.protocol.TimeMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TransactionLimit; + return proto.protocol.TransactionLimit.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TimeMessage} msg The message object to deserialize into. + * @param {!proto.protocol.TransactionLimit} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TimeMessage} + * @return {!proto.protocol.TransactionLimit} */ -proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2902,12 +2856,12 @@ proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBegininmilliseconds(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTransactionid(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setEndinmilliseconds(value); + msg.setLimitnum(value); break; default: reader.skipField(); @@ -2922,9 +2876,9 @@ proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TimeMessage.prototype.serializeBinary = function() { +proto.protocol.TransactionLimit.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TimeMessage.serializeBinaryToWriter(this, writer); + proto.protocol.TransactionLimit.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2932,20 +2886,20 @@ proto.protocol.TimeMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TimeMessage} message + * @param {!proto.protocol.TransactionLimit} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TimeMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TransactionLimit.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBegininmilliseconds(); - if (f !== 0) { - writer.writeInt64( + f = message.getTransactionid_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getEndinmilliseconds(); + f = message.getLimitnum(); if (f !== 0) { writer.writeInt64( 2, @@ -2956,31 +2910,55 @@ proto.protocol.TimeMessage.serializeBinaryToWriter = function(message, writer) { /** - * optional int64 beginInMilliseconds = 1; - * @return {number} + * optional bytes transactionId = 1; + * @return {!(string|Uint8Array)} */ -proto.protocol.TimeMessage.prototype.getBegininmilliseconds = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.TransactionLimit.prototype.getTransactionid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.protocol.TimeMessage.prototype.setBegininmilliseconds = function(value) { +/** + * optional bytes transactionId = 1; + * This is a type-conversion wrapper around `getTransactionid()` + * @return {string} + */ +proto.protocol.TransactionLimit.prototype.getTransactionid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTransactionid())); +}; + + +/** + * optional bytes transactionId = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTransactionid()` + * @return {!Uint8Array} + */ +proto.protocol.TransactionLimit.prototype.getTransactionid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTransactionid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionLimit.prototype.setTransactionid = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 endInMilliseconds = 2; + * optional int64 limitNum = 2; * @return {number} */ -proto.protocol.TimeMessage.prototype.getEndinmilliseconds = function() { +proto.protocol.TransactionLimit.prototype.getLimitnum = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.TimeMessage.prototype.setEndinmilliseconds = function(value) { +proto.protocol.TransactionLimit.prototype.setLimitnum = function(value) { jspb.Message.setField(this, 2, value); }; @@ -2996,12 +2974,12 @@ proto.protocol.TimeMessage.prototype.setEndinmilliseconds = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockLimit = function(opt_data) { +proto.protocol.AccountPaginated = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BlockLimit, jspb.Message); +goog.inherits(proto.protocol.AccountPaginated, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockLimit.displayName = 'proto.protocol.BlockLimit'; + proto.protocol.AccountPaginated.displayName = 'proto.protocol.AccountPaginated'; } @@ -3016,8 +2994,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockLimit.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockLimit.toObject(opt_includeInstance, this); +proto.protocol.AccountPaginated.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountPaginated.toObject(opt_includeInstance, this); }; @@ -3026,14 +3004,15 @@ proto.protocol.BlockLimit.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockLimit} msg The msg instance to transform. + * @param {!proto.protocol.AccountPaginated} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockLimit.toObject = function(includeInstance, msg) { +proto.protocol.AccountPaginated.toObject = function(includeInstance, msg) { var f, obj = { - startnum: jspb.Message.getFieldWithDefault(msg, 1, 0), - endnum: jspb.Message.getFieldWithDefault(msg, 2, 0) + account: (f = msg.getAccount()) && core_Tron_pb.Account.toObject(includeInstance, f), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -3047,23 +3026,23 @@ proto.protocol.BlockLimit.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockLimit} + * @return {!proto.protocol.AccountPaginated} */ -proto.protocol.BlockLimit.deserializeBinary = function(bytes) { +proto.protocol.AccountPaginated.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockLimit; - return proto.protocol.BlockLimit.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.AccountPaginated; + return proto.protocol.AccountPaginated.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockLimit} msg The message object to deserialize into. + * @param {!proto.protocol.AccountPaginated} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockLimit} + * @return {!proto.protocol.AccountPaginated} */ -proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3071,12 +3050,17 @@ proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStartnum(value); + var value = new core_Tron_pb.Account; + reader.readMessage(value,core_Tron_pb.Account.deserializeBinaryFromReader); + msg.setAccount(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setEndnum(value); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); break; default: reader.skipField(); @@ -3091,9 +3075,9 @@ proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockLimit.prototype.serializeBinary = function() { +proto.protocol.AccountPaginated.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockLimit.serializeBinaryToWriter(this, writer); + proto.protocol.AccountPaginated.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3101,23 +3085,31 @@ proto.protocol.BlockLimit.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockLimit} message + * @param {!proto.protocol.AccountPaginated} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockLimit.serializeBinaryToWriter = function(message, writer) { +proto.protocol.AccountPaginated.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartnum(); + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + core_Tron_pb.Account.serializeBinaryToWriter + ); + } + f = message.getOffset(); if (f !== 0) { writer.writeInt64( - 1, + 2, f ); } - f = message.getEndnum(); + f = message.getLimit(); if (f !== 0) { writer.writeInt64( - 2, + 3, f ); } @@ -3125,35 +3117,65 @@ proto.protocol.BlockLimit.serializeBinaryToWriter = function(message, writer) { /** - * optional int64 startNum = 1; - * @return {number} + * optional Account account = 1; + * @return {?proto.protocol.Account} */ -proto.protocol.BlockLimit.prototype.getStartnum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.AccountPaginated.prototype.getAccount = function() { + return /** @type{?proto.protocol.Account} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Account, 1)); }; -/** @param {number} value */ -proto.protocol.BlockLimit.prototype.setStartnum = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {?proto.protocol.Account|undefined} value */ +proto.protocol.AccountPaginated.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.AccountPaginated.prototype.clearAccount = function() { + this.setAccount(undefined); }; /** - * optional int64 endNum = 2; + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.AccountPaginated.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 offset = 2; * @return {number} */ -proto.protocol.BlockLimit.prototype.getEndnum = function() { +proto.protocol.AccountPaginated.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.BlockLimit.prototype.setEndnum = function(value) { +proto.protocol.AccountPaginated.prototype.setOffset = function(value) { jspb.Message.setField(this, 2, value); }; +/** + * optional int64 limit = 3; + * @return {number} + */ +proto.protocol.AccountPaginated.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountPaginated.prototype.setLimit = function(value) { + jspb.Message.setField(this, 3, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -3165,12 +3187,12 @@ proto.protocol.BlockLimit.prototype.setEndnum = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.TransactionLimit = function(opt_data) { +proto.protocol.TimePaginatedMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.TransactionLimit, jspb.Message); +goog.inherits(proto.protocol.TimePaginatedMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TransactionLimit.displayName = 'proto.protocol.TransactionLimit'; + proto.protocol.TimePaginatedMessage.displayName = 'proto.protocol.TimePaginatedMessage'; } @@ -3185,8 +3207,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TransactionLimit.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionLimit.toObject(opt_includeInstance, this); +proto.protocol.TimePaginatedMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TimePaginatedMessage.toObject(opt_includeInstance, this); }; @@ -3195,14 +3217,15 @@ proto.protocol.TransactionLimit.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionLimit} msg The msg instance to transform. + * @param {!proto.protocol.TimePaginatedMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionLimit.toObject = function(includeInstance, msg) { +proto.protocol.TimePaginatedMessage.toObject = function(includeInstance, msg) { var f, obj = { - transactionid: msg.getTransactionid_asB64(), - limitnum: jspb.Message.getFieldWithDefault(msg, 2, 0) + timemessage: (f = msg.getTimemessage()) && proto.protocol.TimeMessage.toObject(includeInstance, f), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -3216,23 +3239,23 @@ proto.protocol.TransactionLimit.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionLimit} + * @return {!proto.protocol.TimePaginatedMessage} */ -proto.protocol.TransactionLimit.deserializeBinary = function(bytes) { +proto.protocol.TimePaginatedMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionLimit; - return proto.protocol.TransactionLimit.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TimePaginatedMessage; + return proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TransactionLimit} msg The message object to deserialize into. + * @param {!proto.protocol.TimePaginatedMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionLimit} + * @return {!proto.protocol.TimePaginatedMessage} */ -proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3240,12 +3263,17 @@ proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTransactionid(value); + var value = new proto.protocol.TimeMessage; + reader.readMessage(value,proto.protocol.TimeMessage.deserializeBinaryFromReader); + msg.setTimemessage(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setLimitnum(value); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); break; default: reader.skipField(); @@ -3260,9 +3288,9 @@ proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TransactionLimit.prototype.serializeBinary = function() { +proto.protocol.TimePaginatedMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionLimit.serializeBinaryToWriter(this, writer); + proto.protocol.TimePaginatedMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3270,80 +3298,94 @@ proto.protocol.TransactionLimit.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionLimit} message + * @param {!proto.protocol.TimePaginatedMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionLimit.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TimePaginatedMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransactionid_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTimemessage(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.protocol.TimeMessage.serializeBinaryToWriter ); } - f = message.getLimitnum(); + f = message.getOffset(); if (f !== 0) { writer.writeInt64( 2, f ); } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } }; /** - * optional bytes transactionId = 1; - * @return {!(string|Uint8Array)} + * optional TimeMessage timeMessage = 1; + * @return {?proto.protocol.TimeMessage} */ -proto.protocol.TransactionLimit.prototype.getTransactionid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.TimePaginatedMessage.prototype.getTimemessage = function() { + return /** @type{?proto.protocol.TimeMessage} */ ( + jspb.Message.getWrapperField(this, proto.protocol.TimeMessage, 1)); +}; + + +/** @param {?proto.protocol.TimeMessage|undefined} value */ +proto.protocol.TimePaginatedMessage.prototype.setTimemessage = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TimePaginatedMessage.prototype.clearTimemessage = function() { + this.setTimemessage(undefined); }; /** - * optional bytes transactionId = 1; - * This is a type-conversion wrapper around `getTransactionid()` - * @return {string} + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.TransactionLimit.prototype.getTransactionid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTransactionid())); +proto.protocol.TimePaginatedMessage.prototype.hasTimemessage = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes transactionId = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTransactionid()` - * @return {!Uint8Array} + * optional int64 offset = 2; + * @return {number} */ -proto.protocol.TransactionLimit.prototype.getTransactionid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTransactionid())); +proto.protocol.TimePaginatedMessage.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.TransactionLimit.prototype.setTransactionid = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {number} value */ +proto.protocol.TimePaginatedMessage.prototype.setOffset = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int64 limitNum = 2; + * optional int64 limit = 3; * @return {number} */ -proto.protocol.TransactionLimit.prototype.getLimitnum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.TimePaginatedMessage.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.TransactionLimit.prototype.setLimitnum = function(value) { - jspb.Message.setField(this, 2, value); +proto.protocol.TimePaginatedMessage.prototype.setLimit = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -3358,12 +3400,12 @@ proto.protocol.TransactionLimit.prototype.setLimitnum = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.AccountPaginated = function(opt_data) { +proto.protocol.AccountNetMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.AccountPaginated, jspb.Message); +goog.inherits(proto.protocol.AccountNetMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.AccountPaginated.displayName = 'proto.protocol.AccountPaginated'; + proto.protocol.AccountNetMessage.displayName = 'proto.protocol.AccountNetMessage'; } @@ -3378,8 +3420,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.AccountPaginated.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountPaginated.toObject(opt_includeInstance, this); +proto.protocol.AccountNetMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountNetMessage.toObject(opt_includeInstance, this); }; @@ -3388,15 +3430,20 @@ proto.protocol.AccountPaginated.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.AccountPaginated} msg The msg instance to transform. + * @param {!proto.protocol.AccountNetMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountPaginated.toObject = function(includeInstance, msg) { +proto.protocol.AccountNetMessage.toObject = function(includeInstance, msg) { var f, obj = { - account: (f = msg.getAccount()) && core_Tron_pb.Account.toObject(includeInstance, f), - offset: jspb.Message.getFieldWithDefault(msg, 2, 0), - limit: jspb.Message.getFieldWithDefault(msg, 3, 0) + freenetused: jspb.Message.getFieldWithDefault(msg, 1, 0), + freenetlimit: jspb.Message.getFieldWithDefault(msg, 2, 0), + netused: jspb.Message.getFieldWithDefault(msg, 3, 0), + netlimit: jspb.Message.getFieldWithDefault(msg, 4, 0), + assetnetusedMap: (f = msg.getAssetnetusedMap()) ? f.toObject(includeInstance, undefined) : [], + assetnetlimitMap: (f = msg.getAssetnetlimitMap()) ? f.toObject(includeInstance, undefined) : [], + totalnetlimit: jspb.Message.getFieldWithDefault(msg, 7, 0), + totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -3410,23 +3457,23 @@ proto.protocol.AccountPaginated.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountPaginated} + * @return {!proto.protocol.AccountNetMessage} */ -proto.protocol.AccountPaginated.deserializeBinary = function(bytes) { +proto.protocol.AccountNetMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountPaginated; - return proto.protocol.AccountPaginated.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.AccountNetMessage; + return proto.protocol.AccountNetMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.AccountPaginated} msg The message object to deserialize into. + * @param {!proto.protocol.AccountNetMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountPaginated} + * @return {!proto.protocol.AccountNetMessage} */ -proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3434,17 +3481,40 @@ proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new core_Tron_pb.Account; - reader.readMessage(value,core_Tron_pb.Account.deserializeBinaryFromReader); - msg.setAccount(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFreenetused(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setOffset(value); + msg.setFreenetlimit(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setLimit(value); + msg.setNetused(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetlimit(value); + break; + case 5: + var value = msg.getAssetnetusedMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 6: + var value = msg.getAssetnetlimitMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalnetlimit(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalnetweight(value); break; default: reader.skipField(); @@ -3459,9 +3529,9 @@ proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.AccountPaginated.prototype.serializeBinary = function() { +proto.protocol.AccountNetMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.AccountPaginated.serializeBinaryToWriter(this, writer); + proto.protocol.AccountNetMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3469,307 +3539,188 @@ proto.protocol.AccountPaginated.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountPaginated} message + * @param {!proto.protocol.AccountNetMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountPaginated.serializeBinaryToWriter = function(message, writer) { +proto.protocol.AccountNetMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( + f = message.getFreenetused(); + if (f !== 0) { + writer.writeInt64( 1, - f, - core_Tron_pb.Account.serializeBinaryToWriter + f ); } - f = message.getOffset(); + f = message.getFreenetlimit(); if (f !== 0) { writer.writeInt64( 2, f ); } - f = message.getLimit(); + f = message.getNetused(); if (f !== 0) { writer.writeInt64( 3, f ); } + f = message.getNetlimit(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getAssetnetusedMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getAssetnetlimitMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getTotalnetlimit(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getTotalnetweight(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } }; /** - * optional Account account = 1; - * @return {?proto.protocol.Account} + * optional int64 freeNetUsed = 1; + * @return {number} */ -proto.protocol.AccountPaginated.prototype.getAccount = function() { - return /** @type{?proto.protocol.Account} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Account, 1)); -}; - - -/** @param {?proto.protocol.Account|undefined} value */ -proto.protocol.AccountPaginated.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.AccountPaginated.prototype.clearAccount = function() { - this.setAccount(undefined); +proto.protocol.AccountNetMessage.prototype.getFreenetused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.AccountPaginated.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; +/** @param {number} value */ +proto.protocol.AccountNetMessage.prototype.setFreenetused = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 offset = 2; + * optional int64 freeNetLimit = 2; * @return {number} */ -proto.protocol.AccountPaginated.prototype.getOffset = function() { +proto.protocol.AccountNetMessage.prototype.getFreenetlimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.AccountPaginated.prototype.setOffset = function(value) { +proto.protocol.AccountNetMessage.prototype.setFreenetlimit = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int64 limit = 3; + * optional int64 NetUsed = 3; * @return {number} */ -proto.protocol.AccountPaginated.prototype.getLimit = function() { +proto.protocol.AccountNetMessage.prototype.getNetused = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.AccountPaginated.prototype.setLimit = function(value) { +proto.protocol.AccountNetMessage.prototype.setNetused = function(value) { jspb.Message.setField(this, 3, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional int64 NetLimit = 4; + * @return {number} */ -proto.protocol.TimePaginatedMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.AccountNetMessage.prototype.getNetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountNetMessage.prototype.setNetlimit = function(value) { + jspb.Message.setField(this, 4, value); }; -goog.inherits(proto.protocol.TimePaginatedMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.TimePaginatedMessage.displayName = 'proto.protocol.TimePaginatedMessage'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TimePaginatedMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TimePaginatedMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TimePaginatedMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TimePaginatedMessage.toObject = function(includeInstance, msg) { - var f, obj = { - timemessage: (f = msg.getTimemessage()) && proto.protocol.TimeMessage.toObject(includeInstance, f), - offset: jspb.Message.getFieldWithDefault(msg, 2, 0), - limit: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TimePaginatedMessage} - */ -proto.protocol.TimePaginatedMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TimePaginatedMessage; - return proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TimePaginatedMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TimePaginatedMessage} - */ -proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.TimeMessage; - reader.readMessage(value,proto.protocol.TimeMessage.deserializeBinaryFromReader); - msg.setTimemessage(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOffset(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * map assetNetUsed = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.protocol.TimePaginatedMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TimePaginatedMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.AccountNetMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TimePaginatedMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TimePaginatedMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimemessage(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.TimeMessage.serializeBinaryToWriter - ); - } - f = message.getOffset(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getLimit(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } +proto.protocol.AccountNetMessage.prototype.clearAssetnetusedMap = function() { + this.getAssetnetusedMap().clear(); }; /** - * optional TimeMessage timeMessage = 1; - * @return {?proto.protocol.TimeMessage} + * map assetNetLimit = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.protocol.TimePaginatedMessage.prototype.getTimemessage = function() { - return /** @type{?proto.protocol.TimeMessage} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TimeMessage, 1)); -}; - - -/** @param {?proto.protocol.TimeMessage|undefined} value */ -proto.protocol.TimePaginatedMessage.prototype.setTimemessage = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.TimePaginatedMessage.prototype.clearTimemessage = function() { - this.setTimemessage(undefined); +proto.protocol.AccountNetMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.TimePaginatedMessage.prototype.hasTimemessage = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.AccountNetMessage.prototype.clearAssetnetlimitMap = function() { + this.getAssetnetlimitMap().clear(); }; /** - * optional int64 offset = 2; + * optional int64 TotalNetLimit = 7; * @return {number} */ -proto.protocol.TimePaginatedMessage.prototype.getOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.AccountNetMessage.prototype.getTotalnetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.protocol.TimePaginatedMessage.prototype.setOffset = function(value) { - jspb.Message.setField(this, 2, value); +proto.protocol.AccountNetMessage.prototype.setTotalnetlimit = function(value) { + jspb.Message.setField(this, 7, value); }; /** - * optional int64 limit = 3; + * optional int64 TotalNetWeight = 8; * @return {number} */ -proto.protocol.TimePaginatedMessage.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.protocol.AccountNetMessage.prototype.getTotalnetweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** @param {number} value */ -proto.protocol.TimePaginatedMessage.prototype.setLimit = function(value) { - jspb.Message.setField(this, 3, value); +proto.protocol.AccountNetMessage.prototype.setTotalnetweight = function(value) { + jspb.Message.setField(this, 8, value); }; @@ -3784,12 +3735,12 @@ proto.protocol.TimePaginatedMessage.prototype.setLimit = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.AccountNetMessage = function(opt_data) { +proto.protocol.AccountResourceMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.AccountNetMessage, jspb.Message); +goog.inherits(proto.protocol.AccountResourceMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.AccountNetMessage.displayName = 'proto.protocol.AccountNetMessage'; + proto.protocol.AccountResourceMessage.displayName = 'proto.protocol.AccountResourceMessage'; } @@ -3804,8 +3755,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.AccountNetMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountNetMessage.toObject(opt_includeInstance, this); +proto.protocol.AccountResourceMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountResourceMessage.toObject(opt_includeInstance, this); }; @@ -3814,11 +3765,11 @@ proto.protocol.AccountNetMessage.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.AccountNetMessage} msg The msg instance to transform. + * @param {!proto.protocol.AccountResourceMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountNetMessage.toObject = function(includeInstance, msg) { +proto.protocol.AccountResourceMessage.toObject = function(includeInstance, msg) { var f, obj = { freenetused: jspb.Message.getFieldWithDefault(msg, 1, 0), freenetlimit: jspb.Message.getFieldWithDefault(msg, 2, 0), @@ -3827,7 +3778,13 @@ proto.protocol.AccountNetMessage.toObject = function(includeInstance, msg) { assetnetusedMap: (f = msg.getAssetnetusedMap()) ? f.toObject(includeInstance, undefined) : [], assetnetlimitMap: (f = msg.getAssetnetlimitMap()) ? f.toObject(includeInstance, undefined) : [], totalnetlimit: jspb.Message.getFieldWithDefault(msg, 7, 0), - totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0) + totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0), + energyused: jspb.Message.getFieldWithDefault(msg, 13, 0), + energylimit: jspb.Message.getFieldWithDefault(msg, 14, 0), + totalenergylimit: jspb.Message.getFieldWithDefault(msg, 15, 0), + totalenergyweight: jspb.Message.getFieldWithDefault(msg, 16, 0), + storageused: jspb.Message.getFieldWithDefault(msg, 21, 0), + storagelimit: jspb.Message.getFieldWithDefault(msg, 22, 0) }; if (includeInstance) { @@ -3841,23 +3798,23 @@ proto.protocol.AccountNetMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountNetMessage} + * @return {!proto.protocol.AccountResourceMessage} */ -proto.protocol.AccountNetMessage.deserializeBinary = function(bytes) { +proto.protocol.AccountResourceMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountNetMessage; - return proto.protocol.AccountNetMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.AccountResourceMessage; + return proto.protocol.AccountResourceMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.AccountNetMessage} msg The message object to deserialize into. + * @param {!proto.protocol.AccountResourceMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountNetMessage} + * @return {!proto.protocol.AccountResourceMessage} */ -proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3900,6 +3857,30 @@ proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, rea var value = /** @type {number} */ (reader.readInt64()); msg.setTotalnetweight(value); break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergyused(value); + break; + case 14: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergylimit(value); + break; + case 15: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalenergylimit(value); + break; + case 16: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalenergyweight(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageused(value); + break; + case 22: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStoragelimit(value); + break; default: reader.skipField(); break; @@ -3913,9 +3894,9 @@ proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.AccountNetMessage.prototype.serializeBinary = function() { +proto.protocol.AccountResourceMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.AccountNetMessage.serializeBinaryToWriter(this, writer); + proto.protocol.AccountResourceMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3923,11 +3904,11 @@ proto.protocol.AccountNetMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountNetMessage} message + * @param {!proto.protocol.AccountResourceMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountNetMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.AccountResourceMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFreenetused(); if (f !== 0) { @@ -3979,20 +3960,62 @@ proto.protocol.AccountNetMessage.serializeBinaryToWriter = function(message, wri f ); } -}; - - + f = message.getEnergyused(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getEnergylimit(); + if (f !== 0) { + writer.writeInt64( + 14, + f + ); + } + f = message.getTotalenergylimit(); + if (f !== 0) { + writer.writeInt64( + 15, + f + ); + } + f = message.getTotalenergyweight(); + if (f !== 0) { + writer.writeInt64( + 16, + f + ); + } + f = message.getStorageused(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } + f = message.getStoragelimit(); + if (f !== 0) { + writer.writeInt64( + 22, + f + ); + } +}; + + /** * optional int64 freeNetUsed = 1; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getFreenetused = function() { +proto.protocol.AccountResourceMessage.prototype.getFreenetused = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setFreenetused = function(value) { +proto.protocol.AccountResourceMessage.prototype.setFreenetused = function(value) { jspb.Message.setField(this, 1, value); }; @@ -4001,13 +4024,13 @@ proto.protocol.AccountNetMessage.prototype.setFreenetused = function(value) { * optional int64 freeNetLimit = 2; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getFreenetlimit = function() { +proto.protocol.AccountResourceMessage.prototype.getFreenetlimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setFreenetlimit = function(value) { +proto.protocol.AccountResourceMessage.prototype.setFreenetlimit = function(value) { jspb.Message.setField(this, 2, value); }; @@ -4016,13 +4039,13 @@ proto.protocol.AccountNetMessage.prototype.setFreenetlimit = function(value) { * optional int64 NetUsed = 3; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getNetused = function() { +proto.protocol.AccountResourceMessage.prototype.getNetused = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setNetused = function(value) { +proto.protocol.AccountResourceMessage.prototype.setNetused = function(value) { jspb.Message.setField(this, 3, value); }; @@ -4031,13 +4054,13 @@ proto.protocol.AccountNetMessage.prototype.setNetused = function(value) { * optional int64 NetLimit = 4; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getNetlimit = function() { +proto.protocol.AccountResourceMessage.prototype.getNetlimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setNetlimit = function(value) { +proto.protocol.AccountResourceMessage.prototype.setNetlimit = function(value) { jspb.Message.setField(this, 4, value); }; @@ -4048,14 +4071,14 @@ proto.protocol.AccountNetMessage.prototype.setNetlimit = function(value) { * empty, instead returning `undefined` * @return {!jspb.Map} */ -proto.protocol.AccountNetMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { +proto.protocol.AccountResourceMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 5, opt_noLazyCreate, null)); }; -proto.protocol.AccountNetMessage.prototype.clearAssetnetusedMap = function() { +proto.protocol.AccountResourceMessage.prototype.clearAssetnetusedMap = function() { this.getAssetnetusedMap().clear(); }; @@ -4066,14 +4089,14 @@ proto.protocol.AccountNetMessage.prototype.clearAssetnetusedMap = function() { * empty, instead returning `undefined` * @return {!jspb.Map} */ -proto.protocol.AccountNetMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { +proto.protocol.AccountResourceMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 6, opt_noLazyCreate, null)); }; -proto.protocol.AccountNetMessage.prototype.clearAssetnetlimitMap = function() { +proto.protocol.AccountResourceMessage.prototype.clearAssetnetlimitMap = function() { this.getAssetnetlimitMap().clear(); }; @@ -4082,13 +4105,13 @@ proto.protocol.AccountNetMessage.prototype.clearAssetnetlimitMap = function() { * optional int64 TotalNetLimit = 7; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getTotalnetlimit = function() { +proto.protocol.AccountResourceMessage.prototype.getTotalnetlimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setTotalnetlimit = function(value) { +proto.protocol.AccountResourceMessage.prototype.setTotalnetlimit = function(value) { jspb.Message.setField(this, 7, value); }; @@ -4097,17 +4120,107 @@ proto.protocol.AccountNetMessage.prototype.setTotalnetlimit = function(value) { * optional int64 TotalNetWeight = 8; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getTotalnetweight = function() { +proto.protocol.AccountResourceMessage.prototype.getTotalnetweight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setTotalnetweight = function(value) { +proto.protocol.AccountResourceMessage.prototype.setTotalnetweight = function(value) { jspb.Message.setField(this, 8, value); }; +/** + * optional int64 EnergyUsed = 13; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getEnergyused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setEnergyused = function(value) { + jspb.Message.setField(this, 13, value); +}; + + +/** + * optional int64 EnergyLimit = 14; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getEnergylimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setEnergylimit = function(value) { + jspb.Message.setField(this, 14, value); +}; + + +/** + * optional int64 TotalEnergyLimit = 15; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getTotalenergylimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalenergylimit = function(value) { + jspb.Message.setField(this, 15, value); +}; + + +/** + * optional int64 TotalEnergyWeight = 16; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getTotalenergyweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalenergyweight = function(value) { + jspb.Message.setField(this, 16, value); +}; + + +/** + * optional int64 storageUsed = 21; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getStorageused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setStorageused = function(value) { + jspb.Message.setField(this, 21, value); +}; + + +/** + * optional int64 storageLimit = 22; + * @return {number} + */ +proto.protocol.AccountResourceMessage.prototype.getStoragelimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setStoragelimit = function(value) { + jspb.Message.setField(this, 22, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -4119,12 +4232,12 @@ proto.protocol.AccountNetMessage.prototype.setTotalnetweight = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.AccountResourceMessage = function(opt_data) { +proto.protocol.PaginatedMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.AccountResourceMessage, jspb.Message); +goog.inherits(proto.protocol.PaginatedMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.AccountResourceMessage.displayName = 'proto.protocol.AccountResourceMessage'; + proto.protocol.PaginatedMessage.displayName = 'proto.protocol.PaginatedMessage'; } @@ -4139,8 +4252,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.AccountResourceMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountResourceMessage.toObject(opt_includeInstance, this); +proto.protocol.PaginatedMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PaginatedMessage.toObject(opt_includeInstance, this); }; @@ -4149,26 +4262,14 @@ proto.protocol.AccountResourceMessage.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.AccountResourceMessage} msg The msg instance to transform. + * @param {!proto.protocol.PaginatedMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountResourceMessage.toObject = function(includeInstance, msg) { +proto.protocol.PaginatedMessage.toObject = function(includeInstance, msg) { var f, obj = { - freenetused: jspb.Message.getFieldWithDefault(msg, 1, 0), - freenetlimit: jspb.Message.getFieldWithDefault(msg, 2, 0), - netused: jspb.Message.getFieldWithDefault(msg, 3, 0), - netlimit: jspb.Message.getFieldWithDefault(msg, 4, 0), - assetnetusedMap: (f = msg.getAssetnetusedMap()) ? f.toObject(includeInstance, undefined) : [], - assetnetlimitMap: (f = msg.getAssetnetlimitMap()) ? f.toObject(includeInstance, undefined) : [], - totalnetlimit: jspb.Message.getFieldWithDefault(msg, 7, 0), - totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0), - energyused: jspb.Message.getFieldWithDefault(msg, 13, 0), - energylimit: jspb.Message.getFieldWithDefault(msg, 14, 0), - totalenergylimit: jspb.Message.getFieldWithDefault(msg, 15, 0), - totalenergyweight: jspb.Message.getFieldWithDefault(msg, 16, 0), - storageused: jspb.Message.getFieldWithDefault(msg, 21, 0), - storagelimit: jspb.Message.getFieldWithDefault(msg, 22, 0) + offset: jspb.Message.getFieldWithDefault(msg, 1, 0), + limit: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -4182,23 +4283,23 @@ proto.protocol.AccountResourceMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountResourceMessage} + * @return {!proto.protocol.PaginatedMessage} */ -proto.protocol.AccountResourceMessage.deserializeBinary = function(bytes) { +proto.protocol.PaginatedMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountResourceMessage; - return proto.protocol.AccountResourceMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.PaginatedMessage; + return proto.protocol.PaginatedMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.AccountResourceMessage} msg The message object to deserialize into. + * @param {!proto.protocol.PaginatedMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountResourceMessage} + * @return {!proto.protocol.PaginatedMessage} */ -proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.PaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4207,66 +4308,14 @@ proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); - msg.setFreenetused(value); + msg.setOffset(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setFreenetlimit(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNetused(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNetlimit(value); - break; - case 5: - var value = msg.getAssetnetusedMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; - case 6: - var value = msg.getAssetnetlimitMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalnetlimit(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalnetweight(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEnergyused(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEnergylimit(value); + msg.setLimit(value); break; - case 15: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalenergylimit(value); - break; - case 16: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalenergyweight(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageused(value); - break; - case 22: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStoragelimit(value); - break; - default: - reader.skipField(); + default: + reader.skipField(); break; } } @@ -4278,9 +4327,9 @@ proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.AccountResourceMessage.prototype.serializeBinary = function() { +proto.protocol.PaginatedMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.AccountResourceMessage.serializeBinaryToWriter(this, writer); + proto.protocol.PaginatedMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4288,320 +4337,300 @@ proto.protocol.AccountResourceMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountResourceMessage} message + * @param {!proto.protocol.PaginatedMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountResourceMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.PaginatedMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFreenetused(); + f = message.getOffset(); if (f !== 0) { writer.writeInt64( 1, f ); } - f = message.getFreenetlimit(); + f = message.getLimit(); if (f !== 0) { writer.writeInt64( 2, f ); } - f = message.getNetused(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getNetlimit(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getAssetnetusedMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getAssetnetlimitMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getTotalnetlimit(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getTotalnetweight(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getEnergyused(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getEnergylimit(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } - f = message.getTotalenergylimit(); - if (f !== 0) { - writer.writeInt64( - 15, - f - ); - } - f = message.getTotalenergyweight(); - if (f !== 0) { - writer.writeInt64( - 16, - f - ); - } - f = message.getStorageused(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getStoragelimit(); - if (f !== 0) { - writer.writeInt64( - 22, - f - ); - } }; /** - * optional int64 freeNetUsed = 1; + * optional int64 offset = 1; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getFreenetused = function() { +proto.protocol.PaginatedMessage.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setFreenetused = function(value) { +proto.protocol.PaginatedMessage.prototype.setOffset = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 freeNetLimit = 2; + * optional int64 limit = 2; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getFreenetlimit = function() { +proto.protocol.PaginatedMessage.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setFreenetlimit = function(value) { +proto.protocol.PaginatedMessage.prototype.setLimit = function(value) { jspb.Message.setField(this, 2, value); }; + /** - * optional int64 NetUsed = 3; - * @return {number} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.AccountResourceMessage.prototype.getNetused = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setNetused = function(value) { - jspb.Message.setField(this, 3, value); +proto.protocol.EasyTransferMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.protocol.EasyTransferMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.EasyTransferMessage.displayName = 'proto.protocol.EasyTransferMessage'; +} +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int64 NetLimit = 4; - * @return {number} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.protocol.AccountResourceMessage.prototype.getNetlimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setNetlimit = function(value) { - jspb.Message.setField(this, 4, value); +proto.protocol.EasyTransferMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferMessage.toObject(opt_includeInstance, this); }; /** - * map assetNetUsed = 5; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.EasyTransferMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountResourceMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 5, opt_noLazyCreate, - null)); -}; - +proto.protocol.EasyTransferMessage.toObject = function(includeInstance, msg) { + var f, obj = { + passphrase: msg.getPassphrase_asB64(), + toaddress: msg.getToaddress_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; -proto.protocol.AccountResourceMessage.prototype.clearAssetnetusedMap = function() { - this.getAssetnetusedMap().clear(); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * map assetNetLimit = 6; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.EasyTransferMessage} */ -proto.protocol.AccountResourceMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, - null)); -}; - - -proto.protocol.AccountResourceMessage.prototype.clearAssetnetlimitMap = function() { - this.getAssetnetlimitMap().clear(); +proto.protocol.EasyTransferMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.EasyTransferMessage; + return proto.protocol.EasyTransferMessage.deserializeBinaryFromReader(msg, reader); }; /** - * optional int64 TotalNetLimit = 7; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.EasyTransferMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.EasyTransferMessage} */ -proto.protocol.AccountResourceMessage.prototype.getTotalnetlimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setTotalnetlimit = function(value) { - jspb.Message.setField(this, 7, value); +proto.protocol.EasyTransferMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPassphrase(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToaddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 TotalNetWeight = 8; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.protocol.AccountResourceMessage.prototype.getTotalnetweight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setTotalnetweight = function(value) { - jspb.Message.setField(this, 8, value); +proto.protocol.EasyTransferMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.EasyTransferMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int64 EnergyUsed = 13; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.EasyTransferMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountResourceMessage.prototype.getEnergyused = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setEnergyused = function(value) { - jspb.Message.setField(this, 13, value); +proto.protocol.EasyTransferMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPassphrase_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getToaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } }; /** - * optional int64 EnergyLimit = 14; - * @return {number} + * optional bytes passPhrase = 1; + * @return {!(string|Uint8Array)} */ -proto.protocol.AccountResourceMessage.prototype.getEnergylimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +proto.protocol.EasyTransferMessage.prototype.getPassphrase = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setEnergylimit = function(value) { - jspb.Message.setField(this, 14, value); +/** + * optional bytes passPhrase = 1; + * This is a type-conversion wrapper around `getPassphrase()` + * @return {string} + */ +proto.protocol.EasyTransferMessage.prototype.getPassphrase_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPassphrase())); }; /** - * optional int64 TotalEnergyLimit = 15; - * @return {number} + * optional bytes passPhrase = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPassphrase()` + * @return {!Uint8Array} */ -proto.protocol.AccountResourceMessage.prototype.getTotalenergylimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +proto.protocol.EasyTransferMessage.prototype.getPassphrase_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPassphrase())); }; -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setTotalenergylimit = function(value) { - jspb.Message.setField(this, 15, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferMessage.prototype.setPassphrase = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 TotalEnergyWeight = 16; - * @return {number} + * optional bytes toAddress = 2; + * @return {!(string|Uint8Array)} */ -proto.protocol.AccountResourceMessage.prototype.getTotalenergyweight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +proto.protocol.EasyTransferMessage.prototype.getToaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setTotalenergyweight = function(value) { - jspb.Message.setField(this, 16, value); +/** + * optional bytes toAddress = 2; + * This is a type-conversion wrapper around `getToaddress()` + * @return {string} + */ +proto.protocol.EasyTransferMessage.prototype.getToaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getToaddress())); }; /** - * optional int64 storageUsed = 21; - * @return {number} + * optional bytes toAddress = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaddress()` + * @return {!Uint8Array} */ -proto.protocol.AccountResourceMessage.prototype.getStorageused = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +proto.protocol.EasyTransferMessage.prototype.getToaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getToaddress())); }; -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setStorageused = function(value) { - jspb.Message.setField(this, 21, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferMessage.prototype.setToaddress = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int64 storageLimit = 22; + * optional int64 amount = 3; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getStoragelimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +proto.protocol.EasyTransferMessage.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setStoragelimit = function(value) { - jspb.Message.setField(this, 22, value); +proto.protocol.EasyTransferMessage.prototype.setAmount = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -4616,12 +4645,12 @@ proto.protocol.AccountResourceMessage.prototype.setStoragelimit = function(value * @extends {jspb.Message} * @constructor */ -proto.protocol.PaginatedMessage = function(opt_data) { +proto.protocol.EasyTransferByPrivateMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.PaginatedMessage, jspb.Message); +goog.inherits(proto.protocol.EasyTransferByPrivateMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.PaginatedMessage.displayName = 'proto.protocol.PaginatedMessage'; + proto.protocol.EasyTransferByPrivateMessage.displayName = 'proto.protocol.EasyTransferByPrivateMessage'; } @@ -4636,8 +4665,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.PaginatedMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PaginatedMessage.toObject(opt_includeInstance, this); +proto.protocol.EasyTransferByPrivateMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferByPrivateMessage.toObject(opt_includeInstance, this); }; @@ -4646,14 +4675,15 @@ proto.protocol.PaginatedMessage.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.PaginatedMessage} msg The msg instance to transform. + * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.PaginatedMessage.toObject = function(includeInstance, msg) { +proto.protocol.EasyTransferByPrivateMessage.toObject = function(includeInstance, msg) { var f, obj = { - offset: jspb.Message.getFieldWithDefault(msg, 1, 0), - limit: jspb.Message.getFieldWithDefault(msg, 2, 0) + privatekey: msg.getPrivatekey_asB64(), + toaddress: msg.getToaddress_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -4667,23 +4697,23 @@ proto.protocol.PaginatedMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.PaginatedMessage} + * @return {!proto.protocol.EasyTransferByPrivateMessage} */ -proto.protocol.PaginatedMessage.deserializeBinary = function(bytes) { +proto.protocol.EasyTransferByPrivateMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PaginatedMessage; - return proto.protocol.PaginatedMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.EasyTransferByPrivateMessage; + return proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.PaginatedMessage} msg The message object to deserialize into. + * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PaginatedMessage} + * @return {!proto.protocol.EasyTransferByPrivateMessage} */ -proto.protocol.PaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4691,12 +4721,16 @@ proto.protocol.PaginatedMessage.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOffset(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPrivatekey(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToaddress(value); + break; + case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setLimit(value); + msg.setAmount(value); break; default: reader.skipField(); @@ -4711,9 +4745,9 @@ proto.protocol.PaginatedMessage.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.PaginatedMessage.prototype.serializeBinary = function() { +proto.protocol.EasyTransferByPrivateMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.PaginatedMessage.serializeBinaryToWriter(this, writer); + proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4721,23 +4755,30 @@ proto.protocol.PaginatedMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.PaginatedMessage} message + * @param {!proto.protocol.EasyTransferByPrivateMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.PaginatedMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOffset(); - if (f !== 0) { - writer.writeInt64( + f = message.getPrivatekey_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getLimit(); + f = message.getToaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAmount(); if (f !== 0) { writer.writeInt64( - 2, + 3, f ); } @@ -4745,32 +4786,95 @@ proto.protocol.PaginatedMessage.serializeBinaryToWriter = function(message, writ /** - * optional int64 offset = 1; - * @return {number} + * optional bytes privateKey = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes privateKey = 1; + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {string} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPrivatekey())); +}; + + +/** + * optional bytes privateKey = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPrivatekey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferByPrivateMessage.prototype.setPrivatekey = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes toAddress = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes toAddress = 2; + * This is a type-conversion wrapper around `getToaddress()` + * @return {string} */ -proto.protocol.PaginatedMessage.prototype.getOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getToaddress())); }; -/** @param {number} value */ -proto.protocol.PaginatedMessage.prototype.setOffset = function(value) { - jspb.Message.setField(this, 1, value); +/** + * optional bytes toAddress = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaddress()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getToaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferByPrivateMessage.prototype.setToaddress = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int64 limit = 2; + * optional int64 amount = 3; * @return {number} */ -proto.protocol.PaginatedMessage.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.EasyTransferByPrivateMessage.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.PaginatedMessage.prototype.setLimit = function(value) { - jspb.Message.setField(this, 2, value); +proto.protocol.EasyTransferByPrivateMessage.prototype.setAmount = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -4785,12 +4889,12 @@ proto.protocol.PaginatedMessage.prototype.setLimit = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.EasyTransferMessage = function(opt_data) { +proto.protocol.EasyTransferResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.EasyTransferMessage, jspb.Message); +goog.inherits(proto.protocol.EasyTransferResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.EasyTransferMessage.displayName = 'proto.protocol.EasyTransferMessage'; + proto.protocol.EasyTransferResponse.displayName = 'proto.protocol.EasyTransferResponse'; } @@ -4805,8 +4909,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.EasyTransferMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.EasyTransferMessage.toObject(opt_includeInstance, this); +proto.protocol.EasyTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferResponse.toObject(opt_includeInstance, this); }; @@ -4815,15 +4919,15 @@ proto.protocol.EasyTransferMessage.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.EasyTransferMessage} msg The msg instance to transform. + * @param {!proto.protocol.EasyTransferResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferMessage.toObject = function(includeInstance, msg) { +proto.protocol.EasyTransferResponse.toObject = function(includeInstance, msg) { var f, obj = { - passphrase: msg.getPassphrase_asB64(), - toaddress: msg.getToaddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + transaction: (f = msg.getTransaction()) && core_Tron_pb.Transaction.toObject(includeInstance, f), + result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f), + txid: msg.getTxid_asB64() }; if (includeInstance) { @@ -4837,23 +4941,23 @@ proto.protocol.EasyTransferMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.EasyTransferMessage} + * @return {!proto.protocol.EasyTransferResponse} */ -proto.protocol.EasyTransferMessage.deserializeBinary = function(bytes) { +proto.protocol.EasyTransferResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.EasyTransferMessage; - return proto.protocol.EasyTransferMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.EasyTransferResponse; + return proto.protocol.EasyTransferResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.EasyTransferMessage} msg The message object to deserialize into. + * @param {!proto.protocol.EasyTransferResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.EasyTransferMessage} + * @return {!proto.protocol.EasyTransferResponse} */ -proto.protocol.EasyTransferMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.EasyTransferResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4861,16 +4965,18 @@ proto.protocol.EasyTransferMessage.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPassphrase(value); + var value = new core_Tron_pb.Transaction; + reader.readMessage(value,core_Tron_pb.Transaction.deserializeBinaryFromReader); + msg.setTransaction(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToaddress(value); + var value = new proto.protocol.Return; + reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); + msg.setResult(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); break; default: reader.skipField(); @@ -4885,9 +4991,9 @@ proto.protocol.EasyTransferMessage.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.EasyTransferMessage.prototype.serializeBinary = function() { +proto.protocol.EasyTransferResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.EasyTransferMessage.serializeBinaryToWriter(this, writer); + proto.protocol.EasyTransferResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4895,29 +5001,31 @@ proto.protocol.EasyTransferMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.EasyTransferMessage} message + * @param {!proto.protocol.EasyTransferResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.EasyTransferResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPassphrase_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTransaction(); + if (f != null) { + writer.writeMessage( 1, - f + f, + core_Tron_pb.Transaction.serializeBinaryToWriter ); } - f = message.getToaddress_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getResult(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.protocol.Return.serializeBinaryToWriter ); } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( 3, f ); @@ -4926,94 +5034,100 @@ proto.protocol.EasyTransferMessage.serializeBinaryToWriter = function(message, w /** - * optional bytes passPhrase = 1; - * @return {!(string|Uint8Array)} + * optional Transaction transaction = 1; + * @return {?proto.protocol.Transaction} */ -proto.protocol.EasyTransferMessage.prototype.getPassphrase = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.EasyTransferResponse.prototype.getTransaction = function() { + return /** @type{?proto.protocol.Transaction} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); +}; + + +/** @param {?proto.protocol.Transaction|undefined} value */ +proto.protocol.EasyTransferResponse.prototype.setTransaction = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.EasyTransferResponse.prototype.clearTransaction = function() { + this.setTransaction(undefined); }; /** - * optional bytes passPhrase = 1; - * This is a type-conversion wrapper around `getPassphrase()` - * @return {string} + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.EasyTransferMessage.prototype.getPassphrase_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPassphrase())); +proto.protocol.EasyTransferResponse.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes passPhrase = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPassphrase()` - * @return {!Uint8Array} + * optional Return result = 2; + * @return {?proto.protocol.Return} */ -proto.protocol.EasyTransferMessage.prototype.getPassphrase_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPassphrase())); +proto.protocol.EasyTransferResponse.prototype.getResult = function() { + return /** @type{?proto.protocol.Return} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Return, 2)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferMessage.prototype.setPassphrase = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {?proto.protocol.Return|undefined} value */ +proto.protocol.EasyTransferResponse.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.EasyTransferResponse.prototype.clearResult = function() { + this.setResult(undefined); }; /** - * optional bytes toAddress = 2; + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.EasyTransferResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes txid = 3; * @return {!(string|Uint8Array)} */ -proto.protocol.EasyTransferMessage.prototype.getToaddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.EasyTransferResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional bytes toAddress = 2; - * This is a type-conversion wrapper around `getToaddress()` + * optional bytes txid = 3; + * This is a type-conversion wrapper around `getTxid()` * @return {string} */ -proto.protocol.EasyTransferMessage.prototype.getToaddress_asB64 = function() { +proto.protocol.EasyTransferResponse.prototype.getTxid_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToaddress())); + this.getTxid())); }; /** - * optional bytes toAddress = 2; + * optional bytes txid = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToaddress()` + * This is a type-conversion wrapper around `getTxid()` * @return {!Uint8Array} */ -proto.protocol.EasyTransferMessage.prototype.getToaddress_asU8 = function() { +proto.protocol.EasyTransferResponse.prototype.getTxid_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToaddress())); + this.getTxid())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferMessage.prototype.setToaddress = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.protocol.EasyTransferMessage.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.protocol.EasyTransferMessage.prototype.setAmount = function(value) { +proto.protocol.EasyTransferResponse.prototype.setTxid = function(value) { jspb.Message.setField(this, 3, value); }; @@ -5029,12 +5143,12 @@ proto.protocol.EasyTransferMessage.prototype.setAmount = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.EasyTransferByPrivateMessage = function(opt_data) { +proto.protocol.AddressPrKeyPairMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.EasyTransferByPrivateMessage, jspb.Message); +goog.inherits(proto.protocol.AddressPrKeyPairMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.EasyTransferByPrivateMessage.displayName = 'proto.protocol.EasyTransferByPrivateMessage'; + proto.protocol.AddressPrKeyPairMessage.displayName = 'proto.protocol.AddressPrKeyPairMessage'; } @@ -5049,8 +5163,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.EasyTransferByPrivateMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.EasyTransferByPrivateMessage.toObject(opt_includeInstance, this); +proto.protocol.AddressPrKeyPairMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AddressPrKeyPairMessage.toObject(opt_includeInstance, this); }; @@ -5059,15 +5173,14 @@ proto.protocol.EasyTransferByPrivateMessage.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The msg instance to transform. + * @param {!proto.protocol.AddressPrKeyPairMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferByPrivateMessage.toObject = function(includeInstance, msg) { +proto.protocol.AddressPrKeyPairMessage.toObject = function(includeInstance, msg) { var f, obj = { - privatekey: msg.getPrivatekey_asB64(), - toaddress: msg.getToaddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + privatekey: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -5081,23 +5194,23 @@ proto.protocol.EasyTransferByPrivateMessage.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.EasyTransferByPrivateMessage} + * @return {!proto.protocol.AddressPrKeyPairMessage} */ -proto.protocol.EasyTransferByPrivateMessage.deserializeBinary = function(bytes) { +proto.protocol.AddressPrKeyPairMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.EasyTransferByPrivateMessage; - return proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.AddressPrKeyPairMessage; + return proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The message object to deserialize into. + * @param {!proto.protocol.AddressPrKeyPairMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.EasyTransferByPrivateMessage} + * @return {!proto.protocol.AddressPrKeyPairMessage} */ -proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5105,16 +5218,12 @@ proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPrivatekey(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToaddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPrivatekey(value); break; default: reader.skipField(); @@ -5129,9 +5238,9 @@ proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.EasyTransferByPrivateMessage.prototype.serializeBinary = function() { +proto.protocol.AddressPrKeyPairMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter(this, writer); + proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5139,129 +5248,59 @@ proto.protocol.EasyTransferByPrivateMessage.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.EasyTransferByPrivateMessage} message + * @param {!proto.protocol.AddressPrKeyPairMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPrivatekey_asU8(); + f = message.getAddress(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getToaddress_asU8(); + f = message.getPrivatekey(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bytes privateKey = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes privateKey = 1; - * This is a type-conversion wrapper around `getPrivatekey()` + * optional string address = 1; * @return {string} */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPrivatekey())); -}; - - -/** - * optional bytes privateKey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPrivatekey()` - * @return {!Uint8Array} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPrivatekey())); +proto.protocol.AddressPrKeyPairMessage.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setPrivatekey = function(value) { +/** @param {string} value */ +proto.protocol.AddressPrKeyPairMessage.prototype.setAddress = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional bytes toAddress = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes toAddress = 2; - * This is a type-conversion wrapper around `getToaddress()` + * optional string privateKey = 2; * @return {string} */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToaddress())); -}; - - -/** - * optional bytes toAddress = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToaddress()` - * @return {!Uint8Array} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToaddress())); +proto.protocol.AddressPrKeyPairMessage.prototype.getPrivatekey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setToaddress = function(value) { +/** @param {string} value */ +proto.protocol.AddressPrKeyPairMessage.prototype.setPrivatekey = function(value) { jspb.Message.setField(this, 2, value); }; -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setAmount = function(value) { - jspb.Message.setField(this, 3, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -5273,13 +5312,20 @@ proto.protocol.EasyTransferByPrivateMessage.prototype.setAmount = function(value * @extends {jspb.Message} * @constructor */ -proto.protocol.EasyTransferResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.TransactionExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionExtention.repeatedFields_, null); }; -goog.inherits(proto.protocol.EasyTransferResponse, jspb.Message); +goog.inherits(proto.protocol.TransactionExtention, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.EasyTransferResponse.displayName = 'proto.protocol.EasyTransferResponse'; + proto.protocol.TransactionExtention.displayName = 'proto.protocol.TransactionExtention'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.TransactionExtention.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5293,8 +5339,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.EasyTransferResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.EasyTransferResponse.toObject(opt_includeInstance, this); +proto.protocol.TransactionExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionExtention.toObject(opt_includeInstance, this); }; @@ -5303,15 +5349,16 @@ proto.protocol.EasyTransferResponse.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.EasyTransferResponse} msg The msg instance to transform. + * @param {!proto.protocol.TransactionExtention} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferResponse.toObject = function(includeInstance, msg) { +proto.protocol.TransactionExtention.toObject = function(includeInstance, msg) { var f, obj = { transaction: (f = msg.getTransaction()) && core_Tron_pb.Transaction.toObject(includeInstance, f), - result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f), - txid: msg.getTxid_asB64() + txid: msg.getTxid_asB64(), + constantResultList: msg.getConstantResultList_asB64(), + result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f) }; if (includeInstance) { @@ -5325,23 +5372,23 @@ proto.protocol.EasyTransferResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.EasyTransferResponse} + * @return {!proto.protocol.TransactionExtention} */ -proto.protocol.EasyTransferResponse.deserializeBinary = function(bytes) { +proto.protocol.TransactionExtention.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.EasyTransferResponse; - return proto.protocol.EasyTransferResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TransactionExtention; + return proto.protocol.TransactionExtention.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.EasyTransferResponse} msg The message object to deserialize into. + * @param {!proto.protocol.TransactionExtention} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.EasyTransferResponse} + * @return {!proto.protocol.TransactionExtention} */ -proto.protocol.EasyTransferResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5354,13 +5401,17 @@ proto.protocol.EasyTransferResponse.deserializeBinaryFromReader = function(msg, msg.setTransaction(value); break; case 2: - var value = new proto.protocol.Return; - reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); - msg.setResult(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); + msg.addConstantResult(value); + break; + case 4: + var value = new proto.protocol.Return; + reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); + msg.setResult(value); break; default: reader.skipField(); @@ -5375,9 +5426,9 @@ proto.protocol.EasyTransferResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.EasyTransferResponse.prototype.serializeBinary = function() { +proto.protocol.TransactionExtention.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.EasyTransferResponse.serializeBinaryToWriter(this, writer); + proto.protocol.TransactionExtention.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5385,11 +5436,11 @@ proto.protocol.EasyTransferResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.EasyTransferResponse} message + * @param {!proto.protocol.TransactionExtention} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferResponse.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TransactionExtention.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTransaction(); if (f != null) { @@ -5399,21 +5450,28 @@ proto.protocol.EasyTransferResponse.serializeBinaryToWriter = function(message, core_Tron_pb.Transaction.serializeBinaryToWriter ); } - f = message.getResult(); - if (f != null) { - writer.writeMessage( + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, - f, - proto.protocol.Return.serializeBinaryToWriter + f ); } - f = message.getTxid_asU8(); + f = message.getConstantResultList_asU8(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedBytes( 3, f ); } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.protocol.Return.serializeBinaryToWriter + ); + } }; @@ -5421,98 +5479,151 @@ proto.protocol.EasyTransferResponse.serializeBinaryToWriter = function(message, * optional Transaction transaction = 1; * @return {?proto.protocol.Transaction} */ -proto.protocol.EasyTransferResponse.prototype.getTransaction = function() { +proto.protocol.TransactionExtention.prototype.getTransaction = function() { return /** @type{?proto.protocol.Transaction} */ ( jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); }; -/** @param {?proto.protocol.Transaction|undefined} value */ -proto.protocol.EasyTransferResponse.prototype.setTransaction = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** @param {?proto.protocol.Transaction|undefined} value */ +proto.protocol.TransactionExtention.prototype.setTransaction = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TransactionExtention.prototype.clearTransaction = function() { + this.setTransaction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TransactionExtention.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes txid = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TransactionExtention.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes txid = 2; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.protocol.TransactionExtention.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.protocol.TransactionExtention.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionExtention.prototype.setTxid = function(value) { + jspb.Message.setField(this, 2, value); }; -proto.protocol.EasyTransferResponse.prototype.clearTransaction = function() { - this.setTransaction(undefined); +/** + * repeated bytes constant_result = 3; + * @return {!(Array|Array)} + */ +proto.protocol.TransactionExtention.prototype.getConstantResultList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); }; /** - * Returns whether this field is set. - * @return {!boolean} + * repeated bytes constant_result = 3; + * This is a type-conversion wrapper around `getConstantResultList()` + * @return {!Array.} */ -proto.protocol.EasyTransferResponse.prototype.hasTransaction = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.TransactionExtention.prototype.getConstantResultList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getConstantResultList())); }; /** - * optional Return result = 2; - * @return {?proto.protocol.Return} + * repeated bytes constant_result = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConstantResultList()` + * @return {!Array.} */ -proto.protocol.EasyTransferResponse.prototype.getResult = function() { - return /** @type{?proto.protocol.Return} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Return, 2)); +proto.protocol.TransactionExtention.prototype.getConstantResultList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getConstantResultList())); }; -/** @param {?proto.protocol.Return|undefined} value */ -proto.protocol.EasyTransferResponse.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 2, value); +/** @param {!(Array|Array)} value */ +proto.protocol.TransactionExtention.prototype.setConstantResultList = function(value) { + jspb.Message.setField(this, 3, value || []); }; -proto.protocol.EasyTransferResponse.prototype.clearResult = function() { - this.setResult(undefined); +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.TransactionExtention.prototype.addConstantResult = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.EasyTransferResponse.prototype.hasResult = function() { - return jspb.Message.getField(this, 2) != null; +proto.protocol.TransactionExtention.prototype.clearConstantResultList = function() { + this.setConstantResultList([]); }; /** - * optional bytes txid = 3; - * @return {!(string|Uint8Array)} + * optional Return result = 4; + * @return {?proto.protocol.Return} */ -proto.protocol.EasyTransferResponse.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.TransactionExtention.prototype.getResult = function() { + return /** @type{?proto.protocol.Return} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Return, 4)); }; -/** - * optional bytes txid = 3; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} - */ -proto.protocol.EasyTransferResponse.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); +/** @param {?proto.protocol.Return|undefined} value */ +proto.protocol.TransactionExtention.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 4, value); }; -/** - * optional bytes txid = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` - * @return {!Uint8Array} - */ -proto.protocol.EasyTransferResponse.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); +proto.protocol.TransactionExtention.prototype.clearResult = function() { + this.setResult(undefined); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferResponse.prototype.setTxid = function(value) { - jspb.Message.setField(this, 3, value); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TransactionExtention.prototype.hasResult = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -5527,13 +5638,20 @@ proto.protocol.EasyTransferResponse.prototype.setTxid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.AddressPrKeyPairMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.BlockExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockExtention.repeatedFields_, null); }; -goog.inherits(proto.protocol.AddressPrKeyPairMessage, jspb.Message); +goog.inherits(proto.protocol.BlockExtention, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.AddressPrKeyPairMessage.displayName = 'proto.protocol.AddressPrKeyPairMessage'; + proto.protocol.BlockExtention.displayName = 'proto.protocol.BlockExtention'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.BlockExtention.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5547,8 +5665,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.AddressPrKeyPairMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AddressPrKeyPairMessage.toObject(opt_includeInstance, this); +proto.protocol.BlockExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockExtention.toObject(opt_includeInstance, this); }; @@ -5557,14 +5675,16 @@ proto.protocol.AddressPrKeyPairMessage.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.AddressPrKeyPairMessage} msg The msg instance to transform. + * @param {!proto.protocol.BlockExtention} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AddressPrKeyPairMessage.toObject = function(includeInstance, msg) { +proto.protocol.BlockExtention.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - privatekey: jspb.Message.getFieldWithDefault(msg, 2, "") + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.protocol.TransactionExtention.toObject, includeInstance), + blockHeader: (f = msg.getBlockHeader()) && core_Tron_pb.BlockHeader.toObject(includeInstance, f), + blockid: msg.getBlockid_asB64() }; if (includeInstance) { @@ -5578,23 +5698,23 @@ proto.protocol.AddressPrKeyPairMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AddressPrKeyPairMessage} + * @return {!proto.protocol.BlockExtention} */ -proto.protocol.AddressPrKeyPairMessage.deserializeBinary = function(bytes) { +proto.protocol.BlockExtention.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AddressPrKeyPairMessage; - return proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockExtention; + return proto.protocol.BlockExtention.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.AddressPrKeyPairMessage} msg The message object to deserialize into. + * @param {!proto.protocol.BlockExtention} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AddressPrKeyPairMessage} + * @return {!proto.protocol.BlockExtention} */ -proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5602,12 +5722,18 @@ proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + var value = new proto.protocol.TransactionExtention; + reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); + msg.addTransactions(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPrivatekey(value); + var value = new core_Tron_pb.BlockHeader; + reader.readMessage(value,core_Tron_pb.BlockHeader.deserializeBinaryFromReader); + msg.setBlockHeader(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockid(value); break; default: reader.skipField(); @@ -5622,9 +5748,9 @@ proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.AddressPrKeyPairMessage.prototype.serializeBinary = function() { +proto.protocol.BlockExtention.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter(this, writer); + proto.protocol.BlockExtention.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5632,23 +5758,32 @@ proto.protocol.AddressPrKeyPairMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AddressPrKeyPairMessage} message + * @param {!proto.protocol.BlockExtention} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockExtention.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); + f = message.getTransactionsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + proto.protocol.TransactionExtention.serializeBinaryToWriter ); } - f = message.getPrivatekey(); - if (f.length > 0) { - writer.writeString( + f = message.getBlockHeader(); + if (f != null) { + writer.writeMessage( 2, + f, + core_Tron_pb.BlockHeader.serializeBinaryToWriter + ); + } + f = message.getBlockid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, f ); } @@ -5656,32 +5791,102 @@ proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter = function(messag /** - * optional string address = 1; - * @return {string} + * repeated TransactionExtention transactions = 1; + * @return {!Array.} */ -proto.protocol.AddressPrKeyPairMessage.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.BlockExtention.prototype.getTransactionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionExtention, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.BlockExtention.prototype.setTransactionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.protocol.TransactionExtention=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.TransactionExtention} + */ +proto.protocol.BlockExtention.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TransactionExtention, opt_index); +}; + + +proto.protocol.BlockExtention.prototype.clearTransactionsList = function() { + this.setTransactionsList([]); +}; + + +/** + * optional BlockHeader block_header = 2; + * @return {?proto.protocol.BlockHeader} + */ +proto.protocol.BlockExtention.prototype.getBlockHeader = function() { + return /** @type{?proto.protocol.BlockHeader} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.BlockHeader, 2)); +}; + + +/** @param {?proto.protocol.BlockHeader|undefined} value */ +proto.protocol.BlockExtention.prototype.setBlockHeader = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.BlockExtention.prototype.clearBlockHeader = function() { + this.setBlockHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.BlockExtention.prototype.hasBlockHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes blockid = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.BlockExtention.prototype.getBlockid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; -/** @param {string} value */ -proto.protocol.AddressPrKeyPairMessage.prototype.setAddress = function(value) { - jspb.Message.setField(this, 1, value); +/** + * optional bytes blockid = 3; + * This is a type-conversion wrapper around `getBlockid()` + * @return {string} + */ +proto.protocol.BlockExtention.prototype.getBlockid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockid())); }; /** - * optional string privateKey = 2; - * @return {string} + * optional bytes blockid = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockid()` + * @return {!Uint8Array} */ -proto.protocol.AddressPrKeyPairMessage.prototype.getPrivatekey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.BlockExtention.prototype.getBlockid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockid())); }; -/** @param {string} value */ -proto.protocol.AddressPrKeyPairMessage.prototype.setPrivatekey = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BlockExtention.prototype.setBlockid = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -5696,19 +5901,19 @@ proto.protocol.AddressPrKeyPairMessage.prototype.setPrivatekey = function(value) * @extends {jspb.Message} * @constructor */ -proto.protocol.TransactionExtention = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionExtention.repeatedFields_, null); +proto.protocol.BlockListExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockListExtention.repeatedFields_, null); }; -goog.inherits(proto.protocol.TransactionExtention, jspb.Message); +goog.inherits(proto.protocol.BlockListExtention, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TransactionExtention.displayName = 'proto.protocol.TransactionExtention'; + proto.protocol.BlockListExtention.displayName = 'proto.protocol.BlockListExtention'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.protocol.TransactionExtention.repeatedFields_ = [3]; +proto.protocol.BlockListExtention.repeatedFields_ = [1]; @@ -5723,8 +5928,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TransactionExtention.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionExtention.toObject(opt_includeInstance, this); +proto.protocol.BlockListExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockListExtention.toObject(opt_includeInstance, this); }; @@ -5733,16 +5938,14 @@ proto.protocol.TransactionExtention.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionExtention} msg The msg instance to transform. + * @param {!proto.protocol.BlockListExtention} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionExtention.toObject = function(includeInstance, msg) { +proto.protocol.BlockListExtention.toObject = function(includeInstance, msg) { var f, obj = { - transaction: (f = msg.getTransaction()) && core_Tron_pb.Transaction.toObject(includeInstance, f), - txid: msg.getTxid_asB64(), - constantResultList: msg.getConstantResultList_asB64(), - result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f) + blockList: jspb.Message.toObjectList(msg.getBlockList(), + proto.protocol.BlockExtention.toObject, includeInstance) }; if (includeInstance) { @@ -5756,23 +5959,23 @@ proto.protocol.TransactionExtention.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionExtention} + * @return {!proto.protocol.BlockListExtention} */ -proto.protocol.TransactionExtention.deserializeBinary = function(bytes) { +proto.protocol.BlockListExtention.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionExtention; - return proto.protocol.TransactionExtention.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockListExtention; + return proto.protocol.BlockListExtention.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TransactionExtention} msg The message object to deserialize into. + * @param {!proto.protocol.BlockListExtention} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionExtention} + * @return {!proto.protocol.BlockListExtention} */ -proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5780,22 +5983,9 @@ proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new core_Tron_pb.Transaction; - reader.readMessage(value,core_Tron_pb.Transaction.deserializeBinaryFromReader); - msg.setTransaction(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addConstantResult(value); - break; - case 4: - var value = new proto.protocol.Return; - reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); - msg.setResult(value); + var value = new proto.protocol.BlockExtention; + reader.readMessage(value,proto.protocol.BlockExtention.deserializeBinaryFromReader); + msg.addBlock(value); break; default: reader.skipField(); @@ -5810,9 +6000,9 @@ proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TransactionExtention.prototype.serializeBinary = function() { +proto.protocol.BlockListExtention.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionExtention.serializeBinaryToWriter(this, writer); + proto.protocol.BlockListExtention.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5820,194 +6010,51 @@ proto.protocol.TransactionExtention.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionExtention} message + * @param {!proto.protocol.BlockListExtention} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionExtention.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockListExtention.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransaction(); - if (f != null) { - writer.writeMessage( - 1, - f, - core_Tron_pb.Transaction.serializeBinaryToWriter - ); - } - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getConstantResultList_asU8(); + f = message.getBlockList(); if (f.length > 0) { - writer.writeRepeatedBytes( - 3, - f - ); - } - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 4, + writer.writeRepeatedMessage( + 1, f, - proto.protocol.Return.serializeBinaryToWriter + proto.protocol.BlockExtention.serializeBinaryToWriter ); } }; /** - * optional Transaction transaction = 1; - * @return {?proto.protocol.Transaction} - */ -proto.protocol.TransactionExtention.prototype.getTransaction = function() { - return /** @type{?proto.protocol.Transaction} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); -}; - - -/** @param {?proto.protocol.Transaction|undefined} value */ -proto.protocol.TransactionExtention.prototype.setTransaction = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.TransactionExtention.prototype.clearTransaction = function() { - this.setTransaction(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.TransactionExtention.prototype.hasTransaction = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes txid = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionExtention.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes txid = 2; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} - */ -proto.protocol.TransactionExtention.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); -}; - - -/** - * optional bytes txid = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` - * @return {!Uint8Array} - */ -proto.protocol.TransactionExtention.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.TransactionExtention.prototype.setTxid = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * repeated bytes constant_result = 3; - * @return {!(Array|Array)} - */ -proto.protocol.TransactionExtention.prototype.getConstantResultList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * repeated bytes constant_result = 3; - * This is a type-conversion wrapper around `getConstantResultList()` - * @return {!Array.} - */ -proto.protocol.TransactionExtention.prototype.getConstantResultList_asB64 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( - this.getConstantResultList())); -}; - - -/** - * repeated bytes constant_result = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getConstantResultList()` - * @return {!Array.} - */ -proto.protocol.TransactionExtention.prototype.getConstantResultList_asU8 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( - this.getConstantResultList())); -}; - - -/** @param {!(Array|Array)} value */ -proto.protocol.TransactionExtention.prototype.setConstantResultList = function(value) { - jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - */ -proto.protocol.TransactionExtention.prototype.addConstantResult = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -proto.protocol.TransactionExtention.prototype.clearConstantResultList = function() { - this.setConstantResultList([]); -}; - - -/** - * optional Return result = 4; - * @return {?proto.protocol.Return} + * repeated BlockExtention block = 1; + * @return {!Array.} */ -proto.protocol.TransactionExtention.prototype.getResult = function() { - return /** @type{?proto.protocol.Return} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Return, 4)); +proto.protocol.BlockListExtention.prototype.getBlockList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockExtention, 1)); }; -/** @param {?proto.protocol.Return|undefined} value */ -proto.protocol.TransactionExtention.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 4, value); +/** @param {!Array.} value */ +proto.protocol.BlockListExtention.prototype.setBlockList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; -proto.protocol.TransactionExtention.prototype.clearResult = function() { - this.setResult(undefined); +/** + * @param {!proto.protocol.BlockExtention=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.BlockExtention} + */ +proto.protocol.BlockListExtention.prototype.addBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.BlockExtention, opt_index); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.TransactionExtention.prototype.hasResult = function() { - return jspb.Message.getField(this, 4) != null; +proto.protocol.BlockListExtention.prototype.clearBlockList = function() { + this.setBlockList([]); }; @@ -6022,19 +6069,19 @@ proto.protocol.TransactionExtention.prototype.hasResult = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockExtention = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockExtention.repeatedFields_, null); +proto.protocol.TransactionListExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionListExtention.repeatedFields_, null); }; -goog.inherits(proto.protocol.BlockExtention, jspb.Message); +goog.inherits(proto.protocol.TransactionListExtention, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockExtention.displayName = 'proto.protocol.BlockExtention'; + proto.protocol.TransactionListExtention.displayName = 'proto.protocol.TransactionListExtention'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.protocol.BlockExtention.repeatedFields_ = [1]; +proto.protocol.TransactionListExtention.repeatedFields_ = [1]; @@ -6049,8 +6096,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockExtention.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockExtention.toObject(opt_includeInstance, this); +proto.protocol.TransactionListExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionListExtention.toObject(opt_includeInstance, this); }; @@ -6059,16 +6106,14 @@ proto.protocol.BlockExtention.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockExtention} msg The msg instance to transform. + * @param {!proto.protocol.TransactionListExtention} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockExtention.toObject = function(includeInstance, msg) { +proto.protocol.TransactionListExtention.toObject = function(includeInstance, msg) { var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.protocol.TransactionExtention.toObject, includeInstance), - blockHeader: (f = msg.getBlockHeader()) && core_Tron_pb.BlockHeader.toObject(includeInstance, f), - blockid: msg.getBlockid_asB64() + transactionList: jspb.Message.toObjectList(msg.getTransactionList(), + proto.protocol.TransactionExtention.toObject, includeInstance) }; if (includeInstance) { @@ -6082,23 +6127,23 @@ proto.protocol.BlockExtention.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockExtention} + * @return {!proto.protocol.TransactionListExtention} */ -proto.protocol.BlockExtention.deserializeBinary = function(bytes) { +proto.protocol.TransactionListExtention.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockExtention; - return proto.protocol.BlockExtention.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TransactionListExtention; + return proto.protocol.TransactionListExtention.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockExtention} msg The message object to deserialize into. + * @param {!proto.protocol.TransactionListExtention} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockExtention} + * @return {!proto.protocol.TransactionListExtention} */ -proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TransactionListExtention.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6108,16 +6153,7 @@ proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader case 1: var value = new proto.protocol.TransactionExtention; reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); - msg.addTransactions(value); - break; - case 2: - var value = new core_Tron_pb.BlockHeader; - reader.readMessage(value,core_Tron_pb.BlockHeader.deserializeBinaryFromReader); - msg.setBlockHeader(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockid(value); + msg.addTransaction(value); break; default: reader.skipField(); @@ -6132,9 +6168,9 @@ proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockExtention.prototype.serializeBinary = function() { +proto.protocol.TransactionListExtention.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockExtention.serializeBinaryToWriter(this, writer); + proto.protocol.TransactionListExtention.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6142,13 +6178,13 @@ proto.protocol.BlockExtention.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockExtention} message + * @param {!proto.protocol.TransactionListExtention} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockExtention.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TransactionListExtention.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransactionsList(); + f = message.getTransactionList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, @@ -6156,36 +6192,21 @@ proto.protocol.BlockExtention.serializeBinaryToWriter = function(message, writer proto.protocol.TransactionExtention.serializeBinaryToWriter ); } - f = message.getBlockHeader(); - if (f != null) { - writer.writeMessage( - 2, - f, - core_Tron_pb.BlockHeader.serializeBinaryToWriter - ); - } - f = message.getBlockid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } }; /** - * repeated TransactionExtention transactions = 1; + * repeated TransactionExtention transaction = 1; * @return {!Array.} */ -proto.protocol.BlockExtention.prototype.getTransactionsList = function() { +proto.protocol.TransactionListExtention.prototype.getTransactionList = function() { return /** @type{!Array.} */ ( jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionExtention, 1)); }; /** @param {!Array.} value */ -proto.protocol.BlockExtention.prototype.setTransactionsList = function(value) { +proto.protocol.TransactionListExtention.prototype.setTransactionList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -6195,82 +6216,201 @@ proto.protocol.BlockExtention.prototype.setTransactionsList = function(value) { * @param {number=} opt_index * @return {!proto.protocol.TransactionExtention} */ -proto.protocol.BlockExtention.prototype.addTransactions = function(opt_value, opt_index) { +proto.protocol.TransactionListExtention.prototype.addTransaction = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TransactionExtention, opt_index); }; -proto.protocol.BlockExtention.prototype.clearTransactionsList = function() { - this.setTransactionsList([]); +proto.protocol.TransactionListExtention.prototype.clearTransactionList = function() { + this.setTransactionList([]); }; + /** - * optional BlockHeader block_header = 2; - * @return {?proto.protocol.BlockHeader} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.BlockExtention.prototype.getBlockHeader = function() { - return /** @type{?proto.protocol.BlockHeader} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.BlockHeader, 2)); +proto.protocol.TransactionSignWeight = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionSignWeight.repeatedFields_, null); }; +goog.inherits(proto.protocol.TransactionSignWeight, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TransactionSignWeight.displayName = 'proto.protocol.TransactionSignWeight'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.TransactionSignWeight.repeatedFields_ = [2]; -/** @param {?proto.protocol.BlockHeader|undefined} value */ -proto.protocol.BlockExtention.prototype.setBlockHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - -proto.protocol.BlockExtention.prototype.clearBlockHeader = function() { - this.setBlockHeader(undefined); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TransactionSignWeight.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionSignWeight.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {!boolean} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TransactionSignWeight} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockExtention.prototype.hasBlockHeader = function() { - return jspb.Message.getField(this, 2) != null; +proto.protocol.TransactionSignWeight.toObject = function(includeInstance, msg) { + var f, obj = { + permission: (f = msg.getPermission()) && core_Tron_pb.Permission.toObject(includeInstance, f), + approvedListList: msg.getApprovedListList_asB64(), + currentWeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + result: (f = msg.getResult()) && proto.protocol.TransactionSignWeight.Result.toObject(includeInstance, f), + transaction: (f = msg.getTransaction()) && proto.protocol.TransactionExtention.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes blockid = 3; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TransactionSignWeight} */ -proto.protocol.BlockExtention.prototype.getBlockid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.TransactionSignWeight.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TransactionSignWeight; + return proto.protocol.TransactionSignWeight.deserializeBinaryFromReader(msg, reader); }; /** - * optional bytes blockid = 3; - * This is a type-conversion wrapper around `getBlockid()` - * @return {string} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TransactionSignWeight} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TransactionSignWeight} */ -proto.protocol.BlockExtention.prototype.getBlockid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockid())); +proto.protocol.TransactionSignWeight.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new core_Tron_pb.Permission; + reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); + msg.setPermission(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addApprovedList(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCurrentWeight(value); + break; + case 4: + var value = new proto.protocol.TransactionSignWeight.Result; + reader.readMessage(value,proto.protocol.TransactionSignWeight.Result.deserializeBinaryFromReader); + msg.setResult(value); + break; + case 5: + var value = new proto.protocol.TransactionExtention; + reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); + msg.setTransaction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes blockid = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockid()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockExtention.prototype.getBlockid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockid())); +proto.protocol.TransactionSignWeight.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TransactionSignWeight.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.BlockExtention.prototype.setBlockid = function(value) { - jspb.Message.setField(this, 3, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TransactionSignWeight} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TransactionSignWeight.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPermission(); + if (f != null) { + writer.writeMessage( + 1, + f, + core_Tron_pb.Permission.serializeBinaryToWriter + ); + } + f = message.getApprovedListList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getCurrentWeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.protocol.TransactionSignWeight.Result.serializeBinaryToWriter + ); + } + f = message.getTransaction(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.protocol.TransactionExtention.serializeBinaryToWriter + ); + } }; @@ -6285,20 +6425,13 @@ proto.protocol.BlockExtention.prototype.setBlockid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockListExtention = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockListExtention.repeatedFields_, null); +proto.protocol.TransactionSignWeight.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BlockListExtention, jspb.Message); +goog.inherits(proto.protocol.TransactionSignWeight.Result, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockListExtention.displayName = 'proto.protocol.BlockListExtention'; + proto.protocol.TransactionSignWeight.Result.displayName = 'proto.protocol.TransactionSignWeight.Result'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.BlockListExtention.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -6312,8 +6445,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockListExtention.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockListExtention.toObject(opt_includeInstance, this); +proto.protocol.TransactionSignWeight.Result.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionSignWeight.Result.toObject(opt_includeInstance, this); }; @@ -6322,14 +6455,14 @@ proto.protocol.BlockListExtention.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockListExtention} msg The msg instance to transform. + * @param {!proto.protocol.TransactionSignWeight.Result} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockListExtention.toObject = function(includeInstance, msg) { +proto.protocol.TransactionSignWeight.Result.toObject = function(includeInstance, msg) { var f, obj = { - blockList: jspb.Message.toObjectList(msg.getBlockList(), - proto.protocol.BlockExtention.toObject, includeInstance) + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -6343,23 +6476,23 @@ proto.protocol.BlockListExtention.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockListExtention} + * @return {!proto.protocol.TransactionSignWeight.Result} */ -proto.protocol.BlockListExtention.deserializeBinary = function(bytes) { +proto.protocol.TransactionSignWeight.Result.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockListExtention; - return proto.protocol.BlockListExtention.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TransactionSignWeight.Result; + return proto.protocol.TransactionSignWeight.Result.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockListExtention} msg The message object to deserialize into. + * @param {!proto.protocol.TransactionSignWeight.Result} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockListExtention} + * @return {!proto.protocol.TransactionSignWeight.Result} */ -proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TransactionSignWeight.Result.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6367,9 +6500,12 @@ proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.BlockExtention; - reader.readMessage(value,proto.protocol.BlockExtention.deserializeBinaryFromReader); - msg.addBlock(value); + var value = /** @type {!proto.protocol.TransactionSignWeight.Result.response_code} */ (reader.readEnum()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); break; default: reader.skipField(); @@ -6384,9 +6520,9 @@ proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockListExtention.prototype.serializeBinary = function() { +proto.protocol.TransactionSignWeight.Result.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockListExtention.serializeBinaryToWriter(this, writer); + proto.protocol.TransactionSignWeight.Result.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6394,219 +6530,226 @@ proto.protocol.BlockListExtention.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockListExtention} message + * @param {!proto.protocol.TransactionSignWeight.Result} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockListExtention.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TransactionSignWeight.Result.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlockList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( 1, - f, - proto.protocol.BlockExtention.serializeBinaryToWriter + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f ); } }; /** - * repeated BlockExtention block = 1; - * @return {!Array.} + * @enum {number} */ -proto.protocol.BlockListExtention.prototype.getBlockList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockExtention, 1)); +proto.protocol.TransactionSignWeight.Result.response_code = { + ENOUGH_PERMISSION: 0, + NOT_ENOUGH_PERMISSION: 1, + SIGNATURE_FORMAT_ERROR: 2, + COMPUTE_ADDRESS_ERROR: 3, + PERMISSION_ERROR: 4, + OTHER_ERROR: 20 }; +/** + * optional response_code code = 1; + * @return {!proto.protocol.TransactionSignWeight.Result.response_code} + */ +proto.protocol.TransactionSignWeight.Result.prototype.getCode = function() { + return /** @type {!proto.protocol.TransactionSignWeight.Result.response_code} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; -/** @param {!Array.} value */ -proto.protocol.BlockListExtention.prototype.setBlockList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + +/** @param {!proto.protocol.TransactionSignWeight.Result.response_code} value */ +proto.protocol.TransactionSignWeight.Result.prototype.setCode = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * @param {!proto.protocol.BlockExtention=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.BlockExtention} + * optional string message = 2; + * @return {string} */ -proto.protocol.BlockListExtention.prototype.addBlock = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.BlockExtention, opt_index); +proto.protocol.TransactionSignWeight.Result.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -proto.protocol.BlockListExtention.prototype.clearBlockList = function() { - this.setBlockList([]); +/** @param {string} value */ +proto.protocol.TransactionSignWeight.Result.prototype.setMessage = function(value) { + jspb.Message.setField(this, 2, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional Permission permission = 1; + * @return {?proto.protocol.Permission} */ -proto.protocol.TransactionListExtention = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionListExtention.repeatedFields_, null); +proto.protocol.TransactionSignWeight.prototype.getPermission = function() { + return /** @type{?proto.protocol.Permission} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Permission, 1)); }; -goog.inherits(proto.protocol.TransactionListExtention, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.TransactionListExtention.displayName = 'proto.protocol.TransactionListExtention'; -} + + +/** @param {?proto.protocol.Permission|undefined} value */ +proto.protocol.TransactionSignWeight.prototype.setPermission = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TransactionSignWeight.prototype.clearPermission = function() { + this.setPermission(undefined); +}; + + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.TransactionListExtention.repeatedFields_ = [1]; +proto.protocol.TransactionSignWeight.prototype.hasPermission = function() { + return jspb.Message.getField(this, 1) != null; +}; +/** + * repeated bytes approved_list = 2; + * @return {!(Array|Array)} + */ +proto.protocol.TransactionSignWeight.prototype.getApprovedListList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +}; + -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * repeated bytes approved_list = 2; + * This is a type-conversion wrapper around `getApprovedListList()` + * @return {!Array.} */ -proto.protocol.TransactionListExtention.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionListExtention.toObject(opt_includeInstance, this); +proto.protocol.TransactionSignWeight.prototype.getApprovedListList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getApprovedListList())); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionListExtention} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated bytes approved_list = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getApprovedListList()` + * @return {!Array.} */ -proto.protocol.TransactionListExtention.toObject = function(includeInstance, msg) { - var f, obj = { - transactionList: jspb.Message.toObjectList(msg.getTransactionList(), - proto.protocol.TransactionExtention.toObject, includeInstance) - }; +proto.protocol.TransactionSignWeight.prototype.getApprovedListList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getApprovedListList())); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {!(Array|Array)} value */ +proto.protocol.TransactionSignWeight.prototype.setApprovedListList = function(value) { + jspb.Message.setField(this, 2, value || []); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionListExtention} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index */ -proto.protocol.TransactionListExtention.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionListExtention; - return proto.protocol.TransactionListExtention.deserializeBinaryFromReader(msg, reader); +proto.protocol.TransactionSignWeight.prototype.addApprovedList = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +proto.protocol.TransactionSignWeight.prototype.clearApprovedListList = function() { + this.setApprovedListList([]); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TransactionListExtention} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionListExtention} + * optional int64 current_weight = 3; + * @return {number} */ -proto.protocol.TransactionListExtention.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.TransactionExtention; - reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); - msg.addTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.protocol.TransactionSignWeight.prototype.getCurrentWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionSignWeight.prototype.setCurrentWeight = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional Result result = 4; + * @return {?proto.protocol.TransactionSignWeight.Result} */ -proto.protocol.TransactionListExtention.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionListExtention.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.TransactionSignWeight.prototype.getResult = function() { + return /** @type{?proto.protocol.TransactionSignWeight.Result} */ ( + jspb.Message.getWrapperField(this, proto.protocol.TransactionSignWeight.Result, 4)); +}; + + +/** @param {?proto.protocol.TransactionSignWeight.Result|undefined} value */ +proto.protocol.TransactionSignWeight.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +proto.protocol.TransactionSignWeight.prototype.clearResult = function() { + this.setResult(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionListExtention} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.TransactionListExtention.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.protocol.TransactionExtention.serializeBinaryToWriter - ); - } +proto.protocol.TransactionSignWeight.prototype.hasResult = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * repeated TransactionExtention transaction = 1; - * @return {!Array.} + * optional TransactionExtention transaction = 5; + * @return {?proto.protocol.TransactionExtention} */ -proto.protocol.TransactionListExtention.prototype.getTransactionList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionExtention, 1)); +proto.protocol.TransactionSignWeight.prototype.getTransaction = function() { + return /** @type{?proto.protocol.TransactionExtention} */ ( + jspb.Message.getWrapperField(this, proto.protocol.TransactionExtention, 5)); }; -/** @param {!Array.} value */ -proto.protocol.TransactionListExtention.prototype.setTransactionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {?proto.protocol.TransactionExtention|undefined} value */ +proto.protocol.TransactionSignWeight.prototype.setTransaction = function(value) { + jspb.Message.setWrapperField(this, 5, value); }; -/** - * @param {!proto.protocol.TransactionExtention=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TransactionExtention} - */ -proto.protocol.TransactionListExtention.prototype.addTransaction = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TransactionExtention, opt_index); +proto.protocol.TransactionSignWeight.prototype.clearTransaction = function() { + this.setTransaction(undefined); }; -proto.protocol.TransactionListExtention.prototype.clearTransactionList = function() { - this.setTransactionList([]); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TransactionSignWeight.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 5) != null; }; diff --git a/src/protocol/core/Contract_pb.js b/src/protocol/core/Contract_pb.js index f92c970..11d6be9 100644 --- a/src/protocol/core/Contract_pb.js +++ b/src/protocol/core/Contract_pb.js @@ -26,6 +26,9 @@ goog.exportSymbol('proto.protocol.ExchangeTransactionContract', null, global); goog.exportSymbol('proto.protocol.ExchangeWithdrawContract', null, global); goog.exportSymbol('proto.protocol.FreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.ParticipateAssetIssueContract', null, global); +goog.exportSymbol('proto.protocol.PermissionAddKeyContract', null, global); +goog.exportSymbol('proto.protocol.PermissionDeleteKeyContract', null, global); +goog.exportSymbol('proto.protocol.PermissionUpdateKeyContract', null, global); goog.exportSymbol('proto.protocol.ProposalApproveContract', null, global); goog.exportSymbol('proto.protocol.ProposalCreateContract', null, global); goog.exportSymbol('proto.protocol.ProposalDeleteContract', null, global); @@ -38,7 +41,6 @@ goog.exportSymbol('proto.protocol.TriggerSmartContract', null, global); goog.exportSymbol('proto.protocol.UnfreezeAssetContract', null, global); goog.exportSymbol('proto.protocol.UnfreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.UpdateAssetContract', null, global); -goog.exportSymbol('proto.protocol.UpdateEnergyLimitContract', null, global); goog.exportSymbol('proto.protocol.UpdateSettingContract', null, global); goog.exportSymbol('proto.protocol.VoteAssetContract', null, global); goog.exportSymbol('proto.protocol.VoteWitnessContract', null, global); @@ -2243,250 +2245,6 @@ proto.protocol.UpdateSettingContract.prototype.setConsumeUserResourcePercent = f -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UpdateEnergyLimitContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UpdateEnergyLimitContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.UpdateEnergyLimitContract.displayName = 'proto.protocol.UpdateEnergyLimitContract'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UpdateEnergyLimitContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UpdateEnergyLimitContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateEnergyLimitContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - contractAddress: msg.getContractAddress_asB64(), - originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UpdateEnergyLimitContract} - */ -proto.protocol.UpdateEnergyLimitContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UpdateEnergyLimitContract; - return proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UpdateEnergyLimitContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UpdateEnergyLimitContract} - */ -proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOriginEnergyLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UpdateEnergyLimitContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getContractAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getOriginEnergyLimit(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.UpdateEnergyLimitContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional bytes contract_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes contract_address = 2; - * This is a type-conversion wrapper around `getContractAddress()` - * @return {string} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractAddress())); -}; - - -/** - * optional bytes contract_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.UpdateEnergyLimitContract.prototype.setContractAddress = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional int64 origin_energy_limit = 3; - * @return {number} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.protocol.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit = function(value) { - jspb.Message.setField(this, 3, value); -}; - - - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2974,7 +2732,6 @@ proto.protocol.AssetIssueContract.prototype.toObject = function(opt_includeInsta */ proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 41, ""), ownerAddress: msg.getOwnerAddress_asB64(), name: msg.getName_asB64(), abbr: msg.getAbbr_asB64(), @@ -2982,7 +2739,6 @@ proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) { frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), proto.protocol.AssetIssueContract.FrozenSupply.toObject, includeInstance), trxNum: jspb.Message.getFieldWithDefault(msg, 6, 0), - precision: jspb.Message.getFieldWithDefault(msg, 7, 0), num: jspb.Message.getFieldWithDefault(msg, 8, 0), startTime: jspb.Message.getFieldWithDefault(msg, 9, 0), endTime: jspb.Message.getFieldWithDefault(msg, 10, 0), @@ -3030,10 +2786,6 @@ proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, re } var field = reader.getFieldNumber(); switch (field) { - case 41: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOwnerAddress(value); @@ -3059,10 +2811,6 @@ proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, re var value = /** @type {number} */ (reader.readInt32()); msg.setTrxNum(value); break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPrecision(value); - break; case 8: var value = /** @type {number} */ (reader.readInt32()); msg.setNum(value); @@ -3136,13 +2884,6 @@ proto.protocol.AssetIssueContract.prototype.serializeBinary = function() { */ proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 41, - f - ); - } f = message.getOwnerAddress_asU8(); if (f.length > 0) { writer.writeBytes( @@ -3186,13 +2927,6 @@ proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, wr f ); } - f = message.getPrecision(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } f = message.getNum(); if (f !== 0) { writer.writeInt32( @@ -3442,21 +3176,6 @@ proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenDays = functio }; -/** - * optional string id = 41; - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, "")); -}; - - -/** @param {string} value */ -proto.protocol.AssetIssueContract.prototype.setId = function(value) { - jspb.Message.setField(this, 41, value); -}; - - /** * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} @@ -3635,21 +3354,6 @@ proto.protocol.AssetIssueContract.prototype.setTrxNum = function(value) { }; -/** - * optional int32 precision = 7; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getPrecision = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AssetIssueContract.prototype.setPrecision = function(value) { - jspb.Message.setField(this, 7, value); -}; - - /** * optional int32 num = 8; * @return {number} @@ -4208,8 +3912,7 @@ proto.protocol.FreezeBalanceContract.toObject = function(includeInstance, msg) { ownerAddress: msg.getOwnerAddress_asB64(), frozenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), frozenDuration: jspb.Message.getFieldWithDefault(msg, 3, 0), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0), - receiverAddress: msg.getReceiverAddress_asB64() + resource: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -4262,14 +3965,6 @@ proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader = function(msg, var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); msg.setResource(value); break; - case 15: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReceiverAddress(value); - break; - case 10: - var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); - msg.setResource(value); - break; default: reader.skipField(); break; @@ -4327,13 +4022,6 @@ proto.protocol.FreezeBalanceContract.serializeBinaryToWriter = function(message, f ); } - f = message.getReceiverAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } }; @@ -4421,45 +4109,6 @@ proto.protocol.FreezeBalanceContract.prototype.setResource = function(value) { }; -/** - * optional bytes receiver_address = 15; - * @return {!(string|Uint8Array)} - */ -proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * optional bytes receiver_address = 15; - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {string} - */ -proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReceiverAddress())); -}; - - -/** - * optional bytes receiver_address = 15; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {!Uint8Array} - */ -proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReceiverAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.FreezeBalanceContract.prototype.setReceiverAddress = function(value) { - jspb.Message.setField(this, 15, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -4508,8 +4157,7 @@ proto.protocol.UnfreezeBalanceContract.prototype.toObject = function(opt_include proto.protocol.UnfreezeBalanceContract.toObject = function(includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0), - receiverAddress: msg.getReceiverAddress_asB64() + resource: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -4554,10 +4202,6 @@ proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader = function(ms var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); msg.setResource(value); break; - case 15: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReceiverAddress(value); - break; default: reader.skipField(); break; @@ -4601,13 +4245,6 @@ proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter = function(messag f ); } - f = message.getReceiverAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } }; @@ -4665,45 +4302,6 @@ proto.protocol.UnfreezeBalanceContract.prototype.setResource = function(value) { }; -/** - * optional bytes receiver_address = 15; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * optional bytes receiver_address = 15; - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {string} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReceiverAddress())); -}; - - -/** - * optional bytes receiver_address = 15; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReceiverAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.UnfreezeBalanceContract.prototype.setReceiverAddress = function(value) { - jspb.Message.setField(this, 15, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -6016,9 +5614,7 @@ proto.protocol.CreateSmartContract.prototype.toObject = function(opt_includeInst proto.protocol.CreateSmartContract.toObject = function(includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), - newContract: (f = msg.getNewContract()) && core_Tron_pb.SmartContract.toObject(includeInstance, f), - callTokenValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - tokenId: jspb.Message.getFieldWithDefault(msg, 4, 0) + newContract: (f = msg.getNewContract()) && core_Tron_pb.SmartContract.toObject(includeInstance, f) }; if (includeInstance) { @@ -6064,14 +5660,6 @@ proto.protocol.CreateSmartContract.deserializeBinaryFromReader = function(msg, r reader.readMessage(value,core_Tron_pb.SmartContract.deserializeBinaryFromReader); msg.setNewContract(value); break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCallTokenValue(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTokenId(value); - break; default: reader.skipField(); break; @@ -6116,20 +5704,6 @@ proto.protocol.CreateSmartContract.serializeBinaryToWriter = function(message, w core_Tron_pb.SmartContract.serializeBinaryToWriter ); } - f = message.getCallTokenValue(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTokenId(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } }; @@ -6202,37 +5776,6 @@ proto.protocol.CreateSmartContract.prototype.hasNewContract = function() { }; -/** - * optional int64 call_token_value = 3; - * @return {number} - */ -proto.protocol.CreateSmartContract.prototype.getCallTokenValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.protocol.CreateSmartContract.prototype.setCallTokenValue = function(value) { - jspb.Message.setField(this, 3, value); -}; - - - -/** - * optional int64 token_id = 4; - * @return {number} - */ -proto.protocol.CreateSmartContract.prototype.getTokenId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.protocol.CreateSmartContract.prototype.setTokenId = function(value) { - jspb.Message.setField(this, 4, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -6283,9 +5826,7 @@ proto.protocol.TriggerSmartContract.toObject = function(includeInstance, msg) { ownerAddress: msg.getOwnerAddress_asB64(), contractAddress: msg.getContractAddress_asB64(), callValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - data: msg.getData_asB64(), - callTokenValue: jspb.Message.getFieldWithDefault(msg, 5, 0), - tokenId: jspb.Message.getFieldWithDefault(msg, 6, 0) + data: msg.getData_asB64() }; if (includeInstance) { @@ -6338,14 +5879,6 @@ proto.protocol.TriggerSmartContract.deserializeBinaryFromReader = function(msg, var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setData(value); break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCallTokenValue(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTokenId(value); - break; default: reader.skipField(); break; @@ -6403,20 +5936,6 @@ proto.protocol.TriggerSmartContract.serializeBinaryToWriter = function(message, f ); } - f = message.getCallTokenValue(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTokenId(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } }; @@ -6552,36 +6071,6 @@ proto.protocol.TriggerSmartContract.prototype.setData = function(value) { }; -/** - * optional int64 call_token_value = 5; - * @return {number} - */ -proto.protocol.TriggerSmartContract.prototype.getCallTokenValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.protocol.TriggerSmartContract.prototype.setCallTokenValue = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional int64 token_id = 6; - * @return {number} - */ -proto.protocol.TriggerSmartContract.prototype.getTokenId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.protocol.TriggerSmartContract.prototype.setTokenId = function(value) { - jspb.Message.setField(this, 6, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -8323,6 +7812,943 @@ proto.protocol.ExchangeTransactionContract.prototype.setExpected = function(valu }; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.AccountPermissionUpdateContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AccountPermissionUpdateContract.repeatedFields_, null); +}; +goog.inherits(proto.protocol.AccountPermissionUpdateContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.AccountPermissionUpdateContract.displayName = 'proto.protocol.AccountPermissionUpdateContract'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.AccountPermissionUpdateContract.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountPermissionUpdateContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.AccountPermissionUpdateContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountPermissionUpdateContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + core_Tron_pb.Permission.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.AccountPermissionUpdateContract} + */ +proto.protocol.AccountPermissionUpdateContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.AccountPermissionUpdateContract; + return proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.AccountPermissionUpdateContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.AccountPermissionUpdateContract} + */ +proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = new core_Tron_pb.Permission; + reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); + msg.addPermissions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.AccountPermissionUpdateContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + core_Tron_pb.Permission.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.AccountPermissionUpdateContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * repeated Permission permissions = 2; + * @return {!Array.} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.getPermissionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Permission, 2)); +}; + + +/** @param {!Array.} value */ +proto.protocol.AccountPermissionUpdateContract.prototype.setPermissionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.protocol.Permission=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Permission} + */ +proto.protocol.AccountPermissionUpdateContract.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Permission, opt_index); +}; + + +proto.protocol.AccountPermissionUpdateContract.prototype.clearPermissionsList = function() { + this.setPermissionsList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.PermissionAddKeyContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.PermissionAddKeyContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.PermissionAddKeyContract.displayName = 'proto.protocol.PermissionAddKeyContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.PermissionAddKeyContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PermissionAddKeyContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.PermissionAddKeyContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionAddKeyContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + key: (f = msg.getKey()) && core_Tron_pb.Key.toObject(includeInstance, f), + permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.PermissionAddKeyContract} + */ +proto.protocol.PermissionAddKeyContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.PermissionAddKeyContract; + return proto.protocol.PermissionAddKeyContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.PermissionAddKeyContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.PermissionAddKeyContract} + */ +proto.protocol.PermissionAddKeyContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = new core_Tron_pb.Key; + reader.readMessage(value,core_Tron_pb.Key.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPermissionName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.PermissionAddKeyContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.PermissionAddKeyContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.PermissionAddKeyContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionAddKeyContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + core_Tron_pb.Key.serializeBinaryToWriter + ); + } + f = message.getPermissionName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.PermissionAddKeyContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Key key = 2; + * @return {?proto.protocol.Key} + */ +proto.protocol.PermissionAddKeyContract.prototype.getKey = function() { + return /** @type{?proto.protocol.Key} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Key, 2)); +}; + + +/** @param {?proto.protocol.Key|undefined} value */ +proto.protocol.PermissionAddKeyContract.prototype.setKey = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.PermissionAddKeyContract.prototype.clearKey = function() { + this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.PermissionAddKeyContract.prototype.hasKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string permission_name = 3; + * @return {string} + */ +proto.protocol.PermissionAddKeyContract.prototype.getPermissionName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.protocol.PermissionAddKeyContract.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.PermissionUpdateKeyContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.PermissionUpdateKeyContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.PermissionUpdateKeyContract.displayName = 'proto.protocol.PermissionUpdateKeyContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PermissionUpdateKeyContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.PermissionUpdateKeyContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionUpdateKeyContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + key: (f = msg.getKey()) && core_Tron_pb.Key.toObject(includeInstance, f), + permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.PermissionUpdateKeyContract} + */ +proto.protocol.PermissionUpdateKeyContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.PermissionUpdateKeyContract; + return proto.protocol.PermissionUpdateKeyContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.PermissionUpdateKeyContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.PermissionUpdateKeyContract} + */ +proto.protocol.PermissionUpdateKeyContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = new core_Tron_pb.Key; + reader.readMessage(value,core_Tron_pb.Key.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPermissionName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.PermissionUpdateKeyContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.PermissionUpdateKeyContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionUpdateKeyContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + core_Tron_pb.Key.serializeBinaryToWriter + ); + } + f = message.getPermissionName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.PermissionUpdateKeyContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Key key = 2; + * @return {?proto.protocol.Key} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getKey = function() { + return /** @type{?proto.protocol.Key} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Key, 2)); +}; + + +/** @param {?proto.protocol.Key|undefined} value */ +proto.protocol.PermissionUpdateKeyContract.prototype.setKey = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.protocol.PermissionUpdateKeyContract.prototype.clearKey = function() { + this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.hasKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string permission_name = 3; + * @return {string} + */ +proto.protocol.PermissionUpdateKeyContract.prototype.getPermissionName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.protocol.PermissionUpdateKeyContract.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.PermissionDeleteKeyContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.PermissionDeleteKeyContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.PermissionDeleteKeyContract.displayName = 'proto.protocol.PermissionDeleteKeyContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PermissionDeleteKeyContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.PermissionDeleteKeyContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionDeleteKeyContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + keyAddress: msg.getKeyAddress_asB64(), + permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.PermissionDeleteKeyContract} + */ +proto.protocol.PermissionDeleteKeyContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.PermissionDeleteKeyContract; + return proto.protocol.PermissionDeleteKeyContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.PermissionDeleteKeyContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.PermissionDeleteKeyContract} + */ +proto.protocol.PermissionDeleteKeyContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKeyAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPermissionName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.PermissionDeleteKeyContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.PermissionDeleteKeyContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.PermissionDeleteKeyContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKeyAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPermissionName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.PermissionDeleteKeyContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes key_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes key_address = 2; + * This is a type-conversion wrapper around `getKeyAddress()` + * @return {string} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKeyAddress())); +}; + + +/** + * optional bytes key_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeyAddress()` + * @return {!Uint8Array} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKeyAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.PermissionDeleteKeyContract.prototype.setKeyAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string permission_name = 3; + * @return {string} + */ +proto.protocol.PermissionDeleteKeyContract.prototype.getPermissionName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.protocol.PermissionDeleteKeyContract.prototype.setPermissionName = function(value) { + jspb.Message.setField(this, 3, value); +}; + + /** * @enum {number} */ diff --git a/src/protocol/core/Tron_pb.js b/src/protocol/core/Tron_pb.js index 571b3fe..6425585 100644 --- a/src/protocol/core/Tron_pb.js +++ b/src/protocol/core/Tron_pb.js @@ -28,8 +28,6 @@ goog.exportSymbol('proto.protocol.ChainInventory', null, global); goog.exportSymbol('proto.protocol.ChainInventory.BlockId', null, global); goog.exportSymbol('proto.protocol.ChainParameters', null, global); goog.exportSymbol('proto.protocol.ChainParameters.ChainParameter', null, global); -goog.exportSymbol('proto.protocol.DelegatedResource', null, global); -goog.exportSymbol('proto.protocol.DelegatedResourceAccountIndex', null, global); goog.exportSymbol('proto.protocol.DisconnectMessage', null, global); goog.exportSymbol('proto.protocol.DynamicProperties', null, global); goog.exportSymbol('proto.protocol.Exchange', null, global); @@ -41,6 +39,8 @@ goog.exportSymbol('proto.protocol.Inventory', null, global); goog.exportSymbol('proto.protocol.Inventory.InventoryType', null, global); goog.exportSymbol('proto.protocol.Items', null, global); goog.exportSymbol('proto.protocol.Items.ItemType', null, global); +goog.exportSymbol('proto.protocol.Key', null, global); +goog.exportSymbol('proto.protocol.Permission', null, global); goog.exportSymbol('proto.protocol.Proposal', null, global); goog.exportSymbol('proto.protocol.Proposal.State', null, global); goog.exportSymbol('proto.protocol.ReasonCode', null, global); @@ -71,7 +71,6 @@ goog.exportSymbol('proto.protocol.Vote', null, global); goog.exportSymbol('proto.protocol.Votes', null, global); goog.exportSymbol('proto.protocol.Witness', null, global); goog.exportSymbol('proto.protocol.authority', null, global); -goog.exportSymbol('proto.protocol.permission', null, global); /** * Generated by JsPbCodeGenerator. @@ -1641,12 +1640,9 @@ proto.protocol.Account.toObject = function(includeInstance, msg) { votesList: jspb.Message.toObjectList(msg.getVotesList(), proto.protocol.Vote.toObject, includeInstance), assetMap: (f = msg.getAssetMap()) ? f.toObject(includeInstance, undefined) : [], - assetv2Map: (f = msg.getAssetv2Map()) ? f.toObject(includeInstance, undefined) : [], frozenList: jspb.Message.toObjectList(msg.getFrozenList(), proto.protocol.Account.Frozen.toObject, includeInstance), netUsage: jspb.Message.getFieldWithDefault(msg, 8, 0), - acquiredDelegatedFrozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 41, 0), - delegatedFrozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 42, 0), createTime: jspb.Message.getFieldWithDefault(msg, 9, 0), latestOprationTime: jspb.Message.getFieldWithDefault(msg, 10, 0), allowance: jspb.Message.getFieldWithDefault(msg, 11, 0), @@ -1657,17 +1653,16 @@ proto.protocol.Account.toObject = function(includeInstance, msg) { frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), proto.protocol.Account.Frozen.toObject, includeInstance), assetIssuedName: msg.getAssetIssuedName_asB64(), - assetIssuedId: msg.getAssetIssuedId_asB64(), latestAssetOperationTimeMap: (f = msg.getLatestAssetOperationTimeMap()) ? f.toObject(includeInstance, undefined) : [], - latestAssetOperationTimev2Map: (f = msg.getLatestAssetOperationTimev2Map()) ? f.toObject(includeInstance, undefined) : [], freeNetUsage: jspb.Message.getFieldWithDefault(msg, 19, 0), freeAssetNetUsageMap: (f = msg.getFreeAssetNetUsageMap()) ? f.toObject(includeInstance, undefined) : [], - freeAssetNetUsagev2Map: (f = msg.getFreeAssetNetUsagev2Map()) ? f.toObject(includeInstance, undefined) : [], latestConsumeTime: jspb.Message.getFieldWithDefault(msg, 21, 0), latestConsumeFreeTime: jspb.Message.getFieldWithDefault(msg, 22, 0), accountId: msg.getAccountId_asB64(), accountResource: (f = msg.getAccountResource()) && proto.protocol.Account.AccountResource.toObject(includeInstance, f), - codehash: msg.getCodehash_asB64() + codehash: msg.getCodehash_asB64(), + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + proto.protocol.Permission.toObject, includeInstance) }; if (includeInstance) { @@ -1731,12 +1726,6 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; - case 56: - var value = msg.getAssetv2Map(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; case 7: var value = new proto.protocol.Account.Frozen; reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); @@ -1746,14 +1735,6 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readInt64()); msg.setNetUsage(value); break; - case 41: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAcquiredDelegatedFrozenBalanceForBandwidth(value); - break; - case 42: - var value = /** @type {number} */ (reader.readInt64()); - msg.setDelegatedFrozenBalanceForBandwidth(value); - break; case 9: var value = /** @type {number} */ (reader.readInt64()); msg.setCreateTime(value); @@ -1791,22 +1772,12 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAssetIssuedName(value); break; - case 57: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAssetIssuedId(value); - break; case 18: var value = msg.getLatestAssetOperationTimeMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; - case 58: - var value = msg.getLatestAssetOperationTimev2Map(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; case 19: var value = /** @type {number} */ (reader.readInt64()); msg.setFreeNetUsage(value); @@ -1817,12 +1788,6 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; - case 59: - var value = msg.getFreeAssetNetUsagev2Map(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; case 21: var value = /** @type {number} */ (reader.readInt64()); msg.setLatestConsumeTime(value); @@ -1844,6 +1809,11 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setCodehash(value); break; + case 31: + var value = new proto.protocol.Permission; + reader.readMessage(value,proto.protocol.Permission.deserializeBinaryFromReader); + msg.addPermissions(value); + break; default: reader.skipField(); break; @@ -1913,10 +1883,6 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { if (f && f.getLength() > 0) { f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } - f = message.getAssetv2Map(true); - if (f && f.getLength() > 0) { - f.serializeBinary(56, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } f = message.getFrozenList(); if (f.length > 0) { writer.writeRepeatedMessage( @@ -1932,20 +1898,6 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getAcquiredDelegatedFrozenBalanceForBandwidth(); - if (f !== 0) { - writer.writeInt64( - 41, - f - ); - } - f = message.getDelegatedFrozenBalanceForBandwidth(); - if (f !== 0) { - writer.writeInt64( - 42, - f - ); - } f = message.getCreateTime(); if (f !== 0) { writer.writeInt64( @@ -2010,21 +1962,10 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getAssetIssuedId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 57, - f - ); - } f = message.getLatestAssetOperationTimeMap(true); if (f && f.getLength() > 0) { f.serializeBinary(18, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } - f = message.getLatestAssetOperationTimev2Map(true); - if (f && f.getLength() > 0) { - f.serializeBinary(58, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } f = message.getFreeNetUsage(); if (f !== 0) { writer.writeInt64( @@ -2036,10 +1977,6 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { if (f && f.getLength() > 0) { f.serializeBinary(20, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } - f = message.getFreeAssetNetUsagev2Map(true); - if (f && f.getLength() > 0) { - f.serializeBinary(59, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } f = message.getLatestConsumeTime(); if (f !== 0) { writer.writeInt64( @@ -2076,6 +2013,14 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 31, + f, + proto.protocol.Permission.serializeBinaryToWriter + ); + } }; @@ -2298,8 +2243,6 @@ proto.protocol.Account.AccountResource.toObject = function(includeInstance, msg) energyUsage: jspb.Message.getFieldWithDefault(msg, 1, 0), frozenBalanceForEnergy: (f = msg.getFrozenBalanceForEnergy()) && proto.protocol.Account.Frozen.toObject(includeInstance, f), latestConsumeTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 3, 0), - acquiredDelegatedFrozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 4, 0), - delegatedFrozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 5, 0), storageLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), storageUsage: jspb.Message.getFieldWithDefault(msg, 7, 0), latestExchangeStorageTime: jspb.Message.getFieldWithDefault(msg, 8, 0) @@ -2352,14 +2295,6 @@ proto.protocol.Account.AccountResource.deserializeBinaryFromReader = function(ms var value = /** @type {number} */ (reader.readInt64()); msg.setLatestConsumeTimeForEnergy(value); break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAcquiredDelegatedFrozenBalanceForEnergy(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setDelegatedFrozenBalanceForEnergy(value); - break; case 6: var value = /** @type {number} */ (reader.readInt64()); msg.setStorageLimit(value); @@ -2423,20 +2358,6 @@ proto.protocol.Account.AccountResource.serializeBinaryToWriter = function(messag f ); } - f = message.getAcquiredDelegatedFrozenBalanceForEnergy(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getDelegatedFrozenBalanceForEnergy(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } f = message.getStorageLimit(); if (f !== 0) { writer.writeInt64( @@ -2521,36 +2442,6 @@ proto.protocol.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy = }; -/** - * optional int64 acquired_delegated_frozen_balance_for_energy = 4; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional int64 delegated_frozen_balance_for_energy = 5; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy = function(value) { - jspb.Message.setField(this, 5, value); -}; - - /** * optional int64 storage_limit = 6; * @return {number} @@ -2753,24 +2644,6 @@ proto.protocol.Account.prototype.clearAssetMap = function() { }; -/** - * map assetV2 = 56; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getAssetv2Map = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 56, opt_noLazyCreate, - null)); -}; - - -proto.protocol.Account.prototype.clearAssetv2Map = function() { - this.getAssetv2Map().clear(); -}; - - /** * repeated Frozen frozen = 7; * @return {!Array.} @@ -2817,36 +2690,6 @@ proto.protocol.Account.prototype.setNetUsage = function(value) { }; -/** - * optional int64 acquired_delegated_frozen_balance_for_bandwidth = 41; - * @return {number} - */ -proto.protocol.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 41, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth = function(value) { - jspb.Message.setField(this, 41, value); -}; - - -/** - * optional int64 delegated_frozen_balance_for_bandwidth = 42; - * @return {number} - */ -proto.protocol.Account.prototype.getDelegatedFrozenBalanceForBandwidth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 42, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Account.prototype.setDelegatedFrozenBalanceForBandwidth = function(value) { - jspb.Message.setField(this, 42, value); -}; - - /** * optional int64 create_time = 9; * @return {number} @@ -3050,45 +2893,6 @@ proto.protocol.Account.prototype.setAssetIssuedName = function(value) { }; -/** - * optional bytes asset_issued_ID = 57; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Account.prototype.getAssetIssuedId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 57, "")); -}; - - -/** - * optional bytes asset_issued_ID = 57; - * This is a type-conversion wrapper around `getAssetIssuedId()` - * @return {string} - */ -proto.protocol.Account.prototype.getAssetIssuedId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAssetIssuedId())); -}; - - -/** - * optional bytes asset_issued_ID = 57; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAssetIssuedId()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getAssetIssuedId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAssetIssuedId())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.Account.prototype.setAssetIssuedId = function(value) { - jspb.Message.setField(this, 57, value); -}; - - /** * map latest_asset_operation_time = 18; * @param {boolean=} opt_noLazyCreate Do not create the map if @@ -3107,24 +2911,6 @@ proto.protocol.Account.prototype.clearLatestAssetOperationTimeMap = function() { }; -/** - * map latest_asset_operation_timeV2 = 58; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getLatestAssetOperationTimev2Map = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 58, opt_noLazyCreate, - null)); -}; - - -proto.protocol.Account.prototype.clearLatestAssetOperationTimev2Map = function() { - this.getLatestAssetOperationTimev2Map().clear(); -}; - - /** * optional int64 free_net_usage = 19; * @return {number} @@ -3158,24 +2944,6 @@ proto.protocol.Account.prototype.clearFreeAssetNetUsageMap = function() { }; -/** - * map free_asset_net_usageV2 = 59; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getFreeAssetNetUsagev2Map = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 59, opt_noLazyCreate, - null)); -}; - - -proto.protocol.Account.prototype.clearFreeAssetNetUsagev2Map = function() { - this.getFreeAssetNetUsagev2Map().clear(); -}; - - /** * optional int64 latest_consume_time = 21; * @return {number} @@ -3314,6 +3082,37 @@ proto.protocol.Account.prototype.setCodehash = function(value) { }; +/** + * repeated Permission permissions = 31; + * @return {!Array.} + */ +proto.protocol.Account.prototype.getPermissionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Permission, 31)); +}; + + +/** @param {!Array.} value */ +proto.protocol.Account.prototype.setPermissionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 31, value); +}; + + +/** + * @param {!proto.protocol.Permission=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Permission} + */ +proto.protocol.Account.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 31, opt_value, proto.protocol.Permission, opt_index); +}; + + +proto.protocol.Account.prototype.clearPermissionsList = function() { + this.setPermissionsList([]); +}; + + /** * Generated by JsPbCodeGenerator. @@ -3325,12 +3124,12 @@ proto.protocol.Account.prototype.setCodehash = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.DelegatedResource = function(opt_data) { +proto.protocol.Key = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.DelegatedResource, jspb.Message); +goog.inherits(proto.protocol.Key, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.DelegatedResource.displayName = 'proto.protocol.DelegatedResource'; + proto.protocol.Key.displayName = 'proto.protocol.Key'; } @@ -3345,8 +3144,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.DelegatedResource.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DelegatedResource.toObject(opt_includeInstance, this); +proto.protocol.Key.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Key.toObject(opt_includeInstance, this); }; @@ -3355,18 +3154,14 @@ proto.protocol.DelegatedResource.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.DelegatedResource} msg The msg instance to transform. + * @param {!proto.protocol.Key} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DelegatedResource.toObject = function(includeInstance, msg) { +proto.protocol.Key.toObject = function(includeInstance, msg) { var f, obj = { - from: msg.getFrom_asB64(), - to: msg.getTo_asB64(), - frozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 3, 0), - frozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 4, 0), - expireTimeForBandwidth: jspb.Message.getFieldWithDefault(msg, 5, 0), - expireTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 6, 0) + address: msg.getAddress_asB64(), + weight: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -3380,23 +3175,23 @@ proto.protocol.DelegatedResource.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DelegatedResource} + * @return {!proto.protocol.Key} */ -proto.protocol.DelegatedResource.deserializeBinary = function(bytes) { +proto.protocol.Key.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DelegatedResource; - return proto.protocol.DelegatedResource.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Key; + return proto.protocol.Key.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.DelegatedResource} msg The message object to deserialize into. + * @param {!proto.protocol.Key} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DelegatedResource} + * @return {!proto.protocol.Key} */ -proto.protocol.DelegatedResource.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3405,27 +3200,11 @@ proto.protocol.DelegatedResource.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFrom(value); + msg.setAddress(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTo(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalanceForBandwidth(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalanceForEnergy(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpireTimeForBandwidth(value); - break; - case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setExpireTimeForEnergy(value); + msg.setWeight(value); break; default: reader.skipField(); @@ -3440,9 +3219,9 @@ proto.protocol.DelegatedResource.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.DelegatedResource.prototype.serializeBinary = function() { +proto.protocol.Key.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.DelegatedResource.serializeBinaryToWriter(this, writer); + proto.protocol.Key.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3450,51 +3229,23 @@ proto.protocol.DelegatedResource.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DelegatedResource} message + * @param {!proto.protocol.Key} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.DelegatedResource.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Key.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFrom_asU8(); + f = message.getAddress_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getTo_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getFrozenBalanceForBandwidth(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFrozenBalanceForEnergy(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getExpireTimeForBandwidth(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getExpireTimeForEnergy(); + f = message.getWeight(); if (f !== 0) { writer.writeInt64( - 6, + 2, f ); } @@ -3502,315 +3253,50 @@ proto.protocol.DelegatedResource.serializeBinaryToWriter = function(message, wri /** - * optional bytes from = 1; + * optional bytes address = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.DelegatedResource.prototype.getFrom = function() { +proto.protocol.Key.prototype.getAddress = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes from = 1; - * This is a type-conversion wrapper around `getFrom()` + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` * @return {string} */ -proto.protocol.DelegatedResource.prototype.getFrom_asB64 = function() { +proto.protocol.Key.prototype.getAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFrom())); + this.getAddress())); }; /** - * optional bytes from = 1; + * optional bytes address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFrom()` + * This is a type-conversion wrapper around `getAddress()` * @return {!Uint8Array} */ -proto.protocol.DelegatedResource.prototype.getFrom_asU8 = function() { +proto.protocol.Key.prototype.getAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFrom())); + this.getAddress())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.DelegatedResource.prototype.setFrom = function(value) { +proto.protocol.Key.prototype.setAddress = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional bytes to = 2; - * @return {!(string|Uint8Array)} + * optional int64 weight = 2; + * @return {number} */ -proto.protocol.DelegatedResource.prototype.getTo = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes to = 2; - * This is a type-conversion wrapper around `getTo()` - * @return {string} - */ -proto.protocol.DelegatedResource.prototype.getTo_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTo())); -}; - - -/** - * optional bytes to = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTo()` - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResource.prototype.getTo_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTo())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.DelegatedResource.prototype.setTo = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional int64 frozen_balance_for_bandwidth = 3; - * @return {number} - */ -proto.protocol.DelegatedResource.prototype.getFrozenBalanceForBandwidth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.protocol.DelegatedResource.prototype.setFrozenBalanceForBandwidth = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional int64 frozen_balance_for_energy = 4; - * @return {number} - */ -proto.protocol.DelegatedResource.prototype.getFrozenBalanceForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.protocol.DelegatedResource.prototype.setFrozenBalanceForEnergy = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional int64 expire_time_for_bandwidth = 5; - * @return {number} - */ -proto.protocol.DelegatedResource.prototype.getExpireTimeForBandwidth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.protocol.DelegatedResource.prototype.setExpireTimeForBandwidth = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional int64 expire_time_for_energy = 6; - * @return {number} - */ -proto.protocol.DelegatedResource.prototype.getExpireTimeForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.protocol.DelegatedResource.prototype.setExpireTimeForEnergy = function(value) { - jspb.Message.setField(this, 6, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.authority = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.authority, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.authority.displayName = 'proto.protocol.authority'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.authority.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.authority} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.authority.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), - permissionName: msg.getPermissionName_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.authority} - */ -proto.protocol.authority.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.authority; - return proto.protocol.authority.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.authority} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.authority} - */ -proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setWeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.authority.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.authority.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.authority} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getWeight(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.authority.prototype.getAccount = function() { - return /** @type{?proto.protocol.AccountId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); -}; - - -/** @param {?proto.protocol.AccountId|undefined} value */ -proto.protocol.authority.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.authority.prototype.clearAccount = function() { - this.setAccount(undefined); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.Key.prototype.setAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional int64 weight = 2; - * @return {number} - */ -proto.protocol.authority.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.Key.prototype.getWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; @@ -3831,8 +3317,8 @@ proto.protocol.Key.prototype.setWeight = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.authority.prototype.getPermissionName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.Permission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Permission.repeatedFields_, null); }; goog.inherits(proto.protocol.Permission, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -3858,9 +3344,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.authority.prototype.getPermissionName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPermissionName())); +proto.protocol.Permission.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Permission.toObject(opt_includeInstance, this); }; @@ -3946,15 +3431,51 @@ proto.protocol.Permission.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.authority.prototype.getPermissionName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPermissionName())); +proto.protocol.Permission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Permission.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.authority.prototype.setPermissionName = function(value) { - jspb.Message.setField(this, 2, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Permission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Permission.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getThreshold(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getParent(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getKeysList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.protocol.Key.serializeBinaryToWriter + ); + } }; @@ -4045,12 +3566,12 @@ proto.protocol.Permission.prototype.clearKeysList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.permission = function(opt_data) { +proto.protocol.authority = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.permission, jspb.Message); +goog.inherits(proto.protocol.authority, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.permission.displayName = 'proto.protocol.permission'; + proto.protocol.authority.displayName = 'proto.protocol.authority'; } @@ -4065,8 +3586,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.permission.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.permission.toObject(opt_includeInstance, this); +proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.authority.toObject(opt_includeInstance, this); }; @@ -4075,11 +3596,11 @@ proto.protocol.permission.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.permission} msg The msg instance to transform. + * @param {!proto.protocol.authority} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.permission.toObject = function(includeInstance, msg) { +proto.protocol.authority.toObject = function(includeInstance, msg) { var f, obj = { account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), permissionName: msg.getPermissionName_asB64() @@ -4096,23 +3617,23 @@ proto.protocol.permission.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.permission} + * @return {!proto.protocol.authority} */ -proto.protocol.permission.deserializeBinary = function(bytes) { +proto.protocol.authority.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.permission; - return proto.protocol.permission.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.authority; + return proto.protocol.authority.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.permission} msg The message object to deserialize into. + * @param {!proto.protocol.authority} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.permission} + * @return {!proto.protocol.authority} */ -proto.protocol.permission.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4141,9 +3662,9 @@ proto.protocol.permission.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.permission.prototype.serializeBinary = function() { +proto.protocol.authority.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.permission.serializeBinaryToWriter(this, writer); + proto.protocol.authority.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4151,11 +3672,11 @@ proto.protocol.permission.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.permission} message + * @param {!proto.protocol.authority} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.permission.serializeBinaryToWriter = function(message, writer) { +proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAccount(); if (f != null) { @@ -4179,19 +3700,19 @@ proto.protocol.permission.serializeBinaryToWriter = function(message, writer) { * optional AccountId account = 1; * @return {?proto.protocol.AccountId} */ -proto.protocol.permission.prototype.getAccount = function() { +proto.protocol.authority.prototype.getAccount = function() { return /** @type{?proto.protocol.AccountId} */ ( jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); }; /** @param {?proto.protocol.AccountId|undefined} value */ -proto.protocol.permission.prototype.setAccount = function(value) { +proto.protocol.authority.prototype.setAccount = function(value) { jspb.Message.setWrapperField(this, 1, value); }; -proto.protocol.permission.prototype.clearAccount = function() { +proto.protocol.authority.prototype.clearAccount = function() { this.setAccount(undefined); }; @@ -4200,7 +3721,7 @@ proto.protocol.permission.prototype.clearAccount = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.protocol.permission.prototype.hasAccount = function() { +proto.protocol.authority.prototype.hasAccount = function() { return jspb.Message.getField(this, 1) != null; }; @@ -6396,7 +5917,10 @@ proto.protocol.Transaction.Contract.ContractType = { EXCHANGEINJECTCONTRACT: 42, EXCHANGEWITHDRAWCONTRACT: 43, EXCHANGETRANSACTIONCONTRACT: 44, - UPDATEENERGYLIMITCONTRACT: 45 + ACCOUNTPERMISSIONUPDATECONTRACT: 45, + PERMISSIONADDKEYCONTRACT: 46, + PERMISSIONUPDATEKEYCONTRACT: 47, + PERMISSIONDELETEKEYCONTRACT: 48 }; /** @@ -6572,13 +6096,8 @@ proto.protocol.Transaction.Result.toObject = function(includeInstance, msg) { fee: jspb.Message.getFieldWithDefault(msg, 1, 0), ret: jspb.Message.getFieldWithDefault(msg, 2, 0), contractret: jspb.Message.getFieldWithDefault(msg, 3, 0), - assetissueid: jspb.Message.getFieldWithDefault(msg, 14, ""), withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), - unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0), - exchangeReceivedAmount: jspb.Message.getFieldWithDefault(msg, 18, 0), - exchangeInjectAnotherAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), - exchangeWithdrawAnotherAmount: jspb.Message.getFieldWithDefault(msg, 20, 0), - exchangeId: jspb.Message.getFieldWithDefault(msg, 21, 0) + unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0) }; if (includeInstance) { @@ -6627,10 +6146,6 @@ proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, re var value = /** @type {!proto.protocol.Transaction.Result.contractResult} */ (reader.readEnum()); msg.setContractret(value); break; - case 14: - var value = /** @type {string} */ (reader.readString()); - msg.setAssetissueid(value); - break; case 15: var value = /** @type {number} */ (reader.readInt64()); msg.setWithdrawAmount(value); @@ -6639,22 +6154,6 @@ proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, re var value = /** @type {number} */ (reader.readInt64()); msg.setUnfreezeAmount(value); break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeReceivedAmount(value); - break; - case 19: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeInjectAnotherAmount(value); - break; - case 20: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeWithdrawAnotherAmount(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeId(value); - break; default: reader.skipField(); break; @@ -6705,13 +6204,6 @@ proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, wr f ); } - f = message.getAssetissueid(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } f = message.getWithdrawAmount(); if (f !== 0) { writer.writeInt64( @@ -6726,34 +6218,6 @@ proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, wr f ); } - f = message.getExchangeReceivedAmount(); - if (f !== 0) { - writer.writeInt64( - 18, - f - ); - } - f = message.getExchangeInjectAnotherAmount(); - if (f !== 0) { - writer.writeInt64( - 19, - f - ); - } - f = message.getExchangeWithdrawAnotherAmount(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getExchangeId(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } }; @@ -6830,21 +6294,6 @@ proto.protocol.Transaction.Result.prototype.setContractret = function(value) { }; -/** - * optional string assetIssueID = 14; - * @return {string} - */ -proto.protocol.Transaction.Result.prototype.getAssetissueid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** @param {string} value */ -proto.protocol.Transaction.Result.prototype.setAssetissueid = function(value) { - jspb.Message.setField(this, 14, value); -}; - - /** * optional int64 withdraw_amount = 15; * @return {number} @@ -6875,66 +6324,6 @@ proto.protocol.Transaction.Result.prototype.setUnfreezeAmount = function(value) }; -/** - * optional int64 exchange_received_amount = 18; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getExchangeReceivedAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Transaction.Result.prototype.setExchangeReceivedAmount = function(value) { - jspb.Message.setField(this, 18, value); -}; - - -/** - * optional int64 exchange_inject_another_amount = 19; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getExchangeInjectAnotherAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Transaction.Result.prototype.setExchangeInjectAnotherAmount = function(value) { - jspb.Message.setField(this, 19, value); -}; - - -/** - * optional int64 exchange_withdraw_another_amount = 20; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount = function(value) { - jspb.Message.setField(this, 20, value); -}; - - -/** - * optional int64 exchange_id = 21; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** @param {number} value */ -proto.protocol.Transaction.Result.prototype.setExchangeId = function(value) { - jspb.Message.setField(this, 21, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -7640,15 +7029,10 @@ proto.protocol.TransactionInfo.toObject = function(includeInstance, msg) { proto.protocol.TransactionInfo.Log.toObject, includeInstance), result: jspb.Message.getFieldWithDefault(msg, 9, 0), resmessage: msg.getResmessage_asB64(), - assetissueid: jspb.Message.getFieldWithDefault(msg, 14, ""), withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0), internalTransactionsList: jspb.Message.toObjectList(msg.getInternalTransactionsList(), - proto.protocol.InternalTransaction.toObject, includeInstance), - exchangeReceivedAmount: jspb.Message.getFieldWithDefault(msg, 18, 0), - exchangeInjectAnotherAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), - exchangeWithdrawAnotherAmount: jspb.Message.getFieldWithDefault(msg, 20, 0), - exchangeId: jspb.Message.getFieldWithDefault(msg, 21, 0) + proto.protocol.InternalTransaction.toObject, includeInstance) }; if (includeInstance) { @@ -7727,10 +7111,6 @@ proto.protocol.TransactionInfo.deserializeBinaryFromReader = function(msg, reade var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setResmessage(value); break; - case 14: - var value = /** @type {string} */ (reader.readString()); - msg.setAssetissueid(value); - break; case 15: var value = /** @type {number} */ (reader.readInt64()); msg.setWithdrawAmount(value); @@ -7744,22 +7124,6 @@ proto.protocol.TransactionInfo.deserializeBinaryFromReader = function(msg, reade reader.readMessage(value,proto.protocol.InternalTransaction.deserializeBinaryFromReader); msg.addInternalTransactions(value); break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeReceivedAmount(value); - break; - case 19: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeInjectAnotherAmount(value); - break; - case 20: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeWithdrawAnotherAmount(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeId(value); - break; default: reader.skipField(); break; @@ -7861,13 +7225,6 @@ proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, write f ); } - f = message.getAssetissueid(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } f = message.getWithdrawAmount(); if (f !== 0) { writer.writeInt64( @@ -7890,34 +7247,6 @@ proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, write proto.protocol.InternalTransaction.serializeBinaryToWriter ); } - f = message.getExchangeReceivedAmount(); - if (f !== 0) { - writer.writeInt64( - 18, - f - ); - } - f = message.getExchangeInjectAnotherAmount(); - if (f !== 0) { - writer.writeInt64( - 19, - f - ); - } - f = message.getExchangeWithdrawAnotherAmount(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getExchangeId(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } }; @@ -8509,21 +7838,6 @@ proto.protocol.TransactionInfo.prototype.setResmessage = function(value) { }; -/** - * optional string assetIssueID = 14; - * @return {string} - */ -proto.protocol.TransactionInfo.prototype.getAssetissueid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** @param {string} value */ -proto.protocol.TransactionInfo.prototype.setAssetissueid = function(value) { - jspb.Message.setField(this, 14, value); -}; - - /** * optional int64 withdraw_amount = 15; * @return {number} @@ -8585,66 +7899,6 @@ proto.protocol.TransactionInfo.prototype.clearInternalTransactionsList = functio }; -/** - * optional int64 exchange_received_amount = 18; - * @return {number} - */ -proto.protocol.TransactionInfo.prototype.getExchangeReceivedAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** @param {number} value */ -proto.protocol.TransactionInfo.prototype.setExchangeReceivedAmount = function(value) { - jspb.Message.setField(this, 18, value); -}; - - -/** - * optional int64 exchange_inject_another_amount = 19; - * @return {number} - */ -proto.protocol.TransactionInfo.prototype.getExchangeInjectAnotherAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** @param {number} value */ -proto.protocol.TransactionInfo.prototype.setExchangeInjectAnotherAmount = function(value) { - jspb.Message.setField(this, 19, value); -}; - - -/** - * optional int64 exchange_withdraw_another_amount = 20; - * @return {number} - */ -proto.protocol.TransactionInfo.prototype.getExchangeWithdrawAnotherAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** @param {number} value */ -proto.protocol.TransactionInfo.prototype.setExchangeWithdrawAnotherAmount = function(value) { - jspb.Message.setField(this, 20, value); -}; - - -/** - * optional int64 exchange_id = 21; - * @return {number} - */ -proto.protocol.TransactionInfo.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** @param {number} value */ -proto.protocol.TransactionInfo.prototype.setExchangeId = function(value) { - jspb.Message.setField(this, 21, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -12000,8 +11254,7 @@ proto.protocol.SmartContract.toObject = function(includeInstance, msg) { bytecode: msg.getBytecode_asB64(), callValue: jspb.Message.getFieldWithDefault(msg, 5, 0), consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 6, 0), - name: jspb.Message.getFieldWithDefault(msg, 7, ""), - originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 8, 0) + name: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -12067,10 +11320,6 @@ proto.protocol.SmartContract.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOriginEnergyLimit(value); - break; default: reader.skipField(); break; @@ -12150,13 +11399,6 @@ proto.protocol.SmartContract.serializeBinaryToWriter = function(message, writer) f ); } - f = message.getOriginEnergyLimit(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } }; @@ -13122,21 +12364,6 @@ proto.protocol.SmartContract.prototype.setName = function(value) { }; -/** - * optional int64 origin_energy_limit = 8; - * @return {number} - */ -proto.protocol.SmartContract.prototype.getOriginEnergyLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** @param {number} value */ -proto.protocol.SmartContract.prototype.setOriginEnergyLimit = function(value) { - jspb.Message.setField(this, 8, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -13382,7 +12609,7 @@ proto.protocol.InternalTransaction.CallValueInfo.prototype.toObject = function(o proto.protocol.InternalTransaction.CallValueInfo.toObject = function(includeInstance, msg) { var f, obj = { callvalue: jspb.Message.getFieldWithDefault(msg, 1, 0), - tokenid: jspb.Message.getFieldWithDefault(msg, 2, "") + tokenname: msg.getTokenname_asB64() }; if (includeInstance) { @@ -13424,8 +12651,8 @@ proto.protocol.InternalTransaction.CallValueInfo.deserializeBinaryFromReader = f msg.setCallvalue(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setTokenid(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenname(value); break; default: reader.skipField(); @@ -13463,9 +12690,9 @@ proto.protocol.InternalTransaction.CallValueInfo.serializeBinaryToWriter = funct f ); } - f = message.getTokenid(); + f = message.getTokenname_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 2, f ); @@ -13489,16 +12716,40 @@ proto.protocol.InternalTransaction.CallValueInfo.prototype.setCallvalue = functi /** - * optional string tokenId = 2; + * optional bytes tokenName = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes tokenName = 2; + * This is a type-conversion wrapper around `getTokenname()` * @return {string} */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenname())); }; -/** @param {string} value */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.setTokenid = function(value) { +/** + * optional bytes tokenName = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenname()` + * @return {!Uint8Array} + */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenname())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.setTokenname = function(value) { jspb.Message.setField(this, 2, value); }; @@ -13707,309 +12958,6 @@ proto.protocol.InternalTransaction.prototype.setRejected = function(value) { }; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.DelegatedResourceAccountIndex = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.DelegatedResourceAccountIndex.repeatedFields_, null); -}; -goog.inherits(proto.protocol.DelegatedResourceAccountIndex, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.DelegatedResourceAccountIndex.displayName = 'proto.protocol.DelegatedResourceAccountIndex'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.DelegatedResourceAccountIndex.repeatedFields_ = [2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DelegatedResourceAccountIndex.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.DelegatedResourceAccountIndex} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DelegatedResourceAccountIndex.toObject = function(includeInstance, msg) { - var f, obj = { - account: msg.getAccount_asB64(), - fromaccountsList: msg.getFromaccountsList_asB64(), - toaccountsList: msg.getToaccountsList_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DelegatedResourceAccountIndex} - */ -proto.protocol.DelegatedResourceAccountIndex.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DelegatedResourceAccountIndex; - return proto.protocol.DelegatedResourceAccountIndex.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.DelegatedResourceAccountIndex} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DelegatedResourceAccountIndex} - */ -proto.protocol.DelegatedResourceAccountIndex.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccount(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addFromaccounts(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addToaccounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.DelegatedResourceAccountIndex.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DelegatedResourceAccountIndex} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DelegatedResourceAccountIndex.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFromaccountsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getToaccountsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes account = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes account = 1; - * This is a type-conversion wrapper around `getAccount()` - * @return {string} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccount())); -}; - - -/** - * optional bytes account = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccount()` - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccount())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.DelegatedResourceAccountIndex.prototype.setAccount = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * repeated bytes fromAccounts = 2; - * @return {!(Array|Array)} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes fromAccounts = 2; - * This is a type-conversion wrapper around `getFromaccountsList()` - * @return {!Array.} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList_asB64 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( - this.getFromaccountsList())); -}; - - -/** - * repeated bytes fromAccounts = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFromaccountsList()` - * @return {!Array.} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList_asU8 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( - this.getFromaccountsList())); -}; - - -/** @param {!(Array|Array)} value */ -proto.protocol.DelegatedResourceAccountIndex.prototype.setFromaccountsList = function(value) { - jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.addFromaccounts = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -proto.protocol.DelegatedResourceAccountIndex.prototype.clearFromaccountsList = function() { - this.setFromaccountsList([]); -}; - - -/** - * repeated bytes toAccounts = 3; - * @return {!(Array|Array)} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * repeated bytes toAccounts = 3; - * This is a type-conversion wrapper around `getToaccountsList()` - * @return {!Array.} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList_asB64 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( - this.getToaccountsList())); -}; - - -/** - * repeated bytes toAccounts = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToaccountsList()` - * @return {!Array.} - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList_asU8 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( - this.getToaccountsList())); -}; - - -/** @param {!(Array|Array)} value */ -proto.protocol.DelegatedResourceAccountIndex.prototype.setToaccountsList = function(value) { - jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.addToaccounts = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -proto.protocol.DelegatedResourceAccountIndex.prototype.clearToaccountsList = function() { - this.setToaccountsList([]); -}; - - /** * @enum {number} */ From 9012536dc7d53db072a257a973a606ff131d687d Mon Sep 17 00:00:00 2001 From: Fernando Sobreira Date: Mon, 11 Mar 2019 15:36:18 -0300 Subject: [PATCH 13/15] Protocol Update / Delegated Resource --- protobuf/api/api.proto | 157 +- protobuf/core/Contract.proto | 44 +- protobuf/core/Tron.proto | 71 +- src/protocol/api/api_pb.js | 4199 +++++++++++++++--------------- src/protocol/core/Contract_pb.js | 1464 ++++------- src/protocol/core/Tron_pb.js | 1706 ++++++++---- src/utils/transactionBuilder.js | 8 +- src/utils/tronWeb.js | 6 + 8 files changed, 3980 insertions(+), 3675 deletions(-) diff --git a/protobuf/api/api.proto b/protobuf/api/api.proto index 2373631..1beee49 100644 --- a/protobuf/api/api.proto +++ b/protobuf/api/api.proto @@ -96,6 +96,10 @@ service Wallet { rpc UpdateSetting (UpdateSettingContract) returns (TransactionExtention) { }; + //modify the energy_limit + rpc UpdateEnergyLimit (UpdateEnergyLimitContract) returns (TransactionExtention) { + }; + //Use this function instead of VoteWitnessAccount. rpc VoteWitnessAccount2 (VoteWitnessContract) returns (TransactionExtention) { }; @@ -312,6 +316,10 @@ service Wallet { } }; } + rpc GetAssetIssueListByName (BytesMessage) returns (AssetIssueList) { + } + rpc GetAssetIssueById (BytesMessage) returns (AssetIssueContract) { + } //Please use GetNowBlock2 instead of this function. rpc GetNowBlock (EmptyMessage) returns (Block) { option (google.api.http) = { @@ -406,6 +414,27 @@ service Wallet { }; }; + + rpc GetDelegatedResource (DelegatedResourceMessage) returns (DelegatedResourceList) { + option (google.api.http) = { + post: "/wallet/getdelegatedresource" + body: "*" + additional_bindings { + get: "/wallet/getdelegatedresource" + } + }; + }; + + rpc GetDelegatedResourceAccountIndex (BytesMessage) returns (DelegatedResourceAccountIndex) { + option (google.api.http) = { + post: "/wallet/getdelegatedresourceaccountindex" + body: "*" + additional_bindings { + get: "/wallet/getdelegatedresourceaccountindex" + } + }; + }; + rpc ListProposals (EmptyMessage) returns (ProposalList) { option (google.api.http) = { post: "/wallet/listproposals" @@ -415,15 +444,15 @@ service Wallet { } }; }; - rpc GetPaginatedProposalList (PaginatedMessage) returns (ProposalList) { - option (google.api.http) = { - post: "/wallet/getpaginatedproposallist" - body: "*" - additional_bindings { - get: "/wallet/getpaginatedproposallist" - } - }; - } + rpc GetPaginatedProposalList (PaginatedMessage) returns (ProposalList) { + option (google.api.http) = { + post: "/wallet/getpaginatedproposallist" + body: "*" + additional_bindings { + get: "/wallet/getpaginatedproposallist" + } + }; + } rpc GetProposalById (BytesMessage) returns (Proposal) { option (google.api.http) = { post: "/wallet/getproposalbyid" @@ -444,14 +473,14 @@ service Wallet { }; }; rpc GetPaginatedExchangeList (PaginatedMessage) returns (ExchangeList) { - option (google.api.http) = { - post: "/wallet/getpaginatedexchangelist" - body: "*" - additional_bindings { - get: "/wallet/getpaginatedexchangelist" - } - }; - } + option (google.api.http) = { + post: "/wallet/getpaginatedexchangelist" + body: "*" + additional_bindings { + get: "/wallet/getpaginatedexchangelist" + } + }; + } rpc GetExchangeById (BytesMessage) returns (Exchange) { option (google.api.http) = { post: "/wallet/getexchangebyid" @@ -576,54 +605,6 @@ service Wallet { } }; } - - rpc AccountPermissionUpdate (AccountPermissionUpdateContract) returns (TransactionExtention) { - option (google.api.http) = { - post: "/wallet/accountpermissionupdate" - body: "*" - additional_bindings { - get: "/wallet/accountpermissionupdate" - } - }; - } - - rpc PermissionAddKey (PermissionAddKeyContract) returns (TransactionExtention) { - option (google.api.http) = { - post: "/wallet/permissionaddkey" - body: "*" - additional_bindings { - get: "/wallet/permissionaddkey" - } - }; - } - - rpc PermissionUpdateKey (PermissionUpdateKeyContract) returns (TransactionExtention) { - option (google.api.http) = { - post: "/wallet/permissionupdatekey" - body: "*" - additional_bindings { - get: "/wallet/permissionupdatekey" - } - }; - } - - rpc PermissionDeleteKey (PermissionDeleteKeyContract) returns (TransactionExtention) { - option (google.api.http) = { - post: "/wallet/permissiondeletekey" - body: "*" - additional_bindings { - get: "/wallet/permissiondeletekey" - } - }; - } - - rpc AddSign (TransactionSign) returns (TransactionExtention) { - - } - - rpc GetTransactionSignWeight (Transaction) returns (TransactionSignWeight) { - - } }; @@ -705,6 +686,18 @@ service WalletSolidity { rpc GetTransactionCountByBlockNum (NumberMessage) returns (NumberMessage) { } + rpc GetDelegatedResource (DelegatedResourceMessage) returns (DelegatedResourceList) { + }; + + rpc GetDelegatedResourceAccountIndex (BytesMessage) returns (DelegatedResourceAccountIndex) { + }; + + rpc GetExchangeById (BytesMessage) returns (Exchange) { + }; + + rpc ListExchanges (EmptyMessage) returns (ExchangeList) { + }; + rpc GetTransactionById (BytesMessage) returns (Transaction) { option (google.api.http) = { post: "/walletsolidity/gettransactionbyid" @@ -829,6 +822,13 @@ message BlockList { message TransactionList { repeated Transaction transaction = 1; } +message DelegatedResourceMessage { + bytes fromAddress = 1; + bytes toAddress = 2; +} +message DelegatedResourceList { + repeated DelegatedResource delegatedResource = 1; +} // Gossip node list message NodeList { @@ -870,6 +870,8 @@ message AccountPaginated { Account account = 1; int64 offset = 2; int64 limit = 3; + int64 startTime = 4; + int64 endTime = 5; } message TimePaginatedMessage { TimeMessage timeMessage = 1; @@ -926,7 +928,7 @@ message EasyTransferByPrivateMessage { message EasyTransferResponse { Transaction transaction = 1; Return result = 2; - bytes txid = 3; //transaction id = sha256(transaction.rowdata) + bytes txid = 3; //transaction id = sha256(transaction.rowdata) } message AddressPrKeyPairMessage { @@ -936,7 +938,7 @@ message AddressPrKeyPairMessage { message TransactionExtention { Transaction transaction = 1; - bytes txid = 2; //transaction id = sha256(transaction.rowdata) + bytes txid = 2; //transaction id = sha256(transaction.rowdata) repeated bytes constant_result = 3; Return result = 4; } @@ -953,25 +955,4 @@ message BlockListExtention { message TransactionListExtention { repeated TransactionExtention transaction = 1; -} - -message TransactionSignWeight { - message Result { - enum response_code { - ENOUGH_PERMISSION = 0; - NOT_ENOUGH_PERMISSION = 1; // error in - SIGNATURE_FORMAT_ERROR = 2; - COMPUTE_ADDRESS_ERROR = 3; - PERMISSION_ERROR = 4; //The key is not in permission - OTHER_ERROR = 20; - } - response_code code = 1; - string message = 2; - } - - Permission permission = 1; - repeated bytes approved_list = 2; - int64 current_weight = 3; - Result result = 4; - TransactionExtention transaction = 5; } \ No newline at end of file diff --git a/protobuf/core/Contract.proto b/protobuf/core/Contract.proto index 6704bbf..f368e0e 100644 --- a/protobuf/core/Contract.proto +++ b/protobuf/core/Contract.proto @@ -48,7 +48,7 @@ message TransferContract { } message TransferAssetContract { - bytes asset_name = 1; + bytes asset_name = 1; // this field is token name before the proposal ALLOW_SAME_TOKEN_NAME is active, otherwise it is token id and token is should be in string format. bytes owner_address = 2; bytes to_address = 3; int64 amount = 4; @@ -78,6 +78,12 @@ message UpdateSettingContract { int64 consume_user_resource_percent = 3; } +message UpdateEnergyLimitContract { + bytes owner_address = 1; + bytes contract_address = 2; + int64 origin_energy_limit = 3; +} + message WitnessCreateContract { bytes owner_address = 1; bytes url = 2; @@ -89,6 +95,8 @@ message WitnessUpdateContract { } message AssetIssueContract { + string id = 41; + message FrozenSupply { int64 frozen_amount = 1; int64 frozen_days = 2; @@ -99,10 +107,11 @@ message AssetIssueContract { int64 total_supply = 4; repeated FrozenSupply frozen_supply = 5; int32 trx_num = 6; + int32 precision = 7; int32 num = 8; int64 start_time = 9; int64 end_time = 10; - int64 order = 11; // the order of tokens of the same name + int64 order = 11; // useless int32 vote_score = 16; bytes description = 20; bytes url = 21; @@ -115,7 +124,7 @@ message AssetIssueContract { message ParticipateAssetIssueContract { bytes owner_address = 1; bytes to_address = 2; - bytes asset_name = 3; // the namekey of target asset, include name and order + bytes asset_name = 3; // this field is token name before the proposal ALLOW_SAME_TOKEN_NAME is active, otherwise it is token id and token is should be in string format. int64 amount = 4; // the amount of drops } @@ -131,12 +140,14 @@ message FreezeBalanceContract { int64 frozen_duration = 3; ResourceCode resource = 10; + bytes receiver_address = 15; } message UnfreezeBalanceContract { bytes owner_address = 1; ResourceCode resource = 10; + bytes receiver_address = 15; } message UnfreezeAssetContract { @@ -174,6 +185,8 @@ message ProposalDeleteContract { message CreateSmartContract { bytes owner_address = 1; SmartContract new_contract = 2; + int64 call_token_value = 3; + int64 token_id = 4; } message TriggerSmartContract { @@ -181,6 +194,8 @@ message TriggerSmartContract { bytes contract_address = 2; int64 call_value = 3; bytes data = 4; + int64 call_token_value = 5; + int64 token_id = 6; } message BuyStorageContract { @@ -226,27 +241,4 @@ message ExchangeTransactionContract { bytes token_id = 3; int64 quant = 4; int64 expected = 5; -} - -message AccountPermissionUpdateContract { - bytes owner_address = 1; - repeated Permission permissions = 2; -} - -message PermissionAddKeyContract { - bytes owner_address = 1; - Key key = 2; - string permission_name = 3; -} - -message PermissionUpdateKeyContract { - bytes owner_address = 1; - Key key = 2; - string permission_name = 3; -} - -message PermissionDeleteKeyContract { - bytes owner_address = 1; - bytes key_address = 2; - string permission_name = 3; } \ No newline at end of file diff --git a/protobuf/core/Tron.proto b/protobuf/core/Tron.proto index a9543cf..6b273e6 100644 --- a/protobuf/core/Tron.proto +++ b/protobuf/core/Tron.proto @@ -85,10 +85,17 @@ message Account { // the other asset owned by this account map asset = 6; - // the frozen balance + // the other asset owned by this account,key is assetId + map assetV2 = 56; + + // the frozen balance for bandwidth repeated Frozen frozen = 7; // bandwidth, get from frozen int64 net_usage = 8; + //Frozen balance provided by other accounts to this account + int64 acquired_delegated_frozen_balance_for_bandwidth = 41; + //Freeze and provide balances to other accounts + int64 delegated_frozen_balance_for_bandwidth = 42; // this account create time int64 create_time = 0x09; @@ -106,10 +113,12 @@ message Account { repeated Frozen frozen_supply = 16; // asset_issued_name bytes asset_issued_name = 17; + bytes asset_issued_ID = 57; map latest_asset_operation_time = 18; - + map latest_asset_operation_timeV2 = 58; int64 free_net_usage = 19; map free_asset_net_usage = 20; + map free_asset_net_usageV2 = 59; int64 latest_consume_time = 21; int64 latest_consume_free_time = 22; @@ -123,36 +132,40 @@ message Account { Frozen frozen_balance_for_energy = 2; int64 latest_consume_time_for_energy = 3; + //Frozen balance provided by other accounts to this account + int64 acquired_delegated_frozen_balance_for_energy = 4; + //Frozen balances provided to other accounts + int64 delegated_frozen_balance_for_energy = 5; + // storage resource, get from market int64 storage_limit = 6; int64 storage_usage = 7; int64 latest_exchange_storage_time = 8; + } AccountResource account_resource = 26; + bytes codeHash = 30; - repeated Permission permissions = 31; } -message Key { - bytes address = 1; - int64 weight = 2; -} -message Permission { - string name = 1; - int64 threshold = 2; - string parent = 3; - repeated Key keys = 4; +message DelegatedResource { + bytes from = 1; + bytes to = 2; + int64 frozen_balance_for_bandwidth = 3; + int64 frozen_balance_for_energy = 4; + int64 expire_time_for_bandwidth = 5; + int64 expire_time_for_energy = 6; } message authority { AccountId account = 1; bytes permission_name = 2; } -// -//message permission { -// AccountId account = 1; -//} + +message permission { + AccountId account = 1; +} // Witness message Witness { @@ -239,10 +252,7 @@ message Transaction { ExchangeInjectContract = 42; ExchangeWithdrawContract = 43; ExchangeTransactionContract = 44; - AccountPermissionUpdateContract = 45; - PermissionAddKeyContract = 46; - PermissionUpdateKeyContract = 47; - PermissionDeleteKeyContract = 48; + UpdateEnergyLimitContract = 45; } ContractType type = 1; google.protobuf.Any parameter = 2; @@ -275,8 +285,13 @@ message Transaction { code ret = 2; contractResult contractRet = 3; + string assetIssueID = 14; int64 withdraw_amount = 15; int64 unfreeze_amount = 16; + int64 exchange_received_amount = 18; + int64 exchange_inject_another_amount = 19; + int64 exchange_withdraw_another_amount = 20; + int64 exchange_id = 21; } message raw { @@ -322,9 +337,14 @@ message TransactionInfo { code result = 9; bytes resMessage = 10; + string assetIssueID = 14; int64 withdraw_amount = 15; int64 unfreeze_amount = 16; repeated InternalTransaction internal_transactions = 17; + int64 exchange_received_amount = 18; + int64 exchange_inject_another_amount = 19; + int64 exchange_withdraw_another_amount = 20; + int64 exchange_id = 21; } message Transactions { @@ -498,6 +518,7 @@ message SmartContract { int64 call_value = 5; int64 consume_user_resource_percent = 6; string name = 7; + int64 origin_energy_limit = 8; } @@ -509,13 +530,19 @@ message InternalTransaction { bytes caller_address = 2; // the one recieve trx (TBD: or token) via function bytes transferTo_address = 3; - message CallValueInfo{ + message CallValueInfo { // trx (TBD: or token) value int64 callValue = 1; // TBD: tokenName, trx should be empty - bytes tokenName = 2; + string tokenId = 2; } repeated CallValueInfo callValueInfo = 4; bytes note = 5; bool rejected = 6; +} + +message DelegatedResourceAccountIndex { + bytes account = 1; + repeated bytes fromAccounts = 2; + repeated bytes toAccounts = 3; } \ No newline at end of file diff --git a/src/protocol/api/api_pb.js b/src/protocol/api/api_pb.js index 80ebffe..40e6bdb 100644 --- a/src/protocol/api/api_pb.js +++ b/src/protocol/api/api_pb.js @@ -26,6 +26,8 @@ goog.exportSymbol('proto.protocol.BlockList', null, global); goog.exportSymbol('proto.protocol.BlockListExtention', null, global); goog.exportSymbol('proto.protocol.BlockReference', null, global); goog.exportSymbol('proto.protocol.BytesMessage', null, global); +goog.exportSymbol('proto.protocol.DelegatedResourceList', null, global); +goog.exportSymbol('proto.protocol.DelegatedResourceMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferByPrivateMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferResponse', null, global); @@ -44,9 +46,6 @@ goog.exportSymbol('proto.protocol.TransactionExtention', null, global); goog.exportSymbol('proto.protocol.TransactionLimit', null, global); goog.exportSymbol('proto.protocol.TransactionList', null, global); goog.exportSymbol('proto.protocol.TransactionListExtention', null, global); -goog.exportSymbol('proto.protocol.TransactionSignWeight', null, global); -goog.exportSymbol('proto.protocol.TransactionSignWeight.Result', null, global); -goog.exportSymbol('proto.protocol.TransactionSignWeight.Result.response_code', null, global); goog.exportSymbol('proto.protocol.WitnessList', null, global); /** @@ -1499,20 +1498,13 @@ proto.protocol.TransactionList.prototype.clearTransactionList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.NodeList = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.NodeList.repeatedFields_, null); +proto.protocol.DelegatedResourceMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.NodeList, jspb.Message); +goog.inherits(proto.protocol.DelegatedResourceMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.NodeList.displayName = 'proto.protocol.NodeList'; + proto.protocol.DelegatedResourceMessage.displayName = 'proto.protocol.DelegatedResourceMessage'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.NodeList.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1526,8 +1518,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.NodeList.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.NodeList.toObject(opt_includeInstance, this); +proto.protocol.DelegatedResourceMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DelegatedResourceMessage.toObject(opt_includeInstance, this); }; @@ -1536,14 +1528,14 @@ proto.protocol.NodeList.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.NodeList} msg The msg instance to transform. + * @param {!proto.protocol.DelegatedResourceMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.NodeList.toObject = function(includeInstance, msg) { +proto.protocol.DelegatedResourceMessage.toObject = function(includeInstance, msg) { var f, obj = { - nodesList: jspb.Message.toObjectList(msg.getNodesList(), - proto.protocol.Node.toObject, includeInstance) + fromaddress: msg.getFromaddress_asB64(), + toaddress: msg.getToaddress_asB64() }; if (includeInstance) { @@ -1557,23 +1549,23 @@ proto.protocol.NodeList.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.NodeList} + * @return {!proto.protocol.DelegatedResourceMessage} */ -proto.protocol.NodeList.deserializeBinary = function(bytes) { +proto.protocol.DelegatedResourceMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.NodeList; - return proto.protocol.NodeList.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.DelegatedResourceMessage; + return proto.protocol.DelegatedResourceMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.NodeList} msg The message object to deserialize into. + * @param {!proto.protocol.DelegatedResourceMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.NodeList} + * @return {!proto.protocol.DelegatedResourceMessage} */ -proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.DelegatedResourceMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1581,9 +1573,12 @@ proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.Node; - reader.readMessage(value,proto.protocol.Node.deserializeBinaryFromReader); - msg.addNodes(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFromaddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToaddress(value); break; default: reader.skipField(); @@ -1598,9 +1593,9 @@ proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.NodeList.prototype.serializeBinary = function() { +proto.protocol.DelegatedResourceMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.NodeList.serializeBinaryToWriter(this, writer); + proto.protocol.DelegatedResourceMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1608,51 +1603,104 @@ proto.protocol.NodeList.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.NodeList} message + * @param {!proto.protocol.DelegatedResourceMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.NodeList.serializeBinaryToWriter = function(message, writer) { +proto.protocol.DelegatedResourceMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodesList(); + f = message.getFromaddress_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 1, - f, - proto.protocol.Node.serializeBinaryToWriter + f + ); + } + f = message.getToaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f ); } }; /** - * repeated Node nodes = 1; - * @return {!Array.} + * optional bytes fromAddress = 1; + * @return {!(string|Uint8Array)} */ -proto.protocol.NodeList.prototype.getNodesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Node, 1)); +proto.protocol.DelegatedResourceMessage.prototype.getFromaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {!Array.} value */ -proto.protocol.NodeList.prototype.setNodesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** + * optional bytes fromAddress = 1; + * This is a type-conversion wrapper around `getFromaddress()` + * @return {string} + */ +proto.protocol.DelegatedResourceMessage.prototype.getFromaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFromaddress())); }; /** - * @param {!proto.protocol.Node=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Node} + * optional bytes fromAddress = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFromaddress()` + * @return {!Uint8Array} */ -proto.protocol.NodeList.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Node, opt_index); +proto.protocol.DelegatedResourceMessage.prototype.getFromaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFromaddress())); }; -proto.protocol.NodeList.prototype.clearNodesList = function() { - this.setNodesList([]); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.DelegatedResourceMessage.prototype.setFromaddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes toAddress = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.DelegatedResourceMessage.prototype.getToaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes toAddress = 2; + * This is a type-conversion wrapper around `getToaddress()` + * @return {string} + */ +proto.protocol.DelegatedResourceMessage.prototype.getToaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getToaddress())); +}; + + +/** + * optional bytes toAddress = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaddress()` + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceMessage.prototype.getToaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getToaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.DelegatedResourceMessage.prototype.setToaddress = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -1667,13 +1715,20 @@ proto.protocol.NodeList.prototype.clearNodesList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Node = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.DelegatedResourceList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.DelegatedResourceList.repeatedFields_, null); }; -goog.inherits(proto.protocol.Node, jspb.Message); +goog.inherits(proto.protocol.DelegatedResourceList, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Node.displayName = 'proto.protocol.Node'; + proto.protocol.DelegatedResourceList.displayName = 'proto.protocol.DelegatedResourceList'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.DelegatedResourceList.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1687,8 +1742,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Node.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Node.toObject(opt_includeInstance, this); +proto.protocol.DelegatedResourceList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DelegatedResourceList.toObject(opt_includeInstance, this); }; @@ -1697,13 +1752,14 @@ proto.protocol.Node.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Node} msg The msg instance to transform. + * @param {!proto.protocol.DelegatedResourceList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Node.toObject = function(includeInstance, msg) { +proto.protocol.DelegatedResourceList.toObject = function(includeInstance, msg) { var f, obj = { - address: (f = msg.getAddress()) && proto.protocol.Address.toObject(includeInstance, f) + delegatedresourceList: jspb.Message.toObjectList(msg.getDelegatedresourceList(), + core_Tron_pb.DelegatedResource.toObject, includeInstance) }; if (includeInstance) { @@ -1717,23 +1773,23 @@ proto.protocol.Node.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Node} + * @return {!proto.protocol.DelegatedResourceList} */ -proto.protocol.Node.deserializeBinary = function(bytes) { +proto.protocol.DelegatedResourceList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Node; - return proto.protocol.Node.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.DelegatedResourceList; + return proto.protocol.DelegatedResourceList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Node} msg The message object to deserialize into. + * @param {!proto.protocol.DelegatedResourceList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Node} + * @return {!proto.protocol.DelegatedResourceList} */ -proto.protocol.Node.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.DelegatedResourceList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1741,9 +1797,9 @@ proto.protocol.Node.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.Address; - reader.readMessage(value,proto.protocol.Address.deserializeBinaryFromReader); - msg.setAddress(value); + var value = new core_Tron_pb.DelegatedResource; + reader.readMessage(value,core_Tron_pb.DelegatedResource.deserializeBinaryFromReader); + msg.addDelegatedresource(value); break; default: reader.skipField(); @@ -1758,9 +1814,9 @@ proto.protocol.Node.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Node.prototype.serializeBinary = function() { +proto.protocol.DelegatedResourceList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Node.serializeBinaryToWriter(this, writer); + proto.protocol.DelegatedResourceList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1768,50 +1824,51 @@ proto.protocol.Node.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Node} message + * @param {!proto.protocol.DelegatedResourceList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Node.serializeBinaryToWriter = function(message, writer) { +proto.protocol.DelegatedResourceList.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); - if (f != null) { - writer.writeMessage( + f = message.getDelegatedresourceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.protocol.Address.serializeBinaryToWriter + core_Tron_pb.DelegatedResource.serializeBinaryToWriter ); } }; /** - * optional Address address = 1; - * @return {?proto.protocol.Address} + * repeated DelegatedResource delegatedResource = 1; + * @return {!Array.} */ -proto.protocol.Node.prototype.getAddress = function() { - return /** @type{?proto.protocol.Address} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Address, 1)); +proto.protocol.DelegatedResourceList.prototype.getDelegatedresourceList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.DelegatedResource, 1)); }; -/** @param {?proto.protocol.Address|undefined} value */ -proto.protocol.Node.prototype.setAddress = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** @param {!Array.} value */ +proto.protocol.DelegatedResourceList.prototype.setDelegatedresourceList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; -proto.protocol.Node.prototype.clearAddress = function() { - this.setAddress(undefined); +/** + * @param {!proto.protocol.DelegatedResource=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.DelegatedResource} + */ +proto.protocol.DelegatedResourceList.prototype.addDelegatedresource = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.DelegatedResource, opt_index); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.Node.prototype.hasAddress = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.DelegatedResourceList.prototype.clearDelegatedresourceList = function() { + this.setDelegatedresourceList([]); }; @@ -1826,13 +1883,20 @@ proto.protocol.Node.prototype.hasAddress = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Address = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.NodeList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.NodeList.repeatedFields_, null); }; -goog.inherits(proto.protocol.Address, jspb.Message); +goog.inherits(proto.protocol.NodeList, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Address.displayName = 'proto.protocol.Address'; + proto.protocol.NodeList.displayName = 'proto.protocol.NodeList'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.NodeList.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1846,8 +1910,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Address.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Address.toObject(opt_includeInstance, this); +proto.protocol.NodeList.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.NodeList.toObject(opt_includeInstance, this); }; @@ -1856,14 +1920,14 @@ proto.protocol.Address.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Address} msg The msg instance to transform. + * @param {!proto.protocol.NodeList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Address.toObject = function(includeInstance, msg) { +proto.protocol.NodeList.toObject = function(includeInstance, msg) { var f, obj = { - host: msg.getHost_asB64(), - port: jspb.Message.getFieldWithDefault(msg, 2, 0) + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.protocol.Node.toObject, includeInstance) }; if (includeInstance) { @@ -1877,23 +1941,23 @@ proto.protocol.Address.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Address} + * @return {!proto.protocol.NodeList} */ -proto.protocol.Address.deserializeBinary = function(bytes) { +proto.protocol.NodeList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Address; - return proto.protocol.Address.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.NodeList; + return proto.protocol.NodeList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Address} msg The message object to deserialize into. + * @param {!proto.protocol.NodeList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Address} + * @return {!proto.protocol.NodeList} */ -proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.NodeList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1901,12 +1965,9 @@ proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHost(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPort(value); + var value = new proto.protocol.Node; + reader.readMessage(value,proto.protocol.Node.deserializeBinaryFromReader); + msg.addNodes(value); break; default: reader.skipField(); @@ -1921,9 +1982,9 @@ proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Address.prototype.serializeBinary = function() { +proto.protocol.NodeList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Address.serializeBinaryToWriter(this, writer); + proto.protocol.NodeList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1931,80 +1992,51 @@ proto.protocol.Address.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Address} message + * @param {!proto.protocol.NodeList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Address.serializeBinaryToWriter = function(message, writer) { +proto.protocol.NodeList.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHost_asU8(); + f = message.getNodesList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getPort(); - if (f !== 0) { - writer.writeInt32( - 2, - f + f, + proto.protocol.Node.serializeBinaryToWriter ); } }; /** - * optional bytes host = 1; - * @return {!(string|Uint8Array)} + * repeated Node nodes = 1; + * @return {!Array.} */ -proto.protocol.Address.prototype.getHost = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.NodeList.prototype.getNodesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.Node, 1)); +}; + + +/** @param {!Array.} value */ +proto.protocol.NodeList.prototype.setNodesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional bytes host = 1; - * This is a type-conversion wrapper around `getHost()` - * @return {string} - */ -proto.protocol.Address.prototype.getHost_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHost())); -}; - - -/** - * optional bytes host = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHost()` - * @return {!Uint8Array} - */ -proto.protocol.Address.prototype.getHost_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHost())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.Address.prototype.setHost = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional int32 port = 2; - * @return {number} + * @param {!proto.protocol.Node=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.Node} */ -proto.protocol.Address.prototype.getPort = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.NodeList.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Node, opt_index); }; -/** @param {number} value */ -proto.protocol.Address.prototype.setPort = function(value) { - jspb.Message.setField(this, 2, value); +proto.protocol.NodeList.prototype.clearNodesList = function() { + this.setNodesList([]); }; @@ -2019,12 +2051,12 @@ proto.protocol.Address.prototype.setPort = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.EmptyMessage = function(opt_data) { +proto.protocol.Node = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.EmptyMessage, jspb.Message); +goog.inherits(proto.protocol.Node, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.EmptyMessage.displayName = 'proto.protocol.EmptyMessage'; + proto.protocol.Node.displayName = 'proto.protocol.Node'; } @@ -2039,8 +2071,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.EmptyMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.EmptyMessage.toObject(opt_includeInstance, this); +proto.protocol.Node.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Node.toObject(opt_includeInstance, this); }; @@ -2049,13 +2081,13 @@ proto.protocol.EmptyMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.EmptyMessage} msg The msg instance to transform. + * @param {!proto.protocol.Node} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EmptyMessage.toObject = function(includeInstance, msg) { +proto.protocol.Node.toObject = function(includeInstance, msg) { var f, obj = { - + address: (f = msg.getAddress()) && proto.protocol.Address.toObject(includeInstance, f) }; if (includeInstance) { @@ -2069,29 +2101,34 @@ proto.protocol.EmptyMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.EmptyMessage} + * @return {!proto.protocol.Node} */ -proto.protocol.EmptyMessage.deserializeBinary = function(bytes) { +proto.protocol.Node.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.EmptyMessage; - return proto.protocol.EmptyMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Node; + return proto.protocol.Node.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.EmptyMessage} msg The message object to deserialize into. + * @param {!proto.protocol.Node} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.EmptyMessage} + * @return {!proto.protocol.Node} */ -proto.protocol.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Node.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.protocol.Address; + reader.readMessage(value,proto.protocol.Address.deserializeBinaryFromReader); + msg.setAddress(value); + break; default: reader.skipField(); break; @@ -2105,9 +2142,9 @@ proto.protocol.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.EmptyMessage.prototype.serializeBinary = function() { +proto.protocol.Node.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.EmptyMessage.serializeBinaryToWriter(this, writer); + proto.protocol.Node.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2115,12 +2152,50 @@ proto.protocol.EmptyMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.EmptyMessage} message + * @param {!proto.protocol.Node} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EmptyMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Node.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getAddress(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.Address.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Address address = 1; + * @return {?proto.protocol.Address} + */ +proto.protocol.Node.prototype.getAddress = function() { + return /** @type{?proto.protocol.Address} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Address, 1)); +}; + + +/** @param {?proto.protocol.Address|undefined} value */ +proto.protocol.Node.prototype.setAddress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.Node.prototype.clearAddress = function() { + this.setAddress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.Node.prototype.hasAddress = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -2135,12 +2210,12 @@ proto.protocol.EmptyMessage.serializeBinaryToWriter = function(message, writer) * @extends {jspb.Message} * @constructor */ -proto.protocol.NumberMessage = function(opt_data) { +proto.protocol.Address = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.NumberMessage, jspb.Message); +goog.inherits(proto.protocol.Address, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.NumberMessage.displayName = 'proto.protocol.NumberMessage'; + proto.protocol.Address.displayName = 'proto.protocol.Address'; } @@ -2155,8 +2230,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.NumberMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.NumberMessage.toObject(opt_includeInstance, this); +proto.protocol.Address.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Address.toObject(opt_includeInstance, this); }; @@ -2165,13 +2240,14 @@ proto.protocol.NumberMessage.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.NumberMessage} msg The msg instance to transform. + * @param {!proto.protocol.Address} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.NumberMessage.toObject = function(includeInstance, msg) { +proto.protocol.Address.toObject = function(includeInstance, msg) { var f, obj = { - num: jspb.Message.getFieldWithDefault(msg, 1, 0) + host: msg.getHost_asB64(), + port: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -2185,23 +2261,23 @@ proto.protocol.NumberMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.NumberMessage} + * @return {!proto.protocol.Address} */ -proto.protocol.NumberMessage.deserializeBinary = function(bytes) { +proto.protocol.Address.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.NumberMessage; - return proto.protocol.NumberMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.Address; + return proto.protocol.Address.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.NumberMessage} msg The message object to deserialize into. + * @param {!proto.protocol.Address} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.NumberMessage} + * @return {!proto.protocol.Address} */ -proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.Address.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2209,8 +2285,12 @@ proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNum(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHost(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPort(value); break; default: reader.skipField(); @@ -2225,9 +2305,9 @@ proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.NumberMessage.prototype.serializeBinary = function() { +proto.protocol.Address.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.NumberMessage.serializeBinaryToWriter(this, writer); + proto.protocol.Address.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2235,34 +2315,80 @@ proto.protocol.NumberMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.NumberMessage} message + * @param {!proto.protocol.Address} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.NumberMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.Address.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNum(); - if (f !== 0) { - writer.writeInt64( + f = message.getHost_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } + f = message.getPort(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } }; /** - * optional int64 num = 1; + * optional bytes host = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Address.prototype.getHost = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes host = 1; + * This is a type-conversion wrapper around `getHost()` + * @return {string} + */ +proto.protocol.Address.prototype.getHost_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHost())); +}; + + +/** + * optional bytes host = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHost()` + * @return {!Uint8Array} + */ +proto.protocol.Address.prototype.getHost_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHost())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Address.prototype.setHost = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 port = 2; * @return {number} */ -proto.protocol.NumberMessage.prototype.getNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.Address.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.NumberMessage.prototype.setNum = function(value) { - jspb.Message.setField(this, 1, value); +proto.protocol.Address.prototype.setPort = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -2277,12 +2403,12 @@ proto.protocol.NumberMessage.prototype.setNum = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.BytesMessage = function(opt_data) { +proto.protocol.EmptyMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BytesMessage, jspb.Message); +goog.inherits(proto.protocol.EmptyMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BytesMessage.displayName = 'proto.protocol.BytesMessage'; + proto.protocol.EmptyMessage.displayName = 'proto.protocol.EmptyMessage'; } @@ -2297,8 +2423,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BytesMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BytesMessage.toObject(opt_includeInstance, this); +proto.protocol.EmptyMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EmptyMessage.toObject(opt_includeInstance, this); }; @@ -2307,13 +2433,13 @@ proto.protocol.BytesMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BytesMessage} msg The msg instance to transform. + * @param {!proto.protocol.EmptyMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BytesMessage.toObject = function(includeInstance, msg) { +proto.protocol.EmptyMessage.toObject = function(includeInstance, msg) { var f, obj = { - value: msg.getValue_asB64() + }; if (includeInstance) { @@ -2327,33 +2453,29 @@ proto.protocol.BytesMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BytesMessage} + * @return {!proto.protocol.EmptyMessage} */ -proto.protocol.BytesMessage.deserializeBinary = function(bytes) { +proto.protocol.EmptyMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BytesMessage; - return proto.protocol.BytesMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.EmptyMessage; + return proto.protocol.EmptyMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BytesMessage} msg The message object to deserialize into. + * @param {!proto.protocol.EmptyMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BytesMessage} + * @return {!proto.protocol.EmptyMessage} */ -proto.protocol.BytesMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); - break; default: reader.skipField(); break; @@ -2367,9 +2489,9 @@ proto.protocol.BytesMessage.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BytesMessage.prototype.serializeBinary = function() { +proto.protocol.EmptyMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BytesMessage.serializeBinaryToWriter(this, writer); + proto.protocol.EmptyMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2377,58 +2499,12 @@ proto.protocol.BytesMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BytesMessage} message + * @param {!proto.protocol.EmptyMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BytesMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.EmptyMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes value = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.BytesMessage.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes value = 1; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.protocol.BytesMessage.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); -}; - - -/** - * optional bytes value = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} - */ -proto.protocol.BytesMessage.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.BytesMessage.prototype.setValue = function(value) { - jspb.Message.setField(this, 1, value); }; @@ -2443,12 +2519,12 @@ proto.protocol.BytesMessage.prototype.setValue = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.TimeMessage = function(opt_data) { +proto.protocol.NumberMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.TimeMessage, jspb.Message); +goog.inherits(proto.protocol.NumberMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TimeMessage.displayName = 'proto.protocol.TimeMessage'; + proto.protocol.NumberMessage.displayName = 'proto.protocol.NumberMessage'; } @@ -2463,8 +2539,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TimeMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TimeMessage.toObject(opt_includeInstance, this); +proto.protocol.NumberMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.NumberMessage.toObject(opt_includeInstance, this); }; @@ -2473,14 +2549,13 @@ proto.protocol.TimeMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TimeMessage} msg The msg instance to transform. + * @param {!proto.protocol.NumberMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TimeMessage.toObject = function(includeInstance, msg) { +proto.protocol.NumberMessage.toObject = function(includeInstance, msg) { var f, obj = { - begininmilliseconds: jspb.Message.getFieldWithDefault(msg, 1, 0), - endinmilliseconds: jspb.Message.getFieldWithDefault(msg, 2, 0) + num: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -2494,23 +2569,23 @@ proto.protocol.TimeMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TimeMessage} + * @return {!proto.protocol.NumberMessage} */ -proto.protocol.TimeMessage.deserializeBinary = function(bytes) { +proto.protocol.NumberMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TimeMessage; - return proto.protocol.TimeMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.NumberMessage; + return proto.protocol.NumberMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TimeMessage} msg The message object to deserialize into. + * @param {!proto.protocol.NumberMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TimeMessage} + * @return {!proto.protocol.NumberMessage} */ -proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.NumberMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2519,11 +2594,7 @@ proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); - msg.setBegininmilliseconds(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEndinmilliseconds(value); + msg.setNum(value); break; default: reader.skipField(); @@ -2538,9 +2609,9 @@ proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TimeMessage.prototype.serializeBinary = function() { +proto.protocol.NumberMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TimeMessage.serializeBinaryToWriter(this, writer); + proto.protocol.NumberMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2548,59 +2619,37 @@ proto.protocol.TimeMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TimeMessage} message + * @param {!proto.protocol.NumberMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TimeMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.NumberMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBegininmilliseconds(); + f = message.getNum(); if (f !== 0) { writer.writeInt64( 1, f ); } - f = message.getEndinmilliseconds(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } }; /** - * optional int64 beginInMilliseconds = 1; + * optional int64 num = 1; * @return {number} */ -proto.protocol.TimeMessage.prototype.getBegininmilliseconds = function() { +proto.protocol.NumberMessage.prototype.getNum = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.TimeMessage.prototype.setBegininmilliseconds = function(value) { +proto.protocol.NumberMessage.prototype.setNum = function(value) { jspb.Message.setField(this, 1, value); }; -/** - * optional int64 endInMilliseconds = 2; - * @return {number} - */ -proto.protocol.TimeMessage.prototype.getEndinmilliseconds = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.protocol.TimeMessage.prototype.setEndinmilliseconds = function(value) { - jspb.Message.setField(this, 2, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -2612,12 +2661,12 @@ proto.protocol.TimeMessage.prototype.setEndinmilliseconds = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockLimit = function(opt_data) { +proto.protocol.BytesMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BlockLimit, jspb.Message); +goog.inherits(proto.protocol.BytesMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockLimit.displayName = 'proto.protocol.BlockLimit'; + proto.protocol.BytesMessage.displayName = 'proto.protocol.BytesMessage'; } @@ -2632,8 +2681,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockLimit.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockLimit.toObject(opt_includeInstance, this); +proto.protocol.BytesMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BytesMessage.toObject(opt_includeInstance, this); }; @@ -2642,14 +2691,13 @@ proto.protocol.BlockLimit.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockLimit} msg The msg instance to transform. + * @param {!proto.protocol.BytesMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockLimit.toObject = function(includeInstance, msg) { +proto.protocol.BytesMessage.toObject = function(includeInstance, msg) { var f, obj = { - startnum: jspb.Message.getFieldWithDefault(msg, 1, 0), - endnum: jspb.Message.getFieldWithDefault(msg, 2, 0) + value: msg.getValue_asB64() }; if (includeInstance) { @@ -2663,23 +2711,23 @@ proto.protocol.BlockLimit.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockLimit} + * @return {!proto.protocol.BytesMessage} */ -proto.protocol.BlockLimit.deserializeBinary = function(bytes) { +proto.protocol.BytesMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockLimit; - return proto.protocol.BlockLimit.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BytesMessage; + return proto.protocol.BytesMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockLimit} msg The message object to deserialize into. + * @param {!proto.protocol.BytesMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockLimit} + * @return {!proto.protocol.BytesMessage} */ -proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BytesMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2687,12 +2735,8 @@ proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStartnum(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEndnum(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); break; default: reader.skipField(); @@ -2707,9 +2751,9 @@ proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockLimit.prototype.serializeBinary = function() { +proto.protocol.BytesMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockLimit.serializeBinaryToWriter(this, writer); + proto.protocol.BytesMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2717,56 +2761,58 @@ proto.protocol.BlockLimit.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockLimit} message + * @param {!proto.protocol.BytesMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockLimit.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BytesMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartnum(); - if (f !== 0) { - writer.writeInt64( + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getEndnum(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } }; /** - * optional int64 startNum = 1; - * @return {number} + * optional bytes value = 1; + * @return {!(string|Uint8Array)} */ -proto.protocol.BlockLimit.prototype.getStartnum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.BytesMessage.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.protocol.BlockLimit.prototype.setStartnum = function(value) { - jspb.Message.setField(this, 1, value); +/** + * optional bytes value = 1; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.protocol.BytesMessage.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); }; /** - * optional int64 endNum = 2; - * @return {number} + * optional bytes value = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} */ -proto.protocol.BlockLimit.prototype.getEndnum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.BytesMessage.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); }; -/** @param {number} value */ -proto.protocol.BlockLimit.prototype.setEndnum = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BytesMessage.prototype.setValue = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -2781,12 +2827,12 @@ proto.protocol.BlockLimit.prototype.setEndnum = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.TransactionLimit = function(opt_data) { +proto.protocol.TimeMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.TransactionLimit, jspb.Message); +goog.inherits(proto.protocol.TimeMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TransactionLimit.displayName = 'proto.protocol.TransactionLimit'; + proto.protocol.TimeMessage.displayName = 'proto.protocol.TimeMessage'; } @@ -2801,8 +2847,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TransactionLimit.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionLimit.toObject(opt_includeInstance, this); +proto.protocol.TimeMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TimeMessage.toObject(opt_includeInstance, this); }; @@ -2811,14 +2857,14 @@ proto.protocol.TransactionLimit.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionLimit} msg The msg instance to transform. + * @param {!proto.protocol.TimeMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionLimit.toObject = function(includeInstance, msg) { +proto.protocol.TimeMessage.toObject = function(includeInstance, msg) { var f, obj = { - transactionid: msg.getTransactionid_asB64(), - limitnum: jspb.Message.getFieldWithDefault(msg, 2, 0) + begininmilliseconds: jspb.Message.getFieldWithDefault(msg, 1, 0), + endinmilliseconds: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -2832,23 +2878,23 @@ proto.protocol.TransactionLimit.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionLimit} + * @return {!proto.protocol.TimeMessage} */ -proto.protocol.TransactionLimit.deserializeBinary = function(bytes) { +proto.protocol.TimeMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionLimit; - return proto.protocol.TransactionLimit.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TimeMessage; + return proto.protocol.TimeMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TransactionLimit} msg The message object to deserialize into. + * @param {!proto.protocol.TimeMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionLimit} + * @return {!proto.protocol.TimeMessage} */ -proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TimeMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2856,12 +2902,12 @@ proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTransactionid(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setBegininmilliseconds(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setLimitnum(value); + msg.setEndinmilliseconds(value); break; default: reader.skipField(); @@ -2876,9 +2922,9 @@ proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TransactionLimit.prototype.serializeBinary = function() { +proto.protocol.TimeMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionLimit.serializeBinaryToWriter(this, writer); + proto.protocol.TimeMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2886,20 +2932,20 @@ proto.protocol.TransactionLimit.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionLimit} message + * @param {!proto.protocol.TimeMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionLimit.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TimeMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransactionid_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getBegininmilliseconds(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getLimitnum(); + f = message.getEndinmilliseconds(); if (f !== 0) { writer.writeInt64( 2, @@ -2910,55 +2956,31 @@ proto.protocol.TransactionLimit.serializeBinaryToWriter = function(message, writ /** - * optional bytes transactionId = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionLimit.prototype.getTransactionid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes transactionId = 1; - * This is a type-conversion wrapper around `getTransactionid()` - * @return {string} - */ -proto.protocol.TransactionLimit.prototype.getTransactionid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTransactionid())); -}; - - -/** - * optional bytes transactionId = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTransactionid()` - * @return {!Uint8Array} + * optional int64 beginInMilliseconds = 1; + * @return {number} */ -proto.protocol.TransactionLimit.prototype.getTransactionid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTransactionid())); +proto.protocol.TimeMessage.prototype.getBegininmilliseconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.TransactionLimit.prototype.setTransactionid = function(value) { +/** @param {number} value */ +proto.protocol.TimeMessage.prototype.setBegininmilliseconds = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 limitNum = 2; + * optional int64 endInMilliseconds = 2; * @return {number} */ -proto.protocol.TransactionLimit.prototype.getLimitnum = function() { +proto.protocol.TimeMessage.prototype.getEndinmilliseconds = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.TransactionLimit.prototype.setLimitnum = function(value) { +proto.protocol.TimeMessage.prototype.setEndinmilliseconds = function(value) { jspb.Message.setField(this, 2, value); }; @@ -2974,12 +2996,12 @@ proto.protocol.TransactionLimit.prototype.setLimitnum = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.AccountPaginated = function(opt_data) { +proto.protocol.BlockLimit = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.AccountPaginated, jspb.Message); +goog.inherits(proto.protocol.BlockLimit, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.AccountPaginated.displayName = 'proto.protocol.AccountPaginated'; + proto.protocol.BlockLimit.displayName = 'proto.protocol.BlockLimit'; } @@ -2994,8 +3016,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.AccountPaginated.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountPaginated.toObject(opt_includeInstance, this); +proto.protocol.BlockLimit.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockLimit.toObject(opt_includeInstance, this); }; @@ -3004,15 +3026,14 @@ proto.protocol.AccountPaginated.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.AccountPaginated} msg The msg instance to transform. + * @param {!proto.protocol.BlockLimit} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountPaginated.toObject = function(includeInstance, msg) { +proto.protocol.BlockLimit.toObject = function(includeInstance, msg) { var f, obj = { - account: (f = msg.getAccount()) && core_Tron_pb.Account.toObject(includeInstance, f), - offset: jspb.Message.getFieldWithDefault(msg, 2, 0), - limit: jspb.Message.getFieldWithDefault(msg, 3, 0) + startnum: jspb.Message.getFieldWithDefault(msg, 1, 0), + endnum: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -3026,23 +3047,23 @@ proto.protocol.AccountPaginated.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountPaginated} + * @return {!proto.protocol.BlockLimit} */ -proto.protocol.AccountPaginated.deserializeBinary = function(bytes) { +proto.protocol.BlockLimit.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountPaginated; - return proto.protocol.AccountPaginated.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockLimit; + return proto.protocol.BlockLimit.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.AccountPaginated} msg The message object to deserialize into. + * @param {!proto.protocol.BlockLimit} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountPaginated} + * @return {!proto.protocol.BlockLimit} */ -proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockLimit.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3050,17 +3071,12 @@ proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new core_Tron_pb.Account; - reader.readMessage(value,core_Tron_pb.Account.deserializeBinaryFromReader); - msg.setAccount(value); - break; - case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setOffset(value); + msg.setStartnum(value); break; - case 3: + case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setLimit(value); + msg.setEndnum(value); break; default: reader.skipField(); @@ -3075,9 +3091,9 @@ proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.AccountPaginated.prototype.serializeBinary = function() { +proto.protocol.BlockLimit.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.AccountPaginated.serializeBinaryToWriter(this, writer); + proto.protocol.BlockLimit.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3085,31 +3101,23 @@ proto.protocol.AccountPaginated.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountPaginated} message + * @param {!proto.protocol.BlockLimit} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountPaginated.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockLimit.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - core_Tron_pb.Account.serializeBinaryToWriter - ); - } - f = message.getOffset(); + f = message.getStartnum(); if (f !== 0) { writer.writeInt64( - 2, + 1, f ); } - f = message.getLimit(); + f = message.getEndnum(); if (f !== 0) { writer.writeInt64( - 3, + 2, f ); } @@ -3117,62 +3125,32 @@ proto.protocol.AccountPaginated.serializeBinaryToWriter = function(message, writ /** - * optional Account account = 1; - * @return {?proto.protocol.Account} - */ -proto.protocol.AccountPaginated.prototype.getAccount = function() { - return /** @type{?proto.protocol.Account} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Account, 1)); -}; - - -/** @param {?proto.protocol.Account|undefined} value */ -proto.protocol.AccountPaginated.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.AccountPaginated.prototype.clearAccount = function() { - this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.AccountPaginated.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 offset = 2; + * optional int64 startNum = 1; * @return {number} */ -proto.protocol.AccountPaginated.prototype.getOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.BlockLimit.prototype.getStartnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.AccountPaginated.prototype.setOffset = function(value) { - jspb.Message.setField(this, 2, value); +proto.protocol.BlockLimit.prototype.setStartnum = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 limit = 3; + * optional int64 endNum = 2; * @return {number} */ -proto.protocol.AccountPaginated.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.protocol.BlockLimit.prototype.getEndnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.AccountPaginated.prototype.setLimit = function(value) { - jspb.Message.setField(this, 3, value); +proto.protocol.BlockLimit.prototype.setEndnum = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -3187,12 +3165,12 @@ proto.protocol.AccountPaginated.prototype.setLimit = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.TimePaginatedMessage = function(opt_data) { +proto.protocol.TransactionLimit = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.TimePaginatedMessage, jspb.Message); +goog.inherits(proto.protocol.TransactionLimit, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TimePaginatedMessage.displayName = 'proto.protocol.TimePaginatedMessage'; + proto.protocol.TransactionLimit.displayName = 'proto.protocol.TransactionLimit'; } @@ -3207,8 +3185,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TimePaginatedMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TimePaginatedMessage.toObject(opt_includeInstance, this); +proto.protocol.TransactionLimit.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionLimit.toObject(opt_includeInstance, this); }; @@ -3217,15 +3195,14 @@ proto.protocol.TimePaginatedMessage.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TimePaginatedMessage} msg The msg instance to transform. + * @param {!proto.protocol.TransactionLimit} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TimePaginatedMessage.toObject = function(includeInstance, msg) { +proto.protocol.TransactionLimit.toObject = function(includeInstance, msg) { var f, obj = { - timemessage: (f = msg.getTimemessage()) && proto.protocol.TimeMessage.toObject(includeInstance, f), - offset: jspb.Message.getFieldWithDefault(msg, 2, 0), - limit: jspb.Message.getFieldWithDefault(msg, 3, 0) + transactionid: msg.getTransactionid_asB64(), + limitnum: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -3239,23 +3216,23 @@ proto.protocol.TimePaginatedMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TimePaginatedMessage} + * @return {!proto.protocol.TransactionLimit} */ -proto.protocol.TimePaginatedMessage.deserializeBinary = function(bytes) { +proto.protocol.TransactionLimit.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TimePaginatedMessage; - return proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TransactionLimit; + return proto.protocol.TransactionLimit.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TimePaginatedMessage} msg The message object to deserialize into. + * @param {!proto.protocol.TransactionLimit} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TimePaginatedMessage} + * @return {!proto.protocol.TransactionLimit} */ -proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TransactionLimit.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3263,17 +3240,12 @@ proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.TimeMessage; - reader.readMessage(value,proto.protocol.TimeMessage.deserializeBinaryFromReader); - msg.setTimemessage(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTransactionid(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setOffset(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimit(value); + msg.setLimitnum(value); break; default: reader.skipField(); @@ -3288,9 +3260,9 @@ proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TimePaginatedMessage.prototype.serializeBinary = function() { +proto.protocol.TransactionLimit.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TimePaginatedMessage.serializeBinaryToWriter(this, writer); + proto.protocol.TransactionLimit.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3298,94 +3270,80 @@ proto.protocol.TimePaginatedMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TimePaginatedMessage} message + * @param {!proto.protocol.TransactionLimit} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TimePaginatedMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TransactionLimit.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimemessage(); - if (f != null) { - writer.writeMessage( + f = message.getTransactionid_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.protocol.TimeMessage.serializeBinaryToWriter + f ); } - f = message.getOffset(); + f = message.getLimitnum(); if (f !== 0) { writer.writeInt64( 2, f ); } - f = message.getLimit(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } }; /** - * optional TimeMessage timeMessage = 1; - * @return {?proto.protocol.TimeMessage} + * optional bytes transactionId = 1; + * @return {!(string|Uint8Array)} */ -proto.protocol.TimePaginatedMessage.prototype.getTimemessage = function() { - return /** @type{?proto.protocol.TimeMessage} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TimeMessage, 1)); -}; - - -/** @param {?proto.protocol.TimeMessage|undefined} value */ -proto.protocol.TimePaginatedMessage.prototype.setTimemessage = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.TimePaginatedMessage.prototype.clearTimemessage = function() { - this.setTimemessage(undefined); +proto.protocol.TransactionLimit.prototype.getTransactionid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {!boolean} + * optional bytes transactionId = 1; + * This is a type-conversion wrapper around `getTransactionid()` + * @return {string} */ -proto.protocol.TimePaginatedMessage.prototype.hasTimemessage = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.TransactionLimit.prototype.getTransactionid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTransactionid())); }; /** - * optional int64 offset = 2; - * @return {number} + * optional bytes transactionId = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTransactionid()` + * @return {!Uint8Array} */ -proto.protocol.TimePaginatedMessage.prototype.getOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.TransactionLimit.prototype.getTransactionid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTransactionid())); }; -/** @param {number} value */ -proto.protocol.TimePaginatedMessage.prototype.setOffset = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionLimit.prototype.setTransactionid = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 limit = 3; + * optional int64 limitNum = 2; * @return {number} */ -proto.protocol.TimePaginatedMessage.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.protocol.TransactionLimit.prototype.getLimitnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.TimePaginatedMessage.prototype.setLimit = function(value) { - jspb.Message.setField(this, 3, value); +proto.protocol.TransactionLimit.prototype.setLimitnum = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -3400,12 +3358,12 @@ proto.protocol.TimePaginatedMessage.prototype.setLimit = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.AccountNetMessage = function(opt_data) { +proto.protocol.AccountPaginated = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.AccountNetMessage, jspb.Message); +goog.inherits(proto.protocol.AccountPaginated, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.AccountNetMessage.displayName = 'proto.protocol.AccountNetMessage'; + proto.protocol.AccountPaginated.displayName = 'proto.protocol.AccountPaginated'; } @@ -3420,8 +3378,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.AccountNetMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountNetMessage.toObject(opt_includeInstance, this); +proto.protocol.AccountPaginated.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountPaginated.toObject(opt_includeInstance, this); }; @@ -3430,20 +3388,17 @@ proto.protocol.AccountNetMessage.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.AccountNetMessage} msg The msg instance to transform. + * @param {!proto.protocol.AccountPaginated} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountNetMessage.toObject = function(includeInstance, msg) { +proto.protocol.AccountPaginated.toObject = function(includeInstance, msg) { var f, obj = { - freenetused: jspb.Message.getFieldWithDefault(msg, 1, 0), - freenetlimit: jspb.Message.getFieldWithDefault(msg, 2, 0), - netused: jspb.Message.getFieldWithDefault(msg, 3, 0), - netlimit: jspb.Message.getFieldWithDefault(msg, 4, 0), - assetnetusedMap: (f = msg.getAssetnetusedMap()) ? f.toObject(includeInstance, undefined) : [], - assetnetlimitMap: (f = msg.getAssetnetlimitMap()) ? f.toObject(includeInstance, undefined) : [], - totalnetlimit: jspb.Message.getFieldWithDefault(msg, 7, 0), - totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0) + account: (f = msg.getAccount()) && core_Tron_pb.Account.toObject(includeInstance, f), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0), + starttime: jspb.Message.getFieldWithDefault(msg, 4, 0), + endtime: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -3457,23 +3412,23 @@ proto.protocol.AccountNetMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountNetMessage} + * @return {!proto.protocol.AccountPaginated} */ -proto.protocol.AccountNetMessage.deserializeBinary = function(bytes) { +proto.protocol.AccountPaginated.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountNetMessage; - return proto.protocol.AccountNetMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.AccountPaginated; + return proto.protocol.AccountPaginated.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.AccountNetMessage} msg The message object to deserialize into. + * @param {!proto.protocol.AccountPaginated} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountNetMessage} + * @return {!proto.protocol.AccountPaginated} */ -proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.AccountPaginated.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3481,40 +3436,25 @@ proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFreenetused(value); + var value = new core_Tron_pb.Account; + reader.readMessage(value,core_Tron_pb.Account.deserializeBinaryFromReader); + msg.setAccount(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setFreenetlimit(value); + msg.setOffset(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setNetused(value); + msg.setLimit(value); break; case 4: var value = /** @type {number} */ (reader.readInt64()); - msg.setNetlimit(value); + msg.setStarttime(value); break; case 5: - var value = msg.getAssetnetusedMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; - case 6: - var value = msg.getAssetnetlimitMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalnetlimit(value); - break; - case 8: var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalnetweight(value); + msg.setEndtime(value); break; default: reader.skipField(); @@ -3529,9 +3469,9 @@ proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.AccountNetMessage.prototype.serializeBinary = function() { +proto.protocol.AccountPaginated.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.AccountNetMessage.serializeBinaryToWriter(this, writer); + proto.protocol.AccountPaginated.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3539,59 +3479,45 @@ proto.protocol.AccountNetMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountNetMessage} message + * @param {!proto.protocol.AccountPaginated} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountNetMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.AccountPaginated.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFreenetused(); - if (f !== 0) { - writer.writeInt64( + f = message.getAccount(); + if (f != null) { + writer.writeMessage( 1, - f + f, + core_Tron_pb.Account.serializeBinaryToWriter ); } - f = message.getFreenetlimit(); + f = message.getOffset(); if (f !== 0) { writer.writeInt64( 2, f ); } - f = message.getNetused(); + f = message.getLimit(); if (f !== 0) { writer.writeInt64( 3, f ); } - f = message.getNetlimit(); + f = message.getStarttime(); if (f !== 0) { writer.writeInt64( 4, f ); } - f = message.getAssetnetusedMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getAssetnetlimitMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getTotalnetlimit(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getTotalnetweight(); + f = message.getEndtime(); if (f !== 0) { writer.writeInt64( - 8, + 5, f ); } @@ -3599,128 +3525,305 @@ proto.protocol.AccountNetMessage.serializeBinaryToWriter = function(message, wri /** - * optional int64 freeNetUsed = 1; - * @return {number} + * optional Account account = 1; + * @return {?proto.protocol.Account} */ -proto.protocol.AccountNetMessage.prototype.getFreenetused = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.protocol.AccountPaginated.prototype.getAccount = function() { + return /** @type{?proto.protocol.Account} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Account, 1)); }; -/** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setFreenetused = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {?proto.protocol.Account|undefined} value */ +proto.protocol.AccountPaginated.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.AccountPaginated.prototype.clearAccount = function() { + this.setAccount(undefined); }; /** - * optional int64 freeNetLimit = 2; + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.AccountPaginated.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 offset = 2; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getFreenetlimit = function() { +proto.protocol.AccountPaginated.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setFreenetlimit = function(value) { +proto.protocol.AccountPaginated.prototype.setOffset = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int64 NetUsed = 3; + * optional int64 limit = 3; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getNetused = function() { +proto.protocol.AccountPaginated.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setNetused = function(value) { +proto.protocol.AccountPaginated.prototype.setLimit = function(value) { jspb.Message.setField(this, 3, value); }; /** - * optional int64 NetLimit = 4; + * optional int64 startTime = 4; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getNetlimit = function() { +proto.protocol.AccountPaginated.prototype.getStarttime = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setNetlimit = function(value) { +proto.protocol.AccountPaginated.prototype.setStarttime = function(value) { jspb.Message.setField(this, 4, value); }; /** - * map assetNetUsed = 5; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional int64 endTime = 5; + * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 5, opt_noLazyCreate, - null)); +proto.protocol.AccountPaginated.prototype.getEndtime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -proto.protocol.AccountNetMessage.prototype.clearAssetnetusedMap = function() { - this.getAssetnetusedMap().clear(); +/** @param {number} value */ +proto.protocol.AccountPaginated.prototype.setEndtime = function(value) { + jspb.Message.setField(this, 5, value); }; + /** - * map assetNetLimit = 6; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.AccountNetMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, - null)); -}; - - -proto.protocol.AccountNetMessage.prototype.clearAssetnetlimitMap = function() { - this.getAssetnetlimitMap().clear(); +proto.protocol.TimePaginatedMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.protocol.TimePaginatedMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TimePaginatedMessage.displayName = 'proto.protocol.TimePaginatedMessage'; +} +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int64 TotalNetLimit = 7; + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.TimePaginatedMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TimePaginatedMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TimePaginatedMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TimePaginatedMessage.toObject = function(includeInstance, msg) { + var f, obj = { + timemessage: (f = msg.getTimemessage()) && proto.protocol.TimeMessage.toObject(includeInstance, f), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TimePaginatedMessage} + */ +proto.protocol.TimePaginatedMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TimePaginatedMessage; + return proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TimePaginatedMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TimePaginatedMessage} + */ +proto.protocol.TimePaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.TimeMessage; + reader.readMessage(value,proto.protocol.TimeMessage.deserializeBinaryFromReader); + msg.setTimemessage(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.TimePaginatedMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TimePaginatedMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TimePaginatedMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.TimePaginatedMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimemessage(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.protocol.TimeMessage.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional TimeMessage timeMessage = 1; + * @return {?proto.protocol.TimeMessage} + */ +proto.protocol.TimePaginatedMessage.prototype.getTimemessage = function() { + return /** @type{?proto.protocol.TimeMessage} */ ( + jspb.Message.getWrapperField(this, proto.protocol.TimeMessage, 1)); +}; + + +/** @param {?proto.protocol.TimeMessage|undefined} value */ +proto.protocol.TimePaginatedMessage.prototype.setTimemessage = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TimePaginatedMessage.prototype.clearTimemessage = function() { + this.setTimemessage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TimePaginatedMessage.prototype.hasTimemessage = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 offset = 2; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getTotalnetlimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.protocol.TimePaginatedMessage.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setTotalnetlimit = function(value) { - jspb.Message.setField(this, 7, value); +proto.protocol.TimePaginatedMessage.prototype.setOffset = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int64 TotalNetWeight = 8; + * optional int64 limit = 3; * @return {number} */ -proto.protocol.AccountNetMessage.prototype.getTotalnetweight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.protocol.TimePaginatedMessage.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.AccountNetMessage.prototype.setTotalnetweight = function(value) { - jspb.Message.setField(this, 8, value); +proto.protocol.TimePaginatedMessage.prototype.setLimit = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -3735,12 +3838,12 @@ proto.protocol.AccountNetMessage.prototype.setTotalnetweight = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.AccountResourceMessage = function(opt_data) { +proto.protocol.AccountNetMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.AccountResourceMessage, jspb.Message); +goog.inherits(proto.protocol.AccountNetMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.AccountResourceMessage.displayName = 'proto.protocol.AccountResourceMessage'; + proto.protocol.AccountNetMessage.displayName = 'proto.protocol.AccountNetMessage'; } @@ -3755,8 +3858,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.AccountResourceMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountResourceMessage.toObject(opt_includeInstance, this); +proto.protocol.AccountNetMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountNetMessage.toObject(opt_includeInstance, this); }; @@ -3765,11 +3868,11 @@ proto.protocol.AccountResourceMessage.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.AccountResourceMessage} msg The msg instance to transform. + * @param {!proto.protocol.AccountNetMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountResourceMessage.toObject = function(includeInstance, msg) { +proto.protocol.AccountNetMessage.toObject = function(includeInstance, msg) { var f, obj = { freenetused: jspb.Message.getFieldWithDefault(msg, 1, 0), freenetlimit: jspb.Message.getFieldWithDefault(msg, 2, 0), @@ -3778,13 +3881,7 @@ proto.protocol.AccountResourceMessage.toObject = function(includeInstance, msg) assetnetusedMap: (f = msg.getAssetnetusedMap()) ? f.toObject(includeInstance, undefined) : [], assetnetlimitMap: (f = msg.getAssetnetlimitMap()) ? f.toObject(includeInstance, undefined) : [], totalnetlimit: jspb.Message.getFieldWithDefault(msg, 7, 0), - totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0), - energyused: jspb.Message.getFieldWithDefault(msg, 13, 0), - energylimit: jspb.Message.getFieldWithDefault(msg, 14, 0), - totalenergylimit: jspb.Message.getFieldWithDefault(msg, 15, 0), - totalenergyweight: jspb.Message.getFieldWithDefault(msg, 16, 0), - storageused: jspb.Message.getFieldWithDefault(msg, 21, 0), - storagelimit: jspb.Message.getFieldWithDefault(msg, 22, 0) + totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -3798,23 +3895,23 @@ proto.protocol.AccountResourceMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountResourceMessage} + * @return {!proto.protocol.AccountNetMessage} */ -proto.protocol.AccountResourceMessage.deserializeBinary = function(bytes) { +proto.protocol.AccountNetMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountResourceMessage; - return proto.protocol.AccountResourceMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.AccountNetMessage; + return proto.protocol.AccountNetMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.AccountResourceMessage} msg The message object to deserialize into. + * @param {!proto.protocol.AccountNetMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountResourceMessage} + * @return {!proto.protocol.AccountNetMessage} */ -proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.AccountNetMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3857,30 +3954,6 @@ proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg var value = /** @type {number} */ (reader.readInt64()); msg.setTotalnetweight(value); break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEnergyused(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEnergylimit(value); - break; - case 15: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalenergylimit(value); - break; - case 16: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalenergyweight(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageused(value); - break; - case 22: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStoragelimit(value); - break; default: reader.skipField(); break; @@ -3894,9 +3967,9 @@ proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.AccountResourceMessage.prototype.serializeBinary = function() { +proto.protocol.AccountNetMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.AccountResourceMessage.serializeBinaryToWriter(this, writer); + proto.protocol.AccountNetMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3904,11 +3977,11 @@ proto.protocol.AccountResourceMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountResourceMessage} message + * @param {!proto.protocol.AccountNetMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AccountResourceMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.AccountNetMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFreenetused(); if (f !== 0) { @@ -3960,48 +4033,6 @@ proto.protocol.AccountResourceMessage.serializeBinaryToWriter = function(message f ); } - f = message.getEnergyused(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getEnergylimit(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } - f = message.getTotalenergylimit(); - if (f !== 0) { - writer.writeInt64( - 15, - f - ); - } - f = message.getTotalenergyweight(); - if (f !== 0) { - writer.writeInt64( - 16, - f - ); - } - f = message.getStorageused(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getStoragelimit(); - if (f !== 0) { - writer.writeInt64( - 22, - f - ); - } }; @@ -4009,13 +4040,13 @@ proto.protocol.AccountResourceMessage.serializeBinaryToWriter = function(message * optional int64 freeNetUsed = 1; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getFreenetused = function() { +proto.protocol.AccountNetMessage.prototype.getFreenetused = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setFreenetused = function(value) { +proto.protocol.AccountNetMessage.prototype.setFreenetused = function(value) { jspb.Message.setField(this, 1, value); }; @@ -4024,13 +4055,13 @@ proto.protocol.AccountResourceMessage.prototype.setFreenetused = function(value) * optional int64 freeNetLimit = 2; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getFreenetlimit = function() { +proto.protocol.AccountNetMessage.prototype.getFreenetlimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setFreenetlimit = function(value) { +proto.protocol.AccountNetMessage.prototype.setFreenetlimit = function(value) { jspb.Message.setField(this, 2, value); }; @@ -4039,13 +4070,13 @@ proto.protocol.AccountResourceMessage.prototype.setFreenetlimit = function(value * optional int64 NetUsed = 3; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getNetused = function() { +proto.protocol.AccountNetMessage.prototype.getNetused = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setNetused = function(value) { +proto.protocol.AccountNetMessage.prototype.setNetused = function(value) { jspb.Message.setField(this, 3, value); }; @@ -4054,13 +4085,13 @@ proto.protocol.AccountResourceMessage.prototype.setNetused = function(value) { * optional int64 NetLimit = 4; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getNetlimit = function() { +proto.protocol.AccountNetMessage.prototype.getNetlimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setNetlimit = function(value) { +proto.protocol.AccountNetMessage.prototype.setNetlimit = function(value) { jspb.Message.setField(this, 4, value); }; @@ -4071,14 +4102,14 @@ proto.protocol.AccountResourceMessage.prototype.setNetlimit = function(value) { * empty, instead returning `undefined` * @return {!jspb.Map} */ -proto.protocol.AccountResourceMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { +proto.protocol.AccountNetMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 5, opt_noLazyCreate, null)); }; -proto.protocol.AccountResourceMessage.prototype.clearAssetnetusedMap = function() { +proto.protocol.AccountNetMessage.prototype.clearAssetnetusedMap = function() { this.getAssetnetusedMap().clear(); }; @@ -4089,14 +4120,14 @@ proto.protocol.AccountResourceMessage.prototype.clearAssetnetusedMap = function( * empty, instead returning `undefined` * @return {!jspb.Map} */ -proto.protocol.AccountResourceMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { +proto.protocol.AccountNetMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 6, opt_noLazyCreate, null)); }; -proto.protocol.AccountResourceMessage.prototype.clearAssetnetlimitMap = function() { +proto.protocol.AccountNetMessage.prototype.clearAssetnetlimitMap = function() { this.getAssetnetlimitMap().clear(); }; @@ -4105,13 +4136,13 @@ proto.protocol.AccountResourceMessage.prototype.clearAssetnetlimitMap = function * optional int64 TotalNetLimit = 7; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getTotalnetlimit = function() { +proto.protocol.AccountNetMessage.prototype.getTotalnetlimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setTotalnetlimit = function(value) { +proto.protocol.AccountNetMessage.prototype.setTotalnetlimit = function(value) { jspb.Message.setField(this, 7, value); }; @@ -4120,107 +4151,17 @@ proto.protocol.AccountResourceMessage.prototype.setTotalnetlimit = function(valu * optional int64 TotalNetWeight = 8; * @return {number} */ -proto.protocol.AccountResourceMessage.prototype.getTotalnetweight = function() { +proto.protocol.AccountNetMessage.prototype.getTotalnetweight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setTotalnetweight = function(value) { +proto.protocol.AccountNetMessage.prototype.setTotalnetweight = function(value) { jspb.Message.setField(this, 8, value); }; -/** - * optional int64 EnergyUsed = 13; - * @return {number} - */ -proto.protocol.AccountResourceMessage.prototype.getEnergyused = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setEnergyused = function(value) { - jspb.Message.setField(this, 13, value); -}; - - -/** - * optional int64 EnergyLimit = 14; - * @return {number} - */ -proto.protocol.AccountResourceMessage.prototype.getEnergylimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setEnergylimit = function(value) { - jspb.Message.setField(this, 14, value); -}; - - -/** - * optional int64 TotalEnergyLimit = 15; - * @return {number} - */ -proto.protocol.AccountResourceMessage.prototype.getTotalenergylimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setTotalenergylimit = function(value) { - jspb.Message.setField(this, 15, value); -}; - - -/** - * optional int64 TotalEnergyWeight = 16; - * @return {number} - */ -proto.protocol.AccountResourceMessage.prototype.getTotalenergyweight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setTotalenergyweight = function(value) { - jspb.Message.setField(this, 16, value); -}; - - -/** - * optional int64 storageUsed = 21; - * @return {number} - */ -proto.protocol.AccountResourceMessage.prototype.getStorageused = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setStorageused = function(value) { - jspb.Message.setField(this, 21, value); -}; - - -/** - * optional int64 storageLimit = 22; - * @return {number} - */ -proto.protocol.AccountResourceMessage.prototype.getStoragelimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); -}; - - -/** @param {number} value */ -proto.protocol.AccountResourceMessage.prototype.setStoragelimit = function(value) { - jspb.Message.setField(this, 22, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -4232,12 +4173,12 @@ proto.protocol.AccountResourceMessage.prototype.setStoragelimit = function(value * @extends {jspb.Message} * @constructor */ -proto.protocol.PaginatedMessage = function(opt_data) { +proto.protocol.AccountResourceMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.PaginatedMessage, jspb.Message); +goog.inherits(proto.protocol.AccountResourceMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.PaginatedMessage.displayName = 'proto.protocol.PaginatedMessage'; + proto.protocol.AccountResourceMessage.displayName = 'proto.protocol.AccountResourceMessage'; } @@ -4252,8 +4193,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.PaginatedMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PaginatedMessage.toObject(opt_includeInstance, this); +proto.protocol.AccountResourceMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AccountResourceMessage.toObject(opt_includeInstance, this); }; @@ -4262,14 +4203,26 @@ proto.protocol.PaginatedMessage.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.PaginatedMessage} msg The msg instance to transform. + * @param {!proto.protocol.AccountResourceMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.PaginatedMessage.toObject = function(includeInstance, msg) { +proto.protocol.AccountResourceMessage.toObject = function(includeInstance, msg) { var f, obj = { - offset: jspb.Message.getFieldWithDefault(msg, 1, 0), - limit: jspb.Message.getFieldWithDefault(msg, 2, 0) + freenetused: jspb.Message.getFieldWithDefault(msg, 1, 0), + freenetlimit: jspb.Message.getFieldWithDefault(msg, 2, 0), + netused: jspb.Message.getFieldWithDefault(msg, 3, 0), + netlimit: jspb.Message.getFieldWithDefault(msg, 4, 0), + assetnetusedMap: (f = msg.getAssetnetusedMap()) ? f.toObject(includeInstance, undefined) : [], + assetnetlimitMap: (f = msg.getAssetnetlimitMap()) ? f.toObject(includeInstance, undefined) : [], + totalnetlimit: jspb.Message.getFieldWithDefault(msg, 7, 0), + totalnetweight: jspb.Message.getFieldWithDefault(msg, 8, 0), + energyused: jspb.Message.getFieldWithDefault(msg, 13, 0), + energylimit: jspb.Message.getFieldWithDefault(msg, 14, 0), + totalenergylimit: jspb.Message.getFieldWithDefault(msg, 15, 0), + totalenergyweight: jspb.Message.getFieldWithDefault(msg, 16, 0), + storageused: jspb.Message.getFieldWithDefault(msg, 21, 0), + storagelimit: jspb.Message.getFieldWithDefault(msg, 22, 0) }; if (includeInstance) { @@ -4283,23 +4236,23 @@ proto.protocol.PaginatedMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.PaginatedMessage} + * @return {!proto.protocol.AccountResourceMessage} */ -proto.protocol.PaginatedMessage.deserializeBinary = function(bytes) { +proto.protocol.AccountResourceMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PaginatedMessage; - return proto.protocol.PaginatedMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.AccountResourceMessage; + return proto.protocol.AccountResourceMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.PaginatedMessage} msg The message object to deserialize into. + * @param {!proto.protocol.AccountResourceMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PaginatedMessage} + * @return {!proto.protocol.AccountResourceMessage} */ -proto.protocol.PaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.AccountResourceMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4308,329 +4261,401 @@ proto.protocol.PaginatedMessage.deserializeBinaryFromReader = function(msg, read switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); - msg.setOffset(value); + msg.setFreenetused(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setLimit(value); + msg.setFreenetlimit(value); break; - default: - reader.skipField(); + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetused(value); break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PaginatedMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PaginatedMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.PaginatedMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PaginatedMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOffset(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getLimit(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 offset = 1; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNetlimit(value); + break; + case 5: + var value = msg.getAssetnetusedMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 6: + var value = msg.getAssetnetlimitMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalnetlimit(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalnetweight(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergyused(value); + break; + case 14: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEnergylimit(value); + break; + case 15: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalenergylimit(value); + break; + case 16: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalenergyweight(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageused(value); + break; + case 22: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStoragelimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.AccountResourceMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.AccountResourceMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.AccountResourceMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.AccountResourceMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFreenetused(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getFreenetlimit(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getNetused(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getNetlimit(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getAssetnetusedMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getAssetnetlimitMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getTotalnetlimit(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getTotalnetweight(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getEnergyused(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getEnergylimit(); + if (f !== 0) { + writer.writeInt64( + 14, + f + ); + } + f = message.getTotalenergylimit(); + if (f !== 0) { + writer.writeInt64( + 15, + f + ); + } + f = message.getTotalenergyweight(); + if (f !== 0) { + writer.writeInt64( + 16, + f + ); + } + f = message.getStorageused(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } + f = message.getStoragelimit(); + if (f !== 0) { + writer.writeInt64( + 22, + f + ); + } +}; + + +/** + * optional int64 freeNetUsed = 1; * @return {number} */ -proto.protocol.PaginatedMessage.prototype.getOffset = function() { +proto.protocol.AccountResourceMessage.prototype.getFreenetused = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.protocol.PaginatedMessage.prototype.setOffset = function(value) { +proto.protocol.AccountResourceMessage.prototype.setFreenetused = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 limit = 2; + * optional int64 freeNetLimit = 2; * @return {number} */ -proto.protocol.PaginatedMessage.prototype.getLimit = function() { +proto.protocol.AccountResourceMessage.prototype.getFreenetlimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.PaginatedMessage.prototype.setLimit = function(value) { +proto.protocol.AccountResourceMessage.prototype.setFreenetlimit = function(value) { jspb.Message.setField(this, 2, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional int64 NetUsed = 3; + * @return {number} */ -proto.protocol.EasyTransferMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.AccountResourceMessage.prototype.getNetused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -goog.inherits(proto.protocol.EasyTransferMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.EasyTransferMessage.displayName = 'proto.protocol.EasyTransferMessage'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.EasyTransferMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.EasyTransferMessage.toObject(opt_includeInstance, this); +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setNetused = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.EasyTransferMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 NetLimit = 4; + * @return {number} */ -proto.protocol.EasyTransferMessage.toObject = function(includeInstance, msg) { - var f, obj = { - passphrase: msg.getPassphrase_asB64(), - toaddress: msg.getToaddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; +proto.protocol.AccountResourceMessage.prototype.getNetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setNetlimit = function(value) { + jspb.Message.setField(this, 4, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.EasyTransferMessage} + * map assetNetUsed = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.protocol.EasyTransferMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.EasyTransferMessage; - return proto.protocol.EasyTransferMessage.deserializeBinaryFromReader(msg, reader); +proto.protocol.AccountResourceMessage.prototype.getAssetnetusedMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.EasyTransferMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.EasyTransferMessage} - */ -proto.protocol.EasyTransferMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPassphrase(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToaddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.protocol.AccountResourceMessage.prototype.clearAssetnetusedMap = function() { + this.getAssetnetusedMap().clear(); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * map assetNetLimit = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.protocol.EasyTransferMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.EasyTransferMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.AccountResourceMessage.prototype.getAssetnetlimitMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +proto.protocol.AccountResourceMessage.prototype.clearAssetnetlimitMap = function() { + this.getAssetnetlimitMap().clear(); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.EasyTransferMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 TotalNetLimit = 7; + * @return {number} */ -proto.protocol.EasyTransferMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPassphrase_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getToaddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } +proto.protocol.AccountResourceMessage.prototype.getTotalnetlimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalnetlimit = function(value) { + jspb.Message.setField(this, 7, value); }; /** - * optional bytes passPhrase = 1; - * @return {!(string|Uint8Array)} + * optional int64 TotalNetWeight = 8; + * @return {number} */ -proto.protocol.EasyTransferMessage.prototype.getPassphrase = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.AccountResourceMessage.prototype.getTotalnetweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalnetweight = function(value) { + jspb.Message.setField(this, 8, value); }; /** - * optional bytes passPhrase = 1; - * This is a type-conversion wrapper around `getPassphrase()` - * @return {string} + * optional int64 EnergyUsed = 13; + * @return {number} */ -proto.protocol.EasyTransferMessage.prototype.getPassphrase_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPassphrase())); +proto.protocol.AccountResourceMessage.prototype.getEnergyused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setEnergyused = function(value) { + jspb.Message.setField(this, 13, value); }; /** - * optional bytes passPhrase = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPassphrase()` - * @return {!Uint8Array} + * optional int64 EnergyLimit = 14; + * @return {number} */ -proto.protocol.EasyTransferMessage.prototype.getPassphrase_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPassphrase())); +proto.protocol.AccountResourceMessage.prototype.getEnergylimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferMessage.prototype.setPassphrase = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setEnergylimit = function(value) { + jspb.Message.setField(this, 14, value); }; /** - * optional bytes toAddress = 2; - * @return {!(string|Uint8Array)} + * optional int64 TotalEnergyLimit = 15; + * @return {number} */ -proto.protocol.EasyTransferMessage.prototype.getToaddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.AccountResourceMessage.prototype.getTotalenergylimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalenergylimit = function(value) { + jspb.Message.setField(this, 15, value); }; /** - * optional bytes toAddress = 2; - * This is a type-conversion wrapper around `getToaddress()` - * @return {string} + * optional int64 TotalEnergyWeight = 16; + * @return {number} */ -proto.protocol.EasyTransferMessage.prototype.getToaddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToaddress())); +proto.protocol.AccountResourceMessage.prototype.getTotalenergyweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setTotalenergyweight = function(value) { + jspb.Message.setField(this, 16, value); }; /** - * optional bytes toAddress = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToaddress()` - * @return {!Uint8Array} + * optional int64 storageUsed = 21; + * @return {number} */ -proto.protocol.EasyTransferMessage.prototype.getToaddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToaddress())); +proto.protocol.AccountResourceMessage.prototype.getStorageused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferMessage.prototype.setToaddress = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {number} value */ +proto.protocol.AccountResourceMessage.prototype.setStorageused = function(value) { + jspb.Message.setField(this, 21, value); }; /** - * optional int64 amount = 3; + * optional int64 storageLimit = 22; * @return {number} */ -proto.protocol.EasyTransferMessage.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.protocol.AccountResourceMessage.prototype.getStoragelimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); }; /** @param {number} value */ -proto.protocol.EasyTransferMessage.prototype.setAmount = function(value) { - jspb.Message.setField(this, 3, value); +proto.protocol.AccountResourceMessage.prototype.setStoragelimit = function(value) { + jspb.Message.setField(this, 22, value); }; @@ -4645,12 +4670,12 @@ proto.protocol.EasyTransferMessage.prototype.setAmount = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.EasyTransferByPrivateMessage = function(opt_data) { +proto.protocol.PaginatedMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.EasyTransferByPrivateMessage, jspb.Message); +goog.inherits(proto.protocol.PaginatedMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.EasyTransferByPrivateMessage.displayName = 'proto.protocol.EasyTransferByPrivateMessage'; + proto.protocol.PaginatedMessage.displayName = 'proto.protocol.PaginatedMessage'; } @@ -4665,8 +4690,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.EasyTransferByPrivateMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.EasyTransferByPrivateMessage.toObject(opt_includeInstance, this); +proto.protocol.PaginatedMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.PaginatedMessage.toObject(opt_includeInstance, this); }; @@ -4675,15 +4700,14 @@ proto.protocol.EasyTransferByPrivateMessage.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The msg instance to transform. + * @param {!proto.protocol.PaginatedMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferByPrivateMessage.toObject = function(includeInstance, msg) { +proto.protocol.PaginatedMessage.toObject = function(includeInstance, msg) { var f, obj = { - privatekey: msg.getPrivatekey_asB64(), - toaddress: msg.getToaddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + offset: jspb.Message.getFieldWithDefault(msg, 1, 0), + limit: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -4697,23 +4721,23 @@ proto.protocol.EasyTransferByPrivateMessage.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.EasyTransferByPrivateMessage} + * @return {!proto.protocol.PaginatedMessage} */ -proto.protocol.EasyTransferByPrivateMessage.deserializeBinary = function(bytes) { +proto.protocol.PaginatedMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.EasyTransferByPrivateMessage; - return proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.PaginatedMessage; + return proto.protocol.PaginatedMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The message object to deserialize into. + * @param {!proto.protocol.PaginatedMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.EasyTransferByPrivateMessage} + * @return {!proto.protocol.PaginatedMessage} */ -proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.PaginatedMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4721,16 +4745,12 @@ proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPrivatekey(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setOffset(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToaddress(value); - break; - case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); + msg.setLimit(value); break; default: reader.skipField(); @@ -4745,9 +4765,9 @@ proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.EasyTransferByPrivateMessage.prototype.serializeBinary = function() { +proto.protocol.PaginatedMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter(this, writer); + proto.protocol.PaginatedMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4755,30 +4775,23 @@ proto.protocol.EasyTransferByPrivateMessage.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.EasyTransferByPrivateMessage} message + * @param {!proto.protocol.PaginatedMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter = function(message, writer) { +proto.protocol.PaginatedMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPrivatekey_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getOffset(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getToaddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAmount(); + f = message.getLimit(); if (f !== 0) { writer.writeInt64( - 3, + 2, f ); } @@ -4786,95 +4799,32 @@ proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter = function(m /** - * optional bytes privateKey = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes privateKey = 1; - * This is a type-conversion wrapper around `getPrivatekey()` - * @return {string} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPrivatekey())); -}; - - -/** - * optional bytes privateKey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPrivatekey()` - * @return {!Uint8Array} + * optional int64 offset = 1; + * @return {number} */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPrivatekey())); +proto.protocol.PaginatedMessage.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setPrivatekey = function(value) { +/** @param {number} value */ +proto.protocol.PaginatedMessage.prototype.setOffset = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional bytes toAddress = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes toAddress = 2; - * This is a type-conversion wrapper around `getToaddress()` - * @return {string} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToaddress())); -}; - - -/** - * optional bytes toAddress = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToaddress()` - * @return {!Uint8Array} - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToaddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setToaddress = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; + * optional int64 limit = 2; * @return {number} */ -proto.protocol.EasyTransferByPrivateMessage.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.protocol.PaginatedMessage.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setAmount = function(value) { - jspb.Message.setField(this, 3, value); +proto.protocol.PaginatedMessage.prototype.setLimit = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -4889,12 +4839,12 @@ proto.protocol.EasyTransferByPrivateMessage.prototype.setAmount = function(value * @extends {jspb.Message} * @constructor */ -proto.protocol.EasyTransferResponse = function(opt_data) { +proto.protocol.EasyTransferMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.EasyTransferResponse, jspb.Message); +goog.inherits(proto.protocol.EasyTransferMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.EasyTransferResponse.displayName = 'proto.protocol.EasyTransferResponse'; + proto.protocol.EasyTransferMessage.displayName = 'proto.protocol.EasyTransferMessage'; } @@ -4909,8 +4859,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.EasyTransferResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.EasyTransferResponse.toObject(opt_includeInstance, this); +proto.protocol.EasyTransferMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferMessage.toObject(opt_includeInstance, this); }; @@ -4919,15 +4869,15 @@ proto.protocol.EasyTransferResponse.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.EasyTransferResponse} msg The msg instance to transform. + * @param {!proto.protocol.EasyTransferMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferResponse.toObject = function(includeInstance, msg) { +proto.protocol.EasyTransferMessage.toObject = function(includeInstance, msg) { var f, obj = { - transaction: (f = msg.getTransaction()) && core_Tron_pb.Transaction.toObject(includeInstance, f), - result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f), - txid: msg.getTxid_asB64() + passphrase: msg.getPassphrase_asB64(), + toaddress: msg.getToaddress_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -4941,42 +4891,40 @@ proto.protocol.EasyTransferResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.EasyTransferResponse} + * @return {!proto.protocol.EasyTransferMessage} */ -proto.protocol.EasyTransferResponse.deserializeBinary = function(bytes) { +proto.protocol.EasyTransferMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.EasyTransferResponse; - return proto.protocol.EasyTransferResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.EasyTransferMessage; + return proto.protocol.EasyTransferMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.EasyTransferResponse} msg The message object to deserialize into. + * @param {!proto.protocol.EasyTransferMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.EasyTransferResponse} + * @return {!proto.protocol.EasyTransferMessage} */ -proto.protocol.EasyTransferResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.EasyTransferMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new core_Tron_pb.Transaction; - reader.readMessage(value,core_Tron_pb.Transaction.deserializeBinaryFromReader); - msg.setTransaction(value); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPassphrase(value); break; case 2: - var value = new proto.protocol.Return; - reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); - msg.setResult(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToaddress(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); break; default: reader.skipField(); @@ -4991,9 +4939,9 @@ proto.protocol.EasyTransferResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.EasyTransferResponse.prototype.serializeBinary = function() { +proto.protocol.EasyTransferMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.EasyTransferResponse.serializeBinaryToWriter(this, writer); + proto.protocol.EasyTransferMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5001,31 +4949,29 @@ proto.protocol.EasyTransferResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.EasyTransferResponse} message + * @param {!proto.protocol.EasyTransferMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.EasyTransferResponse.serializeBinaryToWriter = function(message, writer) { +proto.protocol.EasyTransferMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransaction(); - if (f != null) { - writer.writeMessage( + f = message.getPassphrase_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - core_Tron_pb.Transaction.serializeBinaryToWriter + f ); } - f = message.getResult(); - if (f != null) { - writer.writeMessage( + f = message.getToaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, - f, - proto.protocol.Return.serializeBinaryToWriter + f ); } - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( 3, f ); @@ -5034,100 +4980,94 @@ proto.protocol.EasyTransferResponse.serializeBinaryToWriter = function(message, /** - * optional Transaction transaction = 1; - * @return {?proto.protocol.Transaction} + * optional bytes passPhrase = 1; + * @return {!(string|Uint8Array)} */ -proto.protocol.EasyTransferResponse.prototype.getTransaction = function() { - return /** @type{?proto.protocol.Transaction} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); -}; - - -/** @param {?proto.protocol.Transaction|undefined} value */ -proto.protocol.EasyTransferResponse.prototype.setTransaction = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.EasyTransferResponse.prototype.clearTransaction = function() { - this.setTransaction(undefined); +proto.protocol.EasyTransferMessage.prototype.getPassphrase = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {!boolean} + * optional bytes passPhrase = 1; + * This is a type-conversion wrapper around `getPassphrase()` + * @return {string} */ -proto.protocol.EasyTransferResponse.prototype.hasTransaction = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.EasyTransferMessage.prototype.getPassphrase_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPassphrase())); }; /** - * optional Return result = 2; - * @return {?proto.protocol.Return} + * optional bytes passPhrase = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPassphrase()` + * @return {!Uint8Array} */ -proto.protocol.EasyTransferResponse.prototype.getResult = function() { - return /** @type{?proto.protocol.Return} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Return, 2)); -}; - - -/** @param {?proto.protocol.Return|undefined} value */ -proto.protocol.EasyTransferResponse.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.protocol.EasyTransferResponse.prototype.clearResult = function() { - this.setResult(undefined); +proto.protocol.EasyTransferMessage.prototype.getPassphrase_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPassphrase())); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.EasyTransferResponse.prototype.hasResult = function() { - return jspb.Message.getField(this, 2) != null; +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferMessage.prototype.setPassphrase = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional bytes txid = 3; + * optional bytes toAddress = 2; * @return {!(string|Uint8Array)} */ -proto.protocol.EasyTransferResponse.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.EasyTransferMessage.prototype.getToaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes txid = 3; - * This is a type-conversion wrapper around `getTxid()` + * optional bytes toAddress = 2; + * This is a type-conversion wrapper around `getToaddress()` * @return {string} */ -proto.protocol.EasyTransferResponse.prototype.getTxid_asB64 = function() { +proto.protocol.EasyTransferMessage.prototype.getToaddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); + this.getToaddress())); }; /** - * optional bytes txid = 3; + * optional bytes toAddress = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` + * This is a type-conversion wrapper around `getToaddress()` * @return {!Uint8Array} */ -proto.protocol.EasyTransferResponse.prototype.getTxid_asU8 = function() { +proto.protocol.EasyTransferMessage.prototype.getToaddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); + this.getToaddress())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.EasyTransferResponse.prototype.setTxid = function(value) { +proto.protocol.EasyTransferMessage.prototype.setToaddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.protocol.EasyTransferMessage.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.EasyTransferMessage.prototype.setAmount = function(value) { jspb.Message.setField(this, 3, value); }; @@ -5143,12 +5083,12 @@ proto.protocol.EasyTransferResponse.prototype.setTxid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.AddressPrKeyPairMessage = function(opt_data) { +proto.protocol.EasyTransferByPrivateMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.AddressPrKeyPairMessage, jspb.Message); +goog.inherits(proto.protocol.EasyTransferByPrivateMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.AddressPrKeyPairMessage.displayName = 'proto.protocol.AddressPrKeyPairMessage'; + proto.protocol.EasyTransferByPrivateMessage.displayName = 'proto.protocol.EasyTransferByPrivateMessage'; } @@ -5163,8 +5103,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.AddressPrKeyPairMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AddressPrKeyPairMessage.toObject(opt_includeInstance, this); +proto.protocol.EasyTransferByPrivateMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferByPrivateMessage.toObject(opt_includeInstance, this); }; @@ -5173,14 +5113,15 @@ proto.protocol.AddressPrKeyPairMessage.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.AddressPrKeyPairMessage} msg The msg instance to transform. + * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.AddressPrKeyPairMessage.toObject = function(includeInstance, msg) { +proto.protocol.EasyTransferByPrivateMessage.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - privatekey: jspb.Message.getFieldWithDefault(msg, 2, "") + privatekey: msg.getPrivatekey_asB64(), + toaddress: msg.getToaddress_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -5194,23 +5135,23 @@ proto.protocol.AddressPrKeyPairMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AddressPrKeyPairMessage} + * @return {!proto.protocol.EasyTransferByPrivateMessage} */ -proto.protocol.AddressPrKeyPairMessage.deserializeBinary = function(bytes) { +proto.protocol.EasyTransferByPrivateMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AddressPrKeyPairMessage; - return proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.EasyTransferByPrivateMessage; + return proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.AddressPrKeyPairMessage} msg The message object to deserialize into. + * @param {!proto.protocol.EasyTransferByPrivateMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AddressPrKeyPairMessage} + * @return {!proto.protocol.EasyTransferByPrivateMessage} */ -proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.EasyTransferByPrivateMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5218,12 +5159,16 @@ proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPrivatekey(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPrivatekey(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToaddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); break; default: reader.skipField(); @@ -5235,69 +5180,139 @@ proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(ms /** - * Serializes the message to binary data (in protobuf wire format). + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.EasyTransferByPrivateMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.EasyTransferByPrivateMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPrivatekey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getToaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes privateKey = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes privateKey = 1; + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {string} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPrivatekey())); +}; + + +/** + * optional bytes privateKey = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPrivatekey()` * @return {!Uint8Array} */ -proto.protocol.AddressPrKeyPairMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.EasyTransferByPrivateMessage.prototype.getPrivatekey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPrivatekey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferByPrivateMessage.prototype.setPrivatekey = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AddressPrKeyPairMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes toAddress = 2; + * @return {!(string|Uint8Array)} */ -proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPrivatekey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional string address = 1; + * optional bytes toAddress = 2; + * This is a type-conversion wrapper around `getToaddress()` * @return {string} */ -proto.protocol.AddressPrKeyPairMessage.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getToaddress())); }; -/** @param {string} value */ -proto.protocol.AddressPrKeyPairMessage.prototype.setAddress = function(value) { - jspb.Message.setField(this, 1, value); +/** + * optional bytes toAddress = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaddress()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferByPrivateMessage.prototype.getToaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getToaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferByPrivateMessage.prototype.setToaddress = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional string privateKey = 2; - * @return {string} + * optional int64 amount = 3; + * @return {number} */ -proto.protocol.AddressPrKeyPairMessage.prototype.getPrivatekey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.EasyTransferByPrivateMessage.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** @param {string} value */ -proto.protocol.AddressPrKeyPairMessage.prototype.setPrivatekey = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {number} value */ +proto.protocol.EasyTransferByPrivateMessage.prototype.setAmount = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -5312,20 +5327,13 @@ proto.protocol.AddressPrKeyPairMessage.prototype.setPrivatekey = function(value) * @extends {jspb.Message} * @constructor */ -proto.protocol.TransactionExtention = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionExtention.repeatedFields_, null); +proto.protocol.EasyTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.TransactionExtention, jspb.Message); +goog.inherits(proto.protocol.EasyTransferResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TransactionExtention.displayName = 'proto.protocol.TransactionExtention'; + proto.protocol.EasyTransferResponse.displayName = 'proto.protocol.EasyTransferResponse'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.TransactionExtention.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5339,8 +5347,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TransactionExtention.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionExtention.toObject(opt_includeInstance, this); +proto.protocol.EasyTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.EasyTransferResponse.toObject(opt_includeInstance, this); }; @@ -5349,16 +5357,15 @@ proto.protocol.TransactionExtention.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionExtention} msg The msg instance to transform. + * @param {!proto.protocol.EasyTransferResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionExtention.toObject = function(includeInstance, msg) { +proto.protocol.EasyTransferResponse.toObject = function(includeInstance, msg) { var f, obj = { transaction: (f = msg.getTransaction()) && core_Tron_pb.Transaction.toObject(includeInstance, f), - txid: msg.getTxid_asB64(), - constantResultList: msg.getConstantResultList_asB64(), - result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f) + result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f), + txid: msg.getTxid_asB64() }; if (includeInstance) { @@ -5372,23 +5379,23 @@ proto.protocol.TransactionExtention.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionExtention} + * @return {!proto.protocol.EasyTransferResponse} */ -proto.protocol.TransactionExtention.deserializeBinary = function(bytes) { +proto.protocol.EasyTransferResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionExtention; - return proto.protocol.TransactionExtention.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.EasyTransferResponse; + return proto.protocol.EasyTransferResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TransactionExtention} msg The message object to deserialize into. + * @param {!proto.protocol.EasyTransferResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionExtention} + * @return {!proto.protocol.EasyTransferResponse} */ -proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.EasyTransferResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5401,18 +5408,14 @@ proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, msg.setTransaction(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addConstantResult(value); - break; - case 4: var value = new proto.protocol.Return; reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); msg.setResult(value); break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; default: reader.skipField(); break; @@ -5426,9 +5429,9 @@ proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TransactionExtention.prototype.serializeBinary = function() { +proto.protocol.EasyTransferResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionExtention.serializeBinaryToWriter(this, writer); + proto.protocol.EasyTransferResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5436,11 +5439,11 @@ proto.protocol.TransactionExtention.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionExtention} message + * @param {!proto.protocol.EasyTransferResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionExtention.serializeBinaryToWriter = function(message, writer) { +proto.protocol.EasyTransferResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTransaction(); if (f != null) { @@ -5450,170 +5453,71 @@ proto.protocol.TransactionExtention.serializeBinaryToWriter = function(message, core_Tron_pb.Transaction.serializeBinaryToWriter ); } - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getConstantResultList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 3, - f - ); - } f = message.getResult(); if (f != null) { writer.writeMessage( - 4, + 2, f, proto.protocol.Return.serializeBinaryToWriter ); } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; /** - * optional Transaction transaction = 1; - * @return {?proto.protocol.Transaction} - */ -proto.protocol.TransactionExtention.prototype.getTransaction = function() { - return /** @type{?proto.protocol.Transaction} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); -}; - - -/** @param {?proto.protocol.Transaction|undefined} value */ -proto.protocol.TransactionExtention.prototype.setTransaction = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.protocol.TransactionExtention.prototype.clearTransaction = function() { - this.setTransaction(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.TransactionExtention.prototype.hasTransaction = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes txid = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionExtention.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes txid = 2; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} - */ -proto.protocol.TransactionExtention.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); -}; - - -/** - * optional bytes txid = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` - * @return {!Uint8Array} - */ -proto.protocol.TransactionExtention.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.TransactionExtention.prototype.setTxid = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * repeated bytes constant_result = 3; - * @return {!(Array|Array)} - */ -proto.protocol.TransactionExtention.prototype.getConstantResultList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * repeated bytes constant_result = 3; - * This is a type-conversion wrapper around `getConstantResultList()` - * @return {!Array.} - */ -proto.protocol.TransactionExtention.prototype.getConstantResultList_asB64 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( - this.getConstantResultList())); -}; - - -/** - * repeated bytes constant_result = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getConstantResultList()` - * @return {!Array.} + * optional Transaction transaction = 1; + * @return {?proto.protocol.Transaction} */ -proto.protocol.TransactionExtention.prototype.getConstantResultList_asU8 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( - this.getConstantResultList())); +proto.protocol.EasyTransferResponse.prototype.getTransaction = function() { + return /** @type{?proto.protocol.Transaction} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); }; -/** @param {!(Array|Array)} value */ -proto.protocol.TransactionExtention.prototype.setConstantResultList = function(value) { - jspb.Message.setField(this, 3, value || []); +/** @param {?proto.protocol.Transaction|undefined} value */ +proto.protocol.EasyTransferResponse.prototype.setTransaction = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - */ -proto.protocol.TransactionExtention.prototype.addConstantResult = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.protocol.EasyTransferResponse.prototype.clearTransaction = function() { + this.setTransaction(undefined); }; -proto.protocol.TransactionExtention.prototype.clearConstantResultList = function() { - this.setConstantResultList([]); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.EasyTransferResponse.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional Return result = 4; + * optional Return result = 2; * @return {?proto.protocol.Return} */ -proto.protocol.TransactionExtention.prototype.getResult = function() { +proto.protocol.EasyTransferResponse.prototype.getResult = function() { return /** @type{?proto.protocol.Return} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Return, 4)); + jspb.Message.getWrapperField(this, proto.protocol.Return, 2)); }; /** @param {?proto.protocol.Return|undefined} value */ -proto.protocol.TransactionExtention.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 4, value); +proto.protocol.EasyTransferResponse.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 2, value); }; -proto.protocol.TransactionExtention.prototype.clearResult = function() { +proto.protocol.EasyTransferResponse.prototype.clearResult = function() { this.setResult(undefined); }; @@ -5622,8 +5526,47 @@ proto.protocol.TransactionExtention.prototype.clearResult = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.protocol.TransactionExtention.prototype.hasResult = function() { - return jspb.Message.getField(this, 4) != null; +proto.protocol.EasyTransferResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes txid = 3; + * @return {!(string|Uint8Array)} + */ +proto.protocol.EasyTransferResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes txid = 3; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.protocol.EasyTransferResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.protocol.EasyTransferResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.EasyTransferResponse.prototype.setTxid = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -5638,20 +5581,13 @@ proto.protocol.TransactionExtention.prototype.hasResult = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockExtention = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockExtention.repeatedFields_, null); +proto.protocol.AddressPrKeyPairMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.BlockExtention, jspb.Message); +goog.inherits(proto.protocol.AddressPrKeyPairMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockExtention.displayName = 'proto.protocol.BlockExtention'; + proto.protocol.AddressPrKeyPairMessage.displayName = 'proto.protocol.AddressPrKeyPairMessage'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.BlockExtention.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5665,8 +5601,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockExtention.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockExtention.toObject(opt_includeInstance, this); +proto.protocol.AddressPrKeyPairMessage.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.AddressPrKeyPairMessage.toObject(opt_includeInstance, this); }; @@ -5675,16 +5611,14 @@ proto.protocol.BlockExtention.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockExtention} msg The msg instance to transform. + * @param {!proto.protocol.AddressPrKeyPairMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockExtention.toObject = function(includeInstance, msg) { +proto.protocol.AddressPrKeyPairMessage.toObject = function(includeInstance, msg) { var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.protocol.TransactionExtention.toObject, includeInstance), - blockHeader: (f = msg.getBlockHeader()) && core_Tron_pb.BlockHeader.toObject(includeInstance, f), - blockid: msg.getBlockid_asB64() + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + privatekey: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -5698,23 +5632,23 @@ proto.protocol.BlockExtention.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockExtention} + * @return {!proto.protocol.AddressPrKeyPairMessage} */ -proto.protocol.BlockExtention.deserializeBinary = function(bytes) { +proto.protocol.AddressPrKeyPairMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockExtention; - return proto.protocol.BlockExtention.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.AddressPrKeyPairMessage; + return proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockExtention} msg The message object to deserialize into. + * @param {!proto.protocol.AddressPrKeyPairMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockExtention} + * @return {!proto.protocol.AddressPrKeyPairMessage} */ -proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.AddressPrKeyPairMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5722,18 +5656,12 @@ proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.TransactionExtention; - reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); - msg.addTransactions(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); break; case 2: - var value = new core_Tron_pb.BlockHeader; - reader.readMessage(value,core_Tron_pb.BlockHeader.deserializeBinaryFromReader); - msg.setBlockHeader(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockid(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPrivatekey(value); break; default: reader.skipField(); @@ -5748,9 +5676,9 @@ proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockExtention.prototype.serializeBinary = function() { +proto.protocol.AddressPrKeyPairMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockExtention.serializeBinaryToWriter(this, writer); + proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5758,32 +5686,23 @@ proto.protocol.BlockExtention.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockExtention} message + * @param {!proto.protocol.AddressPrKeyPairMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockExtention.serializeBinaryToWriter = function(message, writer) { +proto.protocol.AddressPrKeyPairMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransactionsList(); + f = message.getAddress(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.protocol.TransactionExtention.serializeBinaryToWriter - ); - } - f = message.getBlockHeader(); - if (f != null) { - writer.writeMessage( - 2, - f, - core_Tron_pb.BlockHeader.serializeBinaryToWriter + f ); } - f = message.getBlockid_asU8(); + f = message.getPrivatekey(); if (f.length > 0) { - writer.writeBytes( - 3, + writer.writeString( + 2, f ); } @@ -5791,102 +5710,32 @@ proto.protocol.BlockExtention.serializeBinaryToWriter = function(message, writer /** - * repeated TransactionExtention transactions = 1; - * @return {!Array.} - */ -proto.protocol.BlockExtention.prototype.getTransactionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionExtention, 1)); -}; - - -/** @param {!Array.} value */ -proto.protocol.BlockExtention.prototype.setTransactionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.protocol.TransactionExtention=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TransactionExtention} - */ -proto.protocol.BlockExtention.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TransactionExtention, opt_index); -}; - - -proto.protocol.BlockExtention.prototype.clearTransactionsList = function() { - this.setTransactionsList([]); -}; - - -/** - * optional BlockHeader block_header = 2; - * @return {?proto.protocol.BlockHeader} - */ -proto.protocol.BlockExtention.prototype.getBlockHeader = function() { - return /** @type{?proto.protocol.BlockHeader} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.BlockHeader, 2)); -}; - - -/** @param {?proto.protocol.BlockHeader|undefined} value */ -proto.protocol.BlockExtention.prototype.setBlockHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.protocol.BlockExtention.prototype.clearBlockHeader = function() { - this.setBlockHeader(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.BlockExtention.prototype.hasBlockHeader = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes blockid = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.BlockExtention.prototype.getBlockid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes blockid = 3; - * This is a type-conversion wrapper around `getBlockid()` + * optional string address = 1; * @return {string} */ -proto.protocol.BlockExtention.prototype.getBlockid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockid())); +proto.protocol.AddressPrKeyPairMessage.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.protocol.AddressPrKeyPairMessage.prototype.setAddress = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional bytes blockid = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockid()` - * @return {!Uint8Array} + * optional string privateKey = 2; + * @return {string} */ -proto.protocol.BlockExtention.prototype.getBlockid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockid())); +proto.protocol.AddressPrKeyPairMessage.prototype.getPrivatekey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.BlockExtention.prototype.setBlockid = function(value) { - jspb.Message.setField(this, 3, value); +/** @param {string} value */ +proto.protocol.AddressPrKeyPairMessage.prototype.setPrivatekey = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -5901,19 +5750,19 @@ proto.protocol.BlockExtention.prototype.setBlockid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.BlockListExtention = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockListExtention.repeatedFields_, null); +proto.protocol.TransactionExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionExtention.repeatedFields_, null); }; -goog.inherits(proto.protocol.BlockListExtention, jspb.Message); +goog.inherits(proto.protocol.TransactionExtention, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.BlockListExtention.displayName = 'proto.protocol.BlockListExtention'; + proto.protocol.TransactionExtention.displayName = 'proto.protocol.TransactionExtention'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.protocol.BlockListExtention.repeatedFields_ = [1]; +proto.protocol.TransactionExtention.repeatedFields_ = [3]; @@ -5928,8 +5777,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.BlockListExtention.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockListExtention.toObject(opt_includeInstance, this); +proto.protocol.TransactionExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionExtention.toObject(opt_includeInstance, this); }; @@ -5938,14 +5787,16 @@ proto.protocol.BlockListExtention.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.BlockListExtention} msg The msg instance to transform. + * @param {!proto.protocol.TransactionExtention} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockListExtention.toObject = function(includeInstance, msg) { +proto.protocol.TransactionExtention.toObject = function(includeInstance, msg) { var f, obj = { - blockList: jspb.Message.toObjectList(msg.getBlockList(), - proto.protocol.BlockExtention.toObject, includeInstance) + transaction: (f = msg.getTransaction()) && core_Tron_pb.Transaction.toObject(includeInstance, f), + txid: msg.getTxid_asB64(), + constantResultList: msg.getConstantResultList_asB64(), + result: (f = msg.getResult()) && proto.protocol.Return.toObject(includeInstance, f) }; if (includeInstance) { @@ -5959,23 +5810,23 @@ proto.protocol.BlockListExtention.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockListExtention} + * @return {!proto.protocol.TransactionExtention} */ -proto.protocol.BlockListExtention.deserializeBinary = function(bytes) { +proto.protocol.TransactionExtention.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockListExtention; - return proto.protocol.BlockListExtention.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.TransactionExtention; + return proto.protocol.TransactionExtention.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.BlockListExtention} msg The message object to deserialize into. + * @param {!proto.protocol.TransactionExtention} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockListExtention} + * @return {!proto.protocol.TransactionExtention} */ -proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.TransactionExtention.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5983,9 +5834,22 @@ proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.protocol.BlockExtention; - reader.readMessage(value,proto.protocol.BlockExtention.deserializeBinaryFromReader); - msg.addBlock(value); + var value = new core_Tron_pb.Transaction; + reader.readMessage(value,core_Tron_pb.Transaction.deserializeBinaryFromReader); + msg.setTransaction(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addConstantResult(value); + break; + case 4: + var value = new proto.protocol.Return; + reader.readMessage(value,proto.protocol.Return.deserializeBinaryFromReader); + msg.setResult(value); break; default: reader.skipField(); @@ -6000,9 +5864,9 @@ proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.BlockListExtention.prototype.serializeBinary = function() { +proto.protocol.TransactionExtention.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.BlockListExtention.serializeBinaryToWriter(this, writer); + proto.protocol.TransactionExtention.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6010,51 +5874,194 @@ proto.protocol.BlockListExtention.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockListExtention} message + * @param {!proto.protocol.TransactionExtention} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.BlockListExtention.serializeBinaryToWriter = function(message, writer) { +proto.protocol.TransactionExtention.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlockList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getTransaction(); + if (f != null) { + writer.writeMessage( 1, f, - proto.protocol.BlockExtention.serializeBinaryToWriter + core_Tron_pb.Transaction.serializeBinaryToWriter + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getConstantResultList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.protocol.Return.serializeBinaryToWriter ); } }; /** - * repeated BlockExtention block = 1; - * @return {!Array.} + * optional Transaction transaction = 1; + * @return {?proto.protocol.Transaction} */ -proto.protocol.BlockListExtention.prototype.getBlockList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockExtention, 1)); +proto.protocol.TransactionExtention.prototype.getTransaction = function() { + return /** @type{?proto.protocol.Transaction} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.Transaction, 1)); +}; + + +/** @param {?proto.protocol.Transaction|undefined} value */ +proto.protocol.TransactionExtention.prototype.setTransaction = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.TransactionExtention.prototype.clearTransaction = function() { + this.setTransaction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.TransactionExtention.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes txid = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.TransactionExtention.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes txid = 2; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.protocol.TransactionExtention.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.protocol.TransactionExtention.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.TransactionExtention.prototype.setTxid = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * repeated bytes constant_result = 3; + * @return {!(Array|Array)} + */ +proto.protocol.TransactionExtention.prototype.getConstantResultList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes constant_result = 3; + * This is a type-conversion wrapper around `getConstantResultList()` + * @return {!Array.} + */ +proto.protocol.TransactionExtention.prototype.getConstantResultList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getConstantResultList())); +}; + + +/** + * repeated bytes constant_result = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConstantResultList()` + * @return {!Array.} + */ +proto.protocol.TransactionExtention.prototype.getConstantResultList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getConstantResultList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.TransactionExtention.prototype.setConstantResultList = function(value) { + jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.TransactionExtention.prototype.addConstantResult = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +proto.protocol.TransactionExtention.prototype.clearConstantResultList = function() { + this.setConstantResultList([]); +}; + + +/** + * optional Return result = 4; + * @return {?proto.protocol.Return} + */ +proto.protocol.TransactionExtention.prototype.getResult = function() { + return /** @type{?proto.protocol.Return} */ ( + jspb.Message.getWrapperField(this, proto.protocol.Return, 4)); +}; + + +/** @param {?proto.protocol.Return|undefined} value */ +proto.protocol.TransactionExtention.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 4, value); }; -/** @param {!Array.} value */ -proto.protocol.BlockListExtention.prototype.setBlockList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.protocol.TransactionExtention.prototype.clearResult = function() { + this.setResult(undefined); }; /** - * @param {!proto.protocol.BlockExtention=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.BlockExtention} + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.BlockListExtention.prototype.addBlock = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.BlockExtention, opt_index); -}; - - -proto.protocol.BlockListExtention.prototype.clearBlockList = function() { - this.setBlockList([]); +proto.protocol.TransactionExtention.prototype.hasResult = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -6069,19 +6076,19 @@ proto.protocol.BlockListExtention.prototype.clearBlockList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.TransactionListExtention = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionListExtention.repeatedFields_, null); +proto.protocol.BlockExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockExtention.repeatedFields_, null); }; -goog.inherits(proto.protocol.TransactionListExtention, jspb.Message); +goog.inherits(proto.protocol.BlockExtention, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TransactionListExtention.displayName = 'proto.protocol.TransactionListExtention'; + proto.protocol.BlockExtention.displayName = 'proto.protocol.BlockExtention'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.protocol.TransactionListExtention.repeatedFields_ = [1]; +proto.protocol.BlockExtention.repeatedFields_ = [1]; @@ -6096,8 +6103,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TransactionListExtention.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionListExtention.toObject(opt_includeInstance, this); +proto.protocol.BlockExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockExtention.toObject(opt_includeInstance, this); }; @@ -6106,14 +6113,16 @@ proto.protocol.TransactionListExtention.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionListExtention} msg The msg instance to transform. + * @param {!proto.protocol.BlockExtention} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionListExtention.toObject = function(includeInstance, msg) { +proto.protocol.BlockExtention.toObject = function(includeInstance, msg) { var f, obj = { - transactionList: jspb.Message.toObjectList(msg.getTransactionList(), - proto.protocol.TransactionExtention.toObject, includeInstance) + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.protocol.TransactionExtention.toObject, includeInstance), + blockHeader: (f = msg.getBlockHeader()) && core_Tron_pb.BlockHeader.toObject(includeInstance, f), + blockid: msg.getBlockid_asB64() }; if (includeInstance) { @@ -6127,23 +6136,23 @@ proto.protocol.TransactionListExtention.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionListExtention} + * @return {!proto.protocol.BlockExtention} */ -proto.protocol.TransactionListExtention.deserializeBinary = function(bytes) { +proto.protocol.BlockExtention.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionListExtention; - return proto.protocol.TransactionListExtention.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockExtention; + return proto.protocol.BlockExtention.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TransactionListExtention} msg The message object to deserialize into. + * @param {!proto.protocol.BlockExtention} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionListExtention} + * @return {!proto.protocol.BlockExtention} */ -proto.protocol.TransactionListExtention.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockExtention.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6153,7 +6162,16 @@ proto.protocol.TransactionListExtention.deserializeBinaryFromReader = function(m case 1: var value = new proto.protocol.TransactionExtention; reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); - msg.addTransaction(value); + msg.addTransactions(value); + break; + case 2: + var value = new core_Tron_pb.BlockHeader; + reader.readMessage(value,core_Tron_pb.BlockHeader.deserializeBinaryFromReader); + msg.setBlockHeader(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockid(value); break; default: reader.skipField(); @@ -6168,9 +6186,9 @@ proto.protocol.TransactionListExtention.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TransactionListExtention.prototype.serializeBinary = function() { +proto.protocol.BlockExtention.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionListExtention.serializeBinaryToWriter(this, writer); + proto.protocol.BlockExtention.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6178,13 +6196,13 @@ proto.protocol.TransactionListExtention.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionListExtention} message + * @param {!proto.protocol.BlockExtention} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionListExtention.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockExtention.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransactionList(); + f = message.getTransactionsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, @@ -6192,21 +6210,36 @@ proto.protocol.TransactionListExtention.serializeBinaryToWriter = function(messa proto.protocol.TransactionExtention.serializeBinaryToWriter ); } + f = message.getBlockHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + core_Tron_pb.BlockHeader.serializeBinaryToWriter + ); + } + f = message.getBlockid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; /** - * repeated TransactionExtention transaction = 1; + * repeated TransactionExtention transactions = 1; * @return {!Array.} */ -proto.protocol.TransactionListExtention.prototype.getTransactionList = function() { +proto.protocol.BlockExtention.prototype.getTransactionsList = function() { return /** @type{!Array.} */ ( jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionExtention, 1)); }; /** @param {!Array.} value */ -proto.protocol.TransactionListExtention.prototype.setTransactionList = function(value) { +proto.protocol.BlockExtention.prototype.setTransactionsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -6216,201 +6249,82 @@ proto.protocol.TransactionListExtention.prototype.setTransactionList = function( * @param {number=} opt_index * @return {!proto.protocol.TransactionExtention} */ -proto.protocol.TransactionListExtention.prototype.addTransaction = function(opt_value, opt_index) { +proto.protocol.BlockExtention.prototype.addTransactions = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TransactionExtention, opt_index); }; -proto.protocol.TransactionListExtention.prototype.clearTransactionList = function() { - this.setTransactionList([]); +proto.protocol.BlockExtention.prototype.clearTransactionsList = function() { + this.setTransactionsList([]); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional BlockHeader block_header = 2; + * @return {?proto.protocol.BlockHeader} */ -proto.protocol.TransactionSignWeight = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionSignWeight.repeatedFields_, null); +proto.protocol.BlockExtention.prototype.getBlockHeader = function() { + return /** @type{?proto.protocol.BlockHeader} */ ( + jspb.Message.getWrapperField(this, core_Tron_pb.BlockHeader, 2)); }; -goog.inherits(proto.protocol.TransactionSignWeight, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.TransactionSignWeight.displayName = 'proto.protocol.TransactionSignWeight'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.TransactionSignWeight.repeatedFields_ = [2]; - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransactionSignWeight.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionSignWeight.toObject(opt_includeInstance, this); +/** @param {?proto.protocol.BlockHeader|undefined} value */ +proto.protocol.BlockExtention.prototype.setBlockHeader = function(value) { + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionSignWeight} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionSignWeight.toObject = function(includeInstance, msg) { - var f, obj = { - permission: (f = msg.getPermission()) && core_Tron_pb.Permission.toObject(includeInstance, f), - approvedListList: msg.getApprovedListList_asB64(), - currentWeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - result: (f = msg.getResult()) && proto.protocol.TransactionSignWeight.Result.toObject(includeInstance, f), - transaction: (f = msg.getTransaction()) && proto.protocol.TransactionExtention.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.protocol.BlockExtention.prototype.clearBlockHeader = function() { + this.setBlockHeader(undefined); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionSignWeight} + * Returns whether this field is set. + * @return {!boolean} */ -proto.protocol.TransactionSignWeight.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionSignWeight; - return proto.protocol.TransactionSignWeight.deserializeBinaryFromReader(msg, reader); +proto.protocol.BlockExtention.prototype.hasBlockHeader = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TransactionSignWeight} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionSignWeight} + * optional bytes blockid = 3; + * @return {!(string|Uint8Array)} */ -proto.protocol.TransactionSignWeight.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new core_Tron_pb.Permission; - reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); - msg.setPermission(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addApprovedList(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCurrentWeight(value); - break; - case 4: - var value = new proto.protocol.TransactionSignWeight.Result; - reader.readMessage(value,proto.protocol.TransactionSignWeight.Result.deserializeBinaryFromReader); - msg.setResult(value); - break; - case 5: - var value = new proto.protocol.TransactionExtention; - reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); - msg.setTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.protocol.BlockExtention.prototype.getBlockid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bytes blockid = 3; + * This is a type-conversion wrapper around `getBlockid()` + * @return {string} */ -proto.protocol.TransactionSignWeight.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionSignWeight.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.protocol.BlockExtention.prototype.getBlockid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockid())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionSignWeight} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes blockid = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockid()` + * @return {!Uint8Array} */ -proto.protocol.TransactionSignWeight.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPermission(); - if (f != null) { - writer.writeMessage( - 1, - f, - core_Tron_pb.Permission.serializeBinaryToWriter - ); - } - f = message.getApprovedListList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getCurrentWeight(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.protocol.TransactionSignWeight.Result.serializeBinaryToWriter - ); - } - f = message.getTransaction(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.protocol.TransactionExtention.serializeBinaryToWriter - ); - } +proto.protocol.BlockExtention.prototype.getBlockid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.BlockExtention.prototype.setBlockid = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -6425,13 +6339,20 @@ proto.protocol.TransactionSignWeight.serializeBinaryToWriter = function(message, * @extends {jspb.Message} * @constructor */ -proto.protocol.TransactionSignWeight.Result = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.protocol.BlockListExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockListExtention.repeatedFields_, null); }; -goog.inherits(proto.protocol.TransactionSignWeight.Result, jspb.Message); +goog.inherits(proto.protocol.BlockListExtention, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.TransactionSignWeight.Result.displayName = 'proto.protocol.TransactionSignWeight.Result'; + proto.protocol.BlockListExtention.displayName = 'proto.protocol.BlockListExtention'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.BlockListExtention.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -6445,8 +6366,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.TransactionSignWeight.Result.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionSignWeight.Result.toObject(opt_includeInstance, this); +proto.protocol.BlockListExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.BlockListExtention.toObject(opt_includeInstance, this); }; @@ -6455,14 +6376,14 @@ proto.protocol.TransactionSignWeight.Result.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionSignWeight.Result} msg The msg instance to transform. + * @param {!proto.protocol.BlockListExtention} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionSignWeight.Result.toObject = function(includeInstance, msg) { +proto.protocol.BlockListExtention.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, "") + blockList: jspb.Message.toObjectList(msg.getBlockList(), + proto.protocol.BlockExtention.toObject, includeInstance) }; if (includeInstance) { @@ -6476,23 +6397,23 @@ proto.protocol.TransactionSignWeight.Result.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionSignWeight.Result} + * @return {!proto.protocol.BlockListExtention} */ -proto.protocol.TransactionSignWeight.Result.deserializeBinary = function(bytes) { +proto.protocol.BlockListExtention.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionSignWeight.Result; - return proto.protocol.TransactionSignWeight.Result.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.BlockListExtention; + return proto.protocol.BlockListExtention.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.TransactionSignWeight.Result} msg The message object to deserialize into. + * @param {!proto.protocol.BlockListExtention} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionSignWeight.Result} + * @return {!proto.protocol.BlockListExtention} */ -proto.protocol.TransactionSignWeight.Result.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.BlockListExtention.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6500,12 +6421,9 @@ proto.protocol.TransactionSignWeight.Result.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.protocol.TransactionSignWeight.Result.response_code} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); + var value = new proto.protocol.BlockExtention; + reader.readMessage(value,proto.protocol.BlockExtention.deserializeBinaryFromReader); + msg.addBlock(value); break; default: reader.skipField(); @@ -6520,9 +6438,9 @@ proto.protocol.TransactionSignWeight.Result.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.TransactionSignWeight.Result.prototype.serializeBinary = function() { +proto.protocol.BlockListExtention.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionSignWeight.Result.serializeBinaryToWriter(this, writer); + proto.protocol.BlockListExtention.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6530,226 +6448,219 @@ proto.protocol.TransactionSignWeight.Result.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionSignWeight.Result} message + * @param {!proto.protocol.BlockListExtention} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionSignWeight.Result.serializeBinaryToWriter = function(message, writer) { +proto.protocol.BlockListExtention.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getMessage(); + f = message.getBlockList(); if (f.length > 0) { - writer.writeString( - 2, - f + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.BlockExtention.serializeBinaryToWriter ); } }; /** - * @enum {number} - */ -proto.protocol.TransactionSignWeight.Result.response_code = { - ENOUGH_PERMISSION: 0, - NOT_ENOUGH_PERMISSION: 1, - SIGNATURE_FORMAT_ERROR: 2, - COMPUTE_ADDRESS_ERROR: 3, - PERMISSION_ERROR: 4, - OTHER_ERROR: 20 -}; - -/** - * optional response_code code = 1; - * @return {!proto.protocol.TransactionSignWeight.Result.response_code} - */ -proto.protocol.TransactionSignWeight.Result.prototype.getCode = function() { - return /** @type {!proto.protocol.TransactionSignWeight.Result.response_code} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {!proto.protocol.TransactionSignWeight.Result.response_code} value */ -proto.protocol.TransactionSignWeight.Result.prototype.setCode = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} + * repeated BlockExtention block = 1; + * @return {!Array.} */ -proto.protocol.TransactionSignWeight.Result.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.protocol.BlockListExtention.prototype.getBlockList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.BlockExtention, 1)); }; -/** @param {string} value */ -proto.protocol.TransactionSignWeight.Result.prototype.setMessage = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {!Array.} value */ +proto.protocol.BlockListExtention.prototype.setBlockList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional Permission permission = 1; - * @return {?proto.protocol.Permission} + * @param {!proto.protocol.BlockExtention=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.BlockExtention} */ -proto.protocol.TransactionSignWeight.prototype.getPermission = function() { - return /** @type{?proto.protocol.Permission} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Permission, 1)); +proto.protocol.BlockListExtention.prototype.addBlock = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.BlockExtention, opt_index); }; -/** @param {?proto.protocol.Permission|undefined} value */ -proto.protocol.TransactionSignWeight.prototype.setPermission = function(value) { - jspb.Message.setWrapperField(this, 1, value); +proto.protocol.BlockListExtention.prototype.clearBlockList = function() { + this.setBlockList([]); }; -proto.protocol.TransactionSignWeight.prototype.clearPermission = function() { - this.setPermission(undefined); -}; - /** - * Returns whether this field is set. - * @return {!boolean} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.protocol.TransactionSignWeight.prototype.hasPermission = function() { - return jspb.Message.getField(this, 1) != null; +proto.protocol.TransactionListExtention = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionListExtention.repeatedFields_, null); }; - - +goog.inherits(proto.protocol.TransactionListExtention, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.TransactionListExtention.displayName = 'proto.protocol.TransactionListExtention'; +} /** - * repeated bytes approved_list = 2; - * @return {!(Array|Array)} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.protocol.TransactionSignWeight.prototype.getApprovedListList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; +proto.protocol.TransactionListExtention.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated bytes approved_list = 2; - * This is a type-conversion wrapper around `getApprovedListList()` - * @return {!Array.} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.protocol.TransactionSignWeight.prototype.getApprovedListList_asB64 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( - this.getApprovedListList())); +proto.protocol.TransactionListExtention.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.TransactionListExtention.toObject(opt_includeInstance, this); }; /** - * repeated bytes approved_list = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getApprovedListList()` - * @return {!Array.} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.TransactionListExtention} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionSignWeight.prototype.getApprovedListList_asU8 = function() { - return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( - this.getApprovedListList())); -}; - +proto.protocol.TransactionListExtention.toObject = function(includeInstance, msg) { + var f, obj = { + transactionList: jspb.Message.toObjectList(msg.getTransactionList(), + proto.protocol.TransactionExtention.toObject, includeInstance) + }; -/** @param {!(Array|Array)} value */ -proto.protocol.TransactionSignWeight.prototype.setApprovedListList = function(value) { - jspb.Message.setField(this, 2, value || []); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.TransactionListExtention} */ -proto.protocol.TransactionSignWeight.prototype.addApprovedList = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -proto.protocol.TransactionSignWeight.prototype.clearApprovedListList = function() { - this.setApprovedListList([]); +proto.protocol.TransactionListExtention.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.TransactionListExtention; + return proto.protocol.TransactionListExtention.deserializeBinaryFromReader(msg, reader); }; /** - * optional int64 current_weight = 3; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.TransactionListExtention} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.TransactionListExtention} */ -proto.protocol.TransactionSignWeight.prototype.getCurrentWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.protocol.TransactionSignWeight.prototype.setCurrentWeight = function(value) { - jspb.Message.setField(this, 3, value); +proto.protocol.TransactionListExtention.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.protocol.TransactionExtention; + reader.readMessage(value,proto.protocol.TransactionExtention.deserializeBinaryFromReader); + msg.addTransaction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional Result result = 4; - * @return {?proto.protocol.TransactionSignWeight.Result} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.protocol.TransactionSignWeight.prototype.getResult = function() { - return /** @type{?proto.protocol.TransactionSignWeight.Result} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TransactionSignWeight.Result, 4)); -}; - - -/** @param {?proto.protocol.TransactionSignWeight.Result|undefined} value */ -proto.protocol.TransactionSignWeight.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 4, value); -}; - - -proto.protocol.TransactionSignWeight.prototype.clearResult = function() { - this.setResult(undefined); +proto.protocol.TransactionListExtention.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.TransactionListExtention.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {!boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.TransactionListExtention} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.TransactionSignWeight.prototype.hasResult = function() { - return jspb.Message.getField(this, 4) != null; +proto.protocol.TransactionListExtention.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.protocol.TransactionExtention.serializeBinaryToWriter + ); + } }; /** - * optional TransactionExtention transaction = 5; - * @return {?proto.protocol.TransactionExtention} + * repeated TransactionExtention transaction = 1; + * @return {!Array.} */ -proto.protocol.TransactionSignWeight.prototype.getTransaction = function() { - return /** @type{?proto.protocol.TransactionExtention} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TransactionExtention, 5)); +proto.protocol.TransactionListExtention.prototype.getTransactionList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionExtention, 1)); }; -/** @param {?proto.protocol.TransactionExtention|undefined} value */ -proto.protocol.TransactionSignWeight.prototype.setTransaction = function(value) { - jspb.Message.setWrapperField(this, 5, value); +/** @param {!Array.} value */ +proto.protocol.TransactionListExtention.prototype.setTransactionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; -proto.protocol.TransactionSignWeight.prototype.clearTransaction = function() { - this.setTransaction(undefined); +/** + * @param {!proto.protocol.TransactionExtention=} opt_value + * @param {number=} opt_index + * @return {!proto.protocol.TransactionExtention} + */ +proto.protocol.TransactionListExtention.prototype.addTransaction = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.TransactionExtention, opt_index); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.TransactionSignWeight.prototype.hasTransaction = function() { - return jspb.Message.getField(this, 5) != null; +proto.protocol.TransactionListExtention.prototype.clearTransactionList = function() { + this.setTransactionList([]); }; diff --git a/src/protocol/core/Contract_pb.js b/src/protocol/core/Contract_pb.js index 11d6be9..d030b55 100644 --- a/src/protocol/core/Contract_pb.js +++ b/src/protocol/core/Contract_pb.js @@ -13,7 +13,6 @@ var global = Function('return this')(); var core_Tron_pb = require('../core/Tron_pb.js'); goog.exportSymbol('proto.protocol.AccountCreateContract', null, global); -goog.exportSymbol('proto.protocol.AccountPermissionUpdateContract', null, global); goog.exportSymbol('proto.protocol.AccountUpdateContract', null, global); goog.exportSymbol('proto.protocol.AssetIssueContract', null, global); goog.exportSymbol('proto.protocol.AssetIssueContract.FrozenSupply', null, global); @@ -26,9 +25,6 @@ goog.exportSymbol('proto.protocol.ExchangeTransactionContract', null, global); goog.exportSymbol('proto.protocol.ExchangeWithdrawContract', null, global); goog.exportSymbol('proto.protocol.FreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.ParticipateAssetIssueContract', null, global); -goog.exportSymbol('proto.protocol.PermissionAddKeyContract', null, global); -goog.exportSymbol('proto.protocol.PermissionDeleteKeyContract', null, global); -goog.exportSymbol('proto.protocol.PermissionUpdateKeyContract', null, global); goog.exportSymbol('proto.protocol.ProposalApproveContract', null, global); goog.exportSymbol('proto.protocol.ProposalCreateContract', null, global); goog.exportSymbol('proto.protocol.ProposalDeleteContract', null, global); @@ -41,6 +37,7 @@ goog.exportSymbol('proto.protocol.TriggerSmartContract', null, global); goog.exportSymbol('proto.protocol.UnfreezeAssetContract', null, global); goog.exportSymbol('proto.protocol.UnfreezeBalanceContract', null, global); goog.exportSymbol('proto.protocol.UpdateAssetContract', null, global); +goog.exportSymbol('proto.protocol.UpdateEnergyLimitContract', null, global); goog.exportSymbol('proto.protocol.UpdateSettingContract', null, global); goog.exportSymbol('proto.protocol.VoteAssetContract', null, global); goog.exportSymbol('proto.protocol.VoteWitnessContract', null, global); @@ -2245,6 +2242,250 @@ proto.protocol.UpdateSettingContract.prototype.setConsumeUserResourcePercent = f +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.UpdateEnergyLimitContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.UpdateEnergyLimitContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.UpdateEnergyLimitContract.displayName = 'proto.protocol.UpdateEnergyLimitContract'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.UpdateEnergyLimitContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.UpdateEnergyLimitContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.UpdateEnergyLimitContract.toObject = function(includeInstance, msg) { + var f, obj = { + ownerAddress: msg.getOwnerAddress_asB64(), + contractAddress: msg.getContractAddress_asB64(), + originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.UpdateEnergyLimitContract} + */ +proto.protocol.UpdateEnergyLimitContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.UpdateEnergyLimitContract; + return proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.UpdateEnergyLimitContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.UpdateEnergyLimitContract} + */ +proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnerAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOriginEnergyLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.UpdateEnergyLimitContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwnerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getContractAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getOriginEnergyLimit(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes owner_address = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes owner_address = 1; + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {string} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnerAddress())); +}; + + +/** + * optional bytes owner_address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnerAddress()` + * @return {!Uint8Array} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.UpdateEnergyLimitContract.prototype.setOwnerAddress = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes contract_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes contract_address = 2; + * This is a type-conversion wrapper around `getContractAddress()` + * @return {string} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractAddress())); +}; + + +/** + * optional bytes contract_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractAddress()` + * @return {!Uint8Array} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.UpdateEnergyLimitContract.prototype.setContractAddress = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 origin_energy_limit = 3; + * @return {number} + */ +proto.protocol.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2732,6 +2973,7 @@ proto.protocol.AssetIssueContract.prototype.toObject = function(opt_includeInsta */ proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) { var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 41, ""), ownerAddress: msg.getOwnerAddress_asB64(), name: msg.getName_asB64(), abbr: msg.getAbbr_asB64(), @@ -2739,6 +2981,7 @@ proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) { frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), proto.protocol.AssetIssueContract.FrozenSupply.toObject, includeInstance), trxNum: jspb.Message.getFieldWithDefault(msg, 6, 0), + precision: jspb.Message.getFieldWithDefault(msg, 7, 0), num: jspb.Message.getFieldWithDefault(msg, 8, 0), startTime: jspb.Message.getFieldWithDefault(msg, 9, 0), endTime: jspb.Message.getFieldWithDefault(msg, 10, 0), @@ -2786,6 +3029,10 @@ proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, re } var field = reader.getFieldNumber(); switch (field) { + case 41: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOwnerAddress(value); @@ -2811,6 +3058,10 @@ proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, re var value = /** @type {number} */ (reader.readInt32()); msg.setTrxNum(value); break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPrecision(value); + break; case 8: var value = /** @type {number} */ (reader.readInt32()); msg.setNum(value); @@ -2884,6 +3135,13 @@ proto.protocol.AssetIssueContract.prototype.serializeBinary = function() { */ proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 41, + f + ); + } f = message.getOwnerAddress_asU8(); if (f.length > 0) { writer.writeBytes( @@ -2927,6 +3185,13 @@ proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, wr f ); } + f = message.getPrecision(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } f = message.getNum(); if (f !== 0) { writer.writeInt32( @@ -3176,6 +3441,21 @@ proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenDays = functio }; +/** + * optional string id = 41; + * @return {string} + */ +proto.protocol.AssetIssueContract.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, "")); +}; + + +/** @param {string} value */ +proto.protocol.AssetIssueContract.prototype.setId = function(value) { + jspb.Message.setField(this, 41, value); +}; + + /** * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} @@ -3354,6 +3634,21 @@ proto.protocol.AssetIssueContract.prototype.setTrxNum = function(value) { }; +/** + * optional int32 precision = 7; + * @return {number} + */ +proto.protocol.AssetIssueContract.prototype.getPrecision = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.protocol.AssetIssueContract.prototype.setPrecision = function(value) { + jspb.Message.setField(this, 7, value); +}; + + /** * optional int32 num = 8; * @return {number} @@ -3912,7 +4207,8 @@ proto.protocol.FreezeBalanceContract.toObject = function(includeInstance, msg) { ownerAddress: msg.getOwnerAddress_asB64(), frozenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), frozenDuration: jspb.Message.getFieldWithDefault(msg, 3, 0), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0) + resource: jspb.Message.getFieldWithDefault(msg, 10, 0), + receiverAddress: msg.getReceiverAddress_asB64() }; if (includeInstance) { @@ -3965,6 +4261,10 @@ proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader = function(msg, var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); msg.setResource(value); break; + case 15: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReceiverAddress(value); + break; default: reader.skipField(); break; @@ -4022,6 +4322,13 @@ proto.protocol.FreezeBalanceContract.serializeBinaryToWriter = function(message, f ); } + f = message.getReceiverAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 15, + f + ); + } }; @@ -4109,10 +4416,49 @@ proto.protocol.FreezeBalanceContract.prototype.setResource = function(value) { }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a + * optional bytes receiver_address = 15; + * @return {!(string|Uint8Array)} + */ +proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * optional bytes receiver_address = 15; + * This is a type-conversion wrapper around `getReceiverAddress()` + * @return {string} + */ +proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReceiverAddress())); +}; + + +/** + * optional bytes receiver_address = 15; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReceiverAddress()` + * @return {!Uint8Array} + */ +proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReceiverAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.FreezeBalanceContract.prototype.setReceiverAddress = function(value) { + jspb.Message.setField(this, 15, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still @@ -4157,7 +4503,8 @@ proto.protocol.UnfreezeBalanceContract.prototype.toObject = function(opt_include proto.protocol.UnfreezeBalanceContract.toObject = function(includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0) + resource: jspb.Message.getFieldWithDefault(msg, 10, 0), + receiverAddress: msg.getReceiverAddress_asB64() }; if (includeInstance) { @@ -4202,6 +4549,10 @@ proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader = function(ms var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); msg.setResource(value); break; + case 15: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReceiverAddress(value); + break; default: reader.skipField(); break; @@ -4245,6 +4596,13 @@ proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter = function(messag f ); } + f = message.getReceiverAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 15, + f + ); + } }; @@ -4302,6 +4660,45 @@ proto.protocol.UnfreezeBalanceContract.prototype.setResource = function(value) { }; +/** + * optional bytes receiver_address = 15; + * @return {!(string|Uint8Array)} + */ +proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * optional bytes receiver_address = 15; + * This is a type-conversion wrapper around `getReceiverAddress()` + * @return {string} + */ +proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReceiverAddress())); +}; + + +/** + * optional bytes receiver_address = 15; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReceiverAddress()` + * @return {!Uint8Array} + */ +proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReceiverAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.UnfreezeBalanceContract.prototype.setReceiverAddress = function(value) { + jspb.Message.setField(this, 15, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -5614,7 +6011,9 @@ proto.protocol.CreateSmartContract.prototype.toObject = function(opt_includeInst proto.protocol.CreateSmartContract.toObject = function(includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), - newContract: (f = msg.getNewContract()) && core_Tron_pb.SmartContract.toObject(includeInstance, f) + newContract: (f = msg.getNewContract()) && core_Tron_pb.SmartContract.toObject(includeInstance, f), + callTokenValue: jspb.Message.getFieldWithDefault(msg, 3, 0), + tokenId: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -5660,6 +6059,14 @@ proto.protocol.CreateSmartContract.deserializeBinaryFromReader = function(msg, r reader.readMessage(value,core_Tron_pb.SmartContract.deserializeBinaryFromReader); msg.setNewContract(value); break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCallTokenValue(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTokenId(value); + break; default: reader.skipField(); break; @@ -5704,6 +6111,20 @@ proto.protocol.CreateSmartContract.serializeBinaryToWriter = function(message, w core_Tron_pb.SmartContract.serializeBinaryToWriter ); } + f = message.getCallTokenValue(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTokenId(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } }; @@ -5776,6 +6197,36 @@ proto.protocol.CreateSmartContract.prototype.hasNewContract = function() { }; +/** + * optional int64 call_token_value = 3; + * @return {number} + */ +proto.protocol.CreateSmartContract.prototype.getCallTokenValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.protocol.CreateSmartContract.prototype.setCallTokenValue = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 token_id = 4; + * @return {number} + */ +proto.protocol.CreateSmartContract.prototype.getTokenId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.CreateSmartContract.prototype.setTokenId = function(value) { + jspb.Message.setField(this, 4, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -5826,7 +6277,9 @@ proto.protocol.TriggerSmartContract.toObject = function(includeInstance, msg) { ownerAddress: msg.getOwnerAddress_asB64(), contractAddress: msg.getContractAddress_asB64(), callValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - data: msg.getData_asB64() + data: msg.getData_asB64(), + callTokenValue: jspb.Message.getFieldWithDefault(msg, 5, 0), + tokenId: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -5879,6 +6332,14 @@ proto.protocol.TriggerSmartContract.deserializeBinaryFromReader = function(msg, var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setData(value); break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCallTokenValue(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTokenId(value); + break; default: reader.skipField(); break; @@ -5936,6 +6397,20 @@ proto.protocol.TriggerSmartContract.serializeBinaryToWriter = function(message, f ); } + f = message.getCallTokenValue(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTokenId(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } }; @@ -6071,6 +6546,36 @@ proto.protocol.TriggerSmartContract.prototype.setData = function(value) { }; +/** + * optional int64 call_token_value = 5; + * @return {number} + */ +proto.protocol.TriggerSmartContract.prototype.getCallTokenValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TriggerSmartContract.prototype.setCallTokenValue = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int64 token_id = 6; + * @return {number} + */ +proto.protocol.TriggerSmartContract.prototype.getTokenId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TriggerSmartContract.prototype.setTokenId = function(value) { + jspb.Message.setField(this, 6, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -7812,943 +8317,6 @@ proto.protocol.ExchangeTransactionContract.prototype.setExpected = function(valu }; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountPermissionUpdateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AccountPermissionUpdateContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.AccountPermissionUpdateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.AccountPermissionUpdateContract.displayName = 'proto.protocol.AccountPermissionUpdateContract'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.AccountPermissionUpdateContract.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountPermissionUpdateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountPermissionUpdateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountPermissionUpdateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - core_Tron_pb.Permission.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountPermissionUpdateContract} - */ -proto.protocol.AccountPermissionUpdateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountPermissionUpdateContract; - return proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountPermissionUpdateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountPermissionUpdateContract} - */ -proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new core_Tron_pb.Permission; - reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); - msg.addPermissions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountPermissionUpdateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPermissionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - core_Tron_pb.Permission.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.AccountPermissionUpdateContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * repeated Permission permissions = 2; - * @return {!Array.} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getPermissionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Permission, 2)); -}; - - -/** @param {!Array.} value */ -proto.protocol.AccountPermissionUpdateContract.prototype.setPermissionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.Permission=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Permission} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Permission, opt_index); -}; - - -proto.protocol.AccountPermissionUpdateContract.prototype.clearPermissionsList = function() { - this.setPermissionsList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.PermissionAddKeyContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PermissionAddKeyContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.PermissionAddKeyContract.displayName = 'proto.protocol.PermissionAddKeyContract'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PermissionAddKeyContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PermissionAddKeyContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PermissionAddKeyContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionAddKeyContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - key: (f = msg.getKey()) && core_Tron_pb.Key.toObject(includeInstance, f), - permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.PermissionAddKeyContract} - */ -proto.protocol.PermissionAddKeyContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PermissionAddKeyContract; - return proto.protocol.PermissionAddKeyContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PermissionAddKeyContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PermissionAddKeyContract} - */ -proto.protocol.PermissionAddKeyContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new core_Tron_pb.Key; - reader.readMessage(value,core_Tron_pb.Key.deserializeBinaryFromReader); - msg.setKey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPermissionName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PermissionAddKeyContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PermissionAddKeyContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.PermissionAddKeyContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionAddKeyContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKey(); - if (f != null) { - writer.writeMessage( - 2, - f, - core_Tron_pb.Key.serializeBinaryToWriter - ); - } - f = message.getPermissionName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PermissionAddKeyContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.PermissionAddKeyContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional Key key = 2; - * @return {?proto.protocol.Key} - */ -proto.protocol.PermissionAddKeyContract.prototype.getKey = function() { - return /** @type{?proto.protocol.Key} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Key, 2)); -}; - - -/** @param {?proto.protocol.Key|undefined} value */ -proto.protocol.PermissionAddKeyContract.prototype.setKey = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.protocol.PermissionAddKeyContract.prototype.clearKey = function() { - this.setKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.PermissionAddKeyContract.prototype.hasKey = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string permission_name = 3; - * @return {string} - */ -proto.protocol.PermissionAddKeyContract.prototype.getPermissionName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.protocol.PermissionAddKeyContract.prototype.setPermissionName = function(value) { - jspb.Message.setField(this, 3, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.PermissionUpdateKeyContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PermissionUpdateKeyContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.PermissionUpdateKeyContract.displayName = 'proto.protocol.PermissionUpdateKeyContract'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PermissionUpdateKeyContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PermissionUpdateKeyContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionUpdateKeyContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - key: (f = msg.getKey()) && core_Tron_pb.Key.toObject(includeInstance, f), - permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.PermissionUpdateKeyContract} - */ -proto.protocol.PermissionUpdateKeyContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PermissionUpdateKeyContract; - return proto.protocol.PermissionUpdateKeyContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PermissionUpdateKeyContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PermissionUpdateKeyContract} - */ -proto.protocol.PermissionUpdateKeyContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new core_Tron_pb.Key; - reader.readMessage(value,core_Tron_pb.Key.deserializeBinaryFromReader); - msg.setKey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPermissionName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PermissionUpdateKeyContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.PermissionUpdateKeyContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionUpdateKeyContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKey(); - if (f != null) { - writer.writeMessage( - 2, - f, - core_Tron_pb.Key.serializeBinaryToWriter - ); - } - f = message.getPermissionName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.PermissionUpdateKeyContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional Key key = 2; - * @return {?proto.protocol.Key} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getKey = function() { - return /** @type{?proto.protocol.Key} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Key, 2)); -}; - - -/** @param {?proto.protocol.Key|undefined} value */ -proto.protocol.PermissionUpdateKeyContract.prototype.setKey = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.protocol.PermissionUpdateKeyContract.prototype.clearKey = function() { - this.setKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.hasKey = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string permission_name = 3; - * @return {string} - */ -proto.protocol.PermissionUpdateKeyContract.prototype.getPermissionName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.protocol.PermissionUpdateKeyContract.prototype.setPermissionName = function(value) { - jspb.Message.setField(this, 3, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.PermissionDeleteKeyContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PermissionDeleteKeyContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.PermissionDeleteKeyContract.displayName = 'proto.protocol.PermissionDeleteKeyContract'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PermissionDeleteKeyContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PermissionDeleteKeyContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionDeleteKeyContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - keyAddress: msg.getKeyAddress_asB64(), - permissionName: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.PermissionDeleteKeyContract} - */ -proto.protocol.PermissionDeleteKeyContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PermissionDeleteKeyContract; - return proto.protocol.PermissionDeleteKeyContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PermissionDeleteKeyContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PermissionDeleteKeyContract} - */ -proto.protocol.PermissionDeleteKeyContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKeyAddress(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPermissionName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PermissionDeleteKeyContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.PermissionDeleteKeyContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PermissionDeleteKeyContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKeyAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPermissionName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.PermissionDeleteKeyContract.prototype.setOwnerAddress = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional bytes key_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes key_address = 2; - * This is a type-conversion wrapper around `getKeyAddress()` - * @return {string} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKeyAddress())); -}; - - -/** - * optional bytes key_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeyAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getKeyAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKeyAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.protocol.PermissionDeleteKeyContract.prototype.setKeyAddress = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional string permission_name = 3; - * @return {string} - */ -proto.protocol.PermissionDeleteKeyContract.prototype.getPermissionName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.protocol.PermissionDeleteKeyContract.prototype.setPermissionName = function(value) { - jspb.Message.setField(this, 3, value); -}; - - /** * @enum {number} */ diff --git a/src/protocol/core/Tron_pb.js b/src/protocol/core/Tron_pb.js index 6425585..c5be60b 100644 --- a/src/protocol/core/Tron_pb.js +++ b/src/protocol/core/Tron_pb.js @@ -28,6 +28,8 @@ goog.exportSymbol('proto.protocol.ChainInventory', null, global); goog.exportSymbol('proto.protocol.ChainInventory.BlockId', null, global); goog.exportSymbol('proto.protocol.ChainParameters', null, global); goog.exportSymbol('proto.protocol.ChainParameters.ChainParameter', null, global); +goog.exportSymbol('proto.protocol.DelegatedResource', null, global); +goog.exportSymbol('proto.protocol.DelegatedResourceAccountIndex', null, global); goog.exportSymbol('proto.protocol.DisconnectMessage', null, global); goog.exportSymbol('proto.protocol.DynamicProperties', null, global); goog.exportSymbol('proto.protocol.Exchange', null, global); @@ -39,8 +41,6 @@ goog.exportSymbol('proto.protocol.Inventory', null, global); goog.exportSymbol('proto.protocol.Inventory.InventoryType', null, global); goog.exportSymbol('proto.protocol.Items', null, global); goog.exportSymbol('proto.protocol.Items.ItemType', null, global); -goog.exportSymbol('proto.protocol.Key', null, global); -goog.exportSymbol('proto.protocol.Permission', null, global); goog.exportSymbol('proto.protocol.Proposal', null, global); goog.exportSymbol('proto.protocol.Proposal.State', null, global); goog.exportSymbol('proto.protocol.ReasonCode', null, global); @@ -71,6 +71,7 @@ goog.exportSymbol('proto.protocol.Vote', null, global); goog.exportSymbol('proto.protocol.Votes', null, global); goog.exportSymbol('proto.protocol.Witness', null, global); goog.exportSymbol('proto.protocol.authority', null, global); +goog.exportSymbol('proto.protocol.permission', null, global); /** * Generated by JsPbCodeGenerator. @@ -1602,7 +1603,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.protocol.Account.repeatedFields_ = [5,7,16,31]; +proto.protocol.Account.repeatedFields_ = [5,7,16]; @@ -1640,9 +1641,12 @@ proto.protocol.Account.toObject = function(includeInstance, msg) { votesList: jspb.Message.toObjectList(msg.getVotesList(), proto.protocol.Vote.toObject, includeInstance), assetMap: (f = msg.getAssetMap()) ? f.toObject(includeInstance, undefined) : [], + assetv2Map: (f = msg.getAssetv2Map()) ? f.toObject(includeInstance, undefined) : [], frozenList: jspb.Message.toObjectList(msg.getFrozenList(), proto.protocol.Account.Frozen.toObject, includeInstance), netUsage: jspb.Message.getFieldWithDefault(msg, 8, 0), + acquiredDelegatedFrozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 41, 0), + delegatedFrozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 42, 0), createTime: jspb.Message.getFieldWithDefault(msg, 9, 0), latestOprationTime: jspb.Message.getFieldWithDefault(msg, 10, 0), allowance: jspb.Message.getFieldWithDefault(msg, 11, 0), @@ -1653,16 +1657,17 @@ proto.protocol.Account.toObject = function(includeInstance, msg) { frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), proto.protocol.Account.Frozen.toObject, includeInstance), assetIssuedName: msg.getAssetIssuedName_asB64(), + assetIssuedId: msg.getAssetIssuedId_asB64(), latestAssetOperationTimeMap: (f = msg.getLatestAssetOperationTimeMap()) ? f.toObject(includeInstance, undefined) : [], + latestAssetOperationTimev2Map: (f = msg.getLatestAssetOperationTimev2Map()) ? f.toObject(includeInstance, undefined) : [], freeNetUsage: jspb.Message.getFieldWithDefault(msg, 19, 0), freeAssetNetUsageMap: (f = msg.getFreeAssetNetUsageMap()) ? f.toObject(includeInstance, undefined) : [], + freeAssetNetUsagev2Map: (f = msg.getFreeAssetNetUsagev2Map()) ? f.toObject(includeInstance, undefined) : [], latestConsumeTime: jspb.Message.getFieldWithDefault(msg, 21, 0), latestConsumeFreeTime: jspb.Message.getFieldWithDefault(msg, 22, 0), accountId: msg.getAccountId_asB64(), accountResource: (f = msg.getAccountResource()) && proto.protocol.Account.AccountResource.toObject(includeInstance, f), - codehash: msg.getCodehash_asB64(), - permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - proto.protocol.Permission.toObject, includeInstance) + codehash: msg.getCodehash_asB64() }; if (includeInstance) { @@ -1726,6 +1731,12 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; + case 56: + var value = msg.getAssetv2Map(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; case 7: var value = new proto.protocol.Account.Frozen; reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); @@ -1735,6 +1746,14 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readInt64()); msg.setNetUsage(value); break; + case 41: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAcquiredDelegatedFrozenBalanceForBandwidth(value); + break; + case 42: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDelegatedFrozenBalanceForBandwidth(value); + break; case 9: var value = /** @type {number} */ (reader.readInt64()); msg.setCreateTime(value); @@ -1772,12 +1791,22 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAssetIssuedName(value); break; + case 57: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAssetIssuedId(value); + break; case 18: var value = msg.getLatestAssetOperationTimeMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; + case 58: + var value = msg.getLatestAssetOperationTimev2Map(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; case 19: var value = /** @type {number} */ (reader.readInt64()); msg.setFreeNetUsage(value); @@ -1788,6 +1817,12 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); }); break; + case 59: + var value = msg.getFreeAssetNetUsagev2Map(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; case 21: var value = /** @type {number} */ (reader.readInt64()); msg.setLatestConsumeTime(value); @@ -1809,11 +1844,6 @@ proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setCodehash(value); break; - case 31: - var value = new proto.protocol.Permission; - reader.readMessage(value,proto.protocol.Permission.deserializeBinaryFromReader); - msg.addPermissions(value); - break; default: reader.skipField(); break; @@ -1883,6 +1913,10 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { if (f && f.getLength() > 0) { f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } + f = message.getAssetv2Map(true); + if (f && f.getLength() > 0) { + f.serializeBinary(56, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } f = message.getFrozenList(); if (f.length > 0) { writer.writeRepeatedMessage( @@ -1898,6 +1932,20 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getAcquiredDelegatedFrozenBalanceForBandwidth(); + if (f !== 0) { + writer.writeInt64( + 41, + f + ); + } + f = message.getDelegatedFrozenBalanceForBandwidth(); + if (f !== 0) { + writer.writeInt64( + 42, + f + ); + } f = message.getCreateTime(); if (f !== 0) { writer.writeInt64( @@ -1962,10 +2010,21 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getAssetIssuedId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 57, + f + ); + } f = message.getLatestAssetOperationTimeMap(true); if (f && f.getLength() > 0) { f.serializeBinary(18, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } + f = message.getLatestAssetOperationTimev2Map(true); + if (f && f.getLength() > 0) { + f.serializeBinary(58, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } f = message.getFreeNetUsage(); if (f !== 0) { writer.writeInt64( @@ -1977,6 +2036,10 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { if (f && f.getLength() > 0) { f.serializeBinary(20, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } + f = message.getFreeAssetNetUsagev2Map(true); + if (f && f.getLength() > 0) { + f.serializeBinary(59, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } f = message.getLatestConsumeTime(); if (f !== 0) { writer.writeInt64( @@ -2013,14 +2076,6 @@ proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getPermissionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 31, - f, - proto.protocol.Permission.serializeBinaryToWriter - ); - } }; @@ -2243,6 +2298,8 @@ proto.protocol.Account.AccountResource.toObject = function(includeInstance, msg) energyUsage: jspb.Message.getFieldWithDefault(msg, 1, 0), frozenBalanceForEnergy: (f = msg.getFrozenBalanceForEnergy()) && proto.protocol.Account.Frozen.toObject(includeInstance, f), latestConsumeTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 3, 0), + acquiredDelegatedFrozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 4, 0), + delegatedFrozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 5, 0), storageLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), storageUsage: jspb.Message.getFieldWithDefault(msg, 7, 0), latestExchangeStorageTime: jspb.Message.getFieldWithDefault(msg, 8, 0) @@ -2295,6 +2352,14 @@ proto.protocol.Account.AccountResource.deserializeBinaryFromReader = function(ms var value = /** @type {number} */ (reader.readInt64()); msg.setLatestConsumeTimeForEnergy(value); break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAcquiredDelegatedFrozenBalanceForEnergy(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDelegatedFrozenBalanceForEnergy(value); + break; case 6: var value = /** @type {number} */ (reader.readInt64()); msg.setStorageLimit(value); @@ -2358,6 +2423,20 @@ proto.protocol.Account.AccountResource.serializeBinaryToWriter = function(messag f ); } + f = message.getAcquiredDelegatedFrozenBalanceForEnergy(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getDelegatedFrozenBalanceForEnergy(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } f = message.getStorageLimit(); if (f !== 0) { writer.writeInt64( @@ -2442,6 +2521,36 @@ proto.protocol.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy = }; +/** + * optional int64 acquired_delegated_frozen_balance_for_energy = 4; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 delegated_frozen_balance_for_energy = 5; + * @return {number} + */ +proto.protocol.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy = function(value) { + jspb.Message.setField(this, 5, value); +}; + + /** * optional int64 storage_limit = 6; * @return {number} @@ -2644,6 +2753,24 @@ proto.protocol.Account.prototype.clearAssetMap = function() { }; +/** + * map assetV2 = 56; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getAssetv2Map = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 56, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearAssetv2Map = function() { + this.getAssetv2Map().clear(); +}; + + /** * repeated Frozen frozen = 7; * @return {!Array.} @@ -2690,6 +2817,36 @@ proto.protocol.Account.prototype.setNetUsage = function(value) { }; +/** + * optional int64 acquired_delegated_frozen_balance_for_bandwidth = 41; + * @return {number} + */ +proto.protocol.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 41, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth = function(value) { + jspb.Message.setField(this, 41, value); +}; + + +/** + * optional int64 delegated_frozen_balance_for_bandwidth = 42; + * @return {number} + */ +proto.protocol.Account.prototype.getDelegatedFrozenBalanceForBandwidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 42, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Account.prototype.setDelegatedFrozenBalanceForBandwidth = function(value) { + jspb.Message.setField(this, 42, value); +}; + + /** * optional int64 create_time = 9; * @return {number} @@ -2893,6 +3050,45 @@ proto.protocol.Account.prototype.setAssetIssuedName = function(value) { }; +/** + * optional bytes asset_issued_ID = 57; + * @return {!(string|Uint8Array)} + */ +proto.protocol.Account.prototype.getAssetIssuedId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 57, "")); +}; + + +/** + * optional bytes asset_issued_ID = 57; + * This is a type-conversion wrapper around `getAssetIssuedId()` + * @return {string} + */ +proto.protocol.Account.prototype.getAssetIssuedId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAssetIssuedId())); +}; + + +/** + * optional bytes asset_issued_ID = 57; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAssetIssuedId()` + * @return {!Uint8Array} + */ +proto.protocol.Account.prototype.getAssetIssuedId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAssetIssuedId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.Account.prototype.setAssetIssuedId = function(value) { + jspb.Message.setField(this, 57, value); +}; + + /** * map latest_asset_operation_time = 18; * @param {boolean=} opt_noLazyCreate Do not create the map if @@ -2911,6 +3107,24 @@ proto.protocol.Account.prototype.clearLatestAssetOperationTimeMap = function() { }; +/** + * map latest_asset_operation_timeV2 = 58; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getLatestAssetOperationTimev2Map = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 58, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearLatestAssetOperationTimev2Map = function() { + this.getLatestAssetOperationTimev2Map().clear(); +}; + + /** * optional int64 free_net_usage = 19; * @return {number} @@ -2944,6 +3158,24 @@ proto.protocol.Account.prototype.clearFreeAssetNetUsageMap = function() { }; +/** + * map free_asset_net_usageV2 = 59; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.protocol.Account.prototype.getFreeAssetNetUsagev2Map = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 59, opt_noLazyCreate, + null)); +}; + + +proto.protocol.Account.prototype.clearFreeAssetNetUsagev2Map = function() { + this.getFreeAssetNetUsagev2Map().clear(); +}; + + /** * optional int64 latest_consume_time = 21; * @return {number} @@ -3082,37 +3314,6 @@ proto.protocol.Account.prototype.setCodehash = function(value) { }; -/** - * repeated Permission permissions = 31; - * @return {!Array.} - */ -proto.protocol.Account.prototype.getPermissionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Permission, 31)); -}; - - -/** @param {!Array.} value */ -proto.protocol.Account.prototype.setPermissionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 31, value); -}; - - -/** - * @param {!proto.protocol.Permission=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Permission} - */ -proto.protocol.Account.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 31, opt_value, proto.protocol.Permission, opt_index); -}; - - -proto.protocol.Account.prototype.clearPermissionsList = function() { - this.setPermissionsList([]); -}; - - /** * Generated by JsPbCodeGenerator. @@ -3124,12 +3325,12 @@ proto.protocol.Account.prototype.clearPermissionsList = function() { * @extends {jspb.Message} * @constructor */ -proto.protocol.Key = function(opt_data) { +proto.protocol.DelegatedResource = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Key, jspb.Message); +goog.inherits(proto.protocol.DelegatedResource, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Key.displayName = 'proto.protocol.Key'; + proto.protocol.DelegatedResource.displayName = 'proto.protocol.DelegatedResource'; } @@ -3144,8 +3345,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Key.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Key.toObject(opt_includeInstance, this); +proto.protocol.DelegatedResource.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DelegatedResource.toObject(opt_includeInstance, this); }; @@ -3154,14 +3355,18 @@ proto.protocol.Key.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Key} msg The msg instance to transform. + * @param {!proto.protocol.DelegatedResource} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Key.toObject = function(includeInstance, msg) { +proto.protocol.DelegatedResource.toObject = function(includeInstance, msg) { var f, obj = { - address: msg.getAddress_asB64(), - weight: jspb.Message.getFieldWithDefault(msg, 2, 0) + from: msg.getFrom_asB64(), + to: msg.getTo_asB64(), + frozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 3, 0), + frozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 4, 0), + expireTimeForBandwidth: jspb.Message.getFieldWithDefault(msg, 5, 0), + expireTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -3175,23 +3380,23 @@ proto.protocol.Key.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Key} + * @return {!proto.protocol.DelegatedResource} */ -proto.protocol.Key.deserializeBinary = function(bytes) { +proto.protocol.DelegatedResource.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Key; - return proto.protocol.Key.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.DelegatedResource; + return proto.protocol.DelegatedResource.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Key} msg The message object to deserialize into. + * @param {!proto.protocol.DelegatedResource} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Key} + * @return {!proto.protocol.DelegatedResource} */ -proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.DelegatedResource.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3200,11 +3405,27 @@ proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); + msg.setFrom(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTo(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFrozenBalanceForBandwidth(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFrozenBalanceForEnergy(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpireTimeForBandwidth(value); + break; + case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setWeight(value); + msg.setExpireTimeForEnergy(value); break; default: reader.skipField(); @@ -3219,9 +3440,9 @@ proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Key.prototype.serializeBinary = function() { +proto.protocol.DelegatedResource.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Key.serializeBinaryToWriter(this, writer); + proto.protocol.DelegatedResource.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3229,23 +3450,51 @@ proto.protocol.Key.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Key} message + * @param {!proto.protocol.DelegatedResource} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Key.serializeBinaryToWriter = function(message, writer) { +proto.protocol.DelegatedResource.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress_asU8(); + f = message.getFrom_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getWeight(); + f = message.getTo_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getFrozenBalanceForBandwidth(); if (f !== 0) { writer.writeInt64( - 2, + 3, + f + ); + } + f = message.getFrozenBalanceForEnergy(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getExpireTimeForBandwidth(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getExpireTimeForEnergy(); + if (f !== 0) { + writer.writeInt64( + 6, f ); } @@ -3253,305 +3502,140 @@ proto.protocol.Key.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes address = 1; + * optional bytes from = 1; * @return {!(string|Uint8Array)} */ -proto.protocol.Key.prototype.getAddress = function() { +proto.protocol.DelegatedResource.prototype.getFrom = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` + * optional bytes from = 1; + * This is a type-conversion wrapper around `getFrom()` * @return {string} */ -proto.protocol.Key.prototype.getAddress_asB64 = function() { +proto.protocol.DelegatedResource.prototype.getFrom_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); + this.getFrom())); }; /** - * optional bytes address = 1; + * optional bytes from = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` + * This is a type-conversion wrapper around `getFrom()` * @return {!Uint8Array} */ -proto.protocol.Key.prototype.getAddress_asU8 = function() { +proto.protocol.DelegatedResource.prototype.getFrom_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); + this.getFrom())); }; /** @param {!(string|Uint8Array)} value */ -proto.protocol.Key.prototype.setAddress = function(value) { +proto.protocol.DelegatedResource.prototype.setFrom = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 weight = 2; - * @return {number} + * optional bytes to = 2; + * @return {!(string|Uint8Array)} */ -proto.protocol.Key.prototype.getWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.DelegatedResource.prototype.getTo = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.protocol.Key.prototype.setWeight = function(value) { - jspb.Message.setField(this, 2, value); +/** + * optional bytes to = 2; + * This is a type-conversion wrapper around `getTo()` + * @return {string} + */ +proto.protocol.DelegatedResource.prototype.getTo_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTo())); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Permission = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Permission.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Permission, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.protocol.Permission.displayName = 'proto.protocol.Permission'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Permission.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Permission.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Permission.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Permission} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Permission.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - threshold: jspb.Message.getFieldWithDefault(msg, 2, 0), - parent: jspb.Message.getFieldWithDefault(msg, 3, ""), - keysList: jspb.Message.toObjectList(msg.getKeysList(), - proto.protocol.Key.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Permission} - */ -proto.protocol.Permission.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Permission; - return proto.protocol.Permission.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Permission} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Permission} - */ -proto.protocol.Permission.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setThreshold(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setParent(value); - break; - case 4: - var value = new proto.protocol.Key; - reader.readMessage(value,proto.protocol.Key.deserializeBinaryFromReader); - msg.addKeys(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes to = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTo()` * @return {!Uint8Array} */ -proto.protocol.Permission.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Permission.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Permission} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Permission.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getThreshold(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getParent(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getKeysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.protocol.Key.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.protocol.Permission.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.protocol.DelegatedResource.prototype.getTo_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTo())); }; -/** @param {string} value */ -proto.protocol.Permission.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {!(string|Uint8Array)} value */ +proto.protocol.DelegatedResource.prototype.setTo = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int64 threshold = 2; + * optional int64 frozen_balance_for_bandwidth = 3; * @return {number} */ -proto.protocol.Permission.prototype.getThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.protocol.DelegatedResource.prototype.getFrozenBalanceForBandwidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.protocol.Permission.prototype.setThreshold = function(value) { - jspb.Message.setField(this, 2, value); +proto.protocol.DelegatedResource.prototype.setFrozenBalanceForBandwidth = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional string parent = 3; - * @return {string} + * optional int64 frozen_balance_for_energy = 4; + * @return {number} */ -proto.protocol.Permission.prototype.getParent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.protocol.DelegatedResource.prototype.getFrozenBalanceForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** @param {string} value */ -proto.protocol.Permission.prototype.setParent = function(value) { - jspb.Message.setField(this, 3, value); +/** @param {number} value */ +proto.protocol.DelegatedResource.prototype.setFrozenBalanceForEnergy = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * repeated Key keys = 4; - * @return {!Array.} + * optional int64 expire_time_for_bandwidth = 5; + * @return {number} */ -proto.protocol.Permission.prototype.getKeysList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Key, 4)); +proto.protocol.DelegatedResource.prototype.getExpireTimeForBandwidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {!Array.} value */ -proto.protocol.Permission.prototype.setKeysList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); +/** @param {number} value */ +proto.protocol.DelegatedResource.prototype.setExpireTimeForBandwidth = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * @param {!proto.protocol.Key=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Key} + * optional int64 expire_time_for_energy = 6; + * @return {number} */ -proto.protocol.Permission.prototype.addKeys = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.protocol.Key, opt_index); +proto.protocol.DelegatedResource.prototype.getExpireTimeForEnergy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -proto.protocol.Permission.prototype.clearKeysList = function() { - this.setKeysList([]); +/** @param {number} value */ +proto.protocol.DelegatedResource.prototype.setExpireTimeForEnergy = function(value) { + jspb.Message.setField(this, 6, value); }; @@ -3776,12 +3860,12 @@ proto.protocol.authority.prototype.setPermissionName = function(value) { * @extends {jspb.Message} * @constructor */ -proto.protocol.Witness = function(opt_data) { +proto.protocol.permission = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.protocol.Witness, jspb.Message); +goog.inherits(proto.protocol.permission, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.protocol.Witness.displayName = 'proto.protocol.Witness'; + proto.protocol.permission.displayName = 'proto.protocol.permission'; } @@ -3796,8 +3880,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Witness.toObject(opt_includeInstance, this); +proto.protocol.permission.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.permission.toObject(opt_includeInstance, this); }; @@ -3806,21 +3890,13 @@ proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.protocol.Witness} msg The msg instance to transform. + * @param {!proto.protocol.permission} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Witness.toObject = function(includeInstance, msg) { +proto.protocol.permission.toObject = function(includeInstance, msg) { var f, obj = { - address: msg.getAddress_asB64(), - votecount: jspb.Message.getFieldWithDefault(msg, 2, 0), - pubkey: msg.getPubkey_asB64(), - url: jspb.Message.getFieldWithDefault(msg, 4, ""), - totalproduced: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalmissed: jspb.Message.getFieldWithDefault(msg, 6, 0), - latestblocknum: jspb.Message.getFieldWithDefault(msg, 7, 0), - latestslotnum: jspb.Message.getFieldWithDefault(msg, 8, 0), - isjobs: jspb.Message.getFieldWithDefault(msg, 9, false) + account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f) }; if (includeInstance) { @@ -3834,23 +3910,23 @@ proto.protocol.Witness.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Witness} + * @return {!proto.protocol.permission} */ -proto.protocol.Witness.deserializeBinary = function(bytes) { +proto.protocol.permission.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Witness; - return proto.protocol.Witness.deserializeBinaryFromReader(msg, reader); + var msg = new proto.protocol.permission; + return proto.protocol.permission.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.protocol.Witness} msg The message object to deserialize into. + * @param {!proto.protocol.permission} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Witness} + * @return {!proto.protocol.permission} */ -proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { +proto.protocol.permission.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3858,40 +3934,9 @@ proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVotecount(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalproduced(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalmissed(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestblocknum(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestslotnum(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsjobs(value); + var value = new proto.protocol.AccountId; + reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); + msg.setAccount(value); break; default: reader.skipField(); @@ -3906,9 +3951,9 @@ proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.protocol.Witness.prototype.serializeBinary = function() { +proto.protocol.permission.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.protocol.Witness.serializeBinaryToWriter(this, writer); + proto.protocol.permission.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3916,39 +3961,237 @@ proto.protocol.Witness.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Witness} message + * @param {!proto.protocol.permission} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.protocol.Witness.serializeBinaryToWriter = function(message, writer) { +proto.protocol.permission.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getAccount(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getVotecount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f + f, + proto.protocol.AccountId.serializeBinaryToWriter ); } - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); +}; + + +/** + * optional AccountId account = 1; + * @return {?proto.protocol.AccountId} + */ +proto.protocol.permission.prototype.getAccount = function() { + return /** @type{?proto.protocol.AccountId} */ ( + jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); +}; + + +/** @param {?proto.protocol.AccountId|undefined} value */ +proto.protocol.permission.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.protocol.permission.prototype.clearAccount = function() { + this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.protocol.permission.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.Witness = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.protocol.Witness, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.Witness.displayName = 'proto.protocol.Witness'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.Witness.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.Witness} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Witness.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + votecount: jspb.Message.getFieldWithDefault(msg, 2, 0), + pubkey: msg.getPubkey_asB64(), + url: jspb.Message.getFieldWithDefault(msg, 4, ""), + totalproduced: jspb.Message.getFieldWithDefault(msg, 5, 0), + totalmissed: jspb.Message.getFieldWithDefault(msg, 6, 0), + latestblocknum: jspb.Message.getFieldWithDefault(msg, 7, 0), + latestslotnum: jspb.Message.getFieldWithDefault(msg, 8, 0), + isjobs: jspb.Message.getFieldWithDefault(msg, 9, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.Witness} + */ +proto.protocol.Witness.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.Witness; + return proto.protocol.Witness.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.Witness} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.Witness} + */ +proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotecount(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubkey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalproduced(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalmissed(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestblocknum(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatestslotnum(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsjobs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.Witness.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.Witness.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.Witness} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.Witness.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getVotecount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); } f = message.getTotalproduced(); if (f !== 0) { @@ -5917,10 +6160,7 @@ proto.protocol.Transaction.Contract.ContractType = { EXCHANGEINJECTCONTRACT: 42, EXCHANGEWITHDRAWCONTRACT: 43, EXCHANGETRANSACTIONCONTRACT: 44, - ACCOUNTPERMISSIONUPDATECONTRACT: 45, - PERMISSIONADDKEYCONTRACT: 46, - PERMISSIONUPDATEKEYCONTRACT: 47, - PERMISSIONDELETEKEYCONTRACT: 48 + UPDATEENERGYLIMITCONTRACT: 45 }; /** @@ -6096,8 +6336,13 @@ proto.protocol.Transaction.Result.toObject = function(includeInstance, msg) { fee: jspb.Message.getFieldWithDefault(msg, 1, 0), ret: jspb.Message.getFieldWithDefault(msg, 2, 0), contractret: jspb.Message.getFieldWithDefault(msg, 3, 0), + assetissueid: jspb.Message.getFieldWithDefault(msg, 14, ""), withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), - unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0) + unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0), + exchangeReceivedAmount: jspb.Message.getFieldWithDefault(msg, 18, 0), + exchangeInjectAnotherAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), + exchangeWithdrawAnotherAmount: jspb.Message.getFieldWithDefault(msg, 20, 0), + exchangeId: jspb.Message.getFieldWithDefault(msg, 21, 0) }; if (includeInstance) { @@ -6146,6 +6391,10 @@ proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, re var value = /** @type {!proto.protocol.Transaction.Result.contractResult} */ (reader.readEnum()); msg.setContractret(value); break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setAssetissueid(value); + break; case 15: var value = /** @type {number} */ (reader.readInt64()); msg.setWithdrawAmount(value); @@ -6154,6 +6403,22 @@ proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, re var value = /** @type {number} */ (reader.readInt64()); msg.setUnfreezeAmount(value); break; + case 18: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeReceivedAmount(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeInjectAnotherAmount(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeWithdrawAnotherAmount(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeId(value); + break; default: reader.skipField(); break; @@ -6204,6 +6469,13 @@ proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, wr f ); } + f = message.getAssetissueid(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } f = message.getWithdrawAmount(); if (f !== 0) { writer.writeInt64( @@ -6218,26 +6490,54 @@ proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, wr f ); } -}; - - -/** - * @enum {number} - */ -proto.protocol.Transaction.Result.code = { - SUCESS: 0, - FAILED: 1 -}; - -/** - * @enum {number} - */ -proto.protocol.Transaction.Result.contractResult = { - DEFAULT: 0, - SUCCESS: 1, - REVERT: 2, - BAD_JUMP_DESTINATION: 3, - OUT_OF_MEMORY: 4, + f = message.getExchangeReceivedAmount(); + if (f !== 0) { + writer.writeInt64( + 18, + f + ); + } + f = message.getExchangeInjectAnotherAmount(); + if (f !== 0) { + writer.writeInt64( + 19, + f + ); + } + f = message.getExchangeWithdrawAnotherAmount(); + if (f !== 0) { + writer.writeInt64( + 20, + f + ); + } + f = message.getExchangeId(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.protocol.Transaction.Result.code = { + SUCESS: 0, + FAILED: 1 +}; + +/** + * @enum {number} + */ +proto.protocol.Transaction.Result.contractResult = { + DEFAULT: 0, + SUCCESS: 1, + REVERT: 2, + BAD_JUMP_DESTINATION: 3, + OUT_OF_MEMORY: 4, PRECOMPILED_CONTRACT: 5, STACK_TOO_SMALL: 6, STACK_TOO_LARGE: 7, @@ -6294,6 +6594,21 @@ proto.protocol.Transaction.Result.prototype.setContractret = function(value) { }; +/** + * optional string assetIssueID = 14; + * @return {string} + */ +proto.protocol.Transaction.Result.prototype.getAssetissueid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** @param {string} value */ +proto.protocol.Transaction.Result.prototype.setAssetissueid = function(value) { + jspb.Message.setField(this, 14, value); +}; + + /** * optional int64 withdraw_amount = 15; * @return {number} @@ -6324,6 +6639,66 @@ proto.protocol.Transaction.Result.prototype.setUnfreezeAmount = function(value) }; +/** + * optional int64 exchange_received_amount = 18; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getExchangeReceivedAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setExchangeReceivedAmount = function(value) { + jspb.Message.setField(this, 18, value); +}; + + +/** + * optional int64 exchange_inject_another_amount = 19; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getExchangeInjectAnotherAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setExchangeInjectAnotherAmount = function(value) { + jspb.Message.setField(this, 19, value); +}; + + +/** + * optional int64 exchange_withdraw_another_amount = 20; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount = function(value) { + jspb.Message.setField(this, 20, value); +}; + + +/** + * optional int64 exchange_id = 21; + * @return {number} + */ +proto.protocol.Transaction.Result.prototype.getExchangeId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.protocol.Transaction.Result.prototype.setExchangeId = function(value) { + jspb.Message.setField(this, 21, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -7029,10 +7404,15 @@ proto.protocol.TransactionInfo.toObject = function(includeInstance, msg) { proto.protocol.TransactionInfo.Log.toObject, includeInstance), result: jspb.Message.getFieldWithDefault(msg, 9, 0), resmessage: msg.getResmessage_asB64(), + assetissueid: jspb.Message.getFieldWithDefault(msg, 14, ""), withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0), internalTransactionsList: jspb.Message.toObjectList(msg.getInternalTransactionsList(), - proto.protocol.InternalTransaction.toObject, includeInstance) + proto.protocol.InternalTransaction.toObject, includeInstance), + exchangeReceivedAmount: jspb.Message.getFieldWithDefault(msg, 18, 0), + exchangeInjectAnotherAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), + exchangeWithdrawAnotherAmount: jspb.Message.getFieldWithDefault(msg, 20, 0), + exchangeId: jspb.Message.getFieldWithDefault(msg, 21, 0) }; if (includeInstance) { @@ -7111,6 +7491,10 @@ proto.protocol.TransactionInfo.deserializeBinaryFromReader = function(msg, reade var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setResmessage(value); break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setAssetissueid(value); + break; case 15: var value = /** @type {number} */ (reader.readInt64()); msg.setWithdrawAmount(value); @@ -7124,6 +7508,22 @@ proto.protocol.TransactionInfo.deserializeBinaryFromReader = function(msg, reade reader.readMessage(value,proto.protocol.InternalTransaction.deserializeBinaryFromReader); msg.addInternalTransactions(value); break; + case 18: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeReceivedAmount(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeInjectAnotherAmount(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeWithdrawAnotherAmount(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExchangeId(value); + break; default: reader.skipField(); break; @@ -7225,6 +7625,13 @@ proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, write f ); } + f = message.getAssetissueid(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } f = message.getWithdrawAmount(); if (f !== 0) { writer.writeInt64( @@ -7247,6 +7654,34 @@ proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, write proto.protocol.InternalTransaction.serializeBinaryToWriter ); } + f = message.getExchangeReceivedAmount(); + if (f !== 0) { + writer.writeInt64( + 18, + f + ); + } + f = message.getExchangeInjectAnotherAmount(); + if (f !== 0) { + writer.writeInt64( + 19, + f + ); + } + f = message.getExchangeWithdrawAnotherAmount(); + if (f !== 0) { + writer.writeInt64( + 20, + f + ); + } + f = message.getExchangeId(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } }; @@ -7838,6 +8273,21 @@ proto.protocol.TransactionInfo.prototype.setResmessage = function(value) { }; +/** + * optional string assetIssueID = 14; + * @return {string} + */ +proto.protocol.TransactionInfo.prototype.getAssetissueid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** @param {string} value */ +proto.protocol.TransactionInfo.prototype.setAssetissueid = function(value) { + jspb.Message.setField(this, 14, value); +}; + + /** * optional int64 withdraw_amount = 15; * @return {number} @@ -7899,6 +8349,66 @@ proto.protocol.TransactionInfo.prototype.clearInternalTransactionsList = functio }; +/** + * optional int64 exchange_received_amount = 18; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getExchangeReceivedAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setExchangeReceivedAmount = function(value) { + jspb.Message.setField(this, 18, value); +}; + + +/** + * optional int64 exchange_inject_another_amount = 19; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getExchangeInjectAnotherAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setExchangeInjectAnotherAmount = function(value) { + jspb.Message.setField(this, 19, value); +}; + + +/** + * optional int64 exchange_withdraw_another_amount = 20; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getExchangeWithdrawAnotherAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setExchangeWithdrawAnotherAmount = function(value) { + jspb.Message.setField(this, 20, value); +}; + + +/** + * optional int64 exchange_id = 21; + * @return {number} + */ +proto.protocol.TransactionInfo.prototype.getExchangeId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.protocol.TransactionInfo.prototype.setExchangeId = function(value) { + jspb.Message.setField(this, 21, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -11254,7 +11764,8 @@ proto.protocol.SmartContract.toObject = function(includeInstance, msg) { bytecode: msg.getBytecode_asB64(), callValue: jspb.Message.getFieldWithDefault(msg, 5, 0), consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 6, 0), - name: jspb.Message.getFieldWithDefault(msg, 7, "") + name: jspb.Message.getFieldWithDefault(msg, 7, ""), + originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -11320,6 +11831,10 @@ proto.protocol.SmartContract.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOriginEnergyLimit(value); + break; default: reader.skipField(); break; @@ -11399,6 +11914,13 @@ proto.protocol.SmartContract.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getOriginEnergyLimit(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } }; @@ -12364,6 +12886,21 @@ proto.protocol.SmartContract.prototype.setName = function(value) { }; +/** + * optional int64 origin_energy_limit = 8; + * @return {number} + */ +proto.protocol.SmartContract.prototype.getOriginEnergyLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.protocol.SmartContract.prototype.setOriginEnergyLimit = function(value) { + jspb.Message.setField(this, 8, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -12609,7 +13146,7 @@ proto.protocol.InternalTransaction.CallValueInfo.prototype.toObject = function(o proto.protocol.InternalTransaction.CallValueInfo.toObject = function(includeInstance, msg) { var f, obj = { callvalue: jspb.Message.getFieldWithDefault(msg, 1, 0), - tokenname: msg.getTokenname_asB64() + tokenid: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -12651,8 +13188,8 @@ proto.protocol.InternalTransaction.CallValueInfo.deserializeBinaryFromReader = f msg.setCallvalue(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTokenname(value); + var value = /** @type {string} */ (reader.readString()); + msg.setTokenid(value); break; default: reader.skipField(); @@ -12690,9 +13227,9 @@ proto.protocol.InternalTransaction.CallValueInfo.serializeBinaryToWriter = funct f ); } - f = message.getTokenname_asU8(); + f = message.getTokenid(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); @@ -12716,40 +13253,16 @@ proto.protocol.InternalTransaction.CallValueInfo.prototype.setCallvalue = functi /** - * optional bytes tokenName = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes tokenName = 2; - * This is a type-conversion wrapper around `getTokenname()` + * optional string tokenId = 2; * @return {string} */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTokenname())); -}; - - -/** - * optional bytes tokenName = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTokenname()` - * @return {!Uint8Array} - */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenname_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTokenname())); +proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {!(string|Uint8Array)} value */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.setTokenname = function(value) { +/** @param {string} value */ +proto.protocol.InternalTransaction.CallValueInfo.prototype.setTokenid = function(value) { jspb.Message.setField(this, 2, value); }; @@ -12958,6 +13471,309 @@ proto.protocol.InternalTransaction.prototype.setRejected = function(value) { }; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.protocol.DelegatedResourceAccountIndex = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.DelegatedResourceAccountIndex.repeatedFields_, null); +}; +goog.inherits(proto.protocol.DelegatedResourceAccountIndex, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.protocol.DelegatedResourceAccountIndex.displayName = 'proto.protocol.DelegatedResourceAccountIndex'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.protocol.DelegatedResourceAccountIndex.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.toObject = function(opt_includeInstance) { + return proto.protocol.DelegatedResourceAccountIndex.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.protocol.DelegatedResourceAccountIndex} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.DelegatedResourceAccountIndex.toObject = function(includeInstance, msg) { + var f, obj = { + account: msg.getAccount_asB64(), + fromaccountsList: msg.getFromaccountsList_asB64(), + toaccountsList: msg.getToaccountsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.protocol.DelegatedResourceAccountIndex} + */ +proto.protocol.DelegatedResourceAccountIndex.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.protocol.DelegatedResourceAccountIndex; + return proto.protocol.DelegatedResourceAccountIndex.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.protocol.DelegatedResourceAccountIndex} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.protocol.DelegatedResourceAccountIndex} + */ +proto.protocol.DelegatedResourceAccountIndex.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAccount(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addFromaccounts(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addToaccounts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.protocol.DelegatedResourceAccountIndex.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.protocol.DelegatedResourceAccountIndex} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.protocol.DelegatedResourceAccountIndex.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFromaccountsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getToaccountsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes account = 1; + * @return {!(string|Uint8Array)} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes account = 1; + * This is a type-conversion wrapper around `getAccount()` + * @return {string} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAccount())); +}; + + +/** + * optional bytes account = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAccount()` + * @return {!Uint8Array} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getAccount_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAccount())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.protocol.DelegatedResourceAccountIndex.prototype.setAccount = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * repeated bytes fromAccounts = 2; + * @return {!(Array|Array)} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes fromAccounts = 2; + * This is a type-conversion wrapper around `getFromaccountsList()` + * @return {!Array.} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getFromaccountsList())); +}; + + +/** + * repeated bytes fromAccounts = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFromaccountsList()` + * @return {!Array.} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getFromaccountsList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getFromaccountsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.DelegatedResourceAccountIndex.prototype.setFromaccountsList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.addFromaccounts = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +proto.protocol.DelegatedResourceAccountIndex.prototype.clearFromaccountsList = function() { + this.setFromaccountsList([]); +}; + + +/** + * repeated bytes toAccounts = 3; + * @return {!(Array|Array)} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes toAccounts = 3; + * This is a type-conversion wrapper around `getToaccountsList()` + * @return {!Array.} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getToaccountsList())); +}; + + +/** + * repeated bytes toAccounts = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToaccountsList()` + * @return {!Array.} + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.getToaccountsList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getToaccountsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.protocol.DelegatedResourceAccountIndex.prototype.setToaccountsList = function(value) { + jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.protocol.DelegatedResourceAccountIndex.prototype.addToaccounts = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +proto.protocol.DelegatedResourceAccountIndex.prototype.clearToaccountsList = function() { + this.setToaccountsList([]); +}; + + /** * @enum {number} */ diff --git a/src/utils/transactionBuilder.js b/src/utils/transactionBuilder.js index 81b622d..5f75dd1 100644 --- a/src/utils/transactionBuilder.js +++ b/src/utils/transactionBuilder.js @@ -188,13 +188,15 @@ function buildAssetIssue(options) { * @param duration Duration in days * @param resource bandwith or energy Bandwidth Point = 0,Energy = 1 */ -function buildFreezeBalance(address, amount, duration, resource) { +function buildFreezeBalance(address, amount, duration, resource, receiver_address) { let contract = new FreezeBalanceContract(); contract.setOwnerAddress(Uint8Array.from(decode58Check(address))); contract.setFrozenBalance(amount); contract.setFrozenDuration(duration); contract.setResource(resource); + if (receiver_address) + contract.setReceiverAddress(Uint8Array.from(decode58Check(receiver_address))); return buildTransferContract( contract, @@ -207,11 +209,13 @@ function buildFreezeBalance(address, amount, duration, resource) { * * @param address From which address to freeze */ -function buildUnfreezeBalance(address, resource) { +function buildUnfreezeBalance(address, resource, receiver_address) { let contract = new UnfreezeBalanceContract(); contract.setOwnerAddress(Uint8Array.from(decode58Check(address))); contract.setResource(resource); + if (receiver_address) + contract.setReceiverAddress(Uint8Array.from(decode58Check(receiver_address))); return buildTransferContract( contract, diff --git a/src/utils/tronWeb.js b/src/utils/tronWeb.js index 6e4acf7..94c8acb 100644 --- a/src/utils/tronWeb.js +++ b/src/utils/tronWeb.js @@ -143,6 +143,9 @@ export function contractJsonToProtobuf(contract) { contract.setResource(1); else contract.setResource(0); + + if (value.receiver_address) + contract.setReceiverAddress(fromHexString(value.receiver_address)); return buildTransferContract( contract, @@ -193,6 +196,9 @@ export function contractJsonToProtobuf(contract) { else contract.setResource(0); + if (value.receiver_address) + contract.setReceiverAddress(value.receiver_address); + return buildTransferContract( contract, Transaction.Contract.ContractType.UNFREEZEBALANCECONTRACT, From 29793778c2a7df24d83e9be8da2546f6d1a90de0 Mon Sep 17 00:00:00 2001 From: Fernando Sobreira Date: Sat, 16 Mar 2019 04:50:41 -0300 Subject: [PATCH 14/15] fix delegated unfreeze --- src/utils/tronWeb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/tronWeb.js b/src/utils/tronWeb.js index 94c8acb..dbec13d 100644 --- a/src/utils/tronWeb.js +++ b/src/utils/tronWeb.js @@ -197,7 +197,7 @@ export function contractJsonToProtobuf(contract) { contract.setResource(0); if (value.receiver_address) - contract.setReceiverAddress(value.receiver_address); + contract.setReceiverAddress(fromHexString(value.receiver_address)); return buildTransferContract( contract, From 480760de1c2d72f0a12263519b75b86f6b861074 Mon Sep 17 00:00:00 2001 From: Fernando Sobreira Date: Fri, 24 May 2019 17:03:52 -0300 Subject: [PATCH 15/15] account update --- src/utils/transactionBuilder.js | 1 + test/transactionBuilder.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/utils/transactionBuilder.js b/src/utils/transactionBuilder.js index 5f75dd1..05dfd28 100644 --- a/src/utils/transactionBuilder.js +++ b/src/utils/transactionBuilder.js @@ -2,6 +2,7 @@ const decode58Check = require("./crypto").decode58Check; const {Block, Transaction, Account} = require("../protocol/core/Tron_pb"); const google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); const encodeString = require("../lib/code").encodeString; +const stringToBytes = require("../lib/code").stringToBytes; const { TransferContract, diff --git a/test/transactionBuilder.js b/test/transactionBuilder.js index 5df3ef1..b99e092 100644 --- a/test/transactionBuilder.js +++ b/test/transactionBuilder.js @@ -1,6 +1,8 @@ const buildWithdrawBalance = require("../src/utils/transactionBuilder").buildWithdrawBalance; const buildUnfreezeBalance = require("../src/utils/transactionBuilder").buildUnfreezeBalance; const buildFreezeBalance = require("../src/utils/transactionBuilder").buildFreezeBalance; +const buildAccountUpdate = require("../src/utils/transactionBuilder").buildAccountUpdate; + const byteArray2hexStr = require("../src/utils/bytes").byteArray2hexStr; const buildVote = require("../src/utils/transactionBuilder").buildVote; const { assert } = require('chai'); @@ -30,4 +32,9 @@ describe('transactionBuilder', () => { console.log("hex", byteArray2hexStr(transaction.getRawData().serializeBinary())); }); + it('build updateAccount', async () => { + let transaction = buildAccountUpdate("TLrpNTBuCpGMrB9TyVwgEhNVRhtWEQPHh4", "AAAA"); + console.log("hex", byteArray2hexStr(transaction.getRawData().serializeBinary())); + }); + });